User`s guide
Bias Point and DC Sweep B
-9
Behavioral Modelin
g
Expressions
Ran
g
e limits
Voltages and currents in PSpice are limited to the range +/-
1e10. Care must be taken that the output of expressions fall
within this range. This is especially important when one is
building an electrical analog of a mechanical, hydraulic or other
type of system.
Source limits
Another consideration is that the controlled sources
must turn off
when the supplies are almost 0 (.001%). There is special code in
PSpice which “squelches” the controlled sources in a continuous
way near 0 supplies. However, care should still be taken using
expressions that have denominators. Take, for example, a
constant power load:
GLOAD 3, 5 VALUE = {2Watts/V(3,5)}
The first repeating series starts with V(3,5) = 0 and the current
through GLOAD would be infinite (actually, the code in PSpice
which does the division clips the result to a finite value). The
“squelching” code is required to be a smooth and well-behaved
function.
Note
The “squelchin
g
” code cannot be “stron
g
” enou
g
h
to suppress dividin
g
by 0.
The result is that GLOAD does not turn off near 0 power
supplies. A better way is described in the application note
Modeling Constant Power Loads. The “squelching” code is
sufficient for turning off all expressions except those having
denominators. In general, though, it is good practice to constrain
expressions having the LIMIT function to keep results within
physically realistic bounds.