Vous êtes sur la page 1sur 4

Steady State Sinusoidal Transient Analysis

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
In this tutorial you will learn to determine the sinusoidal steady response of RLC circuits. 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 1000t V and v2 = 20 cos(1000t 30) V.

1 k i1

1H

1H i2 1 F

1 k

v1

+ 1 k

+ v2

Figure 1: Example Circuit The corresponding SwCAD III schematic is shown in Figure 2. The resistors R1 and R2 are oriented in agreement with the desired current directions in Figure 1. (The currents through L1 and L2 could also be used to determine i1 and i2.)

Figure 2: SwCAD III Schematic The settings for voltage source v1 and v2 are shown in Figure 3. Note that the Freq value shown in Figure 3 corresponds to /(2) where = 1000 rad/s for this source. You can enter mathematical expressions for values, but the entire expression must be enclosed in curly braces. Note also that SwCAD III uses a sine function as its reference sinusoidal waveform whereas v1 and v2 were specified as being cosine functions. Although we could transform the SwCAD III sine function to a cosine function by adding in a +90 phase shift, it is easier just to pretend that our sources are sine functions instead and
1 of 4

measure the phase shifts of the current relative to a reference sine function. The voltage settings for v2 are very similar to those for v1 except that the Amplitude is equal to 20 and the phase angle is -30.

Figure 3: Voltage Source v1 and v2 Settings The Transient analysis settings are shown in Figure 4. The source voltages have a period of about 6.3 ms, selecting a Stop Time of 63 ms will run the simulation for 10 cycles of the waveform. We want to simulate for long enough that sinusoidal steady-state is reached, but blindly entering a large number for the Stop Time can generate large data files.

Figure 4: Transient Analysis Settings The currents through R1 and R2 and a reference sine wave are shown in Figure 5. The phase angles of the current waveforms will be measured relative to this reference. The amplitude of the reference was chosen to be about the same as the amplitudes of the two currents. (The reference waveform was added using the Add Trace feature of the Waveform Viewer. Note that the SwCAD III sine function requires its argument to be in degrees, not radians. The 180/pi term that appears in the argument of the sine function converts from radians to degrees.) The largest amplitude waveform in the 10mA reference. The smallest amplitude waveform is the i2 (I(R2)) waveform. The transient portion of each current
2 of 4

waveform appears to decay pretty quickly here and the amplitudes and phases appear to reach their steady-state values in less than a single cycle of the reference waveform.

Figure 5: First 63ms of Simulation Although we can obtain a pretty good estimate of the amplitudes of the two desired current waveforms from Figure 5 it would be difficult to obtain good phase estimates because the zero-crossings are too close together. To make phase measurement easier we can zoom in on the waveform using the zoom tool. Figure 6 shows the result of using the zoom tool to expand a portion of a single cycle of the waveforms. From Figure 6 we see that both current waveforms lead the reference waveform so that both will have positive phase angles. (They lead the reference because the time from the positive peak of the waveform to a trailing positive peak of the reference is smaller than the time from the positive peak to a leading positive peak of the reference.) You can use the SwCAD III waveform cursors to find the amplitudes of the current waveforms and the amount of time by which the current waveforms lead the reference. i1 (the second largest waveform) has an amplitude of 6.735 mA and leads the reference waveform by 0.670 ms. This corresponds to a phase angle of 38.4 ( = t = (1000 rad/s) (0.670 ms) = 0.670 rad = 38.4). i2 has an amplitude of 5.946 mA and leads the reference by 2.291 ms (a phase angle of 131.3). So the steady-state currents are: i1 = 6.735 cos(1000 t + 38.4) mA i2 = 5.946 cos(1000 t + 131.3) mA

Figure 6: Second 15 ms of Simulation

3 of 4

A phasor domain analysis of the circuit in Figure 1 yields: i1 = 6.735 cos(1000 t + 38.5) mA i2 = 5.946 cos(1000 t + 131.3) mA The theoretical phasor results are in excellent agreement with the SwCAD III simulation results.

Phasor Domain Circuits


You can use SwCAD III and Transient analysis to obtain results for phasor domain circuits. Set the sinusoidal voltage and current sources to use amplitude and phases equal to that of the corresponding phasor sources. Set all sources to use a frequency of = 1 rad/s (or rather Freq = {1/(2*pi)} Hz). For an inductor with an impedance of jX use an inductance value of L = X in the simulation. For a capacitor with an impedance of -jX use a capacitance of C = 1/X. (Recall that the impedance of a capacitor is equal to -j/( C). Setting this equal to -jX and solving for C at = 1 yields C = 1/X.) Run a Transient analysis and let the waveforms reach sinusoidal steady state. (Since the frequency is so low you may need to simulate out to 60 seconds or longer to reach steady-state.) The amplitudes and phase angles of the waveforms will equal the amplitudes and phase angles of the corresponding phasor quantities. Having said that it is possible, let me advise against using Transient analysis to solve phasor domain circuits. Use AC analysis instead, it is much easier. Actually, AC analysis is a much easier and accurate method for solving steady-state sinusoidal response problems, such as the one in this tutorial. The Transient analysis method described here corresponds to how you would find amplitude and phase using an oscilloscope in the lab. Working problems using both Transient and AC analysis will also help you to understand phasors. AC analysis only yields meaningful results for linear circuits. Transient analysis can be use with both linear and nonlinear circuits. AC analysis is the subject of the next tutorial where we will rework the same problem given here.

Tips
1. Use the Waveform Viewer's attached cursors feature to accurately measure amplitudes and time differences. The cursors were used (after zooming in on the waveform) to get the results given here. See the online documentation regarding the Waveform Viewer in order to get information about the attached cursors. If you want to restore the original waveform graph after a zoom, just click on the Zoom to Fit icon or press CTRLE. (The Zoom to Fit icon is just to the right of the Zoom Back icon.) You can also select Zoom to Fit from the View menu. After setting up the plot screen the way you want it, you can save your plot configuration (number of plot panes, which traces in each pane, etc) from the Plot Settings menu. If you save the plot configuration with the same basename as the schematic file name, but with a .plt extension. The configuration will automatically be reloaded after running a simulation. SwCAD III compresses raw data files as they are generated. A lossy compression algorithm is used. You may get slightly more accurate time difference measurements by turning compression off before running the simulation. You turn compression off via the control panel. (Compression is on by default and the compression setting is not remembered between program invocations. You must turn it off again after restarting SwCAD III.) I recommend leaving compression on (the default), you typically get pretty accurate results. (See the discussion regarding compression in the online documentation.)

2.

3.

4.

4 of 4

Vous aimerez peut-être aussi