Piecewise linear waveform |
Any independent source can be assigned a time-dependent value for transient analysis. The PWL form describes a piecewise linear waveform. Each pair of time-value values specifies a corner of the waveform. The value of the source at times between corners is the linear interpolation of the values at the corners. The general form of piecewise linear waveform is:
PWL [TIME_SCALE_FACTOR = <value>] [VALUE_SCALE_FACTOR = <value>] ( corner points )* |
Corner points are:
(<tn>, <vn>) | To specify a point. Each pair of values (tn, vn) specifies that the value of the source is vn (in Volts or Amps) at time=tn. |
FILE <filename> | To read point values from a file,
filename specifies the text file that supplies the time-value
pairs. A typical file can be created by editing an existing PWL
specification, replacing all + signs with blanks (to avoid unintentional
+time). Only numbers (with units attached) can appear in the file;
expressions for tn and vn values are invalid. All
absolute time points in filename are with respect to the last (tn vn)
entered. All relative time points are with respect to the last time
point.
Note: The continuation + signs in the first column are unnecessary and therefore discouraged. |
REPEAT FOR <n> (corner_points)* ENDREPEAT |
To repeat n times. If n = 0, the data is ignored; n = -1 is interpreted as repeat forever. |
REPEAT FOREVER (corner_points)* ENDREPEAT |
To repeat forever. |
* Indicates that may be present several times.
If the filename contains spaces must be delimited by quotation marks. If filename do not specify a full path, the file is searched in the following order:
Can be included immediately after the PWL keyword to show that the time and/or value pairs are to be multiplied by the appropriate scale factor.
V1 1 2 PWL(0 -7 10NS -7 11NS -3 17NS -3 18NS -7 50NS -7)
V2 1 2 PWL REPEAT FOR 20 (0,0) (5n,0) (5n,5) (10n,5) (10n,0) ENDREPEAT
V3 1 2 PWL REPEAT FOREVER (0,0) (5n,0) (5n,5) (10n,5) (10n,0) ENDREPEAT
V4 1 2 PWL FILE PWLDATA.TXT
V5 1 2 PWL REPEAT FOR 10 FILE "PWL DATA.TXT" ENDREPEAT