# RLC circuit - Can someone check my work?

1. Nov 27, 2016

### eehelp150

1. The problem statement, all variables and given/known data
Find the differential equation for Vo

Vin is a square wave

2. Relevant equations
KCL/KVL

3. The attempt at a solution
At Node V1:
$\frac{V_1-V_in}{R_1} + \frac{1}{L_1}\int_{0}^{t}(V_1-V_2) = 0$

At Node V2:
$\frac{1}{L_1}\int_{0}^{t}(V_2-V_1)+C_1*\dot{V_2}+\frac{V_2}{R_2}=0$

V2 = Vo

Differentiate equation 2 and solve for V1
$V_2-V_1+L_1C_1\ddot{V_2}+\frac{L_1\dot{V_2}}{R_2}$
$V_1=V_2+L_1C_1\ddot{V_2}+\frac{L_1\dot{V_2}}{R_2}$

Plug into equation 1
$\frac{V_2}{R_1}+\frac{L_1C_1\ddot{V_2}}{R_1}+\frac{L_1\dot{V_2}}{R_1R_2}+\frac{1}{L_1}\int_{0}^{t}(L_1C_1\ddot{V_2}+\frac{L_1\dot{V_2}}{R_2}=\frac{V_{in}}{R_1})$

Get rid of integral
$\frac{V_2}{R_1}+\frac{L_1C_1\ddot{V_2}}{R_1}+\frac{L_1\dot{V_2}}{R_1R_2}+C_1\dot{V_2}+\frac{{V_2}}{R_2}=\frac{V_{in}}{R_1}$

Multiply everything by $\frac{R_1}{L_1C_1}$
$\frac{V_2}{L_1C_1}+\ddot{V_2}+\frac{\dot{V_2}}{C_1R_2}+\frac{R_1\dot{V_2}}{L_1}+\frac{R_1{V_2}}{L_1C_1R_2}=\frac{V_{in}}{L_1C_1}$

Is my work correct?

Last edited by a moderator: May 8, 2017
2. Nov 27, 2016

### Staff: Mentor

Yes, looks okay to me.

3. Nov 27, 2016

### eehelp150

Assuming I have numerical values for resistors, inductors, capacitors:
To find the natural response, I set the differential equation equal to 0 and find the roots. Then I plug in the roots into the corresponding equation depending on dampening type, correct?
i.e. critically damped = $Root_1te^{-\alpha t}+Root_2e^{-\alpha t}$

To find the forced response, I set the differential equation equal to the forcing function and solve. I know for a constant Vin, the forcing function is simply $A$.. For a sinusoidal Vin, the forcing function would be $Acos(wt + \theta )$. What would the forcing function be for a square wave?

4. Nov 27, 2016

### Staff: Mentor

That's the idea, yes.
That depends upon the frequency of the squarewave compared to the damping constant and the natural response's frequency. If the transients have a chance to die out before the next abrupt change in the squarewave input then you can model the input as a step function. If you think about it, a squarewave can be modeled as a sum of time shifted step functions.

5. Nov 27, 2016

### eehelp150

My professor instructed us to use a frequency of 5tau. Once we find the roots, the smallest root = tau.
$\frac{T}{2}=5\tau$
$T = 10\tau$
$f = \frac{1}{T}$
$f = \frac{1}{10\tau}$

6. Nov 27, 2016

### Staff: Mentor

The rule of thumb is that after $5\tau$ all the excitement is over and we can assume that the transients have decayed. So you can use a step function to model the input transitions.

7. Nov 27, 2016

### eehelp150

So what would be the forcing function?

8. Nov 27, 2016

### Staff: Mentor

A step function with the appropriate amplitude.

9. Nov 27, 2016

### eehelp150

so something like:
natural response = A for 0 to x

natural response = -A for x to ...

10. Nov 27, 2016

### Staff: Mentor

You probably only need to model one transition. The response will be the same for following transitions, only alternating in sign (positive going transition followed by negative transition followed by positive transition....). Take a look at the steady state value of Vo if the input was just a suddenly applied DC voltage.

11. Nov 27, 2016

### eehelp150

Ok but the forcing function to set equal with the differential equation would simply be "A", right?
Something like this and solve for numerical value of A to get forced response.
Then complete response = natural + forced
$\ddot{V}+\dot{V}+V=A$

Sorry if these questions are really simple, my professor never covered this and he does not reply to any emails.

12. Nov 27, 2016

### Staff: Mentor

Yes, the step function can be modeled as a constant in this case. You'll want to consider what size that constant should be (how large are the actual transitions?)

13. Nov 27, 2016

### eehelp150

What do you mean? Would this be something like checking the numerical value after I do the work (i.e. extremely large or extremely small number doesn't make sense -> math error somewhere) or do you mean something else?

14. Nov 27, 2016

### Staff: Mentor

I mean, look at the size of the transition that the input makes from one state to the next.

15. Nov 27, 2016

### eehelp150

Still don't really understand...
Do you mean something like if the squarewave input it 5V amplitude with 10V peak (+5, -5, +5, -5, etc), that the transition size is 10 (going from 5 to -5)

16. Nov 27, 2016

### Staff: Mentor

Yes.

If you happen to have actual component values then you might want to experiment with a circuit simulator to see how the input step size affects the size of the transient response. You should be able to directly compare the simulated results to your calculated ones.