RC low-pass filter (source code)

= RC low-pass filter
{c}
{title2=$\tau=RC$}

An RC low-pass filter places a <resistor> $R>0$ between <input> and <output>, with a <capacitor> $C>0$ from <output> to their common return. The ideal model prescribes the input <electric potential difference> and leaves the output unloaded. It is a <first-order low-pass filter> with unit eventual gain.<Lab 3: Filters by University of Colorado Boulder, Physics Undergraduate Labs>[Lab 3: Filters, §5.4: RC topology and voltage transfer]{ref}

\Image[/rc-low-pass-circuit-and-loading.png]
{title=<RC low-pass filter> topology and an optional <electrical load>}
{description=Original schematic: the <output> is across the <capacitor>, not across the <resistor>. The orange dashed <resistor> is the optional <electrical load> $R_L$ used in <RC low-pass output loading>; omit it for the ideal unloaded model. The blue arrow defines positive <electric current> through $R$.}

For <electrical resistance> $R$ and <capacitance> $C$, <Ohm's law> gives the <electric current> through the <resistor> as $(v_{\rm in}-v_{\rm out})/R$. The <capacitor> relation gives $C\,dv_{\rm out}/dt$. Equating them by <Kirchhoff's current law> yields the <ordinary differential equation>
$$
RC\frac{dv_{\rm out}}{dt}+v_{\rm out}=v_{\rm in},\qquad \tau=RC.
$$
The <time constant> $\tau$ has units of time. A rapid change in <electric potential difference> requires a large <electric current> into the <capacitor>; the finite <electrical resistance> limits that rate. A slowly maintained voltage instead lets the <capacitor> approach the input voltage. The same equation therefore predicts both smoothing of sustained oscillations and a rounded response to a sudden change.

For the original constructed example throughout this article, take
$$
R=2.2\,\mathrm{k}\Omega,\qquad C=47\,\mathrm{nF},\qquad \tau=103.4\,\mu\mathrm{s}.
$$
These stipulated ideal values specify an analytical model, rather than measurements of particular components.