# Electronics/RCL time domain

Figure 1: RCL circuit

When the switch is closed, a voltage step is applied to the RCL circuit. Take the time the switch was closed to be 0s such that the voltage before the switch was closed was 0 volts and the voltage after the switch was closed is a voltage V. This is a step function given by $V\cdot u(t)$ where V is the magnitude of the step and $u(t)=1$ for $t\geq0$ and zero otherwise.

To analyse the circuit response using transient analysis, a differential equation which describes the system is formulated. The voltage around the loop is given by:

$Vu(t)=v_c(t)+\frac{di(t)}{dt}L+Ri(t) \mbox{ (1)}$

where $v_c(t)$ is the voltage across the capacitor, $\frac{di(t)}{dt}L$ is the voltage across the inductor and $Ri(t)$ the voltage across the resistor.

Substituting $i(t)=\frac{dv_c(t)}{dt}$ into equation 1:

$Vu(t)=v_c(t)+\frac{d^2v_c(t)}{dt^2}LC+R\frac{dv_c(t)}{dt}C$

$\frac{d^2v_c(t)}{dt^2}+\frac{R}{L}\frac{dv_c(t)}{dt}+\frac{1}{LC}v_c(t)=\frac{Vu(t)}{LC} \mbox{ (2)}$

The voltage $v_c(t)$ has two components, a natural response $v_n(t)$ and a forced response $v_f(t)$ such that:

$v_c(t)=v_f(t)+v_n(t)\mbox{ (3)}$

substituting equation 3 into equation 2.

$\bigg[\frac{d^2v_n(t)}{dt^2}+\frac{R}{L}\frac{dv_n(t)}{dt}+\frac{1}{LC}v_n(t)\bigg]+\bigg[\frac{d^2v_f(t)}{dt^2}+\frac{R}{L}\frac{dv_f(t)}{dt}+\frac{1}{LC}v_f(t)\bigg]=0+\frac{Vu(t)}{LC}$

when $t>0s$ then $u(t)=1$:

$\bigg[\frac{d^2v_n(t)}{dt^2}+\frac{R}{L}\frac{dv_n(t)}{dt}+\frac{1}{LC}v_n(t)\bigg]=0 \mbox{ (4)}$

$\bigg[\frac{d^2v_f(t)}{dt^2}+\frac{R}{L}\frac{dv_f(t)}{dt}+\frac{1}{LC}v_f(t)\bigg]=\frac{V}{LC} \mbox{ (5)}$

The natural response and forced solution are solved separately.

Solve for $v_f(t):$

Since $\frac{V}{LC}$ is a polynomial of degree 0, the solution $v_f(t)$ must be a constant such that:

$v_f(t)=K$

$\frac{dv_f(t)}{dt}=0$

$\frac{d^2v_f(t)}{dt}=0$

Substituting into equation 5:

$\frac{1}{LC}K=\frac{V}{LC}$

$K=V$

$v_f=V \mbox{ (6)}$

Solve for $v_n(t)$:

Let:

$\frac{R}{L}=2\alpha$

$\frac{1}{LC}=\omega_n^2$

$v_n(t)=Ae^{st}$

Substituting into equation 4 gives:

$\frac{d^2Ae^{st}}{dt^2}+2\alpha\frac{dAe^{st}}{dt}+\omega_n^2Ae^{st}=0$

$s^2Ae^{st}+2\alpha Ae^{st}+\omega_2^2Ae^{st}=0$

$s^2+2\alpha s+\omega_n^2=0$

$s=\frac{-2\alpha\pm\sqrt{4\alpha^2-4\omega_n^2}}{2}=-\alpha\pm\sqrt{\alpha^2-\omega_n^2}$

Therefore $v_n(t)$ has two solutions $Ae^{s_1t}$ and $Ae^{s_2t}$

where $s_1$ and $s_2$ are given by:

$s_1=-\alpha+\sqrt{\alpha^2-\omega_n^2}$

$s_2=-\alpha-\sqrt{\alpha^2-\omega_n^2}$

The general solution is then given by:

$v_n(t)=A_1e^{s_1t}+A_2e^{s_2t}$

Depending on the values of the Resistor, inductor or capacitor the solution has three posibilies.

1. If $\alpha > \omega_n$ the system is said to be overdamped

2. If $\alpha = \omega_n$ the system is said to be critically damped

3. If $\alpha < \omega_n$ the system is said to be underdamped

## Example:

Given the general solution

 R L C V 0.5H 1kΩ 100nF 1V

$\alpha=\frac{R}{2L}=1000$

$\omega_n=\frac{1}{\sqrt{LC}}\approx 4472$

$s_1=-1000-4359j$

$s_2=-1000+4359j$

$v_n(t)=A_1e^{(-1000-4359j)t}+A_2e^{(-1000+4359j)t}$

Thus by Euler's formula ($e^{j\phi}=\cos{\phi}+j\sin{\phi}$):

$v_n(t)=e^{-1000}\big[A_1\big(\cos(-4359t)+j\sin(-4359t)\big)+A_2\big(\cos(4359t)+j\sin(4359t)\big)\big]$

$v_n(t)=e^{-1000t}\big[(A_1+A_2)\cos(4359t)+j(-A_1+A_2)\sin(4359t)\big]$

Let $B_1=A_1+A_2$ and $B_2=j(-A_1+A_2)$

$v_n(t)=e^{-1000t}\big[B_1\cos(4359t)+B_2\sin(4359t)\big]$

Solve for $B_1$ and $B_2$:

From equation \ref{eq:vf}, $v_f=1$ for a unit step of magnitude 1V. Therefore substitution of $v_f$ and $v_n(t)$ into equation \ref{eq:nonhomogeneous} gives:

$v_c(t)=1+e^{-1000t}\big[B_1\cos(4359t)+B_2\sin(4359t)\big]$

for $t=0$ the voltage across the capacitor is zero, $v_c(t)=0$

$0=1+B_1\cos(0)+B_2\sin(0)$

$B_1=-1\mbox{ (7)}$

for $t=0$, the current in the inductor must be zero, $i(0)=0$

$i(t)=\frac{dv_c(t)}{dt}C$

$i(0)=100\cdot10^{-9}\big[e^{-1000t}\big(-4359B_1\sin(4359t)+4359B_2\cos(4359t)\big)-1000e^{-1000t}\big(B_1\cos(4359t)+B_2\sin(4359t)\big)\big]$

$0=100\cdot10^{-9}\big[4359B_2-1000B_1 \big]$

substituting $B_1$ from equation \ref{eq:B1} gives

$B_2\approx-0.229$

For $t>0$, $v_c(t)$ is given by:

$v_c(t)=1-e^{-1000t}\big[\cos(4359t)+0.229\sin(4359t)\big]$

$v_{out}$ is given by:

$v_{out}=V_{in}-v_c(t)$

$v_{out}=Vu(t)-v_c(t)$

For $t>0$, $v_{out}$ is given by:

$v_{out}=e^{-1000t}\big[\cos(4359t)+0.229\sin(4359t)\big]$