RC Low-pass Filter

\(
\require{AMSsymbols}
\def\lfz#1{\overset{\Large#1}{\,\circ\kern-6mu-\kern-7mu-\kern-7mu-\kern-6mu\bullet\,}}
\def\lfzraised#1{\raise{10mu}{#1}}
\def\laplace{\lfz{\mathscr{L}}}
\def\fourier{\lfz{\mathcal{F}}}
\def\ztransform{\lfz{\mathcal{Z}}}
\def\crw{\lfz{}}
\require{cancel}
\newcommand\ccancel[2][black]
{\color{#1}{\cancel{\color{black}{#2}}}}
\newcommand\ccancelto[3][black]
{\color{#1}{\cancelto{#2}{\color{black}{#3}}}}
\)Filters can remove low and/or high frequencies from an electronic signal, to suppress unwanted frequencies such as background noise. This article shows the math and visualizes the system response of such filters.

One of the simplest forms of passive filters consists of a resistor and capacitor in series. The output is the voltage over the capacitor \(y(t)\) as shown in the schematic below.

own work
Schematic RC filter

This type of filter is called an Infinite-Impulse Response (IIR) filter, because if you give it an impulse input, the output takes an infinite time to go down to exactly zero.

Even though this article shows a low pass filter, the same principles apply to a high pass filter where the output is taken over the resistor.

We will derive the transfer function for this filter and determine the step and frequency response functions. Required prior reading includes Laplace Transforms, Impedance and Transfer Functions.

In this article will will use Laplace Transforms. The alternate method of solving the linear differential equation is shown in Appendix B for reference.

Transfer Function

TransferFunction
Transfer function

In the RC circuit, shown above, the current is the input voltage divided by the sum of the impedance of the resistor \(Z_R=R\) and that of the capacitor \(Z_C\). The output is the voltage over the capacitor and equals the current through the system multiplied with the capacitor impedance. The transfer function follows as the quotient of the output and input signals.
$$H(s) = \frac{Y(s)}{U(s)}=\frac{Z_C}{Z_C+Z_R} = \frac{1/sC}{1/sC+R} = \frac{1}{sRC+1}\label{eq:voltagedivider}$$
The denominator of \(\eqref{eq:voltagedivider}\) is a first-order polynomial. The root of this polynomial is called the system’s pole
$$
\shaded{
\begin{array}{ccc}
H(s) = K\frac{1}{s-p},
&K = \frac{1}{RC},
&p = -\frac{1}{RC}
\end{array}}\label{eq:transferpolynomial}
$$
This first order system \(\eqref{eq:transferpolynomial}\) has no zeros and one stable pole \(p\) on the left real axis \(p<0\) as visualized in the \(s\)-plane.

own work
\(s\)-plane

Unit Step Response

The step response gives an impression of the system behavior when the input signal going from \(0\) to \(1\) volt at time \(t=0\). This input is called the Unit Step Function, here represented by \(u(t)=\gamma(t)\).
$$\begin{align}
\gamma(t)&=\begin{cases}
0 & t<0 \\ 1 & t\geq0 \end{cases}\nonumber\\ \Rightarrow\ \Gamma(s)&=\mathcal{L}\left\{\gamma(t)\right\}=\frac{1}{s} \end{align}\label{eq:unitstep}$$ Combining the Laplace transform of \(\gamma(t)\), \(\Gamma(s)\), with the transfer function \(\eqref{eq:transferpolynomial}\), gives the unit step response \(Y(s)\)
$$\begin{align}
Y(s)&=\Gamma(s)\cdot H(s)\nonumber \\
&= \frac{1}{s}\cdot K\frac{1}{(s-p)}\nonumber \\
&= K\frac{1}{s(s-p)}
\end{align}\label{eq:multiplication}$$
Split up this complicated fraction into forms that are in the Laplace Transform table. According to Heaviside, this can be expressed as partial fractions. [swarthmore, MIT-cu]
$$
Y(s)=K\frac{1}{s(s+a)}\equiv\frac{c_0}{s}+\frac{c_1}{s+a}
\label{eq:heaviside}
$$
Substitute \(K=-p\) from \(\eqref{eq:transferpolynomial}\) and find expressions for the constants \(c_{0,1}\), by multiplying with respectively \(s\) and \((s-p)\)
$$
\left\{
\begin{eqnarray}
-p\frac{\cancel{s}}{\cancel{s}(s-p)} &\equiv& \frac{\cancel{s}c_0}{\cancel{s}}+\frac{sc_1}{s-p}\nonumber \\
-p\frac{\cancel{s-p}}{s\cancel{(s-p)}} &\equiv& \frac{c_0(s-p)}{s}+\frac{c_1\cancel{(s-p)}}{\cancel{s-p}}\nonumber
\end{eqnarray}
\right.
$$
Given that these equations are true for any value of \(s\), choose two convenient values of \(s\) that help us find \(c_0\) and \(c_1\).
$$
\begin{eqnarray}
c_0&=&\left.\frac{-p}{s-p}\right|_{s=0}=1\label{eq:constants1a}\\
c_1&=&\left.\frac{-p}{s}\right|_{s=p}=-1\label{eq:constants1b}
\end{eqnarray}
$$
The unit step response \(y(t)\) follows from the inverse Laplace transform of \(\eqref{eq:heaviside}\)
$$
\begin{align}
y(t)&= \mathcal{L}^{-1}\left\{\frac{c_0}{s}\right\}+\mathcal{L}^{-1}\left\{\frac{c_1}{s-p}\right\}, & t\geq0\nonumber \\
&=c_0+c_1e^{pt}, & t\geq0
\end{align}
$$

Substituting the constants \(\eqref{eq:constants1a}, \eqref{eq:constants1b}\) gives the unit step response
$$
\shaded{
\begin{array}{ccr}
y(t)=1-e^{pt}, & p=-\frac{1}{RC}, & t\geq0 \\
\end{array}}
$$

As shown in the graph, the unit step response is a relatively slow decaying exponential curve (with \(p<0\)).

own work
Unit step response

The GNU Octave code used to print this figure is listed in Appendix A.

Frequency Response

The frequency response \(y_{ss}(t)\) is defined as the steady state response to a sinusoidal input signal \(u(t)=\sin(\omega t)\,\gamma(t)\). It describes how well the filter can distinguish between different frequencies.

In Evaluating Transfer Functions, we have proven that
$$
y_{ss}(t)=|H(j\omega)|\,\sin(\omega t+\angle H(j\omega))\,\gamma(t)
$$

The transfer function \(H(s)\) for this RC Filter is given by \(\eqref{eq:transferpolynomial}\)
$$
H(s)=K\frac{1}{s-p},\
K = \frac{1}{RC},\
p = -\frac{1}{RC}
\label{eq:splane}
$$

The system behavior at \(\omega=0\) and at \(\omega\rightarrow \infty\) indicates that this is a low pass filter.
$$
\begin{align}
\lim_{s \rightarrow j0} |H(s)| &=-p\frac{1}{0-p} =1 \\
\lim_{s \rightarrow j\infty} |H(s)| &=-p\frac{1}{\infty-p} =0
\end{align}
$$

Based on Euler’s formula, we can express \(H(s)\) in polar coordinates
$$
\left\{
\begin{align}
H(s) &= |H(s)|\ e^{j\angle{H(s)}}\nonumber \\
|H(s)| &= K \frac{\prod_{i=1}^m\left|(s-z_i)\right|}{\prod_{i=1}^n\left|(s-p_i)\right|}
=K \frac{1}{\left|s-p\right|}\nonumber \\
\angle{H(s)}&=\sum_{i=1}^m\angle(s-z_i)-\sum_{i=1}^n\angle(s-p_i)
=-\angle(s-p)\nonumber
\end{align}
\right.
$$

This transfer function with pole \(p\), evaluated for \(s=j\omega\) can be visualized with a vector from the pole to \(j\omega\).

own work
Evaluated for \(s=j\omega\)

The length of the vector corresponds to \(|(H(j\omega)|\), and minus the angle with the real axis corresponds to phase shift \(\angle H(j\omega)\).

$$
\left\{
\begin{align}
|H(j\omega)| &=K \frac{1}{\left|j\omega-p\right|}=
K \frac{1}{\sqrt{\omega^2+p^2}}\nonumber \\
\angle{H(j\omega)}&=-\angle(j\omega-p)=\mathrm{atan2}(\omega,-p)\nonumber\\
&=-\arctan\frac{\omega}{-p},\ p<0\land p\in\mathbb{R}\nonumber \end{align} \right. \label{eq:polar1} $$ Substitute \(p=-\frac{1}{RC}\) and \(K=\frac{1}{RC}\) $$ \left\{ \begin{eqnarray} |H(j\omega)| &=&\frac{1}{RC} \frac{1}{\sqrt{\omega^2+\left(\frac{1}{RC}\right)^2}}\nonumber \\ \angle{H(j\omega)}&=&-\arctan\frac{\omega}{\frac{1}{RC}}\nonumber \end{eqnarray} \right. \label{eq:eq101} $$ The output signal \(y_{ss}(t)\) for a sinusoidal input signal \(\sin(\omega t)\,\gamma(t)\) $$ \shaded{ \begin{aligned} y_{ss}(t)&=|H(j\omega)|\,\sin(\omega t+\angle H(j\omega))\,\gamma(t)\nonumber \\ |H(j\omega)| &=\frac{1}{\sqrt{(1+\omega RC)^2}}\\ \angle{H(j\omega)}&=-\arctan(\omega RC)\nonumber \end{aligned} } \label{eq:frequencyresponse} $$ This frequency response for different frequencies can be visualized in a Bode plot or a Nyquist diagram. Each of these are a topic of the remaining sections.

Effect on Input with Harmonics

As a side step, we examine the effect of the filter on a square wave input signal. The Fourier series of the square wave shows that it consists of a base frequency and odd harmonics.
$$
x(t)=\frac{4}{\pi}\sum_{n=1,3,\dots }^\infty \frac{\sin\left(n\omega t\right)
}{n}
$$
Substituting \(C=470\ \mathrm{nF}\), \(R=100\ \Omega\) and 20 kHz in \(\eqref{eq:frequencyresponse}\), gives the output signal \(y_{ss}(t)\)
$$
\left\{
\begin{align}
y_{ss}(t)&=\frac{4}{\pi}\sum_{n=1,3,\dots }^\infty |H(jn\omega)|
\frac{\sin\left(n\omega t+\angle H(jn\omega)\right)
}{n}\nonumber\\
|H(jn\omega)| &=\frac{1}{\sqrt{(1+n\omega RC)^2}}\nonumber\\
\angle{H(jn\omega)}&=-\arctan(n\omega RC)\nonumber\\
RC&=47\cdot 10^{-6}\nonumber\\
\omega&=2\pi20\cdot 10^{3}\nonumber
\end{align}
\right.
$$
UNFINISHED

own work
Input and output signals

Bode plot

A Bode plots frequency as the horizontal axis and usually consists of two separate plots to that show the magnitude and phase of the frequency response \(y_{tt}\). Since the range of magnitudes may also be large, the amplitude scale is usually expressed in decibels \(20\log_{10}\left|H(j\omega)\right|\) . The frequency axis uses a logarithmic scale as well.
$$
\begin{align}
|H(j\omega)|\ &= \frac{1}{\sqrt{1+(\omega RC)^2}} \\
|H_{dB}(j\omega)|\ &= -20\log\sqrt{1+ (\omega RC)^2} \\
\angle{H(j\omega)}\ &=-\arctan\left(\omega RC\right)
\end{align}
\label{eq:polar2}
$$

The magnitude of the frequency response has a relatively shallow drop-off.

own work
Frequency response

The phase shift depends on the frequency, causing signals composed of multiple frequencies to be distorted.

Angular frequency \(\omega_c=|p|\), is is known as the cutoff, break, -3dB or half-power frequency because the magnitude of the transfer function \(\eqref{eq:polar2}\) equals \(1/\sqrt{2}\)
$$
\begin{align}
|H(j\omega_c)|\ &=\dfrac{1}{\sqrt{1+(\omega_c RC)^2}}=\frac{1}{\sqrt{2}},\ \omega_c=\left|p\right|=\frac{1}{RC} \\
|H_{dB}(j\omega_c)|\ &= 20\log\frac{1}{\sqrt{2}} \approx-3\rm{\ dB}
\end{align}
$$

The attenuation slope is calculated by first expressing the magnitude relative to the cutoff angular frequency \(\omega_c\)
$$\begin{array}{llr}
&|H(j\omega)| = \frac{1}{\sqrt{1+\left(\frac{\omega}{\omega_c}\right)^2}}\\
\Rightarrow&|H(j\omega)| =\frac{\omega}{\omega_c} & \forall\ {\omega\gg\omega_c}
\end{array}
$$

The rate of change of attenuation is usually expressed in dB/decade, where an decade is a factor of 10 in frequency, \(\omega_2=10\omega_1\)
$$
\begin{gather}\begin{aligned}
|H_{dB}(j\omega_2)|-|H_{dB}(\omega_1)|\
&= -20\log\left(\frac{10\omega_1}{\omega_c}\right)+20\log\left(\frac{\omega_1}{\omega_c}\right) \\
&=20\log\left(\frac{\omega_1}{\omega_c}\frac{\omega_c}{10\omega_1}\right) \\
&=-20 \mathrm{\ dB/decade}
\end{aligned}\end{gather}
$$

This single-pole filter gives has a relatively shallow -20 dB/decade drop-off.

In general, the cutoff frequency is equal to the radial distance of the poles or zeros from the origin of the \(s\)-plane. For information on sketching the Bode magnitude plot from the poles and zeros, refer to Understanding Poles and Zeros [MIT 3.1].

Nyquist plot

The Nyquist plots display both amplitude and phase angle on a single plot, using the angular frequency as the parameter. It helps visualize if a system is stable or unstable.

Starting with the transfer function \(\eqref{eq:transferpolynomial}\)
$$
\begin{gather}\begin{array}{ccc}
H(s) = K\frac{1}{s-p},
&K = \frac{1}{RC},
&p = -\frac{1}{RC}
\end{array}\end{gather}$$
Evaluate at \(s=j\omega\) and split into real and imaginary parts
$$\begin{gather}\begin{aligned}
H(j\omega)\ &=K\frac{1}{j\omega-p}\\
&=K\frac{1}{j\omega-p}\frac{j\omega+p}{j\omega+p}\\
&=K\frac{j\omega+p}{-\omega^2-p^2} \\
&=K\frac{-j\omega-p}{\omega^2+p^2}
\end{aligned}\\
\Rightarrow
\left\{\begin{aligned}
\Re\left\{{H(j\omega)}\right\}=&K\frac{-p}{p^2+\omega^2}\\
\Im\left\{{H(j\omega)}\right\}=&K\frac{-\omega}{p^2+\omega^2}\\
\end{aligned}\right.\end{gather}
$$
Plot the frequency transfer function for \(-\infty<\omega<\infty\), indicating an increase of frequency using an arrow. A dashed line is used for negative frequencies. (The plot was generated using the GNU/Octave as shown in Appendix A.)

own work
Nyquist diagram

From the plot we see that for \(\omega=0\) the gain is 1, and for \(\omega\to\infty\) the gain becomes 0. The high frequency portion of the plot approaches the origin at an angle of -90 degrees. For more information on Nyquist refer to Determining Stability using the Nyquist Plot [swarthmore].

Appendix A

Unit Step Response in GNU/Octave

clc; close all; clear all; format short eng
R=100; # 100Ohm
C=470e-9; # 470nF
w=logspace(3,5,200);
f=w/(2*pi);
t=linspace(0,2e-3,200);
p=-1/(R*C);
u=1-e.^(p*t);
h=plot(t,u);
axis([min(t) max(t) 0 2]); #1.75
xlabel('time [s]'); ylabel('|h(t)|');
t=['Step Response(t), C=' num2str(C*1e9) 'nF, R=' num2str(R) '\Omega']
title(t, "fontsize", 15);

Frequency Response in GNU/Octave

clc; close all; clear all; format short eng
R=100; # 100Ohm
C=470e-9; # 470nF
f=logspace(1,6,200);
w=2*pi*f;
p=-1/(R*C);
u=-20*log10(sqrt(1+(w*R*C).^2));
h=semilogx(f,u); hold on;
wn=-p;
plot([wn/(2*pi) wn/(2*pi)], get(gca,'YLim'),'k--');
text(wn/(2*pi),5,'|p|/2\pi');
f1=-p/(2*pi);
fmax=max(f);
asymp=-20*log10((fmax-f1)/f1);
plot([min(f) f1 fmax],[0 0 asymp ],'k--');
hold off
poles=[-p -p];
figure(1);
grid off;
axis([min(f) max(f) -80 40]);
xlabel('frequency [Hz]'); ylabel('20log| H(t)|');
leg=[strread(num2str(R,1),'%s');'asymptote'];
t=['Bode Magnitude in dB(f), C=' num2str(C*1e9) 'nF, R=' num2str(R) '\Omega'];
title(t, "fontsize", 15);
hold off;

Nyquist Diagram in GNU/Octave

clc; close all; clear all; format short eng
pkg load control
R=100; # 100Ohm
C=470e-9; # 470nF
p=-1/(R*C);
H = tf([-p], [ 1 -p ]);
[mag, phi, w] = bode(H); 
nyquist(H); h=gcf;
axis ([-0.2, 1.2, -.7, .7], "square");

Square Wave in GNU/Octave

clf;
t=linspace(0,2e-3,1e4); # t from 0 to 2 msec, with 10,000 steps
f=2e3; # input frequency [Hz]
R=100; # 100 Ohms
C=470e-9; # 470 nF
M=1e5; # number of harmonics
ut=0; # input signal (square wave)
yt=0; # output signal

w=2*pi*f; # omega
fc=1/(2*pi*R*C) # cutoff (-3dB) frequency

for n=1:2:M,
 nwt = n*w*t;
 nwRC = n*w*R*C;
 ut = ut + 4/pi * sin(nwt) / n;
 argH = 1 / sqrt( 1 + nwRC^2 );
 angH = -atan(nwRC);
 yt = yt + 4/pi * argH * sin(nwt + angH) / n;
end

plot(t*1e3,ut, 'b-',t*1e3,yt)
title('Square Wave input to RC filter')
xlabel('t [msec]')
ylabel('[Volt]')
grid on;
legend('u(t)','y(t)')
saveas(1,"square.svg")

Appendix B

For old times sake, we show the traditional method to solve the differential equation for the passive filters consisting of a resistor and capacitor in series.

The output is the voltage over the capacitor \(y(t)\) as shown in the schematic below.

own work
Schematic RC filter

Assume a switch between the input and the resistor that closes at \(t=t_1\). Further assume \(y(t\leq t_1)=Y_0\).

According to Kichhoff’s Voltage Law, for \(t\geq t_1\)
$$
\begin{align}
u(t)&=u_R(t)+u_C(t)\nonumber\\[6mu]
&=i(t)\,R+y(t)\quad\Rightarrow\nonumber\\[6mu]
R\,i(t)+y(t)&=u(t)\label{eq:bUt}
\end{align}
$$

The relations between voltage and current for the resistor and capacitor are
$$
\begin{align}
u_R(t)&=R\,i(t)&\text{resistor}\label{eq:bUr}\\[6mu]
i(t)&=C\frac{\mathrm{d}y(t) }{\mathrm{d}t}&\text{capacitor}\label{eq:bIt}
\end{align}
$$

Two differential equations follow from substituting \(\eqref{eq:bIt}\) and \(\eqref{eq:bUr}\) in \(\eqref{eq:bUt}\) or its derivative
$$
\begin{align}
R\,i(t)+y(t)&=u(t)\nonumber\\[6mu]
R\,C\frac{\text{d}y(t)}{\text{d}t}+y(t)&=u(t)\label{eq:bDV1}\\[20mu]
\frac{\text{d}i(t)}{\text{d}t}\,R+\frac{i(t)}{C}&=\frac{\text{d}u(t)}{\text{d}t}\nonumber\\[10mu]
RC\frac{\text{d}i(t)}{\text{d}t}+i(t)&=C\frac{\text{d}u(t)}{\text{d}t}\label{eq:bDV2}
\end{align}
$$

If \(u(t)\) is continuous, we can choose either differential equation, but when \(u(t)\) is non-continuous we can’t use \(\eqref{eq:bDV2}\).

Assume the non-homogeneous lineair differential equation of a first order High-pass LC-filter, where \(u(t)=\hat{u}\cos(\omega t)\) is the forcing function and the current \(i(t)\) through the inductor is the response. The differential equation for this system is
$$
RC\,{y_p}^\prime(t)+\,y_p(t)=\hat{u}\cos(\omega t)\label{eq:bTrigRC_DV}
$$

The solution is a superposition of the natural response and a forced response. The so called, homogeneous solution \(y_h(t)\) and the particular solution \(y_p(t)\)
$$
y(t)=y_h(t)+y_p(t)\label{eq:bTrigRC_hp}
$$

Homogeneous solution

The homogeneous solutions follows from the reduced (=homogeneous) linear differential equation where the forcing function is zero.
$$
RC\,{y_p}^\prime(t)+\,y_p(t)=0\label{eq:bTrigRC_homDV}
$$

According the Euler, the homogeneous solutions are in the form
$$
y_h(t)=\mathrm{e}^{pt}\label{eq:bTrigRC_gen}
$$ substituting this \(y_h(t)\) in \(\eqref{eq:bTrigRC_homDV}\) gives the characteristic equation with root \(p\)
$$
\begin{align}
RC\,(\mathrm{e}^{pt})^\prime+\,\mathrm{e}^{pt}&=0\nonumber\\
\Rightarrow\quad
RC\,p\mathrm{e}^{pt}+\mathrm{e}^{pt}&=0&\div{\mathrm{e}^{pt}}\nonumber\\
\Rightarrow\quad
RC\,p+1&=0\nonumber\\
p&=-\frac{1}{RC}\label{eq:bTrigRC_p}
\end{align}
$$

The solution base \(y_{h,1}(t)\) follows from substituting the root \(p\) from equation \(\eqref{eq:bTrigRC_p}\) in back in the homegeneous differential equation \(\eqref{eq:bTrigRC_gen}\)
$$
y_{h1}(t)=\mathrm{e}^{-\frac{t}{RC}t}
$$

The homogeneous solution follows as a linear combination of the solution bases (only one in this case) as
$$
\shaded{y_h(t)=c\,y_{h1}(t)=c\,\mathrm{e}^{-\frac{t}{RC}}}\label{eq:bTrigRC_hSolution}
$$ where the constant \(c\) follows from the initial conditions.

Particular solution

We will show how to get the particular solution using both trigonometry and complex arithmetic.

Using the trigonometry method

If we force a signal \(\hat{u}\cos(\omega t)\) on a linear system, the output will have the same frequency but with a different phase \(\phi\) and amplitude \(A\).
$$
\begin{align}
y_p(t)&=A\cos(\omega t+\phi)\label{eq:bTrigRC_form}\\
\Rightarrow\quad y^\prime_p(t)&=-A\,\omega\sin(\omega t+\phi)\label{eq:bTrigRC_formDer}
\end{align}
$$

Substituting \((\ref{eq:bTrigRC_form},\ref{eq:bTrigRC_formDer})\) in the differential equation \(\eqref{eq:bTrigRC_DV}\)
$$
\begin{align}
-ARC\,\omega\sin(\omega t+\phi)+A\cos(\omega t+\phi)&=\hat{u}\cos(\omega t)\nonumber\\
\Rightarrow\quad
\color{green}{1}\cos(\omega t+\phi)-\color{green}{\omega RC}\,\sin(\omega t+\phi)&=\frac{\hat{u}\cos(\omega t)}{A}\label{eq:bTrigRC_part}\\
\end{align}
$$

Work towards the trigonometric identity

$$
\begin{align}
\gamma\cos(\alpha+\beta)=\gamma\cos\alpha\cos\beta-\gamma\sin\alpha\sin\beta\nonumber
\end{align}\nonumber
$$

by assigning the two independent variables \(R\) and \(\omega L\) to two more convenient independent variables \(\gamma\cos\alpha\) and \(\gamma\sin\alpha\)
$$
\begin{align}
\gamma\cos\alpha&\triangleq 1\label{eq:bTrigRC_CcosAlpha}\\
\gamma\sin\alpha&\triangleq\omega RC\label{eq:bTrigRC_CsinAlpha}\\
\end{align}
$$ to dot the ‘i’, introduce \(\beta\)
$$
\beta\triangleq\omega t+\phi\label{eq:bTrigRC_beta}
$$ we can rewrite \(\eqref{eq:bTrigRC_part}\) and use the aforementioned trigonometric identity
$$
\begin{align}
\gamma\cos\alpha\cos\beta-
\gamma\sin\alpha\sin\beta&=\frac{\hat{u}\cos(\omega t)}{A}\nonumber\\
\gamma\cos(\alpha+\beta)&=\frac{\hat{u}\cos(\omega t)}{A}\label{eq:bTrigRC_alpabetaC}\\
\end{align}
$$

Divide \(\eqref{eq:bTrigRC_CsinAlpha}\) by \(\eqref{eq:bTrigRC_CcosAlpha}\) to solve for \(\alpha\), and apply the geometric identity \(\sin^2\alpha+\cos^2\alpha=1\) to \(\eqref{eq:bTrigRC_CsinAlpha}\) by \(\eqref{eq:bTrigRC_CcosAlpha}\) to solve for \(C\)
$$
\begin{align}
\frac{\cancel{\gamma}\sin\alpha}{\cancel{\gamma}\cos\alpha}=\frac{\omega RC}{1}
\quad\Rightarrow\quad
\alpha&=\arctan\left(\omega RC\right)\label{eq:bTrigRC_alpha}
\\
\left(\frac{\omega RC}{\gamma}\right)^2+\left(\frac{1}{\gamma}\right)^2=1
\quad\Rightarrow\quad
\gamma&=\sqrt{1+(\omega RC)^2}\label{eq:bTrigRC_C}
\end{align}
$$

Substituting \((\ref{eq:bTrigRC_beta}, \ref{eq:bTrigRC_alpha},\ref{eq:bTrigRC_C})\) in equation \(\eqref{eq:bTrigRC_alpabetaC}\)
$$
\begin{align}
\color{brown}{\sqrt{1^2+(\omega RC)^2}}\,\cos{\large(}\color{teal}{\arctan\left(\omega RC\right)+\beta}\,{\large)}&=\color{brown}{\frac{\hat{u}}{A}}\cos(\color{teal}{\omega t})
\end{align}
$$ and combine like terms $$
\begin{align}
A&=\frac{\hat{u}}{\sqrt{1+(\omega RC)^2}}\label{eq:bTrigRC_A}\\
\arctan\left(\omega RC\right)+\cancel{\omega t}+\phi=\cancel{\omega t}
\quad\Rightarrow\quad
\phi&=-\arctan\left(\frac{\omega L}{R}\right)\label{eq:bTrigRC_Phi}
\end{align}
$$

The particular solution follows from substituting \((\ref{eq:bTrigRC_A},\ref{eq:bTrigRC_Phi})\) in \(\eqref{eq:bTrigRC_form}\)
$$
\shaded{\begin{align}
y_p(t)&=A\cos(\omega t+\phi)\nonumber\\
\text{where}\quad A&=\frac{\hat{u}}{\sqrt{1+(\omega RC)^2}}\nonumber\\
\text{and}\quad\phi&=-\arctan\left(\omega RC\right)\nonumber
\end{align}}\label{eq:bTrigRC_pSolution}
$$

Using the complex arithmetic method

Using a complex forcing function \(\underline{u}(t)\) provides a less involved method of finding the particular solution as introduced in Linear Differential Equations. Using a complex forcing function
$$\underline{u}(t)=\hat{u}\,\mathrm{e}^{j\omega t}
$$ the corresponding complex response is of the form
$$
\begin{align}
\underline{y}_p(t)&=A\,\mathrm{e}^{j(\omega t+\phi)}\label{eq:bCaRC_yp}\\
\Rightarrow\quad
{\underline{y}_p}^\prime(t)&=j\omega\,A\,\mathrm{e}^{j(\omega t+\phi)}\label{eq:bCaRC_ypDer}\\
\end{align}
$$

Substituting \(\underline{y}_p(t)\) and \({\underline{y}_p}^\prime(t)\) in the differential equation \(\eqref{eq:bTrigRC_DV}\)
$$
\begin{align}
RC\,j\omega\,A\,\mathrm{e}^{j(\omega t+\phi)}+\,A\,\mathrm{e}^{j(\omega t+\phi)}&=\hat{u}\mathrm{e}^{j\omega t},&\div\mathrm{e}^{j\omega t}\nonumber\\
\Rightarrow\quad
j\omega RC\,A\,\mathrm{e}^{j\phi}
+A\,\mathrm{e}^{j\phi}&=\hat{u}\nonumber\\
\Rightarrow\quad
A\,\mathrm{e}^{j\phi}(j\omega RC+1)&=\hat{u}\nonumber\\
\Rightarrow\quad
A\,\mathrm{e}^{j\phi}&=\frac{\hat{u}}{j\omega RC+1}
\end{align}
$$

The amplitude \(A\) and phase \(\phi\) of the complex response follow as
$$
\begin{align}
A&=\left|\frac{\hat{u}}{j\omega RC+1}\right|\\
\phi&=\angle\hat{u}-\angle(j\omega RC+1)
=0-\mathrm{atan2}\left(\omega RC,1 \right)
=-\arctan\left(\omega RC\right)
\end{align}
$$

Now that \(A\) and \(\phi\) are known, the complex particular response follows as equation \(\eqref{eq:bCaRC_yp}\)
$$
\underline{y}_p(t)=A\,\mathrm{e}^{j(\omega t+\phi)}=A\cos(\omega t)+jA\sin(\omega t)
\label{eq:bRLSol}
$$

Since the forcing function was only the real part of \(\underline{u}(t)\), are only interested in the real part of the complex particular solution \(\eqref{eq:bRLSol}\) as well
$$
\shaded{
\begin{align}
y_p(t)&=\Re\left\{\underline{y}_{\,p}\right\}=A\,\cos(\omega t+\phi),\nonumber\\[6mu]
\text{where}\quad A&=\frac{\hat{u}}{\sqrt{1+(\omega RC)^2}},\nonumber\\
\text{and}\quad\phi&=-\arctan\left(\omega RC\right)\nonumber
\end{align}}\label{eq:bCaRC_pSolution}
$$

General solution

The general solution follows from substituting \(\eqref{eq:bTrigRC_hSolution}\) and \((\ref{eq:bTrigRC_pSolution}\text{ or }\ref{eq:bCaRC_pSolution})\) in equation \(\eqref{eq:bTrigRC_hp}\)
$$
\shaded{
\begin{align}
y(t)&=c\,\mathrm{e}^{-\frac{t}{RC}}+A\cos(\omega t+\phi)\nonumber\\
\text{where}\quad A&=\frac{\hat{u}}{\sqrt{1+(\omega RC)^2}}\nonumber\\
\text{and}\quad\phi&=-\arctan\left(\omega RC\right)\nonumber
\end{align}
}\label{eq:bTrigRC_solution}
$$

Embedded software developer
Passionately curious and stubbornly persistent. Enjoys to inspire and consult with others to exchange the poetry of logical ideas.

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.