Robochameleon
v1.0
|
Generates train of pulses with different shapes. More...
Inherits unit.
Public Member Functions | |
function | PulseTrainGenerator_v1 (in param) |
Class constructor. More... | |
function | setParamT0DutyCycle (in obj, in inParam) |
Compute T0 from dutyCycle or viceversa. More... | |
function | genPulseShape (in obj, in pulseShape, in Nss) |
Generate the shaping pulse shape from the parameters and the shaping type. More... | |
function | traverse (in obj) |
Generate a pulse train with the give pulse shape. | |
![]() | |
virtual | traverse (in obj, in varargin) |
Main function call. | |
function | traverseNode (in obj) |
Set unique ID when creating a unit. More... | |
function | connectOutput (in obj, in uobj, in unitOutput, in nextUnitInput) |
Specify where signal should go next. More... | |
function | connectOutputs (in obj, in units, in destInputs) |
Specify where signal should go next. More... | |
function | writeInputBuffer (in obj, in sig, in inputId) |
write input buffer | |
function | horzcat (in varargin) |
horizontal concatenation | |
function | vertcat (in varargin) |
vertical concatenation | |
function | setparams (in obj, in params, in REQUIRED_PARAMS, in QUIET_PARAMS) |
set parameters More... | |
function | view (in obj) |
Show interactive GUI through unit_view-class. | |
Public Attributes | |
Property | nInputs |
Number of inputs. | |
Property | nOutputs |
Number of outputs. | |
Property | shape |
Pulse shape. | |
Property | Fs |
Samplig frequency. | |
Property | Rs |
Symbol rate. | |
Property | Nss |
Samples per symbol. | |
Property | wavelength |
Wavelength. | |
Property | data |
The data sequence to which the filter will be applied. | |
Property | nPulses |
Number of pulses. | |
Property | peakPower |
Peak power. | |
Property | avgPower |
Average power. | |
Property | dutyCycle |
Duty cycle of the pulse defined as FWHM/Ts. | |
Property | T0 |
HW @ 1/e intensity (E^2) | |
Property | filterSpanLength |
Length of shaping filter in number of symbol periods. | |
Property | riseTime |
Rise time for shaped rect pulses. | |
Property | rolloff |
Rolloff factor for raised cosine shaped rect pulses. | |
![]() | |
Property | inputBuffer |
Buffer for storing inputs as we traverse the graph. | |
Property | nextNodes |
Children nodes. | |
Property | destInputs |
Destination inputs in children. | |
Property | results |
For storing results. | |
Property | label |
Property | draw |
enable/disable plotting | |
Property | nInputs |
Number of signals traverse expects. | |
Property | nOutputs |
Number of outputs traverse expects. | |
Generates train of pulses with different shapes.
Supported pulse shapes:
Example
See run_TestPulseTrainGenerator_v1 to see some usage examples
Note filterSpanLength - In a symbol period we have the pulse and the tails of the adjacent pulses, so that the train is the result of the sum of all these things. If the pulse is broad compared to the symbol period the effect of the tails is significant, so we may need to use an higher number of filterSpanLength to correctly obtain the train
Definition at line 40 of file PulseTrainGenerator_v1.m.
function PulseTrainGenerator_v1::PulseTrainGenerator_v1 | ( | in | param | ) |
Class constructor.
Constructs an object of type ClassTemplate_v1 and more information.. Don't put example here, since we have it in the description..
param.shape | Shape of the filter. Possible values = {'rect', 'sech', 'gaussian', 'rect.gaussian', 'rect.rcos'} |
param.Fs | Sampling frequency (Only two among Fs, Rs and Nss are required) |
param.Rs | Symbol rate (Only two among Fs, Rs and Nss are required) |
param.Nss | Samples per symbol (Only two among Fs, Rs and Nss are required) |
wavelength | Wavelength [nm]. Default: 1550 |
param.data | The data sequence to which the filter will be applied. Example [1 1 0 -1] (Alternative to param.nPulses |
param.nPulses | The number of pulses. (Alternative to param.data). data will be set to a train of ones |
param.peakPower | The peak power of the largest of the pulses in the train. (Alternative to avgPower. Default: 1. |
param.avgPower | The average power of the train of pulses. If not specified the peakPower will be used |
param.rolloff | Rolloff of rcos and rrcos filters |
param.dutyCycle | Duty cycle of the pulse defined as FWHM/Ts |
param.T0 | HW @ 1/e intensity (E^2). Alternatived to power.dutyCycle |
param.filterSpanLength | Length of shaping filter in number of symbol periods. Default:2 |
param.risetime | Rise time for shaped rect pulses |
param.rolloff | Rolloff factor for raised cosine shaped rect pulses |
function PulseTrainGenerator_v1::genPulseShape | ( | in | obj, |
in | pulseShape, | ||
in | Nss | ||
) |
Generate the shaping pulse shape from the parameters and the shaping type.
pulseShape | The type of pulse shaping. Possible values: {'rect', sech', 'gaussian', rcos', rrcos'} |
pshape | Waveform of the desired pulse shape |
function PulseTrainGenerator_v1::setParamT0DutyCycle | ( | in | obj, |
in | inParam | ||
) |
Compute T0 from dutyCycle or viceversa.
inParam | Parameter structure containing either T0 or dutyCycle |
param | Parameter structure containing both T0 and dutyCycle (computed one from another) |