---
title: Sinusoidal steady state with phasors
heading: Turning a differential equation into algebra
eyebrow: A8 · Lesson 30 · Sinusoidal steady state with phasors
xp: 40
---

::: hook
Drive a series RLC circuit with a sine wave and, once the transient has died away, the capacitor's voltage is a sine wave at the same frequency. Finding its size and phase by guessing $B\cos(\omega t + \varphi)$ and grinding through the derivatives works, but it's slow. Phasors from A3 turn every derivative into a multiplication by $j\omega$, so the whole differential equation becomes one line of complex algebra, and near one particular frequency that line predicts something dramatic.

::: play
- This is the gain from the source to the capacitor in a series RLC circuit with $f_0$ = 1 kHz, plotted against frequency.
- Lower ζ. What happens to the gain near 1 kHz? Read the peak off the readout and compare it with $1/(2\zeta)$.
- Watch the phase as you pass through 1 kHz. Where is it −90°, and how sharp is the change at small ζ?
:::
:::

```sim plot
view: bode
x: f = 50..20k Hz log
slider: zeta = 0.02..1.5 step 0.01 = 0.2
H: 1/(1 - (f/1000)^2 + j*2*zeta*f/1000)
marker: x = 1000 | label: f₀
readout: gain at f₀ = 1/(2*zeta)
```

::: predict
## With ζ = 0.05, the source is 1 V at exactly $f_0$. Roughly how big is the voltage across the capacitor?

- [ ] Less than 1 V
- [ ] 1 V
- [x] About 10 V
- [ ] Infinite

::: reveal
About 10 V, ten times the source. At $f_0$ the inductor's and capacitor's voltages are equal and opposite, so they cancel around the loop and only the small resistor limits the current. That large current through the capacitor makes a large voltage: $1/(2\zeta) = 10$ times the source. This is **resonance**, and the factor is the circuit's **Q**. It's how a radio picks one station, and how a careless design ends up with capacitor voltages far above the supply.
:::
:::

::: nameit
## The phasor method for any linear equation

**The idea.** For a sinusoidal input $u = \text{Re}(\mathbf{U}e^{j\omega t})$, look for a steady-state output of the same form, $x = \text{Re}(\mathbf{X}e^{j\omega t})$. Each derivative brings down a factor of $j\omega$:

$$\frac{dx}{dt} \to j\omega\mathbf{X} \qquad \frac{d^2x}{dt^2} \to (j\omega)^2\mathbf{X} = -\omega^2\mathbf{X}$$

So for $a\ddot x + b\dot x + cx = u$:

$$(c - a\omega^2 + jb\omega)\,\mathbf{X} = \mathbf{U} \quad\Rightarrow\quad \mathbf{X} = \frac{\mathbf{U}}{c - a\omega^2 + jb\omega}$$

The amplitude is $|\mathbf{X}|$ and the phase is $\arg\mathbf{X}$. Notice the denominator: it's the characteristic polynomial from lesson 17, evaluated at $s = j\omega$. Lesson 38 and course A10 take that idea much further.

**The series RLC.** For the capacitor's voltage, $LC\ddot v + RC\dot v + v = v_s$, which divides into the standard form, so the **frequency response** is

$$H(j\omega) = \frac{\mathbf{V}_C}{\mathbf{V}_s} = \frac{1}{1 - (\omega/\omega_0)^2 + j\,2\zeta\,\omega/\omega_0}$$

Well below $\omega_0$ the gain is 1: the capacitor follows the source. Well above, the gain falls as $(\omega_0/\omega)^2$, 40 dB per decade, twice as steep as the first-order filter in lesson 14.

**Resonance.** At $\omega = \omega_0$ the real part of the denominator vanishes, leaving

$$H(j\omega_0) = \frac{1}{j\,2\zeta} \qquad |H| = \frac{1}{2\zeta} = Q, \qquad \text{phase } {-90°}$$

In circuit terms, $Q = \dfrac{1}{R}\sqrt{\dfrac{L}{C}}$. With no damping at all (ζ = 0) the steady state doesn't exist: the swing grows without limit, which in a real circuit ends when something breaks or saturates.

**The other way of seeing it.** Each part gets an impedance: $R$, $j\omega L$ and $1/(j\omega C)$. The phasor method is just Ohm's law with these, which is how course C3 will use it every day.
:::

::: example
## Find the steady-state response of $\ddot x + 2\dot x + 5x = \cos 2t$.

::: solution
1. **Substitute $s = 2j$.**
   $$\begin{aligned} &(2j)^2 + 2(2j) + 5 \\ &= 1 + 4j \end{aligned}$$
2. **Amplitude.**
   $$\frac{1}{|1 + 4j|} = 0.243$$
3. **Lag.**
   $$\tan^{-1}4 = 76.0°$$

**Answer:** the response is a cosine at 2 rad/s with amplitude 0.243, lagging the input by 76.0°.
:::
:::

::: example
## A series RLC with $\zeta$ = 0.05 is driven by 1 V at its resonant frequency. How big is the capacitor voltage?

::: solution
1. **Gain at resonance.** At resonance the capacitor voltage is $Q$ times the source:
   $$\begin{aligned} Q &= \frac{1}{2\zeta} \\ &= 10 \end{aligned}$$
2. **Capacitor voltage.** That's 10 V across the capacitor from a 1 V source.

**Answer:** the capacitor sees 10 V, ten times the source.
:::
:::

::: example
## Find the steady-state response of $\ddot y + 3\dot y + 2y = \cos t$.

::: solution
1. **Replace $\frac{d}{dt}$ by $j\omega = j$.**
   $$(j^2 + 3j + 2)Y = 1$$
   so $Y = \frac{1}{1 + 3j}$.
2. **Magnitude and angle.**
   $$\begin{aligned} |Y| &= \frac{1}{\sqrt{10}} \\ &= 0.316 \end{aligned}$$
   and the angle is $-\tan^{-1}3 = -71.6°$.
3. **Write the response.**
   $$y_{ss} = 0.316\cos(t - 71.6°)$$
4. **What it saves.** There are no undetermined coefficients or simultaneous equations to solve: one complex division gives both the amplitude and the lag.

**Answer:** $y_{ss} = 0.316\cos(t - 71.6°)$.
:::
:::

::: check
given: w = 1 | 2 | 3 | 5; c = 5 | 10 | 20
answer: 1/abs(c - w^2 + j*2*w)
tolerance: 0.5%

## Find the steady-state amplitude of $x$ for $\ddot x + 2\dot x + \given{c}x = \cos(\given{w}t)$.

::: right
Right. $|\mathbf{X}| = 1/|\given{c} - \given{w}^2 + j\,2\cdot\given{w}|$ = {answer}.
:::

::: misses
- [1/abs(c + w^2 + j*2*w)] $(j\omega)^2 = -\omega^2$, so it's $c - \omega^2$.
- [1/(c - w^2 + 2*w)] The $j$ matters: take the size of the complex number, $\sqrt{\text{real}^2 + \text{imag}^2}$.
- [1/c] That's the response to a constant input. The derivatives contribute too.
- [any] Not yet. Replace each $d/dt$ with $j\omega$ and solve for $\mathbf{X}$.
:::
:::

::: check
given: w = 1 | 2 | 3 | 5; c = 5 | 10 | 20
answer: -arg(c - w^2 + j*2*w)*180/pi
unit: °
tolerance: 0.5%

## For $\ddot x + 2\dot x + \given{c}x = \cos(\given{w}t)$, what is the steady-state phase of $x$ relative to the input?

::: right
Right. $\varphi = -\arg(\given{c} - \given{w}^2 + j\,2\cdot\given{w})$ = {answer}.
:::

::: misses
- [arg(c - w^2 + j*2*w)*180/pi] Dividing by a complex number subtracts its angle: the output lags.
- [-atan(2*w/c)*180/pi] The real part is $c - \omega^2$, not c.
- [any] Not yet. The phase of $1/z$ is $-\arg z$.
:::
:::

::: check
given: R = 10..47 E12 Ω; L = 1m..10m E6 H; C = 10n..100n E6 F
answer: sqrt(L/C)/R
tolerance: 1%

## What is the Q of a series RLC circuit with R = {R}, L = {L} and C = {C}?

::: right
Right. $Q = \tfrac1R\sqrt{L/C}$ = {answer}: at resonance the capacitor's voltage is {answer} times the source's.
:::

::: misses
- [R*sqrt(C/L)] That's $2\zeta$. Q is its reciprocal.
- [sqrt(C/L)/R] That's upside down inside the root: $Q = \tfrac1R\sqrt{L/C}$.
- [any] Not yet. $Q = \tfrac1R\sqrt{L/C}$.
:::
:::

::: check
kind: expression
answer: U/(c - a*w^2 + j*b*w)
vars: U = 1..5, a = 1..3, b = 1..3, c = 1..9, w = 0.5..3

## Write the phasor $\mathbf{X}$ for the steady state of $a\ddot x + b\dot x + cx = U\cos\omega t$.

::: right
Right. Each derivative is a factor of $j\omega$, so the equation becomes $(c - a\omega^2 + jb\omega)\mathbf{X} = U$.
:::

::: misses
- [U/(c + a*w^2 + j*b*w)] $(j\omega)^2 = -\omega^2$.
- [U/(c - a*w^2 + b*w)] The first derivative brings a $j$: $j b\omega$.
- [U/(c + j*a*w + b*w^2)] The second derivative goes with $a$ and the first with $b$.
- [any] Not yet. Replace $d/dt$ with $j\omega$ and solve for $\mathbf{X}$.
:::
:::

::: check
kind: choice

## A series RLC circuit is driven exactly at $f_0$. What is the phase of the capacitor's voltage relative to the source?

- [ ] 0°
- [x] −90°
- [ ] −180°
- [ ] +90°

::: right
Right. At $f_0$, $H = 1/(j2\zeta)$, which points straight down: −90°.
:::

::: misses
- [1] That's the phase far below resonance.
- [3] That's the phase far above resonance.
- [4] The capacitor's voltage lags. $1/j = -j$.
:::
:::

::: check
kind: parts
given: a = 2 | 3; b = 2 | 5; w = 1 | 2

## Find the steady state of $\ddot y + \given{a}\dot y + \given{b}y = \cos(\given{w}t)$.

::: part
answer: 1/sqrt((b - w^2)^2 + (a*w)^2)
tolerance: 0.5%

### What is its amplitude?

::: misses
- [1/(b + a*w + w^2)] Replace $\frac{d}{dt}$ by $j\omega$ and take the magnitude of the complex number.
- [any] $\frac{1}{|b - \omega^2 + ja\omega|}$.
:::
:::
:::

::: check
kind: derivation
vars: w = 0.1..5

## Find the steady-state gain of $\ddot y + 2\dot y + 5y = 5\cos wt$.

::: step
answer: 5 - w^2

### What is the real part of $(j\omega)^2 + 2j\omega + 5$?
:::

::: step
answer: 5/sqrt((5 - w^2)^2 + 4*w^2)

### What is the amplitude of $y$?
:::

::: right
Right. At low frequency the gain is 1, and it peaks near $\omega = \sqrt3$ before rolling off.
:::
:::

::: explain
## Why does replacing each derivative with $j\omega$ give the right answer for the steady state?

::: model
In the steady state every signal in a linear circuit is a sinusoid at the input's frequency, which can be written as the real part of $\mathbf{X}e^{j\omega t}$. Differentiating $e^{j\omega t}$ gives $j\omega e^{j\omega t}$, so each derivative just multiplies the phasor by $j\omega$, and the $e^{j\omega t}$ appears in every term and cancels. What's left is an algebraic equation for the complex number $\mathbf{X}$, whose size and angle are the output's amplitude and phase.
:::
:::

::: practice

::: check
given: R = 10..1k E12 Ω; L = 1m..100m E6 H; C = 1n..1µ E6 F
answer: 1/(2*pi*sqrt(L*C))
unit: Hz
tolerance: 1%

## At what frequency does a series RLC with R = {R}, L = {L} and C = {C} resonate?

::: misses
- [1/sqrt(L*C)] That's $\omega_0$ in rad/s. Divide by $2\pi$.
- [any] $f_0 = 1/(2\pi\sqrt{LC})$. R doesn't move it.
:::
:::

::: check
given: Q = 5..50 int; V = 1..5 int
answer: Q*V
unit: V
tolerance: 0.5%

## A series RLC with Q = {Q} is driven at resonance by {V} V. What is the capacitor's voltage amplitude?

::: misses
- [V] At resonance the capacitor's voltage is Q times the source's.
- [V/Q] Resonance magnifies: multiply by Q.
- [any] $|V_C| = Q|V_s|$ at $f_0$.
:::
:::

::: check
given: r = 0.2 | 0.4 | 0.7 | 1.5 | 2 | 3
answer: 1/abs(1 - r^2 + j*2*0.1*r)
tolerance: 0.5%

## A second-order low-pass has ζ = 0.1. What is its gain at {r} times $f_0$?

::: misses
- [1/abs(1 + r^2 + j*0.2*r)] $(j\omega)^2 = -\omega^2$: it's $1 - r^2$.
- [any] $|H| = 1/|1 - r^2 + j2\zeta r|$ with $r = f/f_0$.
:::
:::
:::
