# Series RLC Circuit Step Response

I am trying to solve (for current) a series RLC circuit response to a DC step response

Its not difficult to go from

$$V_{\text{in}} = L ~\frac{{\rm d}i(t)}{{\rm d}t} + R~i(t) + \frac 1C \int i(t) {\rm d}t$$

$$\frac {{\rm d}V_{\text{in}} }{ {\rm d}t } = L \frac{{\rm d}^2i(t) }{ {\rm d}t^2} + R\frac{{\rm d}~i(t)}{{\rm d}t} + \frac 1C i(t)$$

Because $V_{\text{in}}$ is a constant then its differential is $0$ and the equation is homogeneous

$$L \frac{ {\rm d}^2 i(t) }{ {\rm d}t^2 } + R \frac { {\rm d} i(t) }{ {\rm d}t }+ \frac 1C i(t) = 0$$

$$\frac{ {\rm d}^2 i(t) }{ {\rm d}t^2 } + \frac RL \frac{ {\rm d} i(t) }{ {\rm d}t } + \frac 1 {LC} i(t) = 0$$

Complementary function is a quadratic

$$S^2 + \frac RL S + \frac 1 {LC} = 0$$

And its easy to use the quadratic equation to give me two roots S1 and S2

the roots are real and different so the solution is the sum of the two

$$i(t) = A{\rm e}^{{S_1}t} + B{\rm e}^{{S_2}t}$$

To calculate the constants A and B I use the initial conditions

the circuit starts up with zero energy stored hence $i(t) = 0$ when $t = 0$

$$A + B = 0$$

Then I come to my problem, how do I get the $\frac {{\rm d}i(t)}{{\rm d}t}$ when $t = 0$

I have tried differentiating the function

$$\frac{{\rm d}i(t)}{{\rm d}t} = S_1A + S_2B$$

But I still dont have enough information as I end up with

$$\frac{ {\rm d}i(t)}{ {\rm d}t} = A(S_1 - S_2)$$

I am a bit confused< I expected this to be easy as I can solve the none homogeneous case where the source is a sinusoid or whatever its a bit more complicated or so I thought!

• It is very difficult to read it. – Claude Leibovici Apr 28 '17 at 13:33
• Sorry I was just editing it and I think I just learned how to enter equations (woop woop) its pretty straight forward, I couldnt save my edit as Daniel had done it for me. Thanks Daniel it wont happen again I read the FAQ and can enter equations now – Jamie Lamb Apr 28 '17 at 13:55
• This is much better, for sure. Thanks to DanielV ! – Claude Leibovici Apr 28 '17 at 14:06
• @JamieLamb No problem, it takes a bit of time to learn Latex markups but it is worth it. Anyway, it looks like you don't care about step response at all, you are just trying to see the current behavior in regular RLC circuit with a constant voltage source. – DanielV Apr 28 '17 at 14:07
• I think I have the basics Daniel, I was stupidly missing out the $sign, after that its just getting to grips with the commands and thats experience so for the future I will copy other questions. With regards to my question I want the current as a function of time when a step is applied to the input. This question is linked to other questions I have posted, I have an RC circuit and want to calculate the inrush current but because the current jumps to max in zero time its not realistic the L in this equation is a parasitic to give me a rise time and stop me from having to split the equation – Jamie Lamb Apr 28 '17 at 14:15 ## 4 Answers At$t=0$you know the current is zero and the voltage on the capacitor is zero, so you have$V_{in}=L\frac {di}{dt}, \frac {di}{dt}=\frac {V_{in}}L$• Yes I think this is it, the entire Vin is across the inductor (because it has a zero rise time). Allow me to solve the equation and plot to confirm and its the answer! – Jamie Lamb Apr 28 '17 at 16:14 Well, we know that: $$\begin{cases} \text{V}_\text{in}\left(t\right)=\text{V}_\text{R}\left(t\right)+\text{V}_\text{C}\left(t\right)+\text{V}_\text{L}\left(t\right)\\ \\ \text{V}_\text{R}\left(t\right)=\text{I}_\text{R}\left(t\right)\cdot\text{R}\\ \\ \text{I}_\text{C}\left(t\right)=\text{V}_\text{C}'\left(t\right)\cdot\text{C}\\ \\ \text{V}_\text{L}\left(t\right)=\text{I}_\text{L}'\left(t\right)\cdot\text{L}\\ \\ \text{I}_\text{in}\left(t\right)=\text{I}_\text{R}\left(t\right)=\text{I}_\text{C}\left(t\right)=\text{I}_\text{L}\left(t\right) \end{cases}\tag1$$ Out of that system of equations we can solve: $$\text{V}_\text{in}'\left(t\right)=\text{I}_\text{in}'\left(t\right)\cdot\text{R}+\text{I}_\text{in}\left(t\right)\cdot\frac{1}{\text{C}}+\text{I}_\text{in}''\left(t\right)\cdot\text{L}\tag2$$ Now, introduce Laplace transform: $$\text{s}\cdot\text{v}_\text{in}\left(\text{s}\right)-\text{V}_\text{in}\left(0\right)=$$ $$\left(\text{s}\cdot\text{i}_\text{in}\left(\text{s}\right)-\text{I}_\text{in}\left(0\right)\right)\cdot\text{R}+\text{i}_\text{in}\left(\text{s}\right)\cdot\frac{1}{\text{C}}+\left(\text{s}^2\cdot\text{i}_\text{in}\left(\text{s}\right)-\text{s}\cdot\text{I}_\text{in}\left(0\right)-\text{I}_\text{in}'\left(0\right)\right)\cdot\text{L}\tag3$$ Now, solving for$\text{i}_\text{in}\left(\text{s}\right)$: $$\text{i}_\text{in}\left(\text{s}\right)=\frac{\text{s}\cdot\text{v}_\text{in}\left(\text{s}\right)-\text{V}_\text{in}\left(0\right)+\text{I}_\text{in}\left(0\right)\cdot\text{R}+\text{s}\cdot\text{I}_\text{in}\left(0\right)\cdot\text{L}+\text{I}_\text{in}'\left(0\right)\cdot\text{L}}{\text{s}^2\cdot\text{L}+\text{s}\cdot\text{R}+\frac{1}{\text{C}}}=$$ $$\frac{\text{s}\cdot\text{v}_\text{in}\left(\text{s}\right)}{\text{s}^2\cdot\text{L}+\text{s}\cdot\text{R}+\frac{1}{\text{C}}}-\frac{\text{V}_\text{in}\left(0\right)-\text{I}_\text{in}\left(0\right)\cdot\text{R}-\text{s}\cdot\text{I}_\text{in}\left(0\right)\cdot\text{L}-\text{I}_\text{in}'\left(0\right)\cdot\text{L}}{\text{s}^2\cdot\text{L}+\text{s}\cdot\text{R}+\frac{1}{\text{C}}}\tag4$$ When all the initial conditions equal$0$, we end up with: $$\text{I}_\text{in}\left(t\right)=\mathscr{L}_\text{s}^{-1}\left[\frac{\text{s}\cdot\text{v}_\text{in}\left(\text{s}\right)}{\text{s}^2\cdot\text{L}+\text{s}\cdot\text{R}+\frac{1}{\text{C}}}\right]_{\left(t\right)}\tag5$$ And, when$\text{V}_\text{in}\left(t\right)=\text{V}_\text{in}\$ is a constant DC voltage we get:

$$\text{I}_\text{in}\left(t\right)=\mathscr{L}_\text{s}^{-1}\left[\frac{\text{s}\cdot\frac{\text{V}_\text{in}}{\text{s}}}{\text{s}^2\cdot\text{L}+\text{s}\cdot\text{R}+\frac{1}{\text{C}}}\right]_{\left(t\right)}=$$ $$\frac{2\cdot\text{V}_\text{in}\cdot\sqrt{\text{C}}}{\sqrt{\text{C}\cdot\text{R}^2-4\cdot\text{L}}}\cdot e^{-\frac{\text{R}}{2\cdot\text{L}}\cdot t}\cdot\sinh\left\{\frac{\sqrt{\text{C}\cdot\text{R}^2-4\cdot\text{L}}}{2\cdot\text{L}\cdot\sqrt{\text{C}}}\cdot t\right\}\tag6$$

• Thanks for this answer Jan, dare I say that I hate Laplace transforms, I follow what you have done but I always feel like I have cheated when I use Laplace! No offence intended I appreciate your time but I want to know how to calculate the A and B to give me the solution. the rest is easy its just what is di/dt at t = 0 – Jamie Lamb Apr 28 '17 at 14:23
• You would expect Google would tell you the answer to this almost instantly but I cant find it, I have my Stroud book out and that doesnt help all the other books I have focus strongly on the none homogeneous case which I can do with a little effort. I like this stuff I find it a lot of fun (i need to get out more) Laplace is just not a method I like again no offence – Jamie Lamb Apr 28 '17 at 14:26
• @JamieLamb Why do you think you cheated? Laplace transform is, wildly used to find responses in electrical circuits (and I know that because I study electrical engineering in The Netherlands). And in this kind of circuits it can be super helpfull and usefull to use this technique. – Jan Apr 28 '17 at 14:27
• I appreciate its a powerful method Jan, its very powerful and I have a friend who does control theory for robotics and he always tells me its not cheating. I know its not cheating I just find it takes away a lot of the understanding. Maybe I am weird I like the integrating function method and all that stuff. I hope this doesnt insult anyone or affect me getting an answer. I can only be honest, I could of probably done the Laplace method I am fine with partial fractions and decent enough with algebra I just hate it! always have, I am an electronics engineer too Jan an extremely enthusiastic one – Jamie Lamb Apr 28 '17 at 14:30

A little add on, to solve this with Matlab its extremely easy, I can use Matlab to give me all the answers but wheres the fun in that and what do you honestly learn?

For my PhD I am working with motor drives and power filters, with a power filter and a dynamic load like an induction motor the system is not an LTI system its one of the main reasons I avoid Laplace

I developed a state space model of an RLC filter previously and I quickly adapted it with no load and a step input I just want to get the equation for the inrush and I can then do all this magical analysis to demonstrate I have solved a problem I have recently had with inrush resistors

This stupid initial condition has me beaten and I am disapointed in myself for not knowing this what I thought simple detail

I suppose I have spent too much time using Matlab and the like knowledge has vanished

Edit how do I insert a picture to display without having to click a link?

• You need a little reputation to post pictures. I don't know how much. Then when you are writing a question or answer there will be an icon to add a picture. – Ross Millikan Apr 28 '17 at 16:18
• Thanks Ross, I added the picture but its a link and I think its preferable to be able to see a picture inline in the post, seems a silly rule as it affects everyone me not having rep. Is this something a moderator can edit? or is the rule there for a good reason? – Jamie Lamb Apr 28 '17 at 16:24
• I disagree with the rule. I think it is to prevent people from joining and putting silly pictures here. I added the graphic inline. – Ross Millikan Apr 28 '17 at 16:38

I solved the equation with the other initial condition provided by Ross

I then wrote a little Matlab script which is added for posterity!, I wrote the script so it is easily modified for future readers of this post should they want to use it with different variables

clc
clear all
close all

R = 5.5;     % Resistance
L = 10e-6;   % Inductance
C = 220e-6;  % Capacitance
Vin = 100;   % Step input magnitude
t = [0:0.000001:0.01]; % time matrix

s1 = -R/(2*L) - 1/(2*L)*sqrt(R^2 - (4*L/C)) % Characteristic equation root 1
s2 = -R/(2*L) + 1/(2*L)*sqrt(R^2 - (4*L/C)) % Characteristic equation root 2

% initial conditions

% t = 0, i(t) = 0
% t = 0, di(t)/dt = Vin/L (entire input across inductor for step input)

% coefficients
A = Vin/((s1-s2)*L);
B = -Vin/((s1-s2)*L);

i = A.*exp(s1.*t) + B.*exp(s2.*t);

plot(t+.001,i)


And what do you know!, it matches my Simulink state space model perfectly which I have a lot of confidence in its accuracy as its been tested to death

Here is the plot

Matlab Script RLC Inrush

Thanks for editing my last post to include the picture Ross, if you could do the same to this post that would be super but not as super as providing me with the initial condition, many thanks for that I learnt something today

Jan I hope I didnt offend you by not accepting the Laplace solution it was a good solution and I appreciate the time you put into providing that it just wasnt what I was looking for no hard feelings I hope

I thought this was a good question seeing how its not easily found via Google but no one has voted it up so maybe I am just a bit thick!

Have a great weekend all who are reading this!

Regards

Jamie