---
title: Driving a system with a step and with a sine
heading: A transient that dies away, and a response that stays
eyebrow: A8 · Lesson 14 · Step and sinusoidal drive
xp: 40
---

::: hook
Switch a sine wave onto an RC circuit and, after a brief wobble, the capacitor settles into a sine wave of its own: same frequency, smaller, and a little late. That split, a passing transient plus a lasting steady state, is how every linear circuit responds to every input. It's why AC analysis can ignore switching on altogether.

::: play
- A sine wave is switched onto an RC low-pass filter at $t = 0$. Watch the output's first cycle and then the ones after it.
- Raise the frequency. How do the output's size and its delay behind the input change?
- The meter reads the settled output's amplitude and phase. Compare with $1/\sqrt{1 + (\omega\tau)^2}$ and $-\tan^{-1}\omega\tau$, with τ = 1 ms.
:::
:::

```sim circuit
V1 in 0 sine 1 V 200 Hz    @ 0,0 down
R1 in out 1k               @ 0,0 right
C1 out 0 1u                @ 2,0 down
slider: V1.f 20..2000 log
scope: v(in), v(out)
time: 0..15m s
meter: v(out)
```

::: predict
## The input is a 1 kHz sine. After the transient dies away, what frequency is the capacitor's voltage?

- [ ] A mixture of frequencies
- [x] 1 kHz, the same as the input
- [ ] The circuit's own frequency, $1/(2\pi RC)$
- [ ] Zero: it settles to a constant

::: reveal
1 kHz. A linear circuit driven by a sinusoid settles into a sinusoid at the same frequency, with only its amplitude and phase changed: the same-frequency rule from A2, now as a theorem about differential equations. The circuit's own time constant shows up only in the transient, which dies away, and in how much the amplitude and phase change.
:::
:::

::: nameit
## Natural response plus forced response

For a linear equation like $\tau\,\dfrac{dv}{dt} + v = u(t)$, the solution always splits into two parts:

$$v(t) = \underbrace{v_f(t)}_{\text{forced}} + \underbrace{Ke^{-t/\tau}}_{\text{natural}}$$

- The **forced response** $v_f$ is any one solution that follows the input: for a constant input, a constant; for a sinusoid, a sinusoid at the same frequency.
- The **natural response** $Ke^{-t/\tau}$ solves the equation with no input. The constant $K$ is set by the starting value. It dies away, leaving only the forced part: the **steady state**.

**Step input** ($u = V_s$): try $v_f = $ constant. It must satisfy $0 + v_f = V_s$, so $v_f = V_s$, and the full solution is lesson 2's formula.

**Sinusoidal input** ($u = A\cos\omega t$): try $v_f = B\cos(\omega t + \varphi)$. With phasors (A3), differentiating is multiplying by $j\omega$, so

$$(1 + j\omega\tau)\mathbf{V} = A \quad\Rightarrow\quad \mathbf{V} = \frac{A}{1 + j\omega\tau}$$

$$|\mathbf{V}| = \frac{A}{\sqrt{1 + (\omega\tau)^2}} \qquad \varphi = -\tan^{-1}(\omega\tau)$$

Slow inputs ($\omega\tau \ll 1$) pass almost unchanged; fast ones ($\omega\tau \gg 1$) are shrunk in proportion to $1/\omega$ and delayed by nearly 90°. At $\omega\tau = 1$, the corner frequency, the amplitude is $1/\sqrt2$ and the phase −45°.

**Superposition.** Because the equation is linear, the response to a sum of inputs is the sum of the responses. That's what lets you analyze a complicated signal by breaking it into sinusoids (A10) and adding up what the circuit does to each.
:::

::: example
## A 1 kHz sine of 1 V drives an RC low-pass with $\tau$ = 1 ms. What is the steady-state output?

::: solution
1. **Normalized frequency.**
   $$\begin{aligned} \omega\tau &= 2\pi \times 1000 \times 0.001 \\ &= 6.28 \end{aligned}$$
2. **Amplitude.**
   $$\begin{aligned} A &= \frac{1}{\sqrt{1 + 6.28^2}} \\ &= 0.157\ \text{V} \end{aligned}$$
3. **Lag.**
   $$\tan^{-1}6.28 = 81.0°$$

**Answer:** the output is a 1 kHz sine of amplitude 0.157 V, lagging the input by 81.0°.
:::
:::

::: example
## A capacitor at 2 V is switched to a 10 V source through $R$. What is its voltage after one time constant?

::: solution
1. **Write the response.** It moves from 2 V toward 10 V:
   $$v = 10 - 8e^{-t/\tau}$$
2. **At one time constant.**
   $$\begin{aligned} v(\tau) &= 10 - \frac{8}{e} \\ &= 7.06\ \text{V} \end{aligned}$$
   That's 63% of the 8 V gap covered.

**Answer:** 7.06 V after one time constant.
:::
:::

::: example
## The RC low-pass with $\tau$ = 1 ms is driven by $\cos(2\pi \cdot 1000t)$ V starting at $t = 0$ from 0 V. How big is the transient?

::: solution
1. **Steady state.** Since $\frac{1}{\sqrt{1 + (2\pi)^2}} = 0.157$ and $\tan^{-1}2\pi = 81.0°$, the steady state is
   $$0.157\cos(\omega t - 81.0°)\ \text{V}$$
2. **Mismatch at the start.** At $t = 0$ the steady state would be
   $$0.157\cos 81.0° = 0.0247\ \text{V}$$
   but the capacitor starts at 0.
3. **The transient.** It makes up the difference at the start:
   $$-0.0247e^{-t/1\,\text{ms}}\ \text{V}$$
   and is gone after about 5 ms.
4. **Other switching points.** Switching on at a different point in the cycle would give a different transient, up to the full 0.157 V.

**Answer:** the transient is $-0.0247e^{-t/1\,\text{ms}}$ V: it starts at −0.0247 V and is gone after about 5 ms.
:::
:::

::: check
given: tau = 0.5 | 1 | 2; f = 200 | 500 | 1000
answer: 1/sqrt(1 + (2*pi*f*tau/1000)^2)
unit: V
tolerance: 1%

## A first-order low-pass with $\tau$ = {tau} ms is driven by a 1 V sine at {f} Hz. What is the steady-state output amplitude, in volts?

::: right
Right. With $\omega\tau = 2\pi \times \given{f} \times \given{tau}$ ms, the amplitude is $1/\sqrt{1 + (\omega\tau)^2}$ = {answer}.
:::

::: misses
- [1/(1 + 2*pi*f*tau/1000)] The size of $1 + j\omega\tau$ is $\sqrt{1 + (\omega\tau)^2}$, not $1 + \omega\tau$.
- [1/sqrt(1 + (f*tau/1000)^2)] Use $\omega = 2\pi f$.
- [any] Not yet. Compute $\omega\tau$, then $1/\sqrt{1 + (\omega\tau)^2}$.
:::
:::

::: check
given: tau = 0.5 | 1 | 2; f = 200 | 500 | 1000
answer: -atan(2*pi*f*tau/1000)*180/pi
unit: °
tolerance: 1%

## A first-order low-pass with $\tau$ = {tau} ms is driven at {f} Hz. What is the output's phase relative to the input?

::: right
Right. $\varphi = -\tan^{-1}(\omega\tau)$ = {answer}: the output lags.
:::

::: misses
- [atan(2*pi*f*tau/1000)*180/pi] The output lags behind the input: the phase is negative.
- [-atan(f*tau/1000)*180/pi] Use $\omega = 2\pi f$.
- [any] Not yet. Compute $-\tan^{-1}(\omega\tau)$ in degrees.
:::
:::

::: check
kind: choice

## A first-order circuit with $\tau$ = 2 ms is switched onto a 50 Hz sine. Roughly how long before only the steady state remains?

- [ ] One cycle of the sine, 20 ms
- [x] About 10 ms: five time constants
- [ ] Forever, since the transient never fully vanishes
- [ ] 2 ms

::: right
Right. The natural response decays with the circuit's own time constant, so after about $5\tau$ = 10 ms it's below 1%.
:::

::: misses
- [1] The transient's lifetime is set by τ, not by the input's period.
- [3] It never reaches exactly zero, but below 1% is gone for practical purposes.
- [4] After one time constant, 37% of the transient remains.
:::
:::

::: check
given: Vs = 3..12 int; v0 = 1 | 2
answer: Vs
unit: V
tolerance: 0.5%

## In $\tau\,dv/dt + v = \given{Vs}$ V with $v(0)$ = {v0} V, what is the forced (steady-state) response?

::: right
Right. A constant $v_f$ has zero derivative, so it must equal {Vs} V.
:::

::: misses
- [v0] That's the starting value, which fixes the natural part's size.
- [Vs - v0] That's the size of the natural response at $t = 0$.
- [any] Not yet. Try a constant: what makes $0 + v_f = V_s$ true?
:::
:::

::: check
kind: parts
given: V0 = 2 | 3; V = 10 | 12; n = 2 | 3

## A capacitor at {V0} V is switched to a {V} V source through a resistor.

::: part
answer: V - (V - V0)*exp(-n)
unit: V
tolerance: 0.5%

### What is its voltage after {n} time constants?

::: misses
- [V*(1 - exp(-n))] It starts at {V0} V, not 0.
- [any] The gap $V - V_0$ decays as $e^{-t/\tau}$.
:::
:::

::: part
answer: V - V0
unit: V
tolerance: 0.5%

### What is the size of the natural (transient) part at $t = 0$?

::: misses
- [any] The forced response is $V$; the transient makes up the difference.
:::
:::
:::

::: check
kind: derivation
vars: w = 0.1..10, tau = 0.1..2

## An RC low-pass with time constant $\tau$ is driven at $\omega = w$.

::: step
answer: 1/sqrt(1 + (w*tau)^2)

### What is the steady-state amplitude ratio?
:::

::: step
answer: atan(w*tau)

### What is the lag, in radians?
:::

::: right
Right. $\frac{1}{\sqrt{1 + (\omega\tau)^2}}$ and $\tan^{-1}\omega\tau$: at the corner, 0.707 and 45°.
:::
:::

::: explain
## Why does a circuit driven by a sine wave settle into a sine wave of exactly the same frequency?

::: model
The complete response is a forced part plus a natural part. The natural part depends only on the circuit, decays exponentially, and fades away. The forced part has to satisfy the equation with the sinusoidal input at every instant; since differentiating a sinusoid gives a sinusoid of the same frequency, a same-frequency sinusoid with the right amplitude and phase does that. Once the natural part has died out, that sinusoid is all that's left.
:::
:::

::: practice

::: check
given: tau = 0.5..5 sig 2
answer: 1000/(2*pi*tau)
unit: Hz
tolerance: 1%

## At what frequency does a first-order low-pass with $\tau$ = {tau} ms pass $1/\sqrt2$ of the input amplitude?

::: misses
- [1000/tau] $1/\tau$ is the corner in radians per second. Divide by $2\pi$ for hertz.
- [any] At $\omega\tau = 1$: $f = 1/(2\pi\tau)$.
:::
:::

::: check
given: w = 10..100 int
answer: -atan(w*0.01)*180/pi
unit: °
tolerance: 1%

## A low-pass with $\tau$ = 10 ms is driven at $\omega$ = {w} rad/s. What is the phase of the output?

::: misses
- [atan(w*0.01)*180/pi] The output lags: negative phase.
- [any] $-\tan^{-1}(\omega\tau)$.
:::
:::

::: check
given: A1 = 1..9 int; A2 = 1..9 int
answer: A1 + A2
unit: V
tolerance: 0.5%

## A linear circuit gives a steady output of {A1} V for one DC input and {A2} V for another. What does it give for their sum?

::: misses
- [any] Linear means superposition: responses add.
:::
:::
:::
