Download CircuitI_exp101411499585

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Topology (electrical circuits) wikipedia , lookup

Power electronics wikipedia , lookup

Switched-mode power supply wikipedia , lookup

Oscilloscope wikipedia , lookup

Superheterodyne receiver wikipedia , lookup

Mathematics of radio engineering wikipedia , lookup

Electronic engineering wikipedia , lookup

Phase-locked loop wikipedia , lookup

Flexible electronics wikipedia , lookup

Resistive opto-isolator wikipedia , lookup

Integrated circuit wikipedia , lookup

Opto-isolator wikipedia , lookup

Wien bridge oscillator wikipedia , lookup

Rectiverter wikipedia , lookup

Two-port network wikipedia , lookup

Radio transmitter design wikipedia , lookup

Valve RF amplifier wikipedia , lookup

Regenerative circuit wikipedia , lookup

Index of electronics articles wikipedia , lookup

Oscilloscope history wikipedia , lookup

Network analysis (electrical circuits) wikipedia , lookup

RLC circuit wikipedia , lookup

Transcript
University of Sharjah
Electrical and Electronics Engineering Department
0402203
Circuit Analysis I Laboratory
Experiment # 10
Introduction to PSPICE – Part III (AC Analysis)
OBJECTIVES:
1. To learn the use of PSPICE for Phasor analysis of circuits in both time and frequency
domains.
2. To learn the use of PSPICE to obtain the frequency response of AC circuits.
INTRODUCTION:
PSpice affords a big relief from the tedious task of manipulating complex numbers in AC circuits
analysis. The procedure for AC analysis is quite similar to that required for DC analysis.
Using “AC Sweep”, PSpice can perform AC analysis of a circuit for a single frequency or over a range
of frequencies in increments that can vary linearly, by decade, or by octave. In AC sweep, one or more
sources are swept over a range of frequencies while the voltages and currents of the circuit are
calculated. Thus, we use “AC Sweep” both for phasor analysis and for frequency response analysis.
While transient analysis is done in the time domain, AC analysis is performed in the frequency domain.
For example, if vs = 10cos(377t + 40°), transient analysis can be used to display vs as a function of time,
whereas AC sweep will give the magnitude as 10 and phase as 40°.
A. Circuit Analysis in the Phasor Domain (Single Frequency)
To perform circuit analysis in the Phasor domain through PSPICE usually involves three steps:
1. Create the circuit in Schematics and specify the source parameters
2. Set analysis parameters
3. Simulate the circuit and obtain the results
1. Creating the circuit in Schematics and specifying the source parameters
In order to run AC Sweep analysis on a circuit, the circuit must first be created using Schematics and
the source(s) parameters must be specified. The passive elements like R, L and C will be brought from
the library as explained in PSPICE-Part I [Be careful with the values of these elements. Never write
‘F’ with the value of the capacitor as PSPICE will take it as a multiplier – F=femto=10-15]. PSPICE
has several time-varying functions or sources. Sources used in the AC analysis include:
 VAC : AC Voltage Source
The VAC source has the following attributes:
ACMAG =
ACPHASE =
Magnitude of the voltage source (as peak value)
Phase in degrees
 IAC : AC Current Source
The IAC source has the attribute: AC = Magnitude of the current source (as peak value)
Circuit Analysis I Lab Manual
31
 Print PSEUDOCOMPONENTS : IPRINT, VPRINT1 and VPRINT2
For Phasor Analysis, print pseudocomponents can be used to send the results to the output file. The
important pseudocomponents and their usage are shown in Fig. 1.1 and listed in Table 1.1. To add a
pseudocomponent, select Draw/Get New Parts in the Schematics window, select the pseudocomponent,
place it at the desired location, and add the appropriate attributes.
Symbol
IPRINT
VPRINTI
VPRINT2
Description
Shows branch current. Current must leave the dash (-) sign of the symbol.
Shows node voltages of single node.
Shows voltage difference between two points. The dash (-) sign of the symbol must be
at negative voltage.
TABLE 1.1 Print Pseudocomponents description
The print pseudocomponents can display the phasor voltages and currents in polar or rectangular form.
Attributes for Polar Form
Attributes for Rectangular Form
AC
MAG
PHASE
AC
REAL
IMAG
= yes
= yes
= yes
= yes
= yes
= yes
2. Set analysis parameters.
Before simulation, we need to adjust some specifications for the AC Sweep. Select Analysis/Setup. Place
a check mark on AC Sweep and double click on AC Sweep to open up the dialog box for AC Sweep. The
dialog box is shown in Figure 1.2 below:
Figure 1.2 : AC Sweep and Noise Analysis dialog box
Circuit Analysis I Lab Manual
32
Types of AC Sweep:



Linear Sweep: implies that simulation points are spread uniformly between the starting
and ending frequencies.
Octave Sweep: The source frequency will be varied by a factor of 2. [e.g. 3, 6, 12, …]
Decade Sweep: The source frequency will be varied by a factor of 10 [e.g. 3, 30, 300, …]
and the frequency axis becomes logarithmic.
Sweep Parameters
► Total Points: The total number of points to be between the starting and the ending
frequencies.
► Start Freq: It is the starting point of frequency to be displayed. It can not be zero
because 0 Hz corresponds to DC analysis.
► End Freq: It is the end point of frequency to be displayed.
For phasor analysis or single frequency analysis we enter 1 in the Total Pts and the same frequency in
Start Freq and End Freq as shown in Fig. 1.2
After the circuit is drawn, the specifications for the AC Sweep analysis are given, and the
circuit is saved, we are ready to simulate it.
3. Simulate the Circuit & Obtain the results
To perform AC Sweep analysis:
1. Select Analysis/Simulate. If no errors are encountered, the circuit is simulated and the
results are saved in an output file with extension .out. The voltages and currents specified in
the print pseudocomponents will be saved in the output file .
2. Obtain the output file by selecting Analysis/Examine Output.
B. Frequency Response of Circuits with AC Sources
Frequency response shows the behavior of the circuit for different source frequencies. In PSPICE, AC
Sweep can be used to obtain the frequency response of a circuit.
To simulate a circuit from 1 Hz to 10 MHz at 10 points per decade we can proceed as follows:
1. Select the Decade in the AC Sweep Type to make the X-axis logarithmic, enter 10 in the
Total Pts/Decade box , enter 1 in the Start Freq box, and enter 10Meg in the End Freq
box. Keep in mind that a decade is a factor of 10. In this case, a decade is from 1 Hz to 10
Hz. from 10 Hz to 100, from 100 to 1 kHz, and so forth.
2. Use Voltage or Current markers to get the desired output. Once you simulate the circuit the
Probe window will appear automatically.
3. Select Trace/Add and type V(variable_name) in the Trace Command box to get the
magnitude plot versus frequency. For phase plot versus frequency type
VP(variable_name) in the Trace Command box.
4. To use advanced markers such as vdb, idb, vphase, iphase, vreal, and ireal, select
Markers/Mark Advanced
Bode plots are separate plots of magnitude and phase versus frequency. To obtain Bode plots, it is
common to use an AC source, say V1, with 1-volt magnitude and zero phase. After we have selected
Analysis/Simulate and have the Probe program running, we can display the magnitude and phase plots as
mentioned above.
Suppose we want to display a Bode magnitude plot of V(Vo):
1. We select Trace/Add and type dB(V(Vo)) in Trace Command box. dB(V(Vo)) is
equivalent to 20log(V(Vo)), and because the magnitude of V1 or V(R1:l) is unity,
dB(V(Vo)) actually corresponds to dB(V(Vo)/V(Rl:1)), which is the gain.
Circuit Analysis I Lab Manual
33
EXAMPLE1.1:
Find Current i in the circuit in Fig. 1.3.
Figure 1.3 For Example 1.1.
Solution:
Recall that 20sin2t = 20cos(2t - 90°) and that f = w/2π = 2/2π = 0.31831.The schematic is shown in Fig.
1.4. The attributes of V1 are set as ACMAG = 20, ACPHASE = -90; while the attributes of IAC are set as
AC = 5. The current-controlled current source is connected in such a way as to conform with the original
circuit in Fig. 1.2; its gain is set equal to 2. The attributes of the pseudocomponent IPRINT are set as AC =
yes, MAG = yes, PHASE = yes. Since this is a single-frequency ac analysis, we select Analysis/Setup/AC
Sweep and enter Total Pts=1,StartFreq=0.31831, and Final Freq = 0.31831. We save the circuit and
select Analysis/Simulate for simulation. The output file includes
FREQ
3.183E-01
IM(V_PRINT3)
7.906E+00
IP(V_PRINT3)
4.349E+01
Figure 1.4 Schematic of circuit of figure 1.3
Circuit Analysis I Lab Manual
34
EXAMPLE 1.2:
Find V1 and V2 in the circuit of Fig. 1.5
Figure 1.5 For Example 1.2.
Solution:
The circuit in Fig. 1.5 is in the frequency domain. Since we are not given a particular frequency and
PSpice requires one, we select any frequency consistent with the given impedances. For example, if we
select (w) = 1 rad/s, the corresponding frequency is f = w/2π = 0.159155 Hz. We obtain the values of the
capacitance (C = 1/wXc) and inductances (L = XL/w). Making these changes results in the schematic in Fig.
1.6. To ease wiring, we have exchanged the positions of the voltage-controlled current source G1 and the 2
+ j2Ω impedance. Notice that the current of G1 flows from node 1 to node 3, while the controlling voltage
is across the capacitor C2, as required in Fig. 1.5. The attributes of pseudocomponents VPRINT1 are set as
shown. As a single-frequency analysis, we select Analysis/Setup/AC Sweep and enter Total Pts = 1, Start
Freq = 0.159155, and Final Freq = 0.159155. After saving the schematic, we select Analysis/Simulate to
simulate the circuit. When this is done, the output file includes
FREQ
VM(1)
VP(1)
1.592E-01
2.708E+00
-5.673E+01
FREQ
1.592E-01
VM(3)
6.914E+00
VP(3)
-8.070E+01
From which we obtain V1 = 2.708/-56.73, V2 = 6.914/-80.7
Figure 1.6 Schematic for the circuit in figure 1.5.
Circuit Analysis I Lab Manual
35
EXAMPLE 1.3
For the RC circuit shown in Fig. 1.7 obtain the magnitude plot of the output voltage Vo for frequencies
from 1 Hz to 10 kHz. Let R = 1KΩ and C = 4 µF.
Solution:
The schematic is shown in Fig. 1.8. We assume that the magnitude of V1 is 1 and its phase is zero; we
enter these as the attributes of VI. We also assume 10 points per decade. For the AC sweep specifications,
we select Analysis/Setup/ AC Sweep and enter 10 in the Total Pts box, 1 in the Start Freq box, and 10k
in the Final Freq box. After saving the circuit, we select Analysis/Simulate. From the Probe menu, we
obtain the plot in Fig. 1.9(a) by selecting Traces/Add and clicking V(2). Also, by Trace/Add and typing
dB(V(2) in the Trace Command box, we obtain the Bode plot in Fig. 1.9(b). The two plots in Fig. 1.9
indicate that the circuit is a low pass filter; low frequencies are passed while high frequencies are blocked
by the circuit.
Figure 1.7 For Example 1.3
Figure 1.8 The schematic of circuit in Fig 1.7
(a)
Figure 1.9: Result of Example 1.3 (a) Linear (b) Bode Plot
(b)
PRACTICE PROBLEM 1.1
Obtain Vx and Ix in the circuit depicted in Fig- 1.10
Figure 1.10 For Practice Prob. 1.1.
Answer: From the output file Vx = 9.2/42.26
Circuit Analysis I Lab Manual
Ix =2.418/155.5A
36
PRACTICE PROBLEM 1.2:
Find ix(t) in the circuit in Fig. 1.11.
Figure 1.11 For Practice Problem. 1.2
Answer: From the output file. Ix = 7.59/108.43,
ix = 7.59cos(4t+108.43).
PRACTICE PROBLEM 1.3
For the circuit in Fig. 1.7 replace the capacitor C with an inductor L = 4 mH and obtain the magnitude plot
(both Linear and Bode) for vo for 10 < f < 100 MHz.
Answer: See the plots in Fig. 1.12
(a)
(b)
Figure1.12: Result of Practice Problem 1.3 (a) Linear Plot (b) Bode Plot.
PROCEDURE:
1. AC analysis for time domain circuits: do example 1.1
2. AC analysis for frequency domain circuits: do example 1.2
3. Frequency response of AC circuits: do example 1.3
HOMEWORK:
1. For AC analysis for time domain circuits, do practice problem 1.1
2. For AC analysis for frequency domain circuits, do practice problem 1.2
3. For frequency response of AC circuits: do practice problem 1.3
Circuit Analysis I Lab Manual
37