# RLC circuit: how to find voltage/current derivatives and derive differential equation

Trying to resolve differential equations for RLC-networks, I'm always stumbling upon the voltage/current derivatives. Here I would like to give two examples from the same textbook and explain my problems. The author asks to find out the value of vL(0+). Let's follow proposed solution (https://www.slader.com/textbook/9780073380575-fundamentals-of-electric-circuits-5th-edition/361/). For t<0 under stable conditions vL(0-) = 0 because it is a simple wire. iL(0-) is 50V/(40+10) = 1A. vC(0-) is defined by a voltage drop on 40-Ohm resistor, so it is 40 V. At t=0 a 2-A current source is switched on. According to KCL,

2 = iL(0+) + iR(0+);


Axiome 1: inductor current cannot change abruptly. Thus, iL(0-) = iL(0+) = 1 A. Axiome 2: capacitor voltage cannot change abruptly. Then vC(0-) = vC(0+) = 40 V. Then

2 = 1 + iR(0+);
iR(0+) = 1 A;


Now let's calculate vL(0+). According to KVL,

vL(0+) = iR(0+)*R + vC(0+) = 1*40 + 40 = 80 V.


LTSpice confirms it. The task is to find out v(t) for t>0. Step 1: define type of response. Answer: underdamped. Step 2: pick up a general equation from the textbook and find out coefficients A and B:

v(t) = vS + exp(-alpha)*(A*cos(omega*t) + B*sin(omega*t));


In order to find out A and B, we need initial conditions, namely voltage and derivative of voltage at t = 0. It is not difficult to find out vC(0-). Let's focus on the derivative:

iC = C*dV/dT;
dV/dT = iC/C;


And here comes the problem. The author of the solution writes:

iC(0+) = iL(0+) = 0.


Indeed, a current through the inductor was 0 A at stable conditions. BUT, now there is a 50 V source which is switched on. And there is a current through 2 and 4 Ohm resistors. And since all these resistors are in series with capacitor, I can logically write:

iC(0+) = iR(0+) = 50/6 A.


The first circuit was cited in order to show the concept: at t = 0+, the current from the second source cannot be neglected. However, the solution for the second circuit neglect it.

Can gurus of the electrical engineering explain subtleties of the logic?

• "I can logically write: iC(0+) = iR(0+) = 50/6 A." I think that's where your problem is. This is not true because of the inductor in series with that capacitor. You would have 6*Ic(0+) = 50 - L*Ic'(0+) - Vc(0+), which when used with your t<0 parameters (iL = iC = 0 and Vc = 12V), gives you iC' and in turn vL. – Harnex Aug 27 '19 at 7:49
• @Harnex, as you write "... (iL = iC = 0 and Vc = 12V)...". According to axiome, iL(0-) = iL(0+) = 0, but it's not equal to iC(0+), because capacitor current can change abruptly. – tenghiz Aug 27 '19 at 7:59
• So for $t\ge 0$ you have: $50=L\frac{di}{dt}+Ri+(-12+\frac{1}{C}\int i\:dt)$, where $i$ is the clockwise current. – Chu Aug 27 '19 at 8:44
• No, there's an initial condition on C. – Chu Aug 27 '19 at 8:48
• @Chu, I see. And what is next? – tenghiz Aug 27 '19 at 8:49

Capacitor and Inductor are devices capable of storing energy in electrostatic and electromagnetic fields, respectively due to which, in simple words, the voltage across the capacitor and the current through inductor cannot change instantly. This is what you recognised as axioms.

Let's see, What happens at t=0?

The current source is 'open' (50u(-t)=0 at t=0 and for all t>0). The voltage source is now introduced (which was earlier 'shorted' as u(t) =0 for t<0). Due to these changes the previous steady state conditions are disturbed and new steady state conditions will be reached after transient. During transient at t=0+, iL(0-)=iL(0+) and vC(0-)=vC(0+).

At t=0+, as current source is out (Note that it is not neglected here, it IS 0 ! ), remaining elements will be in series and following the required condition that iL(0+)=iL(0-), the current through all elements at t=0+ should be 0. It can't be anything else because if it were, it'd have violated iL(0-)=iL(0+)=0.

(In response to his comments) So why you can't write by Ohm's law as current=voltage /sum of resistance? Because in Ohm's law, the voltage should be voltage across resistance(s), which here is not the source voltage (can you find out what is it and then apply Ohm's law to check whether you're getting 0 or not? It'd strengthen your skills! HINT: Voltage across inductor would be Ldi/dt, terminal at which current enters being more positive).

• I can't got the meaning of the last paragraph. I can substitute a voltage source in series with resistance by a current source in parallel with resistance and I'll get the circuit as in Example 1. Thus, I will have a current through capacitor and inductance. Axiome states iL(0-)=iL(0+)=0. Let it be. I just write iC(0+) = iR(0+) = 50/6 A. What is wrong with my assumption? – tenghiz Aug 27 '19 at 9:28
• You'd be happy to know dat what u attempted to do (replace network across inductor terminals by a current source and parallel resistance/impedance) is what you'd learn soon & is called Nortan's theorem. For d part dat what is wrong with your current assumption is that when you perform source transformation, u do it wrt 'untransformed' network, that is the network which is NOT transformed that will have equal circuit parameters. For eg consider 1 & 9 ohm resistances in series across 1V, if u now transform 1V& 1 Ohm into 1A and 1 Ohm current source, will u have same current thru 1Ohm as earlier? – Deep Aug 27 '19 at 9:49
• To add into my prev cmnt, in short you don't include into transformation that part of n/w in which you want to find current/voltage. In your problem 2,if you want to find current through inductor, yes you can reduce it to current source in parallel with some impedance, what exact impedance? You'd learn that when you'd learn to find Nortan's impedance.Also remember that 2 resistors in series with capacitors don't follow current = Source voltage/(sum of resistances), why?because u should consider voltage across capacitor also( Use KVL) Tip: Google this book: Engineering Circuit Analysis by Hayt – Deep Aug 27 '19 at 10:04
• I have started to read it. 8th edition. Fortunately, it has the same chapter order as "Fundamentals of Electric Circuits" by Sadiku, 5th edition. Tell you later whether I have some insights or not. – tenghiz Aug 27 '19 at 14:01
• Both are recognised as worldwide standard reference text for this subject, keep questioning stuff you find though 👍 – Deep Aug 27 '19 at 14:29

After reading and re-reading thoroughly letter by letter textbooks of Sadiku and Hayt (thanks to @Deep), I have finally figured out the whole technology and all the math behind RLC-circuits.

Little nota bene: doesn't matter which textbook is used (among these both), the confusion will always come because of seemingly enormous avalanche of the information. Personally, I think that both authors make the same error, namely first proposing the solutions prêt-à-porter for parallel and series RLC circuits, and only then start to discuss how to solve differential equations for general cases. Pedagogically correct would be to start from teaching students how to derive differential equations from the scratch. Besides giving the better understanding of RLC-networks, the folks will refresh their brains with some pure math.

Procedure will be the same for all kind of circuits. 1) Find vC(0-) and iL(0-), id est before the step happened; 2) find vC(∞) and iL(∞), i.e. at stable DC conditions after the transient response is finished; 3) find derivatives vC(0+)/dt and iL(0+)/dt (this step requires that we take into consideration all the independent sources at t=0+); 4) derive differential equation and find out the form of the transient response (this step requires that we switch off all the independent sources). Here some basic math is required because sometimes we have to differentiate original parameters; 5) The next step is to find roots of quadratic equation, define the form of the transient responce, write the general equation for the current and find its coefficients. I skip this part because this is not relevant to topic question.

Reminder: vC(0-)=vC(0+) and iL(0-)=iL(0+). Once again: capacitor voltage cannot change quickly, all others voltages can. Inductor current cannot change quickly, all others can. Important detail: if inductor is in series with any other element, the current through the element at t=0+ will be the current through the inductor. I don't write "the same as through the inductor" because semantically this expression means the value of the current. It's the same current, basta. Event if there is a 1000-V generator in series.

Let's start to solve for the first circuit which was mentioned in the question.

1) vC(0-)=40 V, iL(0-)=1 A.

2) vC(∞)=40 V, iL(∞)=3 A.

3) find derivatives vC(0+)/dt and iL(0+)/dt. At this point we must remember following principle: at t=0+ only 3 values are known and stable - vC(0+), iL(0+) and independent source. Here we need to write all possible KCL and KVL equations and then try to figure out how to express derivatives through the known values. It is possible that the first written equation will suffice, however, it is not excluded that we have to abandon some equations and examine the others. Let's start from the node A. Please don't forget to take into consideration all the independent sources: KCL: 2 = iL(0+) + i(40); where i(40) is a current through 40-Ohm resistance


We remember that iL(0+)=iL(0-)=1 A, thus i(40R)=1 A. If someone would like to argue that there is a current through 40-Ohm resistance which is caused by 50-V source, than I would like to repeat once again: at t=0+, only 3 values are known and stable - vC(0+), iL(0+) and independent source. Everything that is between can change.

Now let's write KVL equation for the central mesh. Once again, this sequence (KCL --> KVL --> etc) is not a generally prescribed procedure. We can blindly write all possible KCL and KVL equations and then figure out how to find the desired values.

KVL: vL(0+) = i(40)*R + vC(0+).


We still remember that vC(0+)=vC(0-)=40 V. The value i(40)=1 A. Then vL(0+)=80 V. Since

vL = L*di/dt


then

di(0+)/dt = vL(0+)/L = 80/0.5 = 160 A/s.


We have found current derivative. Basically it's enough and there is no need to calculate voltage derivative. The reason is that the general equation for the transient response will have the same form for voltage and current. And even if we will compose the differential equation for the voltage, the roots of the characteristic equation will be the same for voltage and current waveforms. The only thing which changes is the steady part of the general equation, namely vC(∞) and iL(∞).

As I have already mentioned, the step 4 requires that we switch off all the independent sources. Little detail: voltage source must be replaced by short circuit, current source - by open circuit. We are free to write currents in any direction. However, here it would be rational to represent 40-Ohm resistor and inductor in series, it will reduce the number of currents to 3. Let's write KCL equation:

0 = iL + iC + i(10); where i(10) is the current through 10-Ohm resistance.


Now we have to find the way to express all the values through iL and vC:

0 = iL + C*dvC/dt + i(10).


Here we notice that the 10-Ohm resistance has the same voltage as the capacitor, thus

0 = iL + C*dvC/dt + vC/10.


Since there is only one possible KCL equation, then now we can write KVL equation. We have 2 meshes and we can write 2 equations. I arbitrarily decide to write it for the right mesh:

vC = 40*iL + L*diL/dt.


I can continue to write the equation for another mesh, however, I notice that I can substitute vC from KCL equation by the value form the KVL equation:

0 = iL + C*dvC/dt + vC/10;
0 = iL + C*dv(40*iL + L*diL/dt)/dt + 0.1(40*iL + L*diL/dt);
0 = iL + dv(40*iL + 0.5*diL/dt)/dt + 0.1(40*iL + 0.5*diL/dt);
0.5*d(di)/d(dt) + 40.05*di/dt + 5*i = 0;
d(di)/d(dt) + 80.1*di/dt + 10*i = 0;
s^2 + 80.1*s + 10 = 0; characteristic equation.


Here is another nota bene: all the parameters in the differential equations must be positive. If there is a "-" somewhere, please check once again KCL and KVL equations.

Also, we have derived a differential equation for current. Actually it will be the same equation for the voltage waveform too, however, we have already calcualted current derivative di(0+)/dt, so let's avoid any useless movements.

=============================================

Let's carry out the same sequence for the second RLC-circuit.

1) iL(0-)=0 A; vC(0-)=-12 V;

2) iL(∞)=0 A; vC(∞)=50 V;

3) t=0+, current source is off, voltage source is on. This is a simple series circuit, so let's directly write KVL equation.

-50 + 6*iL(0+) + L*di(0+)/dt + vC(0+) = 0;
-50 + 6*0 + 1*di(0+)/dt - 12 = 0;
di(0+)/dt = 62 A/s;


4) Switch off voltage source and derive differential equation. Once again, let's write KVL:

6*iL + L*di/dt + vC = 0;


This is a series circuit and the current is the same through all the elements. It would be convenient to express capacitor voltage through the current:

6*iL + L*di/dt + 1/C*∫i(t)dt = 0;


We can differentiate this equation:

6*di/dt + 1*d(di)/d(dt) + i*1/0.04 = 0;


Characteristic equation:

s^2 + 6*s + 25 = 0;