Communications Blockset | ![]() ![]() |
Library
Description
The PN Sequence Generator block generates a sequence of pseudorandom binary numbers. A pseudonoise sequence can be used in a pseudorandom scrambler and descrambler. It can also be used in a direct-sequence spread-spectrum system.
Below is a schematic of the pseudorandom sequence generator. All adders perform addition modulo 2.
All M registers in the generator update their values at each time step. The state of each switch is defined by the generator polynomial, which is a polynomial in z-1 having binary coefficients. The constant term of the generator polynomial must be 1. You can specify the Generator polynomial parameter using either of these formats:
For example, p = [1 0 0 0 0 0 1 0 1] and p = [0 -6 -8] represent the same polynomial p(z) = 1 + z-6 + z-8.
It is very important that the Initial states parameter have a suitable value. The initial state of at least one of the registers must be nonzero in order to generate a nonzero sequence. The length of the Initial states vector must equal the order of the generator polynomial, and its elements must be binary numbers. If the Generator polynomial parameter is a vector that lists the coefficients in order, then the order of the generator polynomial is one less than the vector length.
Attributes of Output Signal
If the Frame-based outputs box is checked, then the output signal is a frame-based column vector whose length is the Samples per frame parameter. Otherwise, the output signal is a one-dimensional scalar.
Dialog Box
See Also
![]() | PM Modulator Passband | Poisson Int Generator | ![]() |