Swcad Iii Steady State Ac Analysis: An Example Circuit
Swcad Iii Steady State Ac Analysis: An Example Circuit
Swcad Iii Steady State Ac Analysis: An Example Circuit
University of Evansville
June 17, 2008
In addition to SwCAD III, this tutorial assumes that you have installed the University of Evansville Simulation Library for
SwCAD III (UE_SimLib_SWCIII). This library extends SwCAD III by adding symbols and models that make it easier for
students with no previous SPICE experience to get started with SwCAD III.
An Example Circuit
SwCAD III is capable of performing three basic types of circuit analysis. In DC Operating Point analysis capacitors are
treated as open circuits, inductors are treated as short circuits and SwCAD III calculates voltages and currents that would be
displayed by a DC voltmeter. In Transient analysis, SwCAD III numerically solves the differential equations that describe
the circuit and shows results that are typically seen on an oscilloscope. This analysis method is SwCAD III's most powerful
(realistic) circuit simulation method. It allows non-linear devices to be modeled and is therefore useful in the analysis and
design of non-linear circuits (clippers, clampers, power supplies, switching circuits, etc.)
AC analysis results are only meaningful if the circuit is linear. It uses a small-signal linear model for all non-linear devices
(diodes, transistors) and provides meaningless results if these devices operate in a non-linear mode in the corresponding
real-world circuit. There are a tremendous number of circuits that are linear (all of the RLC circuits we've looked at this
semester and transistor and op amp based amplifiers are all assumed to be linear). In AC analysis, SwCAD III does a
complex phasor analysis and can therefore be used check the results of your phasor analysis homework.
We will use SwCAD III to determine the currents i1 and i2 in the circuit shown in Figure 1. The source voltages are equal to
v1 = 10 cos(1000 t) V and v2 = 20 cos(1000t – 30º) V.
1 kΩ 1H 1H 1 kΩ
i1 i2
1 μF
v1 + + v2
– –
1 kΩ
The corresponding SwCAD III schematic is shown in Figure 2. Resistors R1 and R2 are oriented in agreement with the
desired current directions. (Note the small triangles near one end of a component. These define the assumed direction for
positive current during the simulation.)
The settings for voltage source v1 are shown in Figure 3. Notice that the (none) function radio button tab has been selected.
Any of the sources could have been selected because they have no affect on the source during AC analysis. In AC analysis
only the AC Amplitude and AC Phase values have any effect on the simulation. All other values are ignored during AC
analysis. Note also that we do not enter in a simulation frequency at this point (that is done later). The AC magnitude and
AC Phase are 10 V and 0º respectively.
1 of 5
Figure 2: SwCAD III Schematic
The voltage settings for v2 look very similar except that the AC magnitude is equal to 20 and the AC Phase is equal to -30.
After completing the schematic and setting up the voltage sources. We are now ready to run an AC analysis. Click on the
Run icon and the Edit Simulation Command dialog window will appear as shown in Figure 4. Select the AC Analysis tab.
AC Analysis can be done at a single frequency or at several frequencies. We only want results at a single frequency
(1000 rad/s), so select List in the pull-down menu. In the text area at the bottom of the window add “{1000/(2*pi)}” to the
2 of 5
simulation command. (Note that SwCAD III expects frequencies in Hertz, not rad/sec. Now I could convert 1000 rad/s to
Hertz on my calculator, but I let SwCAD III do the calculation for me. As we have seen in previous tutorials, the expression
must be entered in curly braces.) After clicking on the OK button the simulation will proceed. A window similar to that
shown in Figure 5 should appear.
From Figure 5 we see that the I1 phasor is equal to (6.735 mA ∠38.5º) at 1000 rad/s while that of I2 is equal to (5.946 mA
∠131.3º) These phasor values correspond to steady-state time-domain currents of:
Note that both phase angles are positive, so both currents lead voltage source v1.
For example to obtain Vo in the phasor domain circuit shown in Figure 6, we use the SwCAD III schematic shown in Figure
7. At 1 rad/s (or 1/(2π) Hz), the components shown in the SwCAD III schematic will have exactly the same impedance as
the corresponding component in the phasor domain circuit. Results from simulating at a frequency of 1/(2π) Hz are shown
in Figure 8. The results indicate that Vo is (11.314 V ∠-45º). Manual phasor domain analysis of the original circuit yields a
result of (11.314 V ∠-45º) in exact agreement with SwCAD III. (The SwCAD III simulation was much faster than manual
analysis!!)
3 of 5
Figure 5: AC Analysis Simulation Results
j70 Ω -j400 Ω
50 Ω IX
+
72 V ∠0º 160 Ω VO
-
590 IX
Tips
You may have noticed that you can do the AC analysis at multiple frequencies. If you perform the AC analysis at more than
one frequency the Waveform Viewer will be opened and you then probe the circuit to display node voltages and device
currents as a function of frequency. This a very useful feature and will be the subject of the next tutorial.
4 of 5
(a) (b)
Figure 7: SwCAD III Schematic Corresponding to Figure 6
Note the inductance and capacitance values used in the schematic.
frequency: 0.159155 Hz
V(n002): mag: 30.4629 phase: -113.198° voltage
V(n003): mag: 41.7191 phase: 135.001° voltage
V(vo): mag: 11.3136 phase: -44.999° voltage
V(n004): mag: 30.4629 phase: -113.198° voltage
V(n001): mag: 72 phase: 0° voltage
I(C1): mag: 0.0707103 phase: 135.001° device_current
I(L1): mag: 1.2649 phase: -71.5641° device_current
I(R2): mag: 0.0707103 phase: -44.999° device_current
I(R1): mag: 1.20207 phase: -73.0715° device_current
I(V1): mag: 1.2649 phase: 108.436° device_current
Ix(u1:V+): mag: 1.20207 phase: -73.0715° subckt_current
Ix(u1:V-): mag: 1.20207 phase: 106.928° subckt_current
Ix(u1:ISAMPLE+): mag: 0.0707103 phase: 135.001° subckt_current
Ix(u1:ISAMPLE-): mag: 0.0707103 phase: -44.999° subckt_current
Figure 8: Results from Simulation of the Circuit in Figure 7
5 of 5