SPICE-compatible input source waveforms.
VWSIM provides various types of waveform generators that are used during simulation to provide a simulation model with current, voltage, and phase sources.
VWSIM understands four waveform types: Piecewise Linear, Exponential, Sinusoidal, and Pulse. For each of these waveforms, their parameters and the equations generated from these parameters are described below.
parameter | description | units |
---|---|---|
t1 | initial time | seconds |
v1 | initial val | volts, amps, or phase |
... | ... | ... |
tn | nth time | seconds |
vn | value at tn | volts, amps, or phase |
Using the parameters above, a piecewise linear waveform can be described as
Each pair of values (ti, vi) specifies that the value of the source is vi at time = ti. The value of the source at intermediate values of time is determined by using linear interpolation on the input values. For times after the final time value, the value of the source is the final value.
parameter | description | default | units |
---|---|---|---|
v1 | initial value | volts, amps, or phase | |
v2 | pulsed value | volts, amps, or phase | |
td1 | rise delay time | 0.0 | seconds |
tau1 | rise time constant | tstep | seconds |
td2 | fall delay time | td1+tstep | seconds |
tau2 | fall time constant | tstep | seconds |
Using the parameters above, an exponential waveform can be described as
time | equation |
---|---|
0 | v1 |
td1 | v1+(v2-v1)(1-e^(-(time-td1)/tau1)) |
td2 | v1+(v2-v1)(1-e^(-(time-td1)/tau1))+(v1-v2)(1-e^(-(time-td2)/tau2)) |
parameter | description | default | units |
---|---|---|---|
vo | offset | volts, amps, or phase | |
va | amplitude | volts, amps, or phase | |
freq | frequency | 1/tstop | hz |
td | delay | 0.0 | seconds |
theta | damping factor | 0.0 | hz |
phi | phase delay | 0.0 | degrees |
Using the parameters above, a sinusoidal waveform can be described as
time | equation |
---|---|
0 to td | vo + va * sin((pi * phi/180)) |
td to tstop | vo + va * e^(-(time-td)* theta) * sin(2 pi * (freq * (time-td)) + pi * phi/360) |
parameter | description | default | units |
---|---|---|---|
v1 | initial value | volts, amps, or phase | |
v2 | pulsed value | volts, amps, or phase | |
td | time delay | 0.0 | seconds |
tr | rise time | tstep | seconds |
tf | fall time | tstep | seconds |
pw | pulse width | tstep | seconds |
per | period | tstep | seconds |
Using the parameters above, a pulse waveform for a single pulse with no period can be described as
time | equation |
---|---|
0 | v1 |
td | v1 |
td+tr | v2 |
td+tr+pw | v2 |
td+tr+pw+tf | v1 |
tstop | v1 |
If a period is specified, a train of pulses is generated. Each pulse in the train will start at td + (k*per) until tstop is reached.
Note: the minimum value for per is tr+tf+pw.