Source Statement Functions
PULSE Function
PULSE initialValue pulsedValue <delayTime <riseTime <fallTime <pulseWidth <period>>>>>
Note
At delayTime, the pulse will start at initialValue and change to pulsedValue within riseTime.
Consequently, a pulse without delay, rise and fall time PULSE 0 1 0 0 0 will output 0 in the very first simulation step and 1 in the next.
This differs from the PLECS pulse which starts in high-state.
Parameter |
Default |
Description |
|---|---|---|
|
required |
Initial value before pulse |
|
required |
Value during pulse |
|
0 |
Absolute time after which the pulse starts (not phase delay) |
|
0 |
Time for rising edge transition |
|
0 |
Time for falling edge transition |
|
\(\infty\) |
Duration of the pulse at pulsedValue |
|
\(\infty\) |
Period of the pulse waveform |
SIN/SINE Function
SIN<E> offset amplitude <frequency <delay <damping>>>
Parameter |
Default |
Description |
|---|---|---|
|
required |
DC offset |
|
required |
Amplitude of sine wave |
|
0 |
Frequency, in hertz \((\mathrm{Hz})\) |
|
0 |
Absolute time after which the sine starts (not phase delay) |
|
0 |
Damping factor |
Note
Our default frequency of 0 differs from most other SPICE versions where \(1/T_\text{stop}\) is used.
SFFM Function
SFFM offset amplitude <frequency <modulationIndex <signalFrequency>>>
Parameter |
Default |
Description |
|---|---|---|
|
required |
DC offset |
|
required |
Carrier amplitude |
|
0 |
Carrier frequency, in hertz \((\mathrm{Hz})\) |
|
0 |
Modulation index |
|
0 |
Signal frequency, in hertz \((\mathrm{Hz})\) |
Note
Our default frequency of 0 differs from most other SPICE versions where \(1/T_\text{stop}\) is used.
EXP Function
EXP initialValue pulsedValue <riseDelayTime <riseTimeConstant <fallDelayTime <fallTimeConstant>>>>
Parameter |
Default |
Description |
|---|---|---|
|
required |
Initial value |
|
required |
Pulsed value |
|
0 |
Delay before rising exponential starts |
|
0 |
Time constant for rising exponential |
|
0 |
Delay before falling exponential starts |
|
0 |
Time constant for falling exponential |
Note
Our defaults for riseTimeConstant, fallDelayTime, and fallTimeConstant differ from most SPICE versions where \(1/T_\text{step}\) is used.
PWL Function
PWL t1 v1 t2 v2 <t3 v3 <...>>
Piecewise linear interpolation with value v1 at time t1, v2 at time t2, etc.
Requirement |
Description |
|---|---|
Time ordering |
Times must be strictly increasing: \(t_1 < t_2 < t_3 < \ldots\) |
Minimum points |
At least one time-value pair required |