Anda di halaman 1dari 7

Chapter 6 Analog behavioral modeling

<A BM keyword>

specifies the form of the transfer function to be used, as one of:


VALUE TABLE LAPLACE FREQ table CHEBYSHEV arithmetic expression lookup table Laplace transform frequency response Chebyshev filter characteristics

<A BM function>

specifies the transfer function as a formula or lookup table as required by the specified <ABM keyword>

Refer to the online OrCA D PSpice A /D Reference Manual for detailed information.

Modeling mathematical or instantaneous relationships


The instantaneous models (using VALUE and TABLE extensions to PSpice A/D E and G devices in the part templates) enforce a direct response to the input at each moment in time. For example, the output might be equal to the square root of the input at every point in time. Such a device has no memory, or, a flat frequency response. These techniques can be used to model both linear and nonlinear responses.

Note

For AC analysis, a nonlinear device is first linearized around the bias point, and then the linear equivalent is used.

EVALUE and GVALUE parts


The EVALUE and GVALUE parts allow an instantaneous transfer function to be written as a mathematical expression in standard notation. These parts take the input signal, perform the function specified by the EXPR property on the signal, and output the result on the output pins. 222

PSpice A/D-equivalent parts

In controlled sources, EXPR may contain constants and parameters as well as voltages, currents, or time. Voltages may be either the voltage at a net, such as V(5), or the voltage across two nets, such as V(4,5). Currents must be the current through a voltage source (V device), for example, I(VSENSE). Voltage sources with a value of 0 are handy for sensing current for use in these expressions. Functions may be used in expressions, along with arithmetic operators (+, -, *, and /) and parentheses. Available built-in functions are summarized in Table 10 on page 3-111 . The EVALUE and GVALUE parts are defined, in part, by the following properties (default values are shown): EVALUE EXPR GVALUE EXPR V(%IN+, %IN-) Sources are controlled by expressions which may contain voltages, currents, or both. The following examples illustrate customized EVALUE and GVALUE parts. V(%IN+, %IN-)

Example 1
In the example of an EVALUE device shown in Figure 49, the output voltage is set to 5 volts times the square root of the voltage between pins %IN+ and %IN-. The property settings for this device are as follows:
EXPR = 5v * SQRT(V(%IN+,%IN-))

Figure 49 EVALUE part example.

Example 2
Consider the device in Figure 50. This device could be used as an oscillator for a PSK (Phase Shift Keyed) modulator. A current through a source is a sine wave with an amplitude of 15 mA and a frequency of 10 kHz. The voltage at the input pin can shift the phase by 1 radian/volt. Note the use of the TIME parameter in this Figure 50 GVALUE part example.

223

Chapter 6 Analog behavioral modeling

expression. This is the PSpice A/D internal sweep variable used in transient analyses. For any analysis other than transient, TIME = 0. The relevant property settings for this device are shown below:
EXPR = 15ma*SIN(6.28*10kHz*TIME+V(%IN+,%IN-))

EMULT, GMULT, ESUM, and GSUM


The EMULT and GMULT parts provide output which is based on the product of two input sources. The ESUM and GSUM parts provide output which is based on the sum of two input sources. The complete transfer function may also include other mathematical expressions.

Example 1
Consider the device in Figure 51. This device computes the instantaneous power by multiplying the voltage across pins %IN+ and %IN- by the current through VSENSE. This devices behavior is built-in to the PSPICETEMPLATE property as follows (appears on one line):
TEMPLATE=E^@REFDES %OUT+ %OUT- VALUE {V(%IN1+,%IN1-) *V(%IN2+,%IN2-)}

Figure 51 EMULT part example.

You can use the part editor to change the characteristics of the template to accommodate additional mathematical functions, or to change the nature of the transfer function itself. For example, you may want to create a voltage divider, rather than a multiplier. This is illustrated in the following example.

Example 2
Consider the device in Figure 52.

224