SignalGenerator
This block creates signals. The signals are defined by specifying a time vector and a value matrix providing the values of the signals at specified times. Signal values at intermediate points are obtained by interpolation. Several interpolation methods are available. This block can also generate periodic signals.
Library
Activate/SignalGenerators
Description
The Signal Generator block create signals. The signals are defined by specifying a time vector and a value matrix providing the values of the signals at specified times. Signal values at intermediate points are obtained by interpolation. Several interpolation methods are available. This block can also generate periodic signals.
Signal value at intermediate points are obtained by interpolating the points. Several interpolation methods are available. This block can also generate the peridic signals.
The Signal Generator block can generate events at its event output port at every instant of the time instant vector. If higher order interpolation is chosen, events are generated only at first and final time instants.
If the block is activated by external activation and time stamp is also defined, the output are displayed at event activation times. The external activation may be turned off, if time instants are provided.
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
xx | Time instants | Abscissa (time) vector. A row vector of monotonic increasing values of size N. | Vector | |
yy | Output values | Ordinate (value) vector. A matrix of N columns. | Matrix | |
typ | Output datatype | Defines the datatype of the output. | String | 'double' |
outevent | Generate events at time instants | Defines if an output event must be added. At each discontinuity in the signal an event is generated. If higher order interpolation is used, only the first and final time instat are considered as discontinuous and only two events are generated. | Scalar | 0 |
firstder | First derivative output | If checked, an output port provides the first time derivative of the signal | Number | 0 |
secondder | Second derivative output | If checked, an output port provides the second time derivative of the signal | Number | 0 |
externalActivation | External activation | Specifies whether the block receives an external activation or inherits its activation through its regular input ports. When External Activation is selected, an additional activation port is added to the block. By default, external activation is not selected. | Number | 0 |
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
Method | Interpolation method | Interpolation method, to be selected among: ZeroOrder(floor), Linear, Not a Knot, Natural, Clamped To Zero, Akima, Fritsch Butland, Steffen. | String | 'ZeroOrder(floor)' |
Leftside | Behavior before the data time span | Set the signal values before the data start time using one of the following method: Zero, Hold (use first value), Extrapolation (use first values), Repeat (periodic). | String | 'Zero' |
Rightside | Behavior after the data time | Set the signal values after the data end time using one of the following method: Zero, Hold (use last value), Extrapolation (use last values), Repeat (periodic). | String | 'Zero' |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
s | explicit | output | 1 | |
Port 2 | explicit | output | firstder+firstder*secondder | |
Port 3 | activation | input | externalActivation | |
Port 4 | activation | output | outevent |
Advanced Properties
Name | Value | Description |
---|---|---|
always active | no | Time Dependency = standard mode activated |
direct-feedthrough | no | |
zero-crossing | no | |
mode | no | |
continuous-time state | no | |
discrete-time state | no |