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

The PWL Voltage Source block represents a voltage source that you specify in lookup table form using a vector of time values and a vector of the corresponding voltage values. You must specify at least four time-current value pairs. The block generates a time-dependent voltage based on these time-voltage values using the selected interpolation and extrapolation methods. You have a choice of three interpolation methods and two extrapolation methods. The output voltage is independent of the current through 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 voltage values as a tabulated 1-by-n array. The voltage values vector must be the same size as the time values vector. The default value is [ 0 0 0 0 0 ] V.
Select the method the block uses determine the output voltage values at intermediate time points that are not specified in the preceding vectors:
Select the method the block uses determine the output voltage values at time points that are outside the time range specified in the preceding vectors:
Last point value — Use the last specified voltage value at the appropriate end of the range. That is, use the last specified voltage value for all time values greater than the last specified time argument, and the first specified voltage 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 voltage values at the appropriate end of the range. That is, use the first and second specified voltage values if the time value is below the specified range, and the two last specified voltage 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.
![]() | PWL Current Source | Servomotor | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |