CSE250 Lab Exp 8 Simulation Transient
CSE250 Lab Exp 8 Simulation Transient
Experiment No. 8
Study of the Transient Behavior of RC Circuit Using
Software (LTSpice) Simulation.
Objective
The objective of this experiment is to study the Transient Response of the first order RC
circuit with step input. In this experiment, we shall apply a square wave input to an RC
circuit separately and observe the respective wave shapes and determine the time constant, τ.
Theory
The word ‘transient’ means something that only lasts for a short time (short-lived). In circuit
theory, transient response is the response of a system to a change from an equilibrium or a
steady state. In the context of RC circuits (a circuit only consisting of resistors and capacitors
but no inductor), we will study how the voltage and current in an RC circuit change due to
external excitation, such as switching or sudden change in input. In today’s experiment, we
will construct RC circuits and observe their response due to sudden changes in input voltage.
Capacitor
Capacitors are passive elements that can store energy within its own electric field. A
capacitor can be as simple as an insulating material (dielectric) consisting of two parallel
conductive plates. Charges can build up within these plates which creates an electric field
across the plates and a voltage difference between them.
The amount of charge accumulated in each plate is directly proportional to the voltage
difference applied across the two plates of a capacitor. If the voltage across the capacitor is 𝑣𝐶
and the accumulated charge is 𝑄, then we can write,
1
𝑄∝𝑉
⇒ 𝑄 = 𝐶𝑉
𝑑 𝑑 𝑑
⇒ 𝑑𝑡
(𝑄) = 𝑑𝑡
(𝐶𝑉) = 𝐶 𝑑𝑡
(𝑉)
𝑑𝑉
⇒ 𝐼 = 𝐶 𝑑𝑡
Here, 𝐼 is the current through the capacitor and 𝐶 is the capacitance [S.I. unit is Farad (F)].
This boxed equation dictates the behavior of a capacitor. As we can see, there is a current
through the capacitor if and only if the voltage across the capacitor changes over time.
From this equation, we can find the equivalent series and parallel capacitance.
➢ Series combination:
➢ Parallel combination:
RC circuit
An RC circuit is an electric circuit composed of resistors and capacitors as the only passive
components (may contain other active components). Such circuits exhibit transient behaviors
if the input voltage is suddenly changed.
Consider this RC circuit with a switch (arrow indicates the direction of switching):
2
We can break this circuit into two separate circuits:
➢ Initial circuit
➢ Final circuit
The initial position of the switch indicates the voltage source was open and the resistor was
grounded. Since there is no source in the circuit, the elements will have no current.
Furthermore, at steady-state conditions, a capacitor acts like an open circuit. As a result,
the voltage across the capacitor 𝑣𝐶 will be 0V.
Initial Circuit
On the other hand, the final position of the switch indicates that the voltage source will now
supply voltage. However, after reaching a steady-state condition, the capacitor will again
act like an open circuit. As a result, the voltage across the capacitor 𝑣𝐶 will be 5V.
3
Transient Behavior
In the previous circuit, the voltage across the capacitor 𝑣𝐶 rises from 0V to 5V. Unlike
resistors, it takes a significant amount of time for the voltage across a capacitor to change.
This behavior is called transient behavior. We can figure out how the voltage will change
over time using KVL and KCL.
⇒ 𝐶( 𝑑
𝑑𝑡 )
𝑣𝐶 · 𝑅 + 𝑣𝐶 − 𝑉 = 0
𝑑
⇒ 𝑣𝐶 + 𝑅𝐶 𝑑𝑡
𝑣𝐶 − 𝑉 = 0
𝑑
⇒ 𝑣𝐶 + τ 𝑑𝑡
𝑣𝐶 − 𝑉 = 0
Let, τ = 𝑅𝐶. This quantity is called the time constant and the S.I unit is seconds (s). In this
example, τ = 1𝑘Ω × 1µ𝐹 = 1𝑚𝑠. Time constant has physical significance. It determines
how fast the transient response dies out.
−𝑡/τ
[
𝑣𝑐(𝑡) = 𝑣𝐶(∞) + 𝑣𝐶(0) − 𝑣𝐶(∞) 𝑒 ]
Here, 𝑣𝐶(𝑡) is the voltage across the capacitor at time 𝑡. Therefore, 𝑣𝐶(0) refers to the
capacitor voltage of the initial circuit and 𝑣𝐶(∞) refers to the capacitor voltage of the
final circuit after it has reached steady-state. If 𝑣𝐶(0) < 𝑣𝐶(∞), then the RC circuit is said
to be in the charging phase. And the RC circuit is in the discharging phase if
𝑣𝐶(0) > 𝑣𝐶(∞).
4
Charging Phase Discharging Phase
Time Constant
For a given circuit with a resistance of 𝑅 and a capacitance of 𝐶, the time constant is τ = 𝑅𝐶.
However, it is also possible to find the time constant from the plot of transient response.
Higher the value of time constant, the longer it takes for the voltage to reach steady-state. At
time 𝑡 = τ,
[
𝑣𝐶(τ) = 𝑣𝐶(∞) + 𝑣𝐶(0) − 𝑣𝐶(∞) 𝑒 ] −τ/τ = 𝑣𝐶(∞) + [𝑣𝐶(0) − 𝑣𝐶(∞)]𝑒−1
𝑣𝐶(∞)−𝑣𝐶(τ) −1
∴ 𝑣𝐶(∞)−𝑣𝐶(0)
= 1 −𝑒 ≈ 0. 632 = 63. 2%
For example, if τ = 1𝑚𝑠, then 1𝑚𝑠 after switching, the voltage has already reached 63.2%
of its way to the final steady-state voltage.
A similar analysis shows that, after 𝑡 = 5τ, the voltage almost reaches the final steady-state
voltage. So we can conclude it takes approximately 5τ time for a transient circuit to
reach steady-state.
Procedure
5
Circuit 1
An intelligent way to simulate the switching mechanism shown in Circuit 1 is to use a square
wave that oscillates between the values of the two sources (3V & -2V) in place of the sources
and the switch. That way, despite using a single AC source, it behaves as if it’s switching
between the two voltages supplied by the sources present in Circuit 1 (3V & -2V). Let us use
this method and simulate the circuit step by step as described below:
➢ Open a new schematic window by clicking File → New Schematic. Draw the circuit
shown below in Figure 1.
Figure 1
6
➢ We have to modify the V1 source so that it provides 3V and -2V alternatively in order
to mimic the switching action illustrated in Circuit 1. We will use the source as a
pulsating DC square wave generator. To do so, Right-click on the voltage source →
Select Advanced → insert the values as below and click OK. It will generate a -2V -
3V and 50 Hz pulsating DC square signal.
To run the ‘Transient Analysis’, we have to write the analysis command. First, find
the ‘Spice Directives’ option by Right-clicking on the schematic → Draft → Spice
➢ After clicking the ‘Spice Directives’, the ‘Edit Text on the Schematic’ window will
appear. Now Right-click on the blank space on this window → Select ‘Help me Edit’
→ Analysis Command. A window titled ‘Edit Simulation Command’ will appear.
Insert values in the boxes as below and click OK. It will generate a transient analysis
7
command. Place the command somewhere on the schematic. [Notice the ‘.tran’ syntax
for transient analysis.]
➢ To run the simulation, click ‘Run’. Find the ‘Run’ button from the above
toolbar or Right-click on the schematic →Run.
➢ After clicking the ‘Run’ button a plot window will appear. In this window we can see
responses and waveshapes of voltage and currents with respect to time. To see a plot
Right-click on the plot window → Add trace → Select any voltage or current →
OK.
[We can also add trace by simply using a marker on the schematic. When the run is
complete a cursor will appear if we place the mouse cursor on a wire or component
of the circuit.]
8
The axes properties (Range) can be changed by Right-clicking on the horizontal
(x-axis) and the vertical (y-axis).
➢ To extract data from a plot/response, use the data cursor. A cursor for a particular
trace will appear by clicking on the name of that trace. One click will produce
one cursor, clicking twice will produce two. The data point of the cursor can be
moved by the arrow keys from the keyboard.
➢ A window will appear on the bottom right corner containing the values corresponding
to the cursors. Note that it also shows the difference between the two cursors (data
points) for both the vertical and the horizontal axes. Use this to find Time constant τ.
➢ Save the Schematic by clicking File → Save as → ‘Name.asc’ and the plots by
clicking File → Save plot settings → ‘Name.plt’ for future use and analysis.
9
Lab Work
1. Measure the Time constant τ from the plot you just generated.
2. Perform similar analysis to visualize the current supplied to the capacitor and observe
whether it’s a discontinuous graph or not.
3. Observe the shapes of the capacitor voltage & current and also compare the value of
the Time Constant to the theoretical value τ = RCeq, and state your opinion on
whether your observations match the theory or not.
Report
1. Answer to questions and Complete the Lab work sections.
2. Save all your .asc and .plt files and make a zip file. You need to submit it with the
report.
3. Discussion [comment on the obtained results and discrepancies]. Add pages if
necessary.
10