Chapter 4

AC Analysis

Abstract

The AC analysis is used to calculate the frequency and phase response of a circuit by frequency sweeping an AC source connected to the circuit. The AC sweep analysis is a linear analysis and calculates what is known as the small signal response of a circuit over a range of frequencies by replacing any nonlinear circuit device models with linear models. The DC bias point analysis is run prior to the AC analysis, and is used to effectively linearize the circuit around the DC bias point. The AC analysis does not take into account effects such as clipping. Users will have to run a transient analysis to determine these effects. To perform an AC analysis, the independent voltage source VAC or current source IAC from the source library is used. Any independent voltage source which has an AC property attached to the part can be used as an input to the circuit. By default, the magnitude of the VAC source is 1 V. In calculating the frequency response of a circuit, users are normally looking to calculate the gain and phase response of the circuit. One example in which an AC analysis is used to determine the frequency response of a circuit is the notch filter, which attenuates a narrow band of unwanted frequencies. To set up an AC analysis, a PSpice simulation profile needs to be created. AC markers can be used to display dB magnitude, phase, group delay, and the real and imaginary parts of voltage and current.

Keywords

Frequency sweep; Circuit; Simulation; AC source

The AC analysis is used to calculate the frequency and phase response of a circuit by frequency sweeping an AC source connected to the circuit. The AC sweep analysis is a linear analysis and calculates what is known as the small signal response of a circuit over a range of frequencies by replacing any nonlinear circuit device models with linear models. The DC bias point analysis is run prior to the AC analysis and is used to effectively linearize the circuit around the DC bias point. It must be noted that the AC analysis does not take into account effects such as clipping. You will have to run a transient analysis to determine these effects.

To perform an AC analysis, the independent voltage source VAC or current source IAC (Fig. 4.1A) from the source library is used. However, any independent voltage source which has an AC property attached to the part can be used as an input to the circuit. Fig. 4.1B shows the properties attached to the VAC part as displayed in the Property Editor.

Fig. 4.1
Fig. 4.1 Independent VAC and IAC sources: (A) capture parts and (B) VAC properties.

By default, the magnitude of the VAC source is 1 V. In calculating the frequency response of a circuit, you are normally looking to calculate the gain and phase response of the circuit. Since the circuit gain is given by the ratio of Vout to Vin, setting Vin to 1 V, the gain or transfer function of the circuit will be equal to the output voltage, Vout.

4.1 Simulation Parameters

One example in which an AC analysis is used to determine the frequency response of a circuit is the notch filter, which attenuates a narrow band of unwanted frequencies—for instance, the removal of the mains frequency which can lead to unwanted “hum” in an audio amplifier. One common implementation of a twin T notch filter is shown in Fig. 4.2, where the notch frequency is given by:

Fig. 4.2
Fig. 4.2 Implementation of a twin T notch filter.

fo=12πRC

si1_e  (4.1)

Fig. 4.3 shows the notch filter response of the circuit where the output is attenuated by − 60 dB at the notch frequency of 53 Hz.

Fig. 4.3
Fig. 4.3 Notch filter response.

To set up an AC analysis, a PSpice simulation profile needs to be created: PSpice > New Simulation Profile. In Fig. 4.4, the Analysis type is set to AC Sweep/Noise and has been set up for a logarithmic frequency sweep starting from 1 Hz to 100 kHz. You have the choice to sweep the frequency linearly over the whole range or logarithmically either in decades or in octaves. If you want to use a linear range, note that the Total Points is applied over the whole frequency range compared to, say, a decade range where the number of points applies to each decade.

Fig. 4.4
Fig. 4.4 AC sweep simulation settings.

Note

It is a common mistake to mix up the total number of points for linear and decade (or octave). So if your AC response curve severely lacks any resolution, i.e. has been plotted showing 10 points over the complete frequency range, check your AC sweep simulation settings for the correct AC sweep type, linear of logarithmic. Another common mistake is when specifying megahertz, to use MHz, which is the same as mHz (millihertz) as PSpice is not case sensitive. For megahertz, use megHz or MEGHz or 10e6 Hz. You do not have to enter the units (Hz), for example 100 meg.

4.2 AC Markers

AC markers can be found under the PSpice > Markers > Advanced menu as shown in Fig. 4.5. These markers can be used to display dB magnitude, phase, group delay, and the real and imaginary parts of voltage and current. For example, a combination of these markers can be used for Bode and Nyquist plots.

Fig. 4.5
Fig. 4.5 AC Markers menu.

4.3 Exercises

Exercise 1

Fig. 4.6 shows a passive twin T notch filter. You will create an AC sweep and plot the frequency response of the circuit.

Fig. 4.6
Fig. 4.6 Passive twin T notch filter.

1. Draw the circuit of the notch filter in Fig. 4.6. The VAC source can be found in the source library.

2. Create a PSpice simulation profile to perform a logarithmic sweep from 1 Hz to 100 kHz in steps of 100 points per decade (Fig. 4.7).

Fig. 4.7
Fig. 4.7 AC sweep simulation settings.

3. Place a VdB voltage marker on the output node, “out.” This will automatically calculate the output voltage in dB: PSpice > Markers > Advanced > dB Magnitude of Voltage (Fig. 4.8).

Fig. 4.8
Fig. 4.8 Adding a dB voltage marker.

4. Run the simulation and you should see the notch filter response (Fig. 4.9). What we need to do now is to determine the frequency at the deepest part of the notch.

Fig. 4.9
Fig. 4.9 Notch filter response.

5. Turn on the cursor, Trace > Cursor > Display Image 4 Image 4 and place the cursor at the bottom of the notch. For a more accurate reading, zoom in towards the bottom of the trace, View > Zoom > Area or use the icons Image 4
Alternatively, you can use one of the cursor functions, Trace > Cursor > Min Image 6 or Image 6.
The Probe Cursor box will display a notch frequency 53.703 Hz with an attenuation of −59.348 dB as seen in Fig. 4.10, depending on which software version you are using. In both software versions, the Probe Cursor box can be positioned anywhere in the Probe screen.

Fig. 4.10
Fig. 4.10 Cursor data: (A) version 16.2 and (B) version 16.3.

6. Restore the Probe display to its original size, View > Zoom > Fit Image 7
Select the trace name at the bottom of the display and press delete on the keyboard or select Trace > Delete all Traces. Now we are going to manually add the trace for the output voltage V(out).

7. Select Trace > Add Trace Image 8 and the Add Traces window will appear as shown in Fig. 4.11.

Fig. 4.11
Fig. 4.11 Add Traces window showing the list of output variables and Analog Operators and Functions.

8. The Add Traces window displays all the data for all the nodes and devices in the circuit. Uncheck the boxes for Currents and Power and in the list of Simulation Output Variables, scroll down and select the V(out) variable.
Click on OK.

9. The V(out) trace will be displayed in the Probe trace window. However, what we want is the voltage in dB. Select the trace name V(out) and press the delete key to remove the trace.

10. Select Trace > Add Trace and in the right-hand side of Add Traces under Analog Operators and Functions, select DB().
Then, as before, select V(out) from the list of Simulation Output Variables. At the bottom of the window in the Trace Expression box, you should see DB(V(out)). The DB function automatically calculates the DB of V(out). See Fig. 4.12.
Click on OK and you should see the trace shown in Fig. 4.13.

Fig. 4.12
Fig. 4.12 Conversion of V(out) to dB.
Fig. 4.13
Fig. 4.13 Notch filter response.

11. Repeat Step 5 to determine the depth of notch attenuation in dB.

4.3.1 Twin T notch filter

Fig. 4.14 shows the implementation of a notch filter which has a notch frequency given by

Fig. 4.14
Fig. 4.14 Twin T notch filter.

fo=12πRC

si1_e

Using only one value of resistor and one value of capacitor, the circuit in Fig. 4.14 can be implemented as shown in Fig. 4.15.

Fig. 4.15
Fig. 4.15 Twin T Notch filter implemented with one resistor and one capacitor value.

The parallel combination of the two capacitors is given by:

Cp=C+C=2C

si3_e

The parallel combination of the resistors is given by:

Rp=R×RR+R=R2

si4_e

which conforms to the circuit implementation shown in Fig. 4.14.

For the notch filter in Fig. 4.6, R = 27 kΩ and C = 110n. Therefore, using Eq. (4.1), the notch frequency is given by:

fo=12πRCfo=12π×27×103×110×109=53.6Hz

si5_e

..................Content has been hidden....................

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