# RC circuit

A resistor–capacitor circuit (RC circuit), or RC filter or RC network, is an electric circuit composed of resistors and capacitors. It may be driven by a voltage or current source and these will produce different responses. A first order RC circuit is composed of one resistor and one capacitor and is the simplest type of RC circuit.

RC circuits can be used to filter a signal by blocking certain frequencies and passing others. The two most common RC filters are the high-pass filters and low-pass filters; band-pass filters and band-stop filters usually require RLC filters, though crude ones can be made with RC filters.

## Introduction

There are three basic, linear passive lumped analog circuit components: the resistor (R), the capacitor (C), and the inductor (L). These may be combined in the RC circuit, the RL circuit, the LC circuit, and the RLC circuit, with the acronyms indicating which components are used. These circuits, among them, exhibit a large number of important types of behaviour that are fundamental to much of analog electronics. In particular, they are able to act as passive filters. This article considers the RC circuit, in both series and parallel forms, as shown in the diagrams below.

## Natural response

RC circuit

The simplest RC circuit consists of a resistor and a charged capacitor connected to one another in a single loop, without an external voltage source. Once the circuit is closed, the capacitor begins to discharge its stored energy through the resistor. The voltage across the capacitor, which is time-dependent, can be found by using Kirchhoff's current law. The current through the resistor must be equal in magnitude (but opposite in sign) to the time derivative of the accumulated charge on the capacitor. This results in the linear differential equation

${\displaystyle C{\frac {dV}{dt}}+{\frac {V}{R}}=0\,,}$

where C is the capacitance of the capacitor.

Solving this equation for V yields the formula for exponential decay:

${\displaystyle V(t)=V_{0}e^{-{\frac {t}{RC}}}\,,}$

where V0 is the capacitor voltage at time t = 0.

The time required for the voltage to fall to V0/e is called the RC time constant and is given by,[1]

${\displaystyle \tau =RC\,.}$

In this formula, τ is measured in seconds, R in ohms and C in farads.

## Complex impedance

The complex impedance, ZC (in ohms) of a capacitor with capacitance C (in farads) is

${\displaystyle Z_{C}={\frac {1}{sC}}}$

The complex frequency s is, in general, a complex number,

${\displaystyle s=\sigma +j\omega \,,}$

where

Sinusoidal steady state is a special case in which the input voltage consists of a pure sinusoid (with no exponential decay). As a result, ${\displaystyle \sigma =0}$ and the impedance becomes

${\displaystyle Z_{C}=-{\frac {j}{\omega C}}\,.}$

## Series circuit

Series RC circuit

By viewing the circuit as a voltage divider, the voltage across the capacitor is:

${\displaystyle V_{C}(s)={\frac {\frac {1}{Cs}}{R+{\frac {1}{Cs}}}}V_{\mathrm {in} }(s)={\frac {1}{1+RCs}}V_{\mathrm {in} }(s)}$

and the voltage across the resistor is:

${\displaystyle V_{R}(s)={\frac {R}{R+{\frac {1}{Cs}}}}V_{\mathrm {in} }(s)={\frac {RCs}{1+RCs}}V_{\mathrm {in} }(s)\,.}$

### Transfer functions

The transfer function from the input voltage to the voltage across the capacitor is

${\displaystyle H_{C}(s)={\frac {V_{C}(s)}{V_{\mathrm {in} }(s)}}={\frac {1}{1+RCs}}\,.}$

Similarly, the transfer function from the input to the voltage across the resistor is

${\displaystyle H_{R}(s)={\frac {V_{R}(s)}{V_{\rm {in}}(s)}}={\frac {RCs}{1+RCs}}\,.}$

#### Poles and zeros

Both transfer functions have a single pole located at

${\displaystyle s=-{\frac {1}{RC}}\,.}$

In addition, the transfer function for the voltage across the resistor has a zero located at the origin.

### Gain and phase

Amplitude and phase transfer functions for a series RC circuit

The magnitude of the gains across the two components are

${\displaystyle G_{C}={\big |}H_{C}(j\omega ){\big |}=\left|{\frac {V_{C}(j\omega )}{V_{\mathrm {in} }(j\omega )}}\right|={\frac {1}{\sqrt {1+\left(\omega RC\right)^{2}}}}}$

and

${\displaystyle G_{R}={\big |}H_{R}(j\omega ){\big |}=\left|{\frac {V_{R}(j\omega )}{V_{\mathrm {in} }(j\omega )}}\right|={\frac {\omega RC}{\sqrt {1+\left(\omega RC\right)^{2}}}}\,,}$

and the phase angles are

${\displaystyle \phi _{C}=\angle H_{C}(j\omega )=\tan ^{-1}\left(-\omega RC\right)}$

and

${\displaystyle \phi _{R}=\angle H_{R}(j\omega )=\tan ^{-1}\left({\frac {1}{\omega RC}}\right)\,.}$

These expressions together may be substituted into the usual expression for the phasor representing the output:

{\displaystyle {\begin{aligned}V_{C}&=G_{C}V_{\mathrm {in} }e^{j\phi _{C}}\\V_{R}&=G_{R}V_{\mathrm {in} }e^{j\phi _{R}}\,.\end{aligned}}}

### Current

The current in the circuit is the same everywhere since the circuit is in series:

${\displaystyle I(s)={\frac {V_{\mathrm {in} }(s)}{R+{\frac {1}{Cs}}}}={\frac {Cs}{1+RCs}}V_{\mathrm {in} }(s)\,.}$

### Impulse response

The impulse response of a series RC circuit

The impulse response for each voltage is the inverse Laplace transform of the corresponding transfer function. It represents the response of the circuit to an input voltage consisting of an impulse or Dirac delta function.

The impulse response for the capacitor voltage is

${\displaystyle h_{C}(t)={\frac {1}{RC}}e^{-{\frac {t}{RC}}}u(t)={\frac {1}{\tau }}e^{-{\frac {t}{\tau }}}u(t)\,,}$

where u(t) is the Heaviside step function and τ = RC is the time constant.

Similarly, the impulse response for the resistor voltage is

${\displaystyle h_{R}(t)=\delta (t)-{\frac {1}{RC}}e^{-{\frac {t}{RC}}}u(t)=\delta (t)-{\frac {1}{\tau }}e^{-{\frac {t}{\tau }}}u(t)\,,}$

where δ(t) is the Dirac delta function

### Frequency-domain considerations

These are frequency domain expressions. Analysis of them will show which frequencies the circuits (or filters) pass and reject. This analysis rests on a consideration of what happens to these gains as the frequency becomes very large and very small.

As ω → ∞:

${\displaystyle G_{C}\to 0\quad {\mbox{and}}\quad G_{R}\to 1\,.}$

As ω → 0:

${\displaystyle G_{C}\to 1\quad {\mbox{and}}\quad G_{R}\to 0\,.}$

This shows that, if the output is taken across the capacitor, high frequencies are attenuated (shorted to ground) and low frequencies are passed. Thus, the circuit behaves as a low-pass filter. If, though, the output is taken across the resistor, high frequencies are passed and low frequencies are attenuated (since the capacitor blocks the signal as its frequency approaches 0). In this configuration, the circuit behaves as a high-pass filter.

The range of frequencies that the filter passes is called its bandwidth. The point at which the filter attenuates the signal to half its unfiltered power is termed its cutoff frequency. This requires that the gain of the circuit be reduced to

${\displaystyle G_{C}=G_{R}={\frac {1}{\sqrt {2}}}}$.

Solving the above equation yields

${\displaystyle \omega _{\mathrm {c} }={\frac {1}{RC}}\quad {\mbox{or}}\quad f_{\mathrm {c} }={\frac {1}{2\pi RC}}}$

which is the frequency that the filter will attenuate to half its original power.

Clearly, the phases also depend on frequency, although this effect is less interesting generally than the gain variations.

As ω → 0:

${\displaystyle \phi _{C}\to 0\quad {\mbox{and}}\quad \phi _{R}\to 90^{\circ }={\frac {\pi }{2}}{\mbox{ radians}}\,.}$

As ω → ∞:

${\displaystyle \phi _{C}\to -90^{\circ }=-{\frac {\pi }{2}}{\mbox{ radians}}\quad {\mbox{and}}\quad \phi _{R}\to 0\,.}$

So at DC (0 Hz), the capacitor voltage is in phase with the signal voltage while the resistor voltage leads it by 90°. As frequency increases, the capacitor voltage comes to have a 90° lag relative to the signal and the resistor voltage comes to be in-phase with the signal.

### Time-domain considerations

This section relies on knowledge of e, the natural logarithmic constant.

The most straightforward way to derive the time domain behaviour is to use the Laplace transforms of the expressions for VC and VR given above. This effectively transforms s. Assuming a step input (i.e. Vin = 0 before t = 0 and then Vin = V afterwards):

{\displaystyle {\begin{aligned}V_{\mathrm {in} }(s)&=V\cdot {\frac {1}{s}}\\V_{C}(s)&=V\cdot {\frac {1}{1+sRC}}\cdot {\frac {1}{s}}\\V_{R}(s)&=V\cdot {\frac {sRC}{1+sRC}}\cdot {\frac {1}{s}}\,.\end{aligned}}}
Capacitor voltage step-response.
Resistor voltage step-response.

Partial fractions expansions and the inverse Laplace transform yield:

{\displaystyle {\begin{aligned}V_{C}(t)&=V\left(1-e^{-{\frac {t}{RC}}}\right)\\V_{R}(t)&=Ve^{-{\frac {t}{RC}}}\,.\end{aligned}}}

These equations are for calculating the voltage across the capacitor and resistor respectively while the capacitor is charging; for discharging, the equations are vice versa. These equations can be rewritten in terms of charge and current using the relationships C = Q/V and V = IR (see Ohm's law).

Thus, the voltage across the capacitor tends towards V as time passes, while the voltage across the resistor tends towards 0, as shown in the figures. This is in keeping with the intuitive point that the capacitor will be charging from the supply voltage as time passes, and will eventually be fully charged.

These equations show that a series RC circuit has a time constant, usually denoted τ = RC being the time it takes the voltage across the component to either rise (across the capacitor) or fall (across the resistor) to within 1/e of its final value. That is, τ is the time it takes VC to reach V(1 − 1/e) and VR to reach V(1/e).

The rate of change is a fractional 1 − 1/e per τ. Thus, in going from t = to t = (N + 1)τ, the voltage will have moved about 63.2% of the way from its level at t = toward its final value. So the capacitor will be charged to about 63.2% after τ, and essentially fully charged (99.3%) after about 5τ. When the voltage source is replaced with a short circuit, with the capacitor fully charged, the voltage across the capacitor drops exponentially with t from V towards 0. The capacitor will be discharged to about 36.8% after τ, and essentially fully discharged (0.7%) after about 5τ. Note that the current, I, in the circuit behaves as the voltage across the resistor does, via Ohm's Law.

These results may also be derived by solving the differential equations describing the circuit:

{\displaystyle {\begin{aligned}{\frac {V_{\mathrm {in} }-V_{C}}{R}}&=C{\frac {dV_{C}}{dt}}\\V_{R}&=V_{\mathrm {in} }-V_{C}\,.\end{aligned}}}

The first equation is solved by using an integrating factor and the second follows easily; the solutions are exactly the same as those obtained via Laplace transforms.

#### Integrator

Consider the output across the capacitor at high frequency, i.e.

${\displaystyle \omega \gg {\frac {1}{RC}}\,.}$

This means that the capacitor has insufficient time to charge up and so its voltage is very small. Thus the input voltage approximately equals the voltage across the resistor. To see this, consider the expression for ${\displaystyle I}$ given above:

${\displaystyle I={\frac {V_{\mathrm {in} }}{R+{\frac {1}{j\omega C}}}}\,,}$

but note that the frequency condition described means that

${\displaystyle \omega C\gg {\frac {1}{R}}\,,}$

so

${\displaystyle I\approx {\frac {V_{\mathrm {in} }}{R}}}$

which is just Ohm's Law.

Now,

${\displaystyle V_{C}={\frac {1}{C}}\int _{0}^{t}I\,dt\,,}$

so

${\displaystyle V_{C}\approx {\frac {1}{RC}}\int _{0}^{t}V_{\mathrm {in} }\,dt\,,}$

which is an integrator across the capacitor.

#### Differentiator

Consider the output across the resistor at low frequency i.e.,

${\displaystyle \omega \ll {\frac {1}{RC}}\,.}$

This means that the capacitor has time to charge up until its voltage is almost equal to the source's voltage. Considering the expression for I again, when

${\displaystyle R\ll {\frac {1}{\omega C}}\,,}$

so

{\displaystyle {\begin{aligned}I&\approx {\frac {V_{\mathrm {in} }}{\frac {1}{j\omega C}}}\\V_{\mathrm {in} }&\approx {\frac {I}{j\omega C}}=V_{C}\,.\end{aligned}}}

Now,

{\displaystyle {\begin{aligned}V_{R}&=IR=C{\frac {dV_{C}}{dt}}R\\V_{R}&\approx RC{\frac {dV_{in}}{dt}}\,,\end{aligned}}}

which is a differentiator across the resistor.

More accurate integration and differentiation can be achieved by placing resistors and capacitors as appropriate on the input and feedback loop of operational amplifiers (see operational amplifier integrator and operational amplifier differentiator).

PWM RC Series Circuit

#### PWM Averaging Responses

We begin with the analysis using the capacitor definition:

i=C*dv/dt

In this circuit, the current i is noted to be (E-v)/R if v is the average capacitor voltage and E is a constant DC voltage.. This gives us:

C*dv/dt=(E-v)/R

Since E takes on two values here, both E (a particular DC voltage) and 0 (zero voltage) we need two equations, one when it is E and one when it is zero. The second equation is the same with E set to zero and the polarity of v made positive since when the cap is discharging v is some positive value. This gives us:

C*dv/dt=v/R

Now simply multiply both sides of this set of equations by C (and RC=R*C) we get:

dv/dt=(E-v)/RC (when the PWM input E is high)

and

dv/dt=v/RC (when the PWM input E is zero)

The time increment dt is only the same for a 50 percent PWM duty cycle, so we need a more general expression. For this we simply set each time increment dt to a unique value:

dv/dt1=(E-v)/RC

dv/dt2=v/RC

Now simply solve for dv in each equation:

dv=dt1*(E-v)/RC

dv=dt2*v/RC

Now applying the theory of Continuity of States, we can say that these two values for dv must be the same when the voltage across the capacitor is at its average value. That is because when the voltage goes up starting at a certain lower value it must later come down to the same lower voltage or else the voltage is not yet at its average value. So noting that, we can equate the two:

dt1*(E-v)/RC=dt2*v/RC

and now solving for the average voltage v we get:

v=(dt1*E)/(dt2+dt1)

Now we could stop here and note that v is the average voltage across the cap and dt1 is the 'on' time and dt2 is the 'off' time, but in most cases we want to relate this to the duty cycle D. It is quite simple to note that if we know the total time period tp we can equate these two:

dt1=D*tp

dt2=(1-D)*tp

where D is the fractional duty cycle (0.30 is 30 percent for example) and so substituting those two into the previous solution for v we end up with:

v=(tp*D*E)/(tp*D+tp*(1-D))

and when we simplify this expression we get:

v=D*E

A very simple result! So the average voltage is D*E and we might immediately note that the actual values of R and C did not matter. That is actually the case for any values as long as the capacitor voltage does not get close to zero or E for either the 'on' or 'off' periods. Later when we calculate the peaks, we will find that the R and C values do not matter if RC>>tp but if the RC time constant is comparable to the total time period tp then we will find a difference in the upper and lower peaks of the time domain calculations and the upper and lower peaks of the averaged calculations, although the differences may be small.

A simple example is when E=10v and D=0.25, the average voltage v is 2.5 volts.

Another simple example is when E=20v and D=0.50, the average voltage is 10 volts.

Next we will calculate the two peak values, the upper peak and the lower peak. There are at least two ways to do this one using an averaging technique and another using a straight up time domain solution. The averaging technique assumes a short total time period tp while the time domain solution assumes nothing except ideal components (as is typical in theoretical solutions).

Using the averaging technique, we note that previously we got the result for the low to high going capacitor voltage deviation as:

dv=dt1*(E-v)/RC

and we substituted dt1=D*tp and got:

dv=D*tp*(E-v)/RC

and we assumed that 'v' was the average voltage. Since 'v' was the average voltage and we later calculated that as:

v(avg)=D*E

we insert that into the above expression and end up with:

dv=D*tp*(E-D*E)/RC

or:

dv=D*tp*E*(1-D)/RC

and that is the entire deviation from lowest point to highest point across the capacitor, often referred to as the voltage peak to peak.

Since that is the entire deviation and in the straight line approximation it is triangular and a triangular wave has average that is 1/2 of its entire amplitude peak to peak, to get the excursion above the average we just divide that in half. For the same reason the amplitude below the average will also be one half of that.

We might note that the RC values do in fact make a difference for this calculation even though the did not matter for the average calculation.

Example: R=1000 Ohms, C=100uf, tp=0.001 seconds, E=10 volts, D=0.50 (50 percent duty cycle)

Result: dv=0.025 volts peak to peak.

Positive excursion: 0.025/2=0.0125 volts peak

Negative excursion: 0.025/2=0.0125 volts peak

Also noteworthy is that if we calculate the maximum of dv with respect to a variation in D the duty cycle, we will find that the value of D that causes the highest voltage peak to peak is D=0.50 which is a 50 percent duty cycle.

## Parallel circuit

Parallel RC circuit

The parallel RC circuit is generally of less interest than the series circuit. This is largely because the output voltage Vout is equal to the input voltage Vin — as a result, this circuit does not act as a filter on the input signal unless fed by a current source.

With complex impedances:

{\displaystyle {\begin{aligned}I_{R}&={\frac {V_{\mathrm {in} }}{R}}\\I_{C}&=j\omega CV_{\mathrm {in} }\,.\end{aligned}}}

This shows that the capacitor current is 90° out of phase with the resistor (and source) current. Alternatively, the governing differential equations may be used:

{\displaystyle {\begin{aligned}I_{R}&={\frac {V_{\mathrm {in} }}{R}}\\I_{C}&=C{\frac {dV_{\mathrm {in} }}{dt}}\,.\end{aligned}}}

When fed by a current source, the transfer function of a parallel RC circuit is:

${\displaystyle {\frac {V_{\mathrm {out} }}{I_{\mathrm {in} }}}={\frac {R}{1+sRC}}\,.}$

## Synthesis

It is sometimes required to synthesise an RC circuit from a given rational function in s. For synthesis to be possible in passive elements, the function must be a positive-real function. To synthesise as an RC circuit, all the critical frequencies (poles and zeroes) must be on the negative real axis and alternate between poles and zeroes with an equal number of each. Further, the critical frequency nearest the origin must be a pole, assuming the rational function represents an impedance rather than an admittance.

The synthesis can be achieved with a modification of the Foster synthesis or Cauer synthesis used to synthesise LC circuits. In the case of Cauer synthesis, a ladder network of resistors and capacitors will result.[2]