# Writing the correct diff. equations for an RC circuit

• Yoni V
In summary, the conversation includes a discussion about solving a circuit with a given picture using Kirchhoffs laws and Thevenin's theorem. The conversation includes attempts at writing equations for voltage loops and current loops, but there are doubts about their accuracy. The conversation also mentions using Laplace transform and Kirchhoffs current law as alternative methods for solving the circuit.
Yoni V

## Homework Statement

Given the circuit in the picture, I need to:
a. write a system of diff. equations that could solve the charges on each cap. and current on each resistor, and write them in a vector/matrix form.
b. solve the equations for t>>τ

## Homework Equations

Kirchoff's laws, perhaps Thevenin's theorem, although this wasn't my attempt at it.

## The Attempt at a Solution

I wrote the equations for voltage loops.
First was the outer loop, yielding
##V=I_{1}R_{1}+I_{2}R_{2}+I_{3}R_{3}=I_{1}R_{1}+\frac{1}{2}I_{1}R_{2}+\frac{1}{4}I_{1}R_{3}=R_{1}\dot{Q_{1}}+R_{2}\dot{Q_{2}}+I_{3}R_{3}##
Second was
##V=R_{1}\dot{Q_{1}}+R_{2}\dot{Q_{2}}+Q_{2}/C_{2}##
Third was
##V=R_{1}\dot{Q}_{1}+Q_{1}/C_{1}+Q_{2}/C_{2}##
And lastly, although obviously one of these is redundant, the loop containing both capacitors yields
##I_{2}R_{2}=R_{2}\dot{Q}_{2}=Q_{2}/C_{2}-Q_{1}/C_{1}\Rightarrow Q_{2}/C_{2}=Q_{1}/C_{1}+R_{2}\dot{Q_{2}}##

I think I'm supposed to have enough info here to be able to write a decent set of diff. equations, but somehow meshing the equations together didn't result in anything. I mean, first I'm not sure if the equations are indeed enough for a theoretical solution, and second I'm a little puzzled at how to transform all of this into vector form.

Thanks!

Edit: Trying to force an answer from this resulted in:
##
\begin{bmatrix}\dot{Q_{1}}\\
\dot{Q_{2}}
\end{bmatrix}=\begin{bmatrix}\frac{-1}{R_{1}C_{1}} & \frac{-1}{R_{1}C_{2}}\\
\frac{-1}{R_{2}C_{1}} & \frac{1}{R_{2}C_{2}}
\end{bmatrix}\begin{bmatrix}Q_{1}\\
Q_{2}
\end{bmatrix}+\begin{bmatrix}\frac{V}{R_{1}}\\
0
\end{bmatrix}
##

And then for part b, it results (as for all other equation combos) that Q1=Q2=0 (equating the derivatives to 0). This doesn't make much sense to me, but I can't figure out what's wrong.

#### Attachments

• New Bitmap Image.jpg
11.6 KB · Views: 356
Last edited:
I don't think that your equations are correct. They look like Kirchhoffs voltage law, but I don't understand what you are doing. How come that I2 = ½*I1 and that I3 = 1/4*I1?

You must read Kirchhoffs voltage law, and sketch the current loops that you use as for I1, I2, I3.

Edit: I assume that you switch on the battery at t = 0 ?

OH Yes!
You're right.. my thinking was that the currents are additive, and therefore split at the junctions, but of course they don't necessarily split evenly...
Ok, I'll have another go at it.
Thanks

Still not working.
These are the equations I came up with this time.
I0 is the current going out directly from the voltage source.
I1 is the current reaching C1, I2 is the current reaching C2.
Now, using Kirchoff's laws correctly (I think...), we get for the resistors:
R1 gets current I0, R2 gets I1-I0, R3 gets I0+I2-I1.
And for voltage loops we get:
1. Outer loop: ##V=I_{0}R_{1}+\left(I_{1}-I_{0}\right)R_{2}+\left(I_{0}+I_{2}-I_{1}\right)R_{3}=\left(R_{1}-R_{2}+R_{3}\right)I_{0}+\left(R_{2}-R_{3}\right)I_{1}+R_{3}I_{2}##
2. Loop through V and C2: ##V=I_{0}R_{1}+\left(I_{1}-I_{0}\right)R_{2}+Q_{2}/C_{2}=\left(R_{1}-R_{2}\right)I_{0}+R_{1}I_{1}+\frac{Q_{2}}{C_{2}}##
3. Loop through V and C1: ##V=I_{0}R_{1}+Q_{1}/C_{1}##
4. Loop through C1 and C2: ##Q_{1}/C_{1}=R_{2}I_{1}-R_{2}I_{0}+Q_{2}/C_{2}##
5. Loop through C2 and R3: ##Q_{2}/C_{2}=R_{3}I_{0}+R_{3}I_{2}-R_{3}I_{1}##
6. Loop through C1 and R3: ##Q_{1}/C_{1}=\left(I_{1}-I_{0}\right)R_{2}+\left(I_{0}+I_{2}-I_{1}\right)R_{3}##

That's it. The last eq. is redundant, but it's a nice validation for the rest of the equations.
Isolating I0 from loop equation no. 3 we get ##I_{0}=\frac{V}{R_{1}}-\frac{Q_{1}}{R_{1}C_{1}}##
Finally, combining equations 1,2,4,5 into the final system after substituting I0, I ended up with
##
\begin{bmatrix}R_{2}-R_{3} & R_{1}R_{3}\\
R_{1}^{2} & 0\\
R_{1}R_{2} & 0\\
R_{1}R_{3} & -R_{1}R_{3}
\end{bmatrix}\begin{bmatrix}\dot{Q_{1}}\\
\dot{Q_{2}}
\end{bmatrix}+\begin{bmatrix}\frac{R_{2}-R_{1}-R_{3}}{C_{1}} & 0\\
\frac{R_{2}-R_{1}}{C_{1}} & \frac{R_{1}}{C_{2}}\\
\frac{R_{2}-R_{1}}{C_{1}} & \frac{R_{1}}{C_{2}}\\
\frac{R_{3}}{C_{1}} & \frac{R_{1}}{C_{2}}
\end{bmatrix}\begin{bmatrix}Q_{1}\\
Q_{2}
\end{bmatrix}=\begin{bmatrix}\left(R_{2}-R_{3}\right)V\\
R_{2}V\\
R_{2}V\\
R_{3}V
\end{bmatrix}##

That's incorrect, and I want to know whether it's just due to a minor algebraic error on the way, or whether I again misused Kirchhoff's laws.
I equated the derivatives to 0 to solve for the steady state solution, and after solving Q1 and Q2 in terms of the constants, substituting them in the leftover equations resulted in a dependency between the constants (rather than purely a true statement).

Thanks again

Try to write equations for ##\dot{V}## to use Kirchhoff's laws. With ##\dot{Q}## the voltage expression is not clear.

Hmm.. but the voltage I think is given as a constant

When use 2nd law we right the current for the whole hang and express the i.e. ##I_{c1}## as ##I_1-I_2##. With this notation relations for current can written as:
$$I_1 = \frac{V_0-Q_1/C_1}{R_1} ,\, I_2 = \frac{Q_1/C_1-Q_2/C_2}{R_2} ,\, I_3 = \frac{Q_2/C_2}{R_3}$$
I think this notation makes easier equations.

Yoni V
Yoni V said:
I1 is the current reaching C1, I2 is the current reaching C2.
( Just an example ).

I2 is not "reaching" anything: It's a circulation current, spinning around in the loop.
Hesch said:
You must read Kirchhoffs voltage law, and sketch the current loops that you use as for I1, I2, I3.
Kirchhoffs law states:

ΔV = 0 , as for a circulation path in a circuit.

You must sketch these (3) circulation paths ( ending up with 3 equations ). Example:

( you could call the red current, m1, and the blue current, m2. Having found m1 and m2, the current through the center resistor becomes m1 + m2. )

I'd express the impdances of a capacitor, C, as Zc = 1 / sC. Then

I = dQ/dt could be expressed as I(s) = Q*s. Then your matrix system could be expressed by Laplace transform instead of by the time-domain. But I don't know if you are familiar with Laplace transform?

( You may also use Kirchhoffs current law instead, ending up with only 2 equations. Using KCL you find the voltages. By using KVL you find the currents. But when knowing the voltages/currents, currents/voltages are easily found by Ohms law ).

Last edited:
Perhaps I am misusing terms, as English is not mother tongue, but indeed I didn't mean to say the current is "going" anywhere.
Thing is, I don't understand what is wrong with my equations.

Ok... I got it, I think.. Just stupid algebra mistakes...

Last edited:
Yoni V said:
Perhaps I am misusing terms, as English is not mother tongue, but indeed I didn't mean to say the current is "going" anywhere.
Don't be sorry for that: I'm from Denmark, having the same "problem".

Just you understand, that KVL is calculating with circulation currents, which are rarely physical currents. You solve the physical current by adding the loop-currents, found with a few equations. Many people mix up these loop-currents and physical currents, ending up with the double number of equations.

So set up 3 equations ( as for your problem ), add the loop-currents and you have found the physical currents.

So maybe I didn't understand it after all, as I'm not familiar with circulation loops.
From what I've learned, I can notate the currents on a circuit like in the following figure (and I could also add bigger loop eqs., but they cancel out eventually)

#### Attachments

• Untitled.jpg
45.6 KB · Views: 299
Those equations look good. Now solve for ##I_0##, ##I_1##, and ##I_2## in terms of V, Q1, and Q2.

Yoni V
#11: You are mixing physical currents and loop-currents.

The green arrows are not just paths. They are loop-currents. Call them m1, m2, m3. I0, I1, I2 are physical currents, you can measure them. Z1 = 1/sC1 and so on.

Here it goes:

(m1): V - m1*R1 - 1/(sC1)*(m1-m2) = 0
(m2): 1/(sC1)*(m1-m2) - m2*R2 + 1/(sC2)*(m3-m2) = 0
(m3): Try it yourself

Solve m1, m2, m3, then:

I0 = m1
I1 = m1 - m2
I2 = m2 - m3

Last edited:
Yoni V
Hesch said:
Just you understand, that KVL is calculating with circulation currents, which are rarely physical currents.
KVL has nothing to do with currents. KVL says if you sum the voltage differences around any closed loop, they'll sum to 0. That's all it says.

When you use mesh analysis (which is only one possible way to solve the problem), you typically apply KVL to the loops that each mesh current travels. It's not necessary to use those loops, however.

vela said:
KVL says if you sum the voltage differences around any closed loop, they'll sum to 0. That's all it says.
Well, you are free to make the substitution:

V = I * R

With KCL you are free to use:

I = V / R

Ok, I finally made it, thank you all for you help and patience!

## 1. How do I determine the correct differential equations for an RC circuit?

The differential equations for an RC circuit can be determined by using Kirchhoff's laws, which state that the sum of voltages around a closed circuit must equal zero and the sum of currents entering and leaving a node must also equal zero. By applying these laws to the circuit, you can derive the differential equations that describe the behavior of the circuit.

## 2. What are the variables in the differential equations for an RC circuit?

The variables in the differential equations for an RC circuit include the voltage across the capacitor (Vc), the voltage across the resistor (Vr), the current flowing through the capacitor (Ic), and the current flowing through the resistor (Ir). These variables are all functions of time (t).

## 3. Do I need to take into account the initial conditions when writing the differential equations for an RC circuit?

Yes, the initial conditions of the circuit, such as the initial voltage across the capacitor and the initial current flowing through the circuit, must be taken into account when writing the differential equations. This allows for a more accurate representation of the behavior of the circuit.

## 4. Can the differential equations for an RC circuit be solved analytically?

Yes, the differential equations for an RC circuit can be solved analytically using techniques such as separation of variables or integrating factors. However, in some cases, the equations may be too complex to solve analytically and numerical methods may be used instead.

## 5. Are there any simplifications or assumptions that can be made when writing the differential equations for an RC circuit?

Yes, there are some simplifications and assumptions that can be made when writing the differential equations for an RC circuit. These include assuming ideal components (e.g. no resistance in the wires, no capacitance in the wires), neglecting higher-order terms, and assuming the circuit is in a steady state. These simplifications can make the equations easier to solve, but may result in less accurate results.

• Introductory Physics Homework Help
Replies
10
Views
1K
• Introductory Physics Homework Help
Replies
3
Views
372
• Introductory Physics Homework Help
Replies
2
Views
1K
• Introductory Physics Homework Help
Replies
26
Views
2K
• Introductory Physics Homework Help
Replies
2
Views
952
• Introductory Physics Homework Help
Replies
11
Views
2K
• Introductory Physics Homework Help
Replies
4
Views
803
• Introductory Physics Homework Help
Replies
3
Views
800
• Introductory Physics Homework Help
Replies
4
Views
406
• Introductory Physics Homework Help
Replies
2
Views
611