Steady State Sinusoidal Transient Analysis


University of Evansville

July 27, 2009


In addition to LTspice IV, this tutorial assumes that you have installed the University of Evansville Simulation Library for LTspice IV. This library extends LTspice IV by adding symbols and models that make it easier for students with no previous SPICE experience to get started with LTspice IV.


An Example Circuit


In this tutorial you will learn to determine the sinusoidal steady response of RLC circuits. We will use LTspice IV 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.


Figure 1: Example Circuit


The corresponding LTspice IV 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: LTspice IV 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 LTspice IV uses a sine function as its reference sinusoidal waveform whereas v1 and v2 were specified as being cosine functions. Although we could transform the LTspice IV 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 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 huge 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 LTspice IV 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 is the 10mA reference. The smallest amplitude waveform is the i2 (I(R2)) waveform. The transient portion of each current 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 LTspice IV 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: A Complete Cycle of the Simulation


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 LTspice IV simulation results.


Phasor Domain Circuits


You can use LTspice IV 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.


  1. If you want to restore the original waveform graph after a zoom, just click on the Zoom to Fit icon or press CTRL-E. (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.


  1. 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.


  1. LTspice IV 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 LTspice IV.) I recommend leaving compression on (the default), you typically get pretty accurate results. (See the discussion regarding compression in the online documentation.)

1 of 4