Step 6. Report the answer to the circuit analysis problem.

advertisement
Lab 7
PSpice: Time Domain Analysis
OBJECTIVES
1. Use PSpice Circuit Simulator to simulate circuits containing capacitors and inductors
in the time domain.
2. Practice using a switch, and a Pulse & Sinusoidal voltage source in RL and RC
circuits.
EQUIPMENT
PSpice Program
THEORY
The inputs to an electric circuit have generally been independent voltage and current
sources. PSpice provides a set of voltage and current sources that represent time
varying inputs. “Time Domain (Transient)” analysis using PSpice simulates the response
of a circuit to a time varying input. Time domain analysis is most interesting for circuits
that contain capacitors or inductors. For the capacitor, the part properties of interest are
the capacitance and the initial voltage of the capacitor (the “Initial Condition”). For the
inductor on the other hand, the part properties of interest are the inductance and the
initial current of the inductor (the “Initial Condition”).
In this lab we consider three examples. The first example illustrates transient analysis of
a RL circuit with s single switch; the second and third circuits analyzed are the response
of an RC circuit to a Pulse voltage source and a sinusoidal voltage source.
We will again use a six-step procedure to organize circuit analysis using PSpice. This
procedure is stated as follows:
Step 1 Formulate a circuit analysis problem.
Step 2 Describe the circuit using Schematics. This description requires three activities.
1. Place the circuit elements in the Schematics workspace.
2. Adjust the values of the circuit element parameters.
3. Wire the circuit to connect the circuit elements and add a ground.
Step 3 Simulate the circuit using PSpice.
Step 4 Display the results of the simulation, for example, using probe.
Step 5 Verify that the simulation results are correct.
Step 6 Report the answer to the circuit analysis problem.
Part 1: Transient Analysis of an RL Circuit with a Switch
Time varying voltages and currents can be caused by opening or closing a switch.
PSpice provides parts to represent single-pole, single-throw (SPST) switches in the
parts library. These parts are summarized below:
Description:
Open switch will close at t = TCLOSE;
Open switch will close at t = TCLOSE;
Pspice Name: Sw_tCLOSE
Sw_tOPEN
Library:
Analog
TCLOSE = 0
1
U1
2
TOPEN = 0
1
U2
2
PSpice Problem
The circuit shown is at steady state before the switch closes at time t = 0.
6-1
The current in the inductor before the switch is closed is iL(t = 0) = 40 mA. Find the
current of the inductor as a function of time after the switch closes. That is, use PSpice
to simulate the circuit after the switch closes.
Analytical Solution:
iL (t)  ISC  (iL (0 )  ISC )  e t /   (60  20e40000t ) mA
where RL = L/RTh = 25s.
Step 1. Formulate a circuit analysis problem.
After the switch closes , the circuit has a time constant with a value of 25 s. Plot the
inductor current, iL(t), for the first 150 s (6 time constants) after the switch closes.
Step 2. Describe the circuit using Capture.
Start Capture. Create a new project. Place the parts (careful how you place an
inductor – 1 & 2 indicate a positive and negative polarity, respectively), adjust
parameter values and wire the parts together. Don’t forget the ground node! The initial
condition iL(0) of the inductor is 40 mA. The PSpice part representing an inductor has
a property named "IC" that represents the initial current in the inductor. This value of
the initial condition can be specified using the property editor.
Step 3. Simulate the circuit using PSpice.
Select PSpice / New Simulation Profile from the Capture menus to pop up the "New
Simulation" dialog box. Specify a simulation name, then select "Create" to close "New
Simulation" dialog box and pop up the "Simulation Settings" dialog box. In the
"Simulation Settings" dialog box, select "Time Domain (Transient)" as the analysis
type. The simulation starts at time zero and ends at the "Run to time". Specify the "Run
to time" as 6RL = 150 s. Finally, select "OK" to close the "Simulation Settings" dialog
box and return to the Capture screen. Run the simulation.
Step 4. Display the results of the simulation, for example, using Probe.
After a successful "Time Domain (Transient)" simulation, Probe will open automatically
in a Schematics window. Select Trace / Add Trace to add the trace I(Ll) (the current
through inductor L1) and the resulting plot after removing the grid and labeling one
point.
6-2
Hints: If you want to remove grid lines from the plot, right-click on the plot and select
settings. Under the X & Y Grid tabs, select none. To copy this plot to a word
document, on the tool bar, go the window tab and select “copy to clipboard” and
paste into your document.
Step 5. Verify that the simulation results are correct.
The complete natural response to the RL circuit predicts that the inductor current will be
40 mA when t = 0 and also that the inductor current will be 60 mA as t approaches
infinity. The plot agrees with both of these predictions.
To ask a more detail questions such as what is the value of iL(t) at a time of 30.405 s,
there are several tools that are at our disposal: the Probe cursor button and Mark Data
points & adjust value buttons allow one to select a particular data value on the curve.
To find the current at t = 30.405 s, one can find that the plot indicates that iL(t)= 53.592
mA when t = 30.405 s. Substituting t = 30.405 s into the complete natural response
gives iL(t)= 54.073 mA, a difference of 0.5%. The simulation results are correct.
Step 6. Report the answer to the circuit analysis problem.
The previous figure shows the inductor current, iL(t), for the first 6 time constants after
the switch closes.
Part 2: The Response of an RC Circuit to a Pulse Input
The voltage and current sources that represent time varying inputs are provided in the
“SOURCE” parts library. A table of PSpice voltage sources for Transient Response
Simulations is listed at the end of the laboratory write-up.
PSpice Problem
The input voltage vin(t) into an RC circuit is shown below.
The output, or response, of the circuit is the voltage across the capacitor, v0(t). Use
PSpice to simulate the response of this circuit to the pulse input shown below.
Analytical Solution:
4  (1  e 1000t )

v 0 (t)  
1000(t  0.002)

1  4.46  e
0  t  2 ms
2 ms  t  10 ms
Step 1. Formulate a circuit analysis problem
Plot the voltages vin(t) and v0(t) versus time t for the circuit shown.
Step 2. Describe the circuit using Capture.
Place the parts, adjust parameter values and wire the parts together. The voltage and
current sources that represent time varying inputs are provided in the “SOURCE” parts
library. In our circuit, the voltage source is a VPULSE part.
6-3
The plot of vin(t) shows making the transition from -1 V to 4 V instantaneously. Zero is
not an acceptable value for the parameters tr or tf. Choosing very small value for tr and tf
will make the transitions appear to be instantaneous when using a time scale that shows
a period of the source waveform. In this example, the period of the source waveform is
10 ms so 1 ns is a reasonable choice for the values of tr and tf.
It’s convenient to set td, the delay before the periodic part of the waveform, to zero. Then
the values of v1 and v2 are -1 and 4, respectively. The value of pw is the length of time
that vin(t) = v2 = 4V, so pw = 2 ms in this example. The source pulse is a periodic
function of time. The value of per is the period of the pulse function, 10 ms.
Summary of voltage source parameters:
V1 = -1V V2 = 4V TD = 0 TR = 1ns TF = 1ns PW = 2ms PER= 10ms
Typically PSpice labels the nodes of a circuit with labels like N00253 and N00283.
These labels are not very convenient! Nodes can be given more convenient names
using a part called an “off-page connector.” Select a particular off-page connector
called an “OFFPAGELEFT-R” part found on the right-hand tool bar, under the
CAPSYM library. Edit the properties naming each connector with “input” and “output.”
Input
V1 = -1V
V2 = 4V
TD = 0
TR = 1ns
TF = 1ns
PW = 2ms
PER = 10ms
Output
R 1k
Vpulse
C
1uF
0
Step 3. Simulate the circuit using PSpice.
Start a New Simulation Profile from the Capture menus and select the "Time Domain
(Transient)" as the analysis type. The simulation starts at time zero and ends at the
"Run to time". Specify the "Run to time" as 20 ms to run the simulation for two full
periods of the input waveform. Check the "Skip the initial transient bias point
calculation (SKIPBP)" checkbox. Run the simulation.
Step 4. Display the results of the simulation, for example, using Probe.
After a successful Time Domain (Transient) simulation, Probe, the graphical postprocessor for PSpice, will open automatically in a Schematics window. Select Trace /
Add Trace to pop up the "Add Traces" dialog box. Add the traces V(OUTPUT) and
V(INPUT). The resulting plot after removing the grid and labeling some points is
6-4
Go back and change the pulse width to 5ms. How do the resulting plots look like?
Step 5. Verify that the simulation results are correct.
Each label in the plot indicates the coordinates of a point on the plot of the capacitor
voltage, v0(t). For example, the label (1.9912m, 3.4638) indicates that v 0(t) = 3.4638 V
when t = 1.9912 ms = 0.0019912 sec. This value can be checked using the complete
natural response of the circuit. Substituting t = 1.9912 ms results in v0(t) = 3.4539 V, a
difference of 0.3%. Similarly, when t = 2.7876 ms, the output voltage is v 0(t) = 1.0551
V. Substituting t = 2.7876 ms into the complete natural response gives v0(t) = 1.0290
V, a difference of 2.4%. The simulation results are correct.
Step 6. Report the answer to the circuit analysis problem.
Plots of the voltages vin(t) and v0(t) are shown above.
See the end of document to see what to turn in.
Part 3: The Response of an RC Circuit to a Sinusoidal Input
PSpice Problem
The circuit has been analyzed to determine the capacitor voltage, v C(t). We will use
PSpice to plot the capacitor voltage as a function of time and plot the power delivered
to the capacitor as a function of time.
Analytical Solution:
v C (t)  1.55 sin(2π  10t  76.6) V
p(t)  v C (t)  iC (t)  3.77 sin(40πt  153) W
Step 1. Formulate a circuit analysis problem.
Simulate the circuit to determine the capacitor voltage, vC(t). Plot the vC(t) versus t.
Also, plot the power delivered to the capacitor as a function of time.
Step 2. Describe the circuit using Capture.
Start Capture. Create a new project. Place the parts, adjust parameter values and wire
the parts together as shown below. The voltage source is a VSIN part. Note that the
capacitor value of 0.05F in PSpice reads 0.05 x 10 15, where F stands for femto =
1015. Do not include the F! (Careful how you place a capacitor and resistor – 1 & 2
indicate a positive and negative polarity, respectively.)
6-5
2
VOFF = 0
VAMPL = 10V
FREQ = 10Hz
Vsin
4
C
0.05
0
Step 3. Simulate the circuit using PSpice.
Start a New Simulation Profile from the Capture menus and select the "Time Domain
(Transient)" as the analysis type. The simulation starts at time zero and ends at the
"Run to time". Specify the "Run to time" as 0.8s to run the simulation for eight full
periods of the input waveform. Run the simulation.
Step 4. Display the results of the simulation, for example, using Probe.
In the Probe window, add the trace V(C:2). One observes that the plot is disappointing
for a couple of reasons. First, it's a very rough representation of a sine function.
Second, it takes a while for the capacitor voltage to settle down. In other words, the
capacitor voltage includes a transient part as well as the steady state response. In this
example, we only want the steady state response and so would like to eliminate the
transient part of the response.


Both of these disappointments can be remedied. To obtain a smoother plot, select
PSpice/Edit Simulation Profile from the Capture menus to pop up the "Simulation
Settings" dialog box. In the "Simulation Settings" dialog box, set the "Maximum
step size" to 0.001s. (The period of the sine function is 0.1 second. A maximum
step size equal to 0.001 second will cause at least 100 points to be plotted each
period, resulting in a smoother plot.) Finally, select "OK" to close the "Simulation
Settings" dialog box and return to the Capture screen.
The transient part of the capacitor voltage can be eliminated by adjusting the initial
value of the capacitor voltage, vC(t). From the circuit, the voltage of the capacitor is
vC (t)  1.55sin(20t - 76.6) V
Let t = 0, then
vC (0)  1.55sin(76.6)  1.506 V
The plot for vC(t) was obtained using the default value of vC(0), which is zero.
The transient part of the capacitor voltage can be eliminated by changing the
value of vC(0) from 0 to -1.506 V. Some care needs to be exercised when
setting the value of vC(0). Notice that the polarity of the voltage vC(t) has the
plus sign on top. This polarity must also be used when the circuit is drawn in
Capture if the value vC(0) = -1.506 V is to be used.
With these two adjustments, the resulting plots are
voltage of capacitor
6-6
Power of capacitor
Step 5. Verify that the simulation results are correct.
The capacitor voltage
(1) is a sinusoidal function of time
(2) has an amplitude of 1.55 V
(3) has a period of 0.1 seconds
(4) has an initial value of v C(0) = -1.506 V.
The plot of the capacitor voltage has all four of these features. The simulation results
are correct.
Step 6. Report the answer to the circuit analysis problem.
The required plots of the capacitor voltage and power delivered to the capacitor versus
time.
See the end of document to see what to turn in.
What to turn in.
1. The circuit is at steady state before the switch is thrown at t = 0.
a. Determine the voltage across the capacitor vC(t) and the current i2k(t) through
the 2k resistor for t > 0 using the techniques discussed in lecture. (Careful how
you place a capacitor and resistor – 1 & 2 indicate a positive and negative
polarity, respectively.)
b. Simulate the circuit using PSpice. Display the results by plotting vC(t) and i2k(t),
and print out the plots.
c. Verify that the simulation results are correct by comparing them with the
predicted results using a percent difference. How do they compare?
2. Turn in parts 2 and 3 of the PSpice lab. Make sure that you show your work for
verifying the simulation results!
6-7
Download