| SimElectronics™ | ![]() |
SPICE-Compatible Sources

The PWL Current Source block represents a current source that you specify in lookup table form using a vector of time values and a vector of the corresponding current values. You must specify at least four time-current value pairs. The block generates a time-dependent current based on these time-current values using the selected interpolation and extrapolation methods. You have a choice of three interpolation methods and two extrapolation methods. The output current is independent of the voltage across the terminals of the source.

The vector of time values as a tabulated 1-by-n array. The time values vector must be strictly monotonically increasing. The values can be non-uniformly spaced. The default value is [ 0 1 2 3 4 ] s.
The vector of current values as a tabulated 1-by-n array. The current values vector must be the same size as the time values vector. The default value is [ 0 0 0 0 0 ] A.
Select the method the block uses determine the output current values at intermediate time points that are not specified in the preceding vectors:
Select the method the block uses determine the output current values at time points that are outside the time range specified in the preceding vectors:
Last point value — Use the last specified current value at the appropriate end of the range. That is, use the last specified current value for all time values greater than the last specified time argument, and the first specified current value for all time values less than the first specified time argument. This is the default method.
Last 2 points — Extrapolate using the linear method (regardless of the interpolation method specified), based on the last two current values at the appropriate end of the range. That is, use the first and second specified current values if the time value is below the specified range, and the two last specified current values if the time value is above the specified range.
The block has the following ports:
Positive electrical voltage.
Negative electrical voltage.
[1] D. Kahaner, Cleve Moler, and Stephen Nash Numerical Methods and Software Prentice Hall, 1988.
[2] W.H. Press, B.P. Flannery, S.A. Teulkolsky, and W.T. Wetterling Numerical Recipes in C: The Art of Scientific Computing Cambridge University Press, 1992.
![]() | PVCVS | PWL Voltage Source | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |