Main content

### Course: Electrical engineering > Unit 2

Lesson 4: Natural and forced response- Capacitor i-v equations
- A capacitor integrates current
- Capacitor i-v equation in action
- Inductor equations
- Inductor kickback (1 of 2)
- Inductor kickback (2 of 2)
- Inductor i-v equation in action
- RC natural response - intuition
- RC natural response - derivation
- RC natural response - example
- RC natural response
- RC step response - intuition
- RC step response setup (1 of 3)
- RC step response solve (2 of 3)
- RC step response example (3 of 3)
- RC step response
- RL natural response
- Sketching exponentials
- Sketching exponentials - examples
- LC natural response intuition 1
- LC natural response intuition 2
- LC natural response derivation 1
- LC natural response derivation 2
- LC natural response derivation 3
- LC natural response derivation 4
- LC natural response example
- LC natural response
- LC natural response - derivation
- RLC natural response - intuition
- RLC natural response - derivation
- RLC natural response - variations

© 2024 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# LC natural response - derivation

Formal derivation of the LC natural response, where we discover the frequency of oscillation. Written by Willy McAllister.

We derive the natural response of the inductor-capacitor, $\text{LC}$ , circuit.

*This is where sine waves are born.*

### Background

This article walks you step-by-step through the solution to a $2$ nd-order differential equation. I don't assume you have previous experience with this type of equation. Sal has videos on 2nd-order equations, too. $1$ st-order differential equations are solved step-by-step in the articles on $\underset{\u2015}{\text{RC}}$ and $\underset{\u2015}{\text{RL}}$ natural response. You can also check out Sal's videos on 1st-order differential equations.

### What we're building to

The natural response of an $\text{LC}$ circuit is described by this homogeneous second-order differential equation:

The solution for the current is:

Where ${\omega}_{\circ}=\sqrt{{\displaystyle \frac{1}{\text{LC}}}}$ is the $\text{LC}$ circuit and ${\text{V}}_{0}$ is the starting voltage on the capacitor.

*natural frequency*of theIn electrical engineering, we use the letter $j$ as the $\sqrt{-1}$ .

(The letter$i$ is already taken for current.)

(The letter

## Introduction

### First-order systems

Up to now we've looked at first-order circuits, $\underset{\u2015}{\text{RC}}$ and $\underset{\u2015}{\text{RL}}$ , that have one energy-storage element, $\text{C}$ or $\text{L}$ . The natural response of first-order circuits has an exponential shape that "slumps" to its final value. The energy in its storage element is dissipated by the resistor.

### Second-order systems

Now we look at a circuit with two energy-storage elements and no resistor. Circuits with two storage elements are

*second-order systems*, because they produce equations with second derivatives.This article covers the $\text{LC}$ circuit, one of the last two circuits we will solve with full differential equation treatment. The last circuit to get this treatment is the $\text{RLC}$ (in the next article). The mathematics of differential equations keeps getting harder. Fortunately, after we are done with the $\text{LC}$ and $\text{RLC}$ , we learn a really nice shortcut to make our lives simpler.

We stick with differential equations instead of going straight to the shortcut because I want to show you where sine waves come from in electronics. Sine waves emerge from the solution to second-order equations. Sine waves are important. They are

*the*building block for*all*other types of signals.Second-order systems are the first systems that rock back and forth in time, or $\text{LC}$ circuit.

*oscillate*. The classic example of a mechanical second-order system is a clock with a pendulum. In electronics, the classic second-order system is the## Natural response

We want to find the $\text{LC}$ circuit. The natural response is what a circuit does when there is no external driving force. Natural response is always an important part of the total response of a circuit.

*natural response*of the## Natural response of a $2$ nd-order circuit

To get going on a precise answer for the natural response, let's set up the circuit with some initial energy. The components are labeled with careful attention to the sign convention for passive components. The inductor has an initial current of $0{\textstyle \phantom{\rule{0.167em}{0ex}}}\text{A}$ because the switch starts in the open position. We assume the capacitor has an initial voltage before the switch closes, ${v}_{\text{C}}=-{\text{V}}_{0}$ . (
Notice how ${v}_{\text{C}}$ has its $+$ sign at the bottom.) We let the switch close at $t=0$ .

As with every circuit analysis, we begin by writing one of Kirchhoff's Laws. In this case, we'll go with Kirchhoff's Voltage Law (KVL) around the loop, starting at the lower left and going around clockwise.

This KVL equation contains an integral, which is awkward to deal with. The way to get rid of an integral (also known as an anti-derivative) is to take its derivative. We take the derivative of every term in the equation.

This gives us the second derivative of the $\text{L}$ term, gets rid of the integral in the $1/\text{C}$ term, and still leaves us with $0$ on the right side.

The equation is tidier if the first term has no coefficient, so we divide through by $\text{L}$ . This second-order differential equation captures the essence of our circuit.

### Propose a solution

When we solved the first-order $\text{RC}$ and $\text{RL}$ circuits, we guessed at an exponential solution for $i(t)$ . Guessing works with second-order equations, too. Our second-order equation has similar requirements: we want the function and its derivatives to look like each other so they can all add up to $0$ . The exponential function fits the description. We propose an exponential function with some adjustable parameters:

*frequency*. Since we are solving a natural response,

*natural frequency*.

Now we substitute our proposed function into the differential equation and check to see if it makes the equation true.

Let's work on the first term by taking two derivatives. The first derivative is:

And now the second derivative:

We plug our new second derivative back into the equation:

And do some factoring to pull $K{e}^{st}$ to the side:

How many ways can we make this equation true?

That leaves the interesting solution when the ($s+1/\text{LC)}$ term equals $0$ :

This equation is called the $s$ that make left side equal zero).

*characteristic equation*of our circuit. We want to find the*roots*of the characteristic equation (the value(s) ofWhoa, look what's about to happen. We're about to take the square root of a negative number. We are about to generate an imaginary number.

Electrical engineers use the letter $j$ to indicate the imaginary unit, $\sqrt{-1}$ , since we already use $i$ for current.

As a shorthand, we give a name to the square root term:

The roots of the characteristic equation can be expressed in terms of ${\omega}_{\text{o}}$ as:

How about that! The $\text{LC}$ circuit produces two complex natural frequencies, ${s}_{1}$ and ${s}_{2}$ . And one of the natural frequencies is negative. So curious. This will turn out to be very interesting.

Either ${s}_{1}$ or ${s}_{2}$ by itself is a root of the equation. For our proposed solution we allow the possibility of both natural frequencies, ${s}_{1}$ and ${s}_{2}$ . So we write a general solution as a linear combination of two terms, with two adjustable $K$ constants.

At this point you might be thinking, "Complex exponents? Negative frequency? Is this really happening?" The answer is, yes. So please hang in there while we work with these expressions.

## Euler's identities

To work with these complex exponents, we resort to an important identity.

Using Maclaurin series expansions for ${e}^{jx}$ , $\mathrm{sin}jx$ , and $\mathrm{cos}jx$ , it is possible to derive these

*Euler identities*:In the linked video, anytime Sal says $i$ , we will say $j$ .

These identities let us turn the strange ${e}^{imaginary}$ thing to a normal complex number. The real and imaginary parts come from a cosine or sine function, so both the real and imaginary components are somewhere in the range $-1$ to $+1$ .

## Use Euler's identities

We can use Euler's identities in our proposed solution.

Multiply through the constants:

and gather the cosine terms and sine terms together:

We don't know ${K}_{1}$ or ${K}_{2}$ , or their sum or difference. It seems perfectly ok to replace the unknown $K$ 's with different unknown $A$ 's, just to make things appear a bit simpler.

If we let ${A}_{1}=({K}_{1}+{K}_{2})$ , and ${A}_{2}=j({K}_{1}-{K}_{2}$ ), then $i(t)$ is:

We used Euler's identities to rearrange the complex exponentials into a sum of trig functions. This equation is the very first time in electronics we see a sine or cosine as a function of time (a

*sinusoidal waveform*).(Notice how we defined ${A}_{2}$ to include $j({K}_{1}-{K}_{2})$ , so $j$ no longer directly appears in the proposed solution.)

## Test the proposed solution

Next, we check our proposed solution by plugging it into the second-order differential equation. If we can come up with values for the constants that make the differential equation true, the proposed solution is a winner.

### Figure out the initial conditions

The initial conditions needed for a second-order circuit are a little more involved than for a first-order circuit.
When we did this for first-order circuits, $\text{RC}$ or $\text{RL}$ , we had to know a single value, a starting current or voltage. With a second-order $\text{LC}$ circuit, we need to know

*two*things: the current*and*the derivative of the current when the switch closes.We write down everything we know about $t={0}^{-}$ (the moment just before the switch closes):

- The switch is open, so
$i({0}^{-})=0$ - The starting capacitor voltage is specified:
.${v}_{\text{C}}({0}^{-})=-{\text{V}}_{0}$

If $t={0}^{+}$ is the moment just after the switch closes, our goal is to find $i({0}^{+})$ and $di/dt({0}^{+})$ .

We know some properties of inductors and capacitors that will take us from $t={0}^{-}$ to $t={0}^{+}$ :

- Inductor current cannot change instantly, so
$i({0}^{+})=i({0}^{-})=0$ - Capacitor voltage cannot change instantly, so
$v({0}^{+})=v({0}^{-})={\text{V}}_{0}$

(After the switch closes there is only one $v$ , so we'll just call it $v$ from now on.)

Now we have $i({0}^{+})$ , but not $di/dt({0}^{+})$ , yet. Where can we get this derivative? How about from the inductor's $i$ -$v$ equation?

Now we have our second initial condition. This says the moment just after the switch closes, the current in the inductor starts changing with a slope of ${\text{V}}_{0}/\text{L}$ amperes every second.

### Summary of the initial conditions

### Use the initial conditions to find ${A}_{1}$ and ${A}_{2}$

We use our initial conditions one at a time to solve for the constants. The first initial condition is $i=0$ at $t={0}^{+}$ . Let's plug it into the proposed solution and see where it takes us:

Now we go after ${A}_{2}$ using the second initial condition. The derivative of $i$ at $t={0}^{+}$ is:

Take the derivative of the proposed $i(t)$ :

Evaluating this expression at $t=0$ :

We can expand ${\omega}_{\circ}$ into $\text{L}$ and $\text{C}$ to get:

And finally, after a lot of hard work, the solution for the current is:

## Real component values

To demonstrate what the solution looks like, we assign component values $\text{L}=1$ henry and $\text{C}=1/4$ farad, and a starting voltage on the capacitor of $10{\textstyle \phantom{\rule{0.167em}{0ex}}}\text{V}$ .

The natural frequency, ${\omega}_{\circ}$ is:

The current as a function of time is:

The current starts up the moment the switch closes:

The current takes off in a sine wave pattern that continues forever. (There is no resistor in this ideal circuit, so the energy never dissipates. In a real-world circuit there would be small resistances that eventually dissipate the energy.)

The natural frequency of the sine wave is ${\omega}_{\circ}=2{\textstyle \phantom{\rule{0.167em}{0ex}}}\text{radians}/\text{sec}$ . We can convert from radians per second to cycles per second, (also known as hertz, or $\text{Hz}$ ) knowing that $1$ full cycle of a sine function corresponds to $2\pi $ radians. We usually use the symbol $f$ for cycles per second. The conversion is:

The natural frequency of the circuit in cycles per second, hertz, $\text{Hz}$ , is:

or equivalently, the current completes a full cycle every $\pi $ seconds.

### A quick look back at the initial conditions

We can look in close to the origin to see how the solution accounted for the initial conditions. The sine wave starts at the origin, $i=0$ . And notice how the slope of the blue sine wave near the origin matches the slope of the straight black line, $i=10{\textstyle \phantom{\rule{0.167em}{0ex}}}\text{A}/\text{sec}$ .

## Voltage, $v(t)$

At this point we have solved the current. If you want to press on a little further, have a go at solving for the voltage, $v(t)$ .

**Find an expression for**$v(t)$ after the switch closes.

Probably the quickest route is to use the inductor $i$ -$v$ equation to solve for $v$ in terms of $di/dt$ .

## Summary

We derived the natural response of an $\text{LC}$ circuit by first creating this homogeneous second-order differential equation:

Then we assumed a solution of the form $K{e}^{st}$ , which gave us the

*characteristic equation*for the circuit:When computing the roots of the characteristic equation we ran head on into a ${e}^{j{\omega}_{\circ}t}$ , an exponential with complex exponent. We reached deep into our bag of tricks and pulled out:

*very*strange expression:Euler's identities

These identities let us express the complex exponential as a combination of sine and cosine functions. (In electrical engineering, we use the letter $j$ as the name for $\sqrt{-1}.$ )

Then we looked carefully at the circuit to find the initial conditions. For a second-order system, we found an initial $i$ and an initial $di/dt$ .

We found a function for $i(t)$ that satisfied the differential equation:

*natural frequency*of the

(This solution applies when the starting current in the inductor is $0$ .)

## Want to join the conversation?

- Under First Order Systems in the Introduction, would it be right to call the natural response of a first order an exponential decay in terms of the graph? Thank you!(2 votes)
- Correct. All RC and RL circuits follow this curve. Don't forget there is another related curve to describe charging.(2 votes)

- How did the imaginary j in A2 disappear after we solved for it? Does that mean (K1 - K2) is an imaginary number?(2 votes)
- The j is simply a component of A2. Since A2=j(K1-K2), and A2 is a real number, then (K1-K2) is also imaginary. We can try and solve for K1 and K2, but there is no need as K1 and K2 are not actually part of the solution that we need for i.(1 vote)

- After solving quadratic, we concluded that two roots are S1 and S2. But why did we are both to get general solution ? Isn't answer supposed to be one of the roots ?(1 vote)
- You can't decide ahead of time what the answer is 'supposed' to be. You have to see what the math tells you. We proposed a very general solution, with terms that included S1 and S2. Then we proceeded to test the proposed solution by plugging it into the differential equation and testing to see if the equation came out true. Along the way we computed the leading constants. In the end we got a true solution, which makes us very happy and also makes us love the proposed solution.

What would have happened to the math if our fancy 2-term proposed solution was too fancy? The derivation would cause one of the terms to drop out. This would happen for example if K2 turned out to be 0. That didn't happen, did it?(2 votes)

- Its stated that capacitor voltage can't change instantly, so v(0-) = v(0+) = Vo. But v(0-) is -Vo. Why were signs changed ?(1 vote)
- Sorry for the confusion. I could have been clearer. The capacitor voltage has its positive sign at the bottom of the capacitor (to respect the passive sign convention). In the section on Figure out the Initial Conditions I started with this definition, but then in the second circuit diagram where the switch is closed I change over to calling the voltage just "v" and flipped it to be positive at the top. I mentioned "v" before showing you what it is. Sorry.

There's an improved version of this article at https://spinningnumbers.org/a/lc-natural-response-derivation.html.(2 votes)

- Why can we write i(t) = K1 * e^jwt + K2 * e^-jwt? I would expect that we work out i(t) separately for each of s. Do I miss something?(1 vote)
- If you go down two parallel branches solving separately for each complex exponential term you eliminate solutions where both K's are non-zero at the same time. In fact, both K's can be non-zero, which results in the most interesting solutions.(2 votes)

- I think there is a typo in the last sentence.(1 vote)
- If the capacitor starts with an initial charge, shouldn't the current be flowing out of the positive side of the capacitor? This seemed to be the case with the RC circuit, and is also labeled as such in the RLC circuit, why is this case labeled with a different convention?(1 vote)
- In this simple LC circuit it is oddly difficult to specify (label) the voltage and current. This strangeness first appears in the section "Natural response of a 2nd-order circuit" where it looks like the capacitor voltage is upside down for no good reason.

There is a reason (I hope you think it is a good one). It helps me get write the KVL equation correctly with the correct signs. (Try this: Flip vc around so it is positive at the top, just like vl. See if you can write the KVL equation (it will be different), and then derive the exact same differential equation. This may turn out to be easy for you, or it may drive you nuts.)

That, I hope, justifies the upside down vc. I hope you noticed that a little farther down in the derivation I switched from vl an vc to a simpler v(t). v(t) is positive at the top, just like vl.

You are correct that an initial voltage on the capacitor means the initial surge of current when the switch closes will be upward out of the capacitor. If we write the current surge in terms of vc it would initially have a negative value. However, by the time we get to the solution I'm working with v(t), so the plot shows a positive surge at the start.

Sorry this is so convoluted. It stems from the fundamental need to respect the sign convention for passive components.(1 vote)

- Wouldn't it have been simpler to just use i=Ksin(st) as the initial guess for solving the 2nd order ODE? Since we know that the double derivative of a sine function ends up as a -sine function, you would always have some +sine + -sine = 0. Which fulfils the ODE.

Then you wouldn't have to mess around with complex numbers and Euler's formulae to get to the same answer. I tried it out on paper from i=Ksin(st) when I first saw you going with exponentials and got to the same result much faster.

Is there any reason to use exponentials other than trying to keep the same pattern as the derivations from the previous circuits?(1 vote)- If you are a great guesser then yes, you could go for a sine guess. Your last point is the main reason for walking through the complex exponential. You will see it again when you visit the RLC derivation.

I did a pretty good rewrite of this article here: https://spinningnumbers.org/t/topic-natural-and-forced-response.html#lc(1 vote)