If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

RC step response

How does an RC circuit respond to a voltage step? We solve for the total response as the sum of the forced and natural response. The RC step response is a fundamental behavior of all digital circuits. Written by Willy McAllister.
Let's cause an abrupt step in voltage to a resistor-capacitor (RC) circuit and observe what happens to the voltage across the capacitor.
We want to find the voltage v(t) across the capacitor as a function of time.
When something changes in a circuit, like a switch closes, the voltages and currents in the circuit elements adjust to the new conditions. If the change is an abrupt step, as it is here, the response of the voltages and currents is called the step response. The step response is a common way to give a circuit a little "kick" to see what it does. It tells us quite a lot about the properties of the circuit.

What we're building to

The total response of a circuit can be teased apart into a forced response plus a natural response. These responses can be combined using the principle of superposition.
  • The forced response is calculated with the sources turned on, but with the initial conditions (internal stored energy) set to zero.
  • The natural response is what the circuit does including the initial conditions, (initial voltage on capacitors or current in inductors), but with input suppressed.
total = forced + natural
We derive the step response of an RC network using this method of forced and natural response:
v(t)=VS+(V0VS)et/RC
VS is the height of the voltage step.
V0 is the initial voltage on the capacitor.

Find the RC step response

We are interested in the voltage on the capacitor, v as a function of time. We start by looking at what happens before the switch closes. Then we jump way out in time to a long time from now, and figure out where the circuit finishes up. Finally, we look at what happens in between the switch closing and a long time from now.

Initial state

Before the switch is closed, (t<0), the schematic tells us an initial voltage exists on the capacitor: v(0)=V0.
We know the current in the circuit is 0 because the switch is open. These are the initial conditions of the circuit.

Final state

If we close the switch at t=0, current will start flowing around the now-completed circuit. Current will continue to flow as long as there is a voltage difference across the resistor.
At some point in the future, the capacitor voltage, v, will become the same as the source voltage, VS. When this happens, the voltage across the resistor, VSv, will be 0, and current will fall to 0. This is the final state of the circuit.
Summary: The circuit starts with no current, and ends with no current, but the voltage (and current) do something between start and end.

Transient period

Between the initial state and the final state the current and voltage adjust to new conditions imposed by the voltage source. This is called the transient period, when things are changing. The change v makes during this time is the transient response of the RC circuit. In our example, the switch closing event applies a voltage step to the RC circuit, so this is also called the step response.
We will use our knowledge of the initial and final states, plus what we know about R and C, to come up with a precise understanding of the transient response.

Analysis

To start the analysis of this circuit, we write a current equation for the top right node using Kirchhoff's Current Law. We sum the currents flowing out of the node:
iR+iC=0vVSR+Cdvdt=0
We untwist this to make it look like a differential equation:
vRVSR+Cdvdt=0
Cdvdt+vR=VSR
dvdt+vRC=VSRC
initial condition:v(0)=V0
This is the differential equation we have to solve. The right side has this term: VS/RC. This is not v or a derivative of v. Because of this, we say the equation is non-homogeneous.
Solving a non-homogeneous differential equation is not the simplest thing in the world, so we will come up with a strategy.

Strategy: find the forced and natural response

The two complications (input signal and initial conditions) make solving a non-homogeneous equation somewhat of a chore, the math can be tricky. Our strategy, as usual, is to break the problem into parts. We separate the larger problem into two simpler problems by teasing apart the forced and natural response. Solving the forced and natural responses separately is simpler than going head-on at the non-homogeneous equation.
What is forced response? The forced response is where the output (the voltage on the capacitor) is going to end up in the long run after all stored energy eventually dissipates. The forced response does this by ignoring the presence of energy storage elements (in this case, it ignores the capacitor and its initial voltage).
The forced response can't tell us what happens at the beginning when the switch closes, or during the transition to the final state, because it ignores the stored energy. For that, we need the natural response.
The natural response tells us what the circuit does as its internal stored energy (the initial voltage on the capacitor) is allowed to dissipate. It does this by ignoring the forcing input (the voltage step caused by the switch closing). The "destination" of the natural response is always zero voltage and zero current.
In the end, we combine the forced and natural responses to get the full story. The forced response impresses its will on the natural response and gives it a destination different from zero. This gives us the total response.

Forced plus natural is superposition

The forced response considers the external inputs.
The natural response considers the internal initial conditions.
We get the total response by summing the two.
This is the principle of superposition in action.
Initial conditionsInputsforced response0in(t)+natural responsei.c.’s0=total responsexxxi.c.’sin(t)
vt=vf+vn
(The subscripts t, f, and n stand for total, forced, and natural responses.)

Solving a driven circuit

The method for solving a circuit driven by an external source is:
  • Set the initial conditions to 0 and solve the forced response.
  • Set the input to 0, and solve the natural response.
  • Add the forced response to the natural response to get the total response.
  • Use the initial conditions to resolve any constants.

Forced response of the RC circuit

The forced response, vf(t), is the part of the total response caused directly by the input, while assuming the initial conditions are all 0. We forget about the initial conditions for the moment, and search for a solution to the non-homogeneous differential equation. The solution for the forced response is usually a scaled version of the input.
Prior to t=0 we know the forced response is zero, because the voltage source is disconnected from the resistor and capacitor.
For t>0 the equation is:
dvfdt+vfRC=VSRC
Our approach is to guess at a solution for the forced response, vf, and try it out. For the forced response, a good guess is something that resembles the input. Since the input is a constant for t>0, let's guess the forced response is also a constant:
vf=Kf
Plug this into the differential equation for t>0 to see what happens:
dKfdt+KfRC=VSRC
The leading derivative term is 0, leaving us with:
KfRC=VSRC
So the forced differential equation becomes true if:
vf=Kf=VS
This is our forced response:
(By coincidence, it looks exactly like the input.)

Natural response of the RC circuit

Now we solve the natural response. (You can review the derivation in detail in RC natural response.) For the natural response, we suppress (turn off, set to zero) the input and solve just the circuit itself.
Turning off the input means replacing the voltage source with a short. When we suppress the inputs, the right side of the original non-homogeneous differential equation becomes 0, turning it into a homogeneous differential equation. (We know how to solve these.)
dvndt+vnRC=0
We propose a solution for vn in the form of an exponential with two adjustable parameters, and try it out.
vn=Knest
This plugs into the homogeneous differential equation.
sKnest+1RCKnest=0
We can factor out the common Knest term:
Knest(s+1RC)=0
If Kn and est are finite, Knest never becomes 0. If either of them does become 0, the answer is boring. However, we get a non-trivial solution if:
s+1RC=0
This is called the characteristic equation of the RC system. We will see a lot more of these in the future.
s=1RC
This gives us the natural response:
vn=Knet/RC
Doing this homogeneous equation thing allowed us to come up with s and a natural response. The natural response is a property of just the RC circuit, and isn't all tangled up with some input function. We still have to figure out Kn. We'll do that in a moment, as part of the total response.

Total response = forced + natural response

The forced response took into account the input signal.
The natural response took into account the internal initial conditions.
Now we merge them to get the total response, which accounts for both.
vt=vf+vn
vt=VS+Knet/RC

Use the initial conditions to find Kn

This is the point where we use the initial conditions to figure out Kn. We know the total response at time t=0 has to be vt=V0. (The total response, not just the natural response.) Let's plug what we know about t=0 into the total response equation:
V0=VS+Kne0/RC
The exponential expression turns into 1, and we are left with:
V0=VS+Kn
Kn=V0VS

Assemble the total response

Now we put V0VS into the total response and get:
vt=VS+(V0VS)et/RC
And that's it. This is the total response to a voltage step for a series RC combination.
If the capacitor had no initial voltage, v(0)=0, then the equation for the total response is:
vt=VSVSet/RC
or
vt=VS(1et/RC)

Closing remarks

What does the forced response mean? The forced response basically ignores both the energy stored in the capacitor and its initial voltage. The forced response tells us where the output voltage is going to end up in the long run after all stored energy eventually dissipates.
The forced response doesn't tell us what happens at the beginning, or during the transition to the final state, because it ignores the stored energy.
The natural response tells us what an isolated circuit will do as its stored energy is allowed to dissipate. The "destination" of the natural response is always zero. The forced response gives the natural response a new destination. In our example, the new destination was VS.

Summary

We talked about how to solve a resistor-capacitor circuit with a driving voltage. We used Kirchhoff's Current Law to create a differential equation representing the circuit. Then we solved it by the method of forced and natural response.
  • The forced response is what the circuit does with the sources turned on, but with the initial conditions set to zero.
  • The natural response is what the circuit does including the initial conditions, but with the input suppressed.
  • The total response is the sum of the forced response plus the natural response. These responses can be combined using the principle of superposition.
total response = forced response + natural response
For a series RC network, the step response is:
v=VS+(V0VS)et/RC
VS is the step voltage and V0 is the initial voltage on the capacitor.

Want to join the conversation?

  • leaf green style avatar for user energeticasish
    While solving for the forced response, why it is written that,"For the forced response, a good guess is something that resembles the input."?
    What is the concept behind this?
    (3 votes)
    Default Khan Academy avatar avatar for user
    • spunky sam orange style avatar for user Willy McAllister
      Solving differential equations is hard. There is not always a nice recipe where you go step by step to a solution. The differential equation representing the forced response of the system is a particularly difficult equation to solve (on one side is the independent variable, v or i, and its derivatives. On the other side of the equation there is something related to the driving function, which has nothing to do with the value of the components in the circuit). The usual (and possibly only) way to solve a non-homogeneous equation is to make a guess at a solution and try it out, over and over again. Rather than repeatedly shooting in the dark looking for answers, the advice in this article is to make your first guess something that looks like the signal that's driving the circuit. I didn't make this up. Someone taught me, and I'm passing the advice along to you.

      I used this guessing method when solving the natural response of the RC. That differential equation has 0 on one side, which makes it simple enough to solve by another method, called *separable" differential equations. You can see how this is done in the Appendix of the RL Natural Response article.
      https://www.khanacademy.org/science/electrical-engineering/ee-circuit-analysis-topic/ee-natural-and-forced-response/a/ee-rl-natural-response
      (3 votes)
  • leaf green style avatar for user Alexander Wu
    If I already know how to solve first-order differential equations, do I still need to know about forced and natural response?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • purple pi purple style avatar for user APDahlen
      Hello Alexander,

      YES! This is a way to think about the world. Later as you study feedback in amplifiers and controls as applied to electromechanical systems the concepts will help you understand what is occurring.

      IMHO it gives you intuition so you don't blindly follow the math...

      Regards,

      APD
      (3 votes)
  • mr pink red style avatar for user manavpandya31
    Is step response and forced response one and same ?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • purple pi purple style avatar for user Casper Eijkens
    I'm getting confused! You treat the forced and the natural response as two independent events, but I feel like they are dependant of each other. The capacitor is discharging as a function of dv/dt on the capacitor. But this change in voltage is different when there is a voltage step, right?
    (1 vote)
    Default Khan Academy avatar avatar for user
    • spunky sam orange style avatar for user Willy McAllister
      This is the tricky part of the theory of forced+natural response. This is how it makes sense to me:

      The normal (un-forced) natural response of an RC is what it does when it has some initial energy and it is allowed to "go home". Going home means all the energy is allowed to dissipate and the circuit state fades to 0. When we worked out the natural response we discovered it starts at the initial voltage is on the capacitor (Vo) and it goes towards 0. It has an exponential shape determined by the exponent -t/RC. We noted that the exponent has no dependence on where you start from. You can start from any Vo and the droop rate will always be e^-t/RC.

      When we add the forcing function (a step voltage), all that's happening is the circuit is no longer "going home". It is being forced to go somewhere else, namely Vs. The natural response still has the same exponent, -t/RC; it's just heading to a different destination. Adding the forcing function to the natural response circuit doesn't change the exponent.

      It's kind of amazing how robust that RC time constant is. Changes to the starting point or the ending point have no impact on RC. This is the independence you are sensing.

      Forced + Natural response is an application of Superposition. There's more on this here: https://www.khanacademy.org/w/a/ee-superposition
      (4 votes)
  • female robot amelia style avatar for user Scott Shepherd
    Isn't the "forced response" scenario just what happens if we take the capacitor away and bump the source to Vs? in which case v = Vs? Why go through the motions of solving a differential equation to get that result?
    (1 vote)
    Default Khan Academy avatar avatar for user
    • spunky sam orange style avatar for user Willy McAllister
      Great question. When you know the forcing input is a step you can pretend the capacitor isn't there and go straight to the solution for forced or "steady-state" response, v = Vs.

      This shortcut works when the input is a step, but it does not work in general, for any forcing input. I went back and looked at the three textbooks I use for reference and all of them teach the differential equation route. That's what I did, too. The forced solution isn't really that hard to do. The forced+natural technique is a general approach to attack any circuit with forced input. When going for the forced solution the rule is to "ignore initial conditions" rather than "ignore the storage elements" (capacitors and/or inductors). This works for any forced input, (ramp, sine, step, ...).

      The "ignore the capacitor" method is a special case for a step input. As I think about it, this shortcut might be justified in hindsight after you know the answer is v = Vs. Kind of like using the answer from the hard way to come up with a nice shortcut method for step inputs.

      If your interest is primarily digital circuits, the lesson to take away from this article is not so much the forced+natural method but rather to instantly go to the solution where you know there will be an exponential going from the starting to ending voltage.
      (3 votes)
  • blobby green style avatar for user jack.stalnaker
    The separation into forced and natural responses was presented as a way to simplify a non-homogeneous ODE, but the forced response is still a non-homogeneous ODE. The only way it differs from the total response equation is that the I.C.s are zero. I'm sort of confused how that simplifies things?
    (2 votes)
    Default Khan Academy avatar avatar for user
  • mr pink red style avatar for user manavpandya31
    So total response is just value of voltage across capacitor varying with time, right ? But what about voltage across resistor, how do we find that ?
    (1 vote)
    Default Khan Academy avatar avatar for user
    • spunky sam orange style avatar for user Willy McAllister
      To find the voltage across a resistor you use Ohm's Law, v = i R. You know R (it is "R" or a real value given to you in the problem statement) and you need to find i. Since you now know the voltage on the capacitor, what equation might you use to find the capacitor current, (which is the same as the resistor current)?

      i = C dv/dt

      To find the current, take the derivative of the voltage, then multiply by C.
      To find the voltage on R, multiply the current you just found by R.
      (2 votes)
  • mr pink red style avatar for user manavpandya31
    Is Vt(total response) voltage across capacitor varying over time t ?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • marcimus pink style avatar for user Muddassir Ahmed
    can you gimme equation for current for RC step response
    (1 vote)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Gaofeng Fan
    Thanks for clarifying this. I swapped the position of R and C in the above circuit and do the same analysis. The forced response and natural response has the same equations. So I just solved it once. The equation is homogeneous equation. However, I find I cannot use the initial condition to figure out Kf or Kn. (I guess I need to use the physical meaning of the circuit, well, appreciate your insight)
    (1 vote)
    Default Khan Academy avatar avatar for user
    • spunky sam orange style avatar for user Willy McAllister
      I'm not sure where you're getting stuck. Exchanging the positions of R and C in the series loop should have no effect on loop current or element voltages. Exchanging R and C is topologically equivalent to moving the switch from the top terminal of the step source to the bottom terminal. If you can identify a specific step that seems to go off the rails, I will try to help.
      (1 vote)