commsrc.pattern
Construct pattern generator object
Description
h = commsrc.pattern
constructs a pattern generator
object, h
.
The pattern generator object produces modulated data patterns. The object can be used to inject jitter into modulated signals.
h = commsrc.pattern(
creates a pattern generator object with the specified property Name
,Value
)Name
set to
the specified Value
. You can specify additional name-value pair arguments in
any order as
(Name1
,Value1
,...,NameN
,ValueN
).
Properties
A pattern generator object includes these properties. You can edit all properties, except those explicitly noted.
Property | Description |
---|---|
Type | Type of pattern generator object ('Pattern Generator' ).
This property is not writable. |
SamplingFrequency | Sampling frequency of the input signal in hertz. |
SymbolRate | The symbol rate of the input signal. This property depends
upon the SamplingFequency and SamplesPerSymbol properties.
This property is not writable. |
SamplesPerSymbol | The number of samples representing a symbol. |
PulseType | The type of pulse the object generates. Pulse types available: return-to-zero
( |
OutputLevels | Amplitude levels that correspond to the symbol indices. For an |
DutyCycle | The duty cycle of the pulse the object generates. Displays calculated duty cycle based on pulse parameters. This property is not writable. |
RiseTime | Specifies 10% to 90% rise time of the pulse in seconds. |
PulseDuration | Pulse duration in seconds defined by IEEE STD 181 standard. See the Return-to-Zero (RZ)
Signal Conversion: Ideal Pulse to STD–181 figure in the Object Functions. Applies
when |
FallTime | Fall time of the pulse in seconds, specified as a percentage from 10 to 90. |
DataPattern | The bit sequence the object uses, specified as |
UserDataPattern | User-defined bit pattern consisting of a vector of ones and zeroes. Applies when
|
Jitter | Jitter characteristics, specified as a |
Object Functions
A pattern generator object has five object functions, as described in this section.
generate
This object function outputs a frame worth of modulated and interpolated symbols. It has one input argument, which is the number of symbols in a frame. Its output is a column vector. You can call the object function using this syntax:
x = generate(h, N)
h
is the handle to the object, N
is the number of output
symbols, and x
is a column vector whose length is N
multiplied by h.SamplesPerSymbol
.reset
This object function resets the pattern generator to its default state. The property values do not reset unless they relate to the state of the object. This object function has no input arguments.
idealtostd181
This object function converts the ideal pulse specifications to IEEE STD-181 specifications.
The ideal 0% to 100% span rise time (tr
) and fall time
(tf
) are converted to 10% to 90% spans with a 50% pulse width duration
(pw
). Call the idealtostd181
object function using this
syntax:
h = idealtostd181(tr,tf,pw)
The object function sets the appropriate properties. The IEEE STD-181 Return-to-Zero (RZ) signal parameters are shown in this figure.
std181toideal
The std181toideal
object function converts the IEEE STD-181 pulse
specifications, stored in the pattern generator, to ideal pulse specifications. The function
converts the rise and fall times from 10% – 90% span to 0% – 100% span, and converts the 50%
pulse duration to pulse width. Call the std181toideal
object function using
this syntax:
[tr tf pw] = std181toideal(h)
h
is the pattern generator object handle, tr
is the ideal
0% – 100% rise time, tf
is the ideal 0% – 100% fall time, and
pw
is the ideal pulse width. The ideal pulse non-return-to-zero (NRZ) signal
parameters are shown in this figure.
Use the property values for IEEE STD-181 specifications.
computedcd
The computedcd
object function computes the duty cycle distortion,
DCD, of the pulse defined by the pattern generator object
h.
DCD represents the ratio of the pulse on duration to the pulse off
duration. For an NRZ pulse, on duration is the duration the pulse spends above the symbol
boundary level. Off duration is the duration the pulse spends below zero. Call the
computedcd
object function using this
syntax:
dcd = computedcd(h)
The software calculates DCD given tR, tF, Tsym. This formula assumes that the symbol boundary level is zero.
Th = (Ah-Al) * + (Ah-Al) * + PW+
Tl = (Ah-Al) * + (Ah-Al) * + PW-
DCD =
Where Th is the duration of the high signal, Tl is the duration of the low signal, and DCD represents the ratio of the duration of the high signal to the low signal.
Examples
References
[1] IEEE Standard for Transitions, Pulses, and Related Waveforms, STD-181-2011. Piscataway, NJ. 6 September 2011.
Version History
Introduced in R2008b