You are on page 1of 5

Written by Th.

S Thai Van Tien

Lab 4
Time Domain Analysis
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 ca-
pacitors 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 two examples. The first example illustrates transient analysis of
a RL circuit with s single switch; the second circuit analyzed are the response of an RC
circuit to a Pulse 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 activit-
ies.
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.
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: TCLOSE = 0
1 2
Description: Open switch will close at t = TCLOSE; U1
Open switch will close at t = TCLOSE;
Pspice Name: Sw_tCLOSE TOPEN = 0
Sw_tOPEN 1 2
U2
Library: Analog

Spice Problem
The circuit shown is at steady state before the switch closes at time t = 0.

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.

After the switch closes , the circuit has a time constant with a value of 25 µs. Plot the
Step 1. Formulate a circuit analysis problem.

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

to time" as 6τRL = 150 µs. Finally, select "OK" to close the "Simulation Settings" dialog
type. The simulation starts at time zero and ends at the "Run to time". Specify the "Run

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.

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 infin-
ity. 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

To find the current at t = 30.405 µs, one can find that the plot indicates that iL(t)= 53.592
points & adjust value buttons allow one to select a particular data value on the curve.

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.

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 0 < t < 2 ms
−1000t

v 0 (t) = 
)
−1 + 4.46 ⋅ e 2 ms < t < 10 ms
−1000(t − 0.002)

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.

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

Output
V1 = -1V
V2 = 4V R 1k
TD = 0
TR = 1ns Vpulse C 1uF
TF = 1ns
PW = 2ms
PER = 10ms
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 calcula-
tion (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 post-
processor 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

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 v0(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 v0(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.

PRACTICE
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 negat-
ive polarity, respectively.)
B. Simulate the circuit using PSpice. Display the results by plotting vC(t) and i2kΩ(t),
and print out the plots.

You might also like