next up previous contents index
Next: Single-Frequency FM Up: Tran Functions Previous: Pulse   Contents   Index


Piecewise Linear

General Form:
pwl(t1 v1 [t2 v2 t3 v3 t4 v4 ...])
Example:
vclock 7 5 pwl(0 -7 10ns -7 11ns -3 17ns -3 18ns -7 50ns -7)

Each pair of values (ti, vi) specifies that the value of the source is vi (in volts or amps) 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 before the initial time value, the return is the initial value, and for times after the final time value, the return is the final value.

In dependent sources where the controlling input is specified, a pwl() construct if used in the expression for the source will take as input the value of the controlling input, and not time. This is one means by which a piecewise-linear transfer function can be implemented. A similar capability exists through the table() function.

Example:

e1 1 0 2 0 pwl(-1 1 0 0 1 1)

The example above implements a perfect rectifier (absolute value generator) for voltages between -1 and 1V. Outside this range, the output is clipped to 1V.


next up previous contents index
Next: Single-Frequency FM Up: Tran Functions Previous: Pulse   Contents   Index
Stephen R. Whiteley 2006-10-23