Rectangular Waveform
Rectangular pulse generator.
Description
The Rectangular Waveform unit generates a pulse signal with a specified pulse width and pulse repetition frequency (PRF). The output of the block is an integer number of pulses or a sequence of samples.
Ports
Input
FreqOffset - frequency offset
scalar
Frequency offset specified as a scalar.
*Example: 2e3
Dependencies
To use this port, set the Source of Frequency Offset parameters to Input port
.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
, Bool
.
Output
Y - pulse signal
`complex vector
A signal at the block output specified as a complex vector.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
, Bool
.
PRF - pulse repetition frequency
positive scalar
Pulse repetition rate specified as a positive scalar value.
Dependencies
To use this port, set the Output signal format parameter to Pulses
and then select the checkbox for the Enable PRF output parameter.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
, Bool
.
Coeff - coefficients of the matched filter
vector
| matrix
Coefficients of the matched filter given as a vector or matrix.
Dependencies
To use this port, select the Enable Matched Filter Coefficients Output checkbox.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
, Bool
.
Parameters
Sample rate (Hz) - sampling rate
1e6 (by default)
| positive scalar
The sampling frequency of the signal as a positive scalar. The unit of measurement is Hz.
The ratio of Sample rate (Hz) to the Pulse repetition frequency must be an integer.
This restriction is equivalent to requiring that the pulse repetition interval (PRI) be an integer multiple of the sampling step :
Block parameters |
|
Values |
|
By default |
|
Method to specify pulse duration - pulse duration as time or fill factor (duty cycle)
Pulse width (By default)
| Duty cycle
Method to specify pulse duration as Pulse width
or Duty cycle
:
-
Pulse width
- the pulse width is set using the Pulse width (s) parameters. -
Duty cycle
- the pulse width is calculated from the Pulse repetition frequency (Hz) and Duty Cycle parameters.
Block Parameters |
|
Values |
|
By default |
|
Pulse width (s) - pulse width
50e-6 s (by default)
| positive scalar
Pulse width , specified as a positive scalar value.
The product of Pulse width (s) and Pulse repetition frequency (Hz) must be less than or equal to one:
This constraint ensures that the pulse width is less than the pulse repetition period.
*Example: 300e-6
Dependencies
To use this parameter, set the Method to specify pulse duration parameters to Pulse width
.
Block parameters |
|
Values |
|
By default |
|
Duty cycle - fill factor (duty cycle)
0.5 (by default)
| scalar in the range [0,1]
Fill factor set as a scalar in the range [0,1].
*Example: 0.7
Dependencies
To use this parameter, set the Method to specify pulse duration parameters to Duty cycle
.
Block parameters |
|
Values |
|
* By default* |
|
Pulse repetition frequency (Hz) - pulse repetition frequency
1e4 Hz (By default)
| positive scalar
Pulse repetition frequency (PRF) specified as a scalar or string vector. The pulse repetition interval (PRI) is the inverse of the pulse repetition frequency (PRF).
The Pulse repetition frequency (Hz) must meet the following constraints:
-
The product of Pulse width (s) and Pulse repetition frequency (Hz) must be less than or equal to one:
This constraint ensures that the pulse width is less than the pulse repetition period. For a phase encoded signal, the pulse width is equal to the product of the duration of one chip by the number of chips.
The ratio of Sample rate (Hz) to Pulse repetition frequency (Hz) must be an integer:
This restriction is equivalent to requiring that the number of samples in a pulse repetition period be an integer.
Block parameters |
|
Values |
|
By default |
|
Source of Frequency Offset - frequency offset setting
Property (By default)
| Input port
Frequency offset set as Property
or Input port
:
-
If
Property
is set, the offset is determined by the value of the Frequency Offset parameters. -
If
Input port
is set, the offset is determined by the port value FreqOffset.
Block parameters |
|
Values |
|
By default |
|
*Frequency Offset (Hz)
- frequency offset
0 (By default)
| scalar
Frequency offset set as a scalar.
*Example: 2e3
Dependencies
To use this parameter, set the Source of Frequency Offset parameter to Property
.
Block parameters |
|
Values |
|
By default |
|
Output signal format - output signal format
Pulses (by default)
| Samples
Output signal format as Pulses
or Samples
:
-
If you set this parameter to
Pulses
, the block output consists of a number of pulses. The number of pulses is the value of the Number of pulses in output parameter. -
If you set this parameter to
Samples
, the block output consists of multiple samples. The number of samples is the value of the Number of samples in output parameter.
Block parameters |
|
Values |
|
By default |
|
Number of samples in output - number of samples of the output signal
100 (By default)
| positive number
The number of samples of the output signal specified as a positive integer.
*Example: 1000
Dependencies
To use this parameter, set the Output signal format parameters to Samples
.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
.
Block parameters |
|
Values |
|
By default |
|
Number of pulses in output - number of pulses of the output signal
1 (By default)
| positive number
The number of pulses of the output signal set as a positive integer.
Dependencies
To use this parameter, set the Output signal format parameters to Pulses
.
Data types: Float16
, Float32
, Float64
, Int8
, Int16
, Int32
, Int64
, UInt8
, UInt16
, UInt32
, UInt64
.
Block parameters |
|
Values |
|
By default |
|
Enable PRF Output - enable PRF output
off (by default)
| on
Select the checkbox to enable the PRF output port.
Dependencies
To use this parameter, set the Output signal format parameters to Pulses
.
Block parameters |
|
Values |
|
* By default* |
|
Enable Matched Filter Coefficients Output - enable output of matched filter coefficients
disabled (by default)
| enabled
Tick the checkbox to enable the Coeff output port.
Block parameter |
|
Values |
|
By default |
|