Robochameleon  v1.0
Public Member Functions | Public Attributes | List of all members
PulseTrainGenerator_v1 Class Reference

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.
 
- Public Member Functions inherited from unit
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.
 
- Public Attributes inherited from unit
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.
 

Detailed Description

Generates train of pulses with different shapes.

Supported pulse shapes:

Example

param.ptg.avgPower = 0;
param.ptg.nPulses = 3;
param.ptg.Rs = 10e9;
param.ptg.Fs = 160e9;
param.ptg.wavelength = 1550.3;
param.ptg.shape = 'gaussian'; % gaussian rect nyquist
param.ptg.T0 = 1/param.ptg.Rs*0.2;
ptg = PulseTrainGenerator_v1(param.ptg);
sig = ptg.traverse();

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

Author
Simone Gaiarin
Version
1

Definition at line 40 of file PulseTrainGenerator_v1.m.

Constructor & Destructor Documentation

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..

Parameters
param.shapeShape of the filter. Possible values = {'rect', 'sech', 'gaussian', 'rect.gaussian', 'rect.rcos'}
param.FsSampling frequency (Only two among Fs, Rs and Nss are required)
param.RsSymbol rate (Only two among Fs, Rs and Nss are required)
param.NssSamples per symbol (Only two among Fs, Rs and Nss are required)
wavelengthWavelength [nm]. Default: 1550
param.dataThe data sequence to which the filter will be applied. Example [1 1 0 -1] (Alternative to param.nPulses
param.nPulsesThe number of pulses. (Alternative to param.data). data will be set to a train of ones
param.peakPowerThe peak power of the largest of the pulses in the train. (Alternative to avgPower. Default: 1.
param.avgPowerThe average power of the train of pulses. If not specified the peakPower will be used
param.rolloffRolloff of rcos and rrcos filters
param.dutyCycleDuty cycle of the pulse defined as FWHM/Ts
param.T0HW @ 1/e intensity (E^2). Alternatived to power.dutyCycle
param.filterSpanLengthLength of shaping filter in number of symbol periods. Default:2
param.risetimeRise time for shaped rect pulses
param.rolloffRolloff factor for raised cosine shaped rect pulses

Member Function Documentation

function PulseTrainGenerator_v1::genPulseShape ( in  obj,
in  pulseShape,
in  Nss 
)

Generate the shaping pulse shape from the parameters and the shaping type.

Parameters
pulseShapeThe type of pulse shaping. Possible values: {'rect', sech', 'gaussian', rcos', rrcos'}
Return values
pshapeWaveform of the desired pulse shape
function PulseTrainGenerator_v1::setParamT0DutyCycle ( in  obj,
in  inParam 
)

Compute T0 from dutyCycle or viceversa.

Parameters
inParamParameter structure containing either T0 or dutyCycle
Return values
paramParameter structure containing both T0 and dutyCycle (computed one from another)

The documentation for this class was generated from the following file: