4th-Order Circuit

In the RLC circuit below, the switches close at time t = 0 t = 0 , at which time the inductors are de-energized and the capacitors have initial voltages V C 1 V_{C1} and V C 2 V_{C2} .

Let E ( t ) E(t) be the total combined energy stored in the inductors and capacitors at any particular time. Let E 0 E_0 be the value of E ( t ) E(t) at time t = 0 t = 0 .

At what time is E ( t ) E(t) equal to 0.09 E 0 0.09 E_0 ?

Details and Assumptions:
1) R = 2 R = 2
2) L 1 = 1 L_1 = 1
3) L 2 = 2 L_2 = 2
4) C 1 = 3 C_1 = 3
5) C 2 = 1 C_2 = 1
6) V C 1 = 5 V_{C1} = 5
7) V C 2 = 10 V_{C2} = 10


The answer is 42.5.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Karan Chatrath
Dec 5, 2019

This problem is interesting on many levels. I hope to explain it all in the following description. At a general time t t , say the charge on C 1 C_1 is Q 1 Q_1 , that on C 2 C_2 is Q 2 Q_2 . Let the current flowing through L 1 L_1 be I 1 I_1 and that through L 2 L_2 be I 2 I_2 . Since the capacitors are discharging, it can be concluded that:

Q ˙ 1 = I 1 \dot{Q}_1 = -I_1 Q ˙ 2 = I 2 \dot{Q}_2 = -I_2 Using Kirchoff's laws, the circuit equations can be written as:

Q 1 C 1 + L 1 I ˙ 1 + R ( I 1 + I 2 ) = 0 -\frac{Q_1}{C_1} + L_1 \dot{I}_1 + R(I_1 + I_2)=0 Q 2 C 1 + L 1 I ˙ 2 + R ( I 1 + I 2 ) = 0 -\frac{Q_2}{C_1} + L_1 \dot{I}_2 + R(I_1 + I_2)=0

Now, I often make use of linear algebra to make this system of equations more compact. The benefit of using linear algebra is that doing so enables me to code in a more compact manner. By rearranging the above equations, one can obtain the following state-space form:

[ Q ˙ 1 Q ˙ 2 I ˙ 1 I ˙ 2 ] = [ 0 0 1 0 0 0 0 1 1 L 1 C 1 0 R / L 1 R / L 1 0 1 L 2 C 2 R / L 2 R / L 2 ] [ Q 1 Q 2 I 1 I 2 ] \left[\begin{matrix}\dot{Q}_1\\ \dot{Q}_2\\ \dot{I}_1\\ \dot{I}_2\end{matrix}\right] = \left[\begin{matrix}0&0&-1&0\\0&0&0&-1\\ \frac{1}{L_1C_1}&0&-R/L_1&-R/L_1\\ 0&\frac{1}{L_2C_2}&-R/L_2&-R/L_2\end{matrix}\right] \left[\begin{matrix}Q_1\\ Q_2\\ I_1\\ I_2\end{matrix}\right]

Or:

x ˙ = A x \dot{x} = Ax Where A = [ 0 0 1 0 0 0 0 1 1 L 1 C 1 0 R / L 1 R / L 1 0 1 L 2 C 2 R / L 2 R / L 2 ] A = \left[\begin{matrix}0&0&-1&0\\0&0&0&-1\\ \frac{1}{L_1C_1}&0&-R/L_1&-R/L_1\\ 0&\frac{1}{L_2C_2}&-R/L_2&-R/L_2\end{matrix}\right] x = [ Q 1 Q 2 I 1 I 2 ] x = \left[\begin{matrix}Q_1\\ Q_2\\ I_1\\ I_2\end{matrix}\right]

The initial conditions are stated in the problem and are written as a vector: x ( 0 ) = [ C 1 V C 1 C 2 V C 2 0 0 ] x(0) = \left[\begin{matrix}C_1V_{C_1}\\ C_2V_{C_2}\\ 0\\ 0\end{matrix}\right]

Now, the total energy of the circuit is as follows:

E = Q 1 2 2 C 1 + Q 2 2 2 C 2 + L 1 I 1 2 2 + L 2 I 2 2 2 E = \frac{Q_1^2}{2C_1} + \frac{Q_2^2}{2C_2} + \frac{L_1I_1^2}{2} + \frac{L_2I_2^2}{2}

This can be written in a compact form using linear algebra as follows:

E = 1 2 x T W x E = \frac{1}{2}x^TWx

Where x x is the vector defined above and

W = [ 1 C 1 0 0 0 0 1 C 1 0 0 0 0 L 1 0 0 0 0 L 2 ] W = \left[\begin{matrix}\frac{1}{C_1}&0&0&0\\0&\frac{1}{C_1}&0&0\\ 0&0&L_1&0\\ 0&0&0&L_2\end{matrix}\right]

The energy at t = 0 t=0 is: E o = 1 2 x ( 0 ) T W x ( 0 ) E_o = \frac{1}{2}x(0)^TWx(0)

Now, I define normalized energy as follows:

E R = E E o E_{R} = \frac{E}{E_o}

The following plot shows two cases. One where R = 2 R=2 and the other where R = 0 R=0 . Notice how well the law of conservation of energy is demonstrated through this . It is known that a resistor is a dissipative element and without it, energy remains constant.

What also makes this problem interesting is the answer. I am lucky to have got it right cause I obtain an answer of approximately 42.7 \boxed{42.7} seconds and not 42.5 seconds. Subsequent tries got me to the correct ballpark. Moreover, the use of linear algebra made the numerical solution more compact in my opinion. The simulation code is below (MATLAB).

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
clear all
clc

%System Parameters:
R       = 2;
L1      = 1;
L2      = 2;
C1      = 3;
C2      = 1;
VC1     = 5;
VC2     = 10;

% Definition of A and W matrices:
A       = [0 0 -1 0;0 0 0 -1;1/(L1*C1) 0 -R/L1 -R/L1;0 1/(L2*C2) -R/L2 -R/L2];
W       = diag([1/C1;1/C2;L1;L2]);

% Initial conditions and circuit energy initialisation:
xs(:,1) = [C1*VC1;C2*VC2;0;0];
E(1)    = 0.5*xs(:,1)'*W*xs(:,1);

% Time initialisation:
dt      = 1e-5;
tf      = 50;
t       = 0:dt:tf;
N       = length(t);

% Solving Linear System of Diff. eqs by Explicit Euler..
% And computing Circuit Energy:

for k = 2:N
    dxs     = A*xs(:,k-1);
    xs(:,k) = xs(:,k-1) + dt*dxs;
    E(k)    =  0.5*xs(:,k)'*W*xs(:,k);
end

% Normlaised energy:
Er      = E/E(1);

% Postprocessing:
plot(t,E/E(1),'Linewidth',1.5)
grid on
xlabel('Time')
title('Normalised Energy of Circuit vs. Time')
ylabel('E/E_o')
ylim([0 1.1])
hold on

One may even get an analytical solution in terms of a matrix exponential. Anyway, I posted my solution just to share some of my observations as I solved this. Nice problem, as always!

Karan Chatrath - 1 year, 6 months ago

Thanks for the detailed solution. I also wrote some code to keep track of energy conservation, as an additional check on the solution. It is interesting to see how long the circuit oscillates after it loses most of the energy during the initial current spike. When I run Explicit Euler, I get a final time of 42.71 42.71 for Δ t = 1 0 4 \Delta t = 10^{-4} , 42.49 42.49 for Δ t = 1 0 5 \Delta t = 10^{-5} , and 42.47 42.47 for Δ t = 1 0 6 \Delta t = 10^{-6}

Steven Chase - 1 year, 6 months ago

Log in to reply

I used a time step of 1 0 5 10^{-5} and reported my observations based on that (had solved it several hours earlier, actually). Now when I recheck using the numbers you have given, I see the results are consistent with your observations. Maybe I was absent-minded about some detail while I was solving it. Anyway, thanks for the clarification

Karan Chatrath - 1 year, 6 months ago

Log in to reply

Got any more problems coming?

Steven Chase - 1 year, 6 months ago

Log in to reply

@Steven Chase I am a little tied up these days. I do manage to take out time to solve any problem I find interesting and to keep my streak alive. I will post something as soon as I can

Karan Chatrath - 1 year, 6 months ago
Steven Chase
Dec 5, 2019

The state variables are the capacitor voltages ( V C 1 , V C 2 ) (V_{C1} , V_{C2}) and the inductor currents ( I L 1 , I L 2 ) (I_{L1} , I_{L2}) . Express the rates of change of the state variables in terms of the state variables themselves.

Capacitor equations:

I L 1 = C 1 V ˙ C 1 I L 2 = C 2 V ˙ C 2 -I_{L1} = C_1 \dot{V}_{C1} \\ -I_{L2} = C_2 \dot{V}_{C2}

Inductor equations:

V C 1 R ( I L 1 + I L 2 ) = L 1 I ˙ L 1 V C 2 R ( I L 1 + I L 2 ) = L 2 I ˙ L 2 V_{C1} - R(I_{L1} + I_{L2}) = L_1 \dot{I}_{L1} \\ V_{C2} - R(I_{L1} + I_{L2}) = L_2 \dot{I}_{L2}

Isolating the derivative terms and numerically integrating yields the desired solution. Recall also the equations for the energy stored in capacitors and inductors:

E C = 1 2 C V C 2 E L = 1 2 L I L 2 E_C = \frac{1}{2} C V_C^2 \\ E_L = \frac{1}{2} L I_L^2

It takes about 42.5 42.5 units of time for the total stored energy to drop to 9 % 9 \% of its original value. A plot of the resistor current and energy ratio is shown below:

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...