SPICE Tutorial: PWL Voltage (1) Basic Function

SPICE “V” element with “PWL” option generates a Piece-wise Linear voltage signal.

The syntax of “PWL” is as follows.

Berkeley SPICE2, HSpice, PSpice, XSpice, LTspice
Vxxx n+ n- PWL [TDELAY = Value][TSCALE = Value][VSCALE = Value][TPERIOD = Value] ( <comer points> )

TD[ELAY]: Delay Time[s]
TS[CALE]: Time Scale Factor [s]
VS[CALE]: Voltage Scale Factor [V]
VOFF[SET]: Offset Voltage [V]
TP[ERIOD]: Time Period [s]
<comer points>: Pair Data of Time and Voltage

Each time and voltage are expressed as follows.

t = TDELAY + TPERIOD x (N-1) + t(i) x TSCALE
v = VOFFSET + v(i) x VSCALE

V1 N001 0 PWL (0 0 10ns 0 20ns 5 100ns 5 110ns 0)
V2 N002 0 PWL TDELAY = 100ns (0 0 10ns 0 20ns 5 100ns 5 110ns 0)
V3 N003 0 PWL VOFF = 100mV (0,0 10ns,0 20ns,5 100ns,5 110ns,0)

The symbol of LTspice’s “V” element with “PWL” option is “voltage” which is in “C:\Users\Username\Documents\LTspiceXVII\lib\sym” directory. If you want to set the parameters of that by GUI, click “Advanced” button on “Component” menu window and check “PWL(t1 v1 t2 v2…)” in “Functions” setting.

→ SPICE Information