Chapter 13

Analog Behaviorial Models

Abstract

Analog behaviorial models (ABM) devices are extended versions of the traditional Spice Voltage Controlled sources, the E device which is a voltage controlled voltage source and the G device, a voltage controlled current source. They provide transfer functions, mathematical expressions, or look up tables to describe the behavior of an electronic device or circuit. ABM's can provide a systems approach to designing electronic circuits. The electronic system is represented by a block diagram with each block represented by an ABM device which will reduce the total simulation time. If the system meets the required specifications, then each block can be successively replaced by its final electronic circuit. Alternatively, working electronic circuits can be replaced by an equivalent ABM block.

Keywords

Simulation time; Filter; ABM; Current; Delay functions; Comparators; Voltage sources

Analog behaviorial models (ABM) devices are extended versions of the traditional Spice Voltage Controlled sources, the E device which is a voltage controlled voltage source (VCVS) and the G device, a Voltage Controlled Current Source (VCCS). They provide transfer functions, mathematical expressions, or look up tables to describe the behavior of an electronic device or circuit. ABM's can provide a systems approach to designing electronic circuits. The electronic system is represented by a block diagram with each block represented by an ABM device which will reduce the total simulation time. If the system meets the required specifications, then each block can be successively replaced by its final electronic circuit. Alternatively, working electronic circuits can be replaced by an equivalent ABM block.

There are two types of ABM devices, PSpice equivalent parts which have a differential input and double-ended output and control system parts which have a single input and output pin. The standard E, F, G, and H devices can be found in the analog library, whereas the ABM devices can be found in the ABM library.

13.1 ABM Devices

The extended sources provide five additional functions which are defined as:

ValueMathematical expression
TableLook up table
FreqFrequency response
ChebyshevFilter characteristics
LaplaceLaplace transform

Fig. 13.1 shows a typical use of an ABM EValue device to implement a voltage doubler. The ABM has a differential input (IN +, IN −) and a double-ended output (OUT +, OUT −). When you first place the ABM, the default expression is given by

Fig. 13.1
Fig. 13.1 Voltage amplitude doubler.

V(%IN +, %IN −)

which calculates the difference between the voltages on the input pins IN + and IN −. In order to multiply by a factor of 2, the expression is first enclosed in curly brackets (braces).

2⁎{V(%IN +, %IN −)}

Fig. 13.2 shows the output voltage when a 1 V sinewave is applied to the input pins.

Fig. 13.2
Fig. 13.2 Input and output waveforms for the voltage doubler.

Other mathematical functions that can be applied to ABM expressions are shown in Table 13.1.

Table 13.1

Mathematical functions

FunctionExpression
ABSAbsolute value
SQRTSquare root √ x
PWR| x |exp
PWRSxexp
LOGLog base e ln(x)
LOG10Log base 10 log10(x)
EXPex
SINsin
COScos
TANtan
ATANtan− 1
ARCTANtan− 1

Conditional statements can also be applied to ABM parts. For example, in Fig. 13.3, if the input voltage is greater than 4 V, then output 0 V else output 5 V. This effectively is a comparator. The resulting waveform is shown in Fig. 13.4.

Fig. 13.3
Fig. 13.3 ABM comparator.
Fig. 13.4
Fig. 13.4 ABM comparator results.

The first-order 159 Hz low pass filter in Fig. 13.5 can be defined by the transfer function:

Fig. 13.5
Fig. 13.5 Low pass filter.

VoutVin=11+jωωc

si1_e  (13.1)

where the cut off frequency is given by

ωc=1CR=2πf

si2_e  (13.2)

f=12πCR=12π×106×103=159Hz

si3_e

Fig. 13.6 shows the frequency response of the filter.

Fig. 13.6
Fig. 13.6 Low pass filter frequency response.

Laplace ABM's can be used to implement filter circuits where the transfer function is transformed to the s domain where s =  and ω = 2πf so the transfer function for the low pass filter is defined in the s domain by

VoutVin=11+

si4_e  (13.3)

where

τ=CR=106×103

si5_e

τ=103or0.001s

si6_e

The filter circuit is redrawn in Fig. 13.7 with the transfer function given as:

Fig. 13.7
Fig. 13.7 Laplace low pass filter.

VoutVin=11+0.001s

si7_e  (13.4)

Note

When you enter the coefficient for s, make sure you enter the multiplier, i.e., 1 + 0.001⁎s and not 1 + 0.001s.

Fig. 13.8 shows the low pass frequency response for the filter.

Fig. 13.8
Fig. 13.8 Low frequency response for the Laplace filter.

In the circuit of Fig. 13.9, both inputs are grounded but the ABM expression is referencing a net name called “source.” This is useful to reduce the wiring complexity of a circuit especially if there are multiple ABM's being driven by a single source. Note that since a GValue ABM part is being used, the output is a current and therefore cannot be left unconnected. Hence the output resistor provides a DC path to 0 V.

Fig. 13.9
Fig. 13.9 Referencing the source node in the circuit.

In version 17.2, two new behavioral delay functions have been introduced, DelayT() and DelayT1(). Both these functions have improved simulation times and more efficient handling of convergence issues compared to the standard delay functions such as TLINE. DelayT() requires two parameters, delay time and max delay, whereas DelayT1() only requires the delay value and also inverts the input signal. The delay functions are shown in Fig. 13.10 and can be found in the function.olb library in the advanced analysis folder.

Fig. 13.10
Fig. 13.10 Delay parts: (A) DelayT() and (B) DelayT1().

In later software versions you can search for the delay functions using:

Place > PSpice Component > Search

Then under Categories, select Analog Behavioral Models > General Purpose as shown in Fig. 13.11.

Fig. 13.11
Fig. 13.11 PSpice component search for Delay functions.

13.2 Exercises

Exercise 1

In Fig. 13.12, an EFreq ABM part is being used to model a bandpass filter using a table of parameters defining frequency, magnitude, and phase.

Fig. 13.12
Fig. 13.12 Using a frequency table.

1. Draw the circuit in Fig. 3.12 using an EFreq part from the ABM library. The VAC source (V1) is from the source library.

2. Double click on EFreq to open the Property Editor and scroll to the Table property and enter:

(0.1,−40,170)(1 k,−40,160)(2 k,−20,140)(3 k,−0,100)(6 k,−0,−100)(10 k,−20,−140)(20 k,−40,−160)(30 k,−40,−170).

3. Set up a simulation profile for an AC Sweep from 1 to 100 kHz. Place a VdB voltage marker. PSpice > Markers > Advanced > dB Magnitude of Voltage.

4. Run the simulation. You should see the bandpass response as shown in Fig. 13.13.

Fig. 13.13
Fig. 13.13 Bandpass filter response using a Freq ABM.

Exercise 2

Use a GValue ABM to model to reference a net name and output a current.

1. Draw the ABM rectifier as shown in Fig. 13.14. The net name source is referenced inside the ABM expression brackets.

Fig. 13.14
Fig. 13.14 Behavioral implementation of a rectifier.

2. Set up a simulation profile for a transient sweep with a run to time of 4 ms.

3. Run the simulation.

4. Investigate the use of the EFREQ ABM device in modeling the 1500 Hz bandpass filter in Chapter 10.

Exercise 3

1. Draw the circuit in Fig. 13.15 using the Delay part. Either, Place > PSpice Component > Search > Analog Behavioral Models > General Purpose (23Parts) and select Delay or alternatively, use Place > Part and Add Library > advanls > function and select the Delay part.

Fig. 13.15
Fig. 13.15 Delay circuit diagram.

2. Click on DELAY =? and add a delay value of 2 ms.

3. Place a 100 Hz, 1 V sinusoidal source from the source library. For later software versions, press shift-R to open the Independent Sources window as shown in Fig. 13.16.

Fig. 13.16
Fig. 13.16 Placing a sinusoidal source.

4. Name the output signals as out1 and out2 and add voltage probes as shown and set up a transient analysis for a Run-To Time of 20 ms.

5. Run the simulation. Note that out2 has been delayed by 2 ms, see Fig. 13.17.

Fig. 13.17
Fig. 13.17 Delayed output of Out2 by 2 ms.

6. Replace the Delay part with a DelayT1 part and add a delay of 2 ms.

7. Run the simulation. Note that out2 has been inverted and delayed by 2 ms, see Fig. 13.18.

Fig. 13.18
Fig. 13.18 Inverted and delayed output of Out2 by 2 ms.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.69.255