Lab 02 To Generate Random Bits and Random Noise Signals in Simulink
Lab 02 To Generate Random Bits and Random Noise Signals in Simulink
Lab 02
• Random bits
• Random integers
• Pseudorandom integers
• Random real numbers
A seconds/frame = (B seconds/sample)*
(S samples/frame)
where:
• A is the number shown in the Probe block after
the Tf notation.
• B is the random source block’s Sample time
parameter.
• S is the random source block’s Samples per frame
parameter.
Prepared by Engr Ali M Durrani
8
(CECOS University) [email protected]
Seed Parameter for Random Sources
• Each of the random source blocks requires you to set a seed in the
block mask.
• This is the initial seed that the random number generator uses
when forming its sequence of numbers.
• If you choose a constant seed, then the block produces the same
noise sequence each time you start the simulation.
• If you want the noise to be different each time you start the
simulation, then you can use a varying seed such as cputime.
Prepared by Engr Ali M Durrani
9
(CECOS University) [email protected]
Signal Attribute Parameters for
Random Sources
• In most random source blocks, the output can
be a frame-based matrix, a sample-based row
or column vector, or a sample-based one-
dimensional array
• From the library's File menu, select New and then select
Model.
Prepared by Engr Ali M Durrani
14
(CECOS University) [email protected]
• Rayleigh Noise Generator
• In the case of the Rayleigh Noise Generator block, the first two
block parameters (Sigma and Initial seed) determine the number of
channels in the output
• Also, the shape (row or column) of the Initial seed and Probability
of a zero parameters becomes the shape of a sample-based two-
dimensional output signal.