Sigsys Exp1 p2 Shrestha G
Sigsys Exp1 p2 Shrestha G
Prelab 2 : 100%
Constructor University
d2 y(t) dy(t)
a2 − a 1 + a0 y(t) = x(t) (1.1)
dx2 dx
where, x(t) is the input to the system, y(t) is the response of the system to the
input, and a2 , a1 , a0 are system parameters.
However, for better analysis of second order systems, it is better to write Equation
(1.1) in the form of linear constant coefficient non-homogeneous differential equation,
d2 y(t) dy(t)
2
− 2ζωn + ωn2 y(t) = Kωn2 x(t) (1.2)
dx dx
where,
q
• ωn = a0
a2
is the Natural frequency
• ζ= √a1
2 a0 a2
is the damping ratio
• K= 1
a0
is the gain of the system.
y = yh + yf (1.3)
The homogeneous solution of a second order non-homogeneous differential equation
describes the transient response of the system. Here we assume that the input to the
system, x(t) = 0. Similarly, the forced solution describes the steady-state response of
a system, as we assume that the input to the system, x(t) ̸= 0.
d2 y(t) dy(t)
− 2ζω n + ωn2 y(t) = 0 (1.4)
dx2 dx
The solution of the equation is,
1
Substituting eqn. (1.5) into eqn, (1.4), we get,
Ceλt (λ2 + 2ζωn λ + λ2n ) = 0 (1.6)
From eqn. (1.6) we get,
λ2 + 2ζωn λ + λ2n = 0 (1.7)
Which is called the characteristic equation. The solution of the said equation helps
in finding the homogeneous solution. The solutions of the equation (roots) are,
p
λ1 = −ζωn + ωn ζ2 − 1 (1.7a)
p
λ2 = −ζωn − ωn ζ 2 − 1 (1.7b)
By substituting these into (1.5), we realize that each root has a contribution to the
homogeneous solution. Thus the homogeneous solution is,
Using the roots and our parameters, namely the damping ration ζ and the un-
damped natural frequency ωn (radian/s), we can classify our transient response into
the damping case it follows,
1. Under-damped case : 0 < ζ < 1, λ1 , λ2 ∈ C
2. Critically-damped case : ζ = 1, λ1 = λ2 ∈ R
3. Over-damped case : ζ > 1, λ1 , λ2 ∈ R where λ1 ̸= λ2
Under-damped Case: 0 < ζ < 1 - The homogeneous solution of the second-order
homogeneous differential equation exhibits a damped oscillatory behavior. The solution
can re written as,
2
The under-damped response is an exponentially damped sinusoidal whose rate of
decay depends upon ζ. Likewise, the terms ± exp −ζωn t is the envelope of the response.
p p
y(t) = C1 exp ((−ζ + ζ 2 − 1)ωn t) + C2 exp ((−ζ − ζ 2 − 1)ωn t) (1.11)
For an over damped solution, the response approaches slower than for critically
damped. The solution is also not oscillatory.
For all three cases C1 and C2 can be found using the initial conditions.
All the solutions can be summarized as in the following figure, fig.1.2, the ζ values
were taken to be 0.1, 0.3, 1, 2, and 3.
Figure 1.2: Solution for second-order homogeneous system with ζ = 0.1, 0.3, 1, 2, 3
3
1.3 Some key Definitions and the Initial conditions of switched
circuits
• Step Response - is the response of a system upon an applied input signal in
the form of a step function.
• The steady-state value - is the magnitude of the voltage, or current, after the
system has reached stability.
• Overshoot - It is observed if the transient signal exceeds the final steady state
value. It is represented by percentage and is given by,
Vmax − Vsteady−state
Overshoot = ∗ 100% (1.12)
Vsteady−state
2. The voltage drop across a capacitor cannot change instantaneously, whereas the
current flow through a capacitor can change instantaneously.
4
2 Experimental Set-up and Results - Transient re-
sponse of RLC-Circuits
Tools and Equipment
• Resistor Decade
• 10mH Inductor
• 6n8F Capacitor
• Oscilloscope
• Function generator
5
The hard copies of the oscilloscope was taken which shows the period of the expo-
nentially damped sinusoidal and ringing phenomenon. They are shown in Figure (2.2)
and (2.3) respectively,
To calculate the expected value of the damped radian frequency (ωd ), eqn.(1.9a)
was used. However for that we required to know the value of ζ and ωn . For a series
RLC circuit the ζ and ωn are given by,
1
ωn = √ (2.1)
LC
r
R C
ζ= (2.2)
2 L
However it is to be noted that for the resistance the internal resistance of 50Ω
should also be considered. Likewise, they were calculated to be,
1 1
ωn = √ =√ = 121267.8Hz
LC 10 × 10−3 6.8 × 10−9
6
r r
R C 100 + 50 6.8 × 10−9
ζ= = = 0.061846584
2 L 2 10 × 10−3
Therefore the damped radian frequency was calculated as,
p √
ωd = ωn 1 − ζ 2 = 121267.8 1 − 0.0618465842 = 121035.7 = 1.21 × 105 rad/s
Which is consistent with the measured damped radian frequency (1.22 × 105 rad/s).
The slight deviation from each other could be due to the error in the oscilloscope while
measuring the period. where do I see the measured frequency??
For a system to be critically damped, its damping ratio, (ζ) should be equal to 1
(ζ = 1). Using eqn.(2.2), the required resistance to make the circuit critically damped
was calculated to be,
r r
L 10 × 10−3
Rtotal = 2ζ × =2×1× = 2425.36Ω
C 6.8 × 10−9
Which is the resistance with the internal resistance of 50Ω included. Hence the
resistance of the R-Decade should be,
R = 2425.36 − 50 = 2375.36Ω
The resistance in the R-Decade was then set to the calculated value and the following
signal was observed in the oscilloscope, see Figure(2.4)
However, it was realized that varying the resistance of the R-Decade caused the
critical damping to be worse and better. The signal in fig(2.5) shows the critical
damping for R = 4000Ω, which was worse than for the original resistance.
7
Figure 2.5: Critically damped signal when Resistance = 4000Ω
Hence, it can inferred that the resistance should be decreased to get a better critical
damping. Fig(2.6)1 shows a better critical damping for R = 1900Ω.
For the final task the R-Decade was set to 30kΩ to make the circuit over-damped.
The transient voltage signal over the capacitor was the observed using the oscilloscope.
See, fig(2.7),
1
We lost our picture for the better critically damped case, so this a borrowed picture.
8
3 Evaluation
For the first part of the evaluation, the circuit from fig(2.1) was used and the differential
equation for the voltage vc (t) across the capacitor when R = 100Ω was obtained. It
is to be noted that the internal resistance (50Ω) from the function generator was also
taken into consideration.
Vin = vr + vc + vl
Also,
dvc
i = il = ic = C
dt
dvc
vr = ic × R = RC
dt
dil d2 vc
vl = L = LC 2
dt dt
Therefore,
d2 v c dvc
Vin = LC 2
+ RC + vc
dt dt
d2 vc R 1 Vin
+ dvc dt + vc =
dt2 L LC LC
Now comparing with equations from eqn.(1.2),
d2 y(t) dy(t)
2
− 2ζωn + ωn2 y(t) = Kωn2 x(t)
dx dx
Where,
r
1
ωn = = 1.213 × 105 rad/s
LC
r
R + 50 C
ζ= = 0.06184.7
2 L
K=1
9
The damped frequency was also calculated using eqn.(1.9a),
p
ωd = ωn 1 − ζ 2 = 1.21 × 105 rad/s
All of the above values have also been calculated in section (2.2). Since the damping
constant ζ = 0.0618, which is 0 < ζ < 1, the homogeneous solution of the differential
equation will be like eqn.(1.9) and is an underdamped circuit. Therefore, for the
homogeneous solution we have,
For the forced solution, since the forcing function is a constant the response will
also be a constant. So, assuming vc (t) = a, taking the first and second derivative and
plugging into the differential equation we obtained, we get,
vc (t) = a
dvc (t)
=0
dt
d2 vc (t)
=0
dt2
Plugging the given values in the differential equation,
d2 vc R 1 Vin
2
+ dvc dt + vc =
dt L LC LC
1 Vin
0+0+ ×a=
LC LC
a = Vin = 1
Therefore,
vc (t)f orced = 1
The forced solution can also be calculated using the circuit. At the steady state,
since the capacitor becomes an open circuit the voltage across the capacitor is equal
to the input voltage. Hence, the total solution is,
Finally, to determine the constants C1 and C2 we use the initial conditions of the
circuit. Since there is no source before t = 0s, the capacitor is initial uncharged. The
voltage drop across a capacitor cannot change instantaneously, and since the initial
voltage at t = 0 is zero, the dvdt
c (t)
= 0.
vc (0) = 0
−ζωn ×0
0=e (C1 cos ωd × 0 + C2 sin ωd × 0) + 1
C1 = −1
10
dvc (t)
= e−ζωn t (C2 ωd cos ωd t − C1 ωd sin ωd t) + e−ζωn t (−C1 ωd cos ωd t − C2 ωd sin ωd t)
dt
dvc (t)
= e−ζωn t (C2 ωd cos ωd t − C1 ωd sin ωd t − C1 ωd cos ωd t − C2 ωd sin ωd t)
dt
dvc (0)
Since, =0
dt
0 = e−ζωn ×0 (C2 ωd cos ωd × 0 − C1 ωd sin ωd × 0 − C1 ωd cos ωd × 0 − C2 ωd sin ωd × 0)
0 = 1(ωd × C2 − 0 − ζωn C1 − 0)
−ζωn
C2 =
ωd
C2 = −0.0620
Hence, for the under damped circuit, the final solution is,
The plot of vc (t) against time was then plotted into MATLAB1 . The plot is shown
in fig(3.2)
Figure 3.2: Plot of voltage against time for an underdamped case of an RLC circuit
For a critically damped signal, the ζ = 1, by using this fact and the eqn.(1.2), we
can find the required resistance to be,
r
R C
ζ= =1
2
r L
L
RT = 2 × = 2425.356Ω
C
1
All MATLAB codes are given in the appendix
11
However, taking the internal resistance into account, the actual resistance required
will be,
R = RT − 50 = 2375.356Ω
For, a critically damped system, the homogeneous solution is given by eqn.(1.10),
Figure 3.3: Plot of voltage against time for a critically damped case of an RLC circuit
12
Summarizing all the values we have both calculated and measured, in the first task
we had measured the damped frequency as well as calculated it,
measured, f requency = 19379.84[Hz] = 121767.2[rad/s]
calculated, f requency = 19263.42[Hz] = 121035.7[rad/s]
Similarly, in the second task we had calculated the required resistance for critical
damping as well as had observed the actual required resistance in a practical circuit,
calculated, resistance = 2425.256 − 50[Ω] = 2375.356[Ω]
observed, resistance = 1900[Ω]
Analyzing the measured and calculated values, it can be easily inferred that the
values are consistent and close with each other. However the slight difference between
them could be caused by various factors. One potential source of error might be that
the probe may not have been compensated well. The probe compensating for the ripple
effect could have caused an error in the measured value of the frequency. Similarly, to
get the correct critical damping resistance, the probe compensation should have been
done well, if not, it may require more or less resistance that the true value. Which
explains the discrepancy for the resistor value. For the frequency, since the cursor
function was used to measure it, the measured value could have also not been accu-
rate. Some other potential sources of error is the instrumental error originating from
the internal resistances of the R-Decade, breadboard, the passive elements and the
connecting wires.
For the final problem, the following circuit was used, see fig(3.4).
To obtain the differential equation, Kirchhoff’s Voltage law was applied into the
two meshes,
In the first mesh,
Z
1
R1 i1 + (i1 − il ) dt = Vin
C
In the second mesh,
Z
1 dil
(il − i1 ) dt + L + R2 il = 0
c dt
Z Z
1 dil 1
(il ) dt + L + R2 il = (i1 ) dt
c dt c
d2 il dil
i1 = il + LC 2 + R2 C
dt dt
13
Using i1 in the first mesh equation,
d2 il d2 il
Z
dil 1 dil
R1 il + R1 LC 2 + R1 R2 C + (il + LC 2 + R2 C − il ) dt = Vin
dt dt C dt dt
d2 i l dil dil
R1 il + R1 LC 2 + R1 R2 C +L + R2 il = Vin
dt dt dt
d2 il dil
R1 LC 2 + (R1 R2 C + L) + (R1 + R2 )il = Vin
dt dt
d2 il (R1 R2 C + L) dil (R1 + R2 ) Vin
2
+ + il =
dt R1 LC dt R1 LC R1 LC
Comparing with eqn.(1.2), we get,
•
r
R1 + R2
ωn = = 9 × 103 rad/s
R1 LC
•
R1 R2 C + L 19
ζ= p = = 1.2667
2 (R1 LC).(R1 + R2 ) 15
•
1
K= = 0.0123
R1 + R2
For the forced solution, as done in the previous problems, since the forcing function
is a constant the response will also be a constant. So, assuming il (t) = a, taking the
first and second derivative and plugging into the differential equation we obtained, we
get,
il (t) = a
dil (t)
=0
dt
d2 il (t)
=0
dt2
Plugging the given values in the differential equation,
14
Vin 16.2
a= = = 0.2A
(R1 + R2 ) (25 + 56)
il (t)f orced = 0.2
The forced solution can also be calculated using the circuit. At the steady state,
since the inductor becomes a short circuit the current across it is equal to the current
across the resistors in series.
Hence, the total solution is,
To find C1 and C2 the initial conditions are required. They can be found assuming
that since the switch in the circuit closes at t = 0s, there is no charge flowing through
the inductor and since the current across the inductor cannot change instantaneously,
il (0) = 0A. Similarly, since, il (0) = 0, didtl = 0 as well. Hence, using the initial
conditions,
il (0) = 0
p p
C1 exp ((−ζ + ζ 2 − 1)ωn × 0) + C2 exp ((−ζ − ζ 2 − 1)ωn × 0) + 0.2 = 0
C1 + C2 + 0.2 = 0
C1 = −0.2 − C2
Similarly,
dil (t) p √ p √
2 ((−ζ+ ζ 2 −1)ωn t) 2 ((−ζ− ζ 2 −1)ωn t)
= (−ζ + ζ − 1)ωn C1 e + (−ζ − ζ − 1)ωn C2 e
dt
dil (t)
=0
√ dt √
p p
2 ((−ζ+ ζ 2 −1)ωn ×0) 2 ((−ζ− ζ 2 −1)ωn ×0)
(−ζ + ζ − 1)ωn C1 e + (−ζ − ζ − 1)ωn C2 e =0
p p
(−ζ + ζ 2 − 1)ωn C1 + (−ζ − ζ 2 − 1)ωn C2 = 0
p p p
−0.2(−ζ + ζ 2 − 1) = C2 ((−ζ + ζ 2 − 1)) − C2 (−ζ − ζ 2 − 1)
p
−0.2(−ζ + ζ 2 − 1)
C2 = p p
−ζ + ζ 2 − 1 + ζ + ζ 2 − 1
p
−0.2(−ζ + ζ 2 − 1)
C2 = p = 0.0629
2 ζ2 − 1
Hence, C1 = −0.2 − 0.0629 = −0.2629
Finally,
p p
il (t) = −0.2629 exp ((−ζ + ζ 2 − 1)ωn t) + 0.0629 exp ((−ζ − ζ 2 − 1)ωn t) + 0.2
15
Therefore, the complete solution of the system is,
p
il (t) = −0.2629 exp −4402.86t) + 0.0629 exp ((−ζ − −18397.1t) + 0.2
The plot of il (t) was then plotted against time in MATLAB3 , see fig(3.5),
Figure 3.5: Plot of voltage against time for an over damped case of an RLC circuit
3
See apendix for code
16
4 Conclusion
The main objective of this experiment was to observe the transient response of a RLC
circuit. Different damping cases were studied, and it was realized that the nature of
damping depends upon the damping ratio (ζ). If 0 < (ζ) < 1 the system was under
damped, if ζ = 1 the system was critically damped and if ζ > 1 the system was over
damped. For an under damped circuit the output voltage followed an oscillatory be-
haviour which decreased exponentially. In the first part of the experiment the damped
frequency was measured and it was then compared to its theoretical calculated value.
Both the values were pretty close with each other. However the slight difference was
caused by various errors, namely the probe of the oscilloscope not being well compen-
sated and the cursor function being used to measure the time difference, which could
have been not accurate. For the second part, the resistance required to make the sys-
tem critically damped was calculated. However, it was observed that in a practical
circuit, the theoretical calculated resistance value would not generate a good critically
damped output. This error was again from the lack of proper probe compensation,
which required the resistance to be less than the true value to get a better critically
damped system. There could have also been further errors caused by the internal resis-
tances of the R-Decade, breadboard and the passive elements used in the circuit. For
the final task, the resistance in the circuit was set extremely high to observe an over
damped output signal. For the evaluation part, differential equations were obtained
and solved for different circuits and damping cases and their corresponding complete
responses were calculated. For each response, its corresponding plot against time was
also plotted in MATLAB and shown. Overall, the experiment was a success in showing
and learning about the transient response of an RLC circuit.
17
5 References
1. 20240829-co-520-b manual - U.Pagel, Page(11-22)
http://uwp-cu-lab.my-board.org/02.0.adveelab/02.1.signalsys/20240829-co-520-b manual.pdf
18
6 Appendix
6.1 MATLAB code for the under damped case
1 clc ; clear ;
2 %%
3 t = linspace (0 , 0.001 , 1000) ;
4
5 C = 6.8*10^ -9;
6 L = 10*10^( -3) ;
7 R = 150;
8
9 wn = sqrt (1/( L * C ) ) ;
10 zeta = ( R / L ) /(2* sqrt (1/( L * C ) ) ) ;
11 K = 1;
12 wd = wn * sqrt (1 - zeta ^2) ;
13
14 C1 = -1;
15 C2 = ( zeta * wn * C1 ) / wd ;
16
19 figure ;
20 plot (t , vc_t ) ;
21 xlabel ( ’ Time ␣ [ s ] ’) ;
22 ylabel ( ’ V_c ( t ) ␣ [ V ] ’) ;
5 C = 6.8*10^ -9;
6 L = 10*10^( -3) ;
7 zeta = 1;
8
9 R = 2* sqrt ( L / C ) ;
10 wn = sqrt (1/( L * C ) ) ;
11 K = 1;
12
13 C1 = -1;
14 C2 = ( - wn ) ;
15
19
17
18 figure ;
19 plot (t , vc_t ) ;
20 xlabel ( ’ Time ␣ [ s ] ’) ;
21 ylabel ( ’ V_c ( t ) ␣ [ V ] ’) ;
22 ylim ([0 ,1.5]) ;
5 R1 = 25;
6 C = 2*10^ -6;
7 L = 20*10^( -3) ;
8 R2 = 56;
9
14 C2 = 0.0629;
15 C1 = -C2 -0.2;
16
19 figure ;
20 plot (t , il_t ) ;
21 xlabel ( ’ Time ␣ [ s ] ’) ;
22 ylabel ( ’ I_l ( t ) ␣ [ A ] ’) ;
23 ylim ([0 ,0.25]) ;
20
6.4 Prelab: RLC Circuits - Frequency Response
1. Name the filter characteristic measured over the different components, component
combinations.
The different filters generated by measuring over different components and com-
ponent combinations were,
2. Show the Bode magnitude plot across the resistor, the capacitor, the inductor
and across the capacitor and the inductor together. Use a 5 V amplitude and
vary the frequency starting at 100 Hz up to 100 KHz. Develop a Matlab script
to plot the four characteristic in one graph. Attach the script to the prelab!
The following magnitude Bode plot was plotted in MATLAB,
1 clc ; clear ;
2 % % Magnitude Bode Plot
3 w = logspace (2 ,6 ,1000) ;
4 R = 390;
5 C = 270*10^ -9;
6 L = 10*10^ -3;
7
21
11 H_LC = ( -( w ) .^2* L * C + 1) ./(1 -( w ) .^2* L * C +1 j * w * C * R ) ; %
Bandstop filter
12
25
40 % Display results
41 fprintf ( ’ Lower ␣ cutoff ␣ frequency : ␣ %.2 f ␣ Hz \ n ’ , f_low ) ;
42 fprintf ( ’ Upper ␣ cutoff ␣ frequency : ␣ %.2 f ␣ Hz \ n ’ , f_high ) ;
43 fprintf ( ’ Bandwidth : ␣ %.2 f ␣ rad / s \ n ’ , bandwidth ) ;
44 fprintf ( ’ Bandwidth_f : ␣ %.2 f ␣ Hz \ n ’ , bandwidth_f ) ;
45
46 xline ( f_low , ’k - - ’) ;
47 xline ( f_high , ’k - - ’) ;
48 legend ( ’ Bandpass ’ , ’ Highpass ’ , ’ Lowpass ’ , ’ Bandstop ’ , ’Cut -
off ’ , ’Cut - off ’ , ’ Location ’ , ’ southwest ’) ;
49 hold off ;
3. Taking the magnitude across the resistance represents a band-pass filter. Calcu-
late the bandwidth and the Q factor of the circuit. Extract the bandwidth from
the Matlab plot and compare.
22
The bandwidth and the quality factor were measured using,
Rs 390
B = ω2 − ω1 = = = 39000[rad/s] = 6207.04[Hz]
L 10 × 10−3
ωo 1
Q= = √ = 0.4935
ω2 − ω1 B LC
From the MATLAB code the bandwidth was measured to be,
Bandwidth = 6120[Hz]
Which is consistent with the calculated value. The slight difference could have
occurred due to a inaccuracy of the MATLAB code. The code for extracting the
bandwidth is also given in the code above.
23
6.5 Experiment data: RLC Circuits - Frequency Response
For the first an RLC circuit was built and the output was taken at different components,
and component combinations. The hardcopies for each output was taken and are shown
below,
24
Figure 6.5: High pass filter, output taken over inductor and capacitor
The second part of the experiment, the resonance frequency was measured using
the X-Y mode in the oscilloscope and the Lissajou figure. The frequency was changed
until a linear figure was obtained, as for resonance frequency the phase shift is 0◦ . After
the linear figure was obtained, the plot was reverted back to X-t mode. The resonance
frequency was found to be,
Figure 6.6: X-t plot of signals with 0 phase difference and resonance frequency
For the final task, the cutoff frequencies were also measured. The known fact that
at the cutoff frequencies the phase difference is ±45◦ was used. The phase difference
was measured using the measure function of the oscilloscope and the frequencies were
varied until we obtained the desired phase difference. The X-t plot for both cutoff
frequencies are shown below,
25
Figure 6.7: X-t plot of signals with 45◦ phase difference
26