Generate a pseudo-noise (PN) sequence
The PNSequence object generates a sequence of pseudorandom binary
numbers using a linear-feedback shift register (LFSR). This object implements LFSR using a
simple shift register generator (SSRG, or Fibonacci) configuration. Pseudo-noise sequences are
typically used for pseudorandom scrambling and in direct-sequence spread-spectrum
systems.
To generate a PN sequence:
Create the comm.PNSequence object and set its properties.
Call the object with arguments, as if it were a function.
To learn more about how System objects work, see What Are System Objects?.
creates a
pseudo-noise (PN) sequence generator System object™. This object generates a sequence of pseudorandom binary numbers using a
linear-feedback shift register (LFSR).pnSequence = comm.PNSequence
sets properties using one or more name-value pairs. Enclose each property name in
quotes.pnSequence = comm.PNSequence(Name,Value)
outputs a frame
of the PN sequence. Specify the frame length with the outSequence = pnSequence()SamplesPerFrame
property. The PN sequence has a period of N = 2n –
1, where n is the degree of the generator polynomial
that you specify in the Polynomial property.
You can combine optional input arguments when you set their enabling properties. Optional inputs must be listed in the same order as the order of the enabling properties.
provides
an additional input with values specifying the initial conditions of the linear-feedback
shift register.outSequence = pnSequence(initCond)
This syntax applies when you set the InitialConditionsSource
property of the object to 'Input port'.
provides
an additional input specifying the mask vector that determines how the PN sequence is
shifted from its starting point.outSequence = pnSequence(maskVec)
This syntax applies when you set the MaskSource property of the
object to 'Input port'.
provides an additional input specifying the output size of the PN sequence.outSequence = pnSequence(outputSize)
This syntax applies when you set the VariableSizeOutput property
of the object to true.
provides an
additional input indicating whether to reset the PN sequence generator.outSequence = pnSequence(reset)
This syntax applies when you set InitialConditionsSource to
'Property' and ResetInputPort to
true.
outSequence = pnSequence(initCond,maskVec,outputSize)
outSequence = pnSequence(maskVec,outputSize,reset)
Using these syntaxes, you can combine optional input arguments when you set their enabling properties. Optional inputs must be listed in the same order as the order of the enabling properties.
To use an object function, specify the
System object as the first input argument. For
example, to release system resources of a System object named obj, use
this syntax:
release(obj)
[1] Proakis, John G. Digital Communications. 3rd ed. New York: McGraw Hill, 1995.
[2] Lee, J. S., and L. E. Miller. CDMA Systems Engineering Handbook. Boston and London. Artech House, 1998.
[3] Golomb, S.W. Shift Register Sequences. Laguna Hills. Aegean Park Press, 1967.