Here one spinning arrow goes into an RC circuit, the circuit behind a guitar’s tone knob, and then a faster arrow follows it. Make a prediction: does a faster or a slower arrow come out? Watch the output arrow’s spin rate, its length and the angle it falls behind.
A spinning arrow through an RC circuit
RC = 1 s. First 1 rad/s, then 3 rad/s, in slow motion.
An arrow spinning at 1 radian per second goes into the circuit.
Describe this picture
Three panels, “input”, “RC” and “output”, follow an arrow through the circuit, with s; the picture has no control. It plays eight seconds in slow motion with the time scale fixed, 3 s per lap at 1 rad/s, and holds at the end. For the first 4 s the input arrow spins at 1 rad/s; between 3.7 s and 4.5 s it speeds up smoothly to 3 rad/s, one lap per second. The output panel holds a dashed copy of the input arrow, and an arc between the two arrows is labelled with the lag. Two readouts follow the frame: “Spin rate, in and out”, 1.0 rad/s and then 3.0 rad/s, and “H(jω)”, “0.707∠−45.0°” and then “0.316∠−71.6°”.
A spinning arrow through an RC circuit
On the page Fourier series coefficients (7.2) you drew a repeating wave as a row of lines, one for each spinning arrow. This page asks what a system does to that row. The answer is simple: a linear time-invariant (LTI) system treats every arrow separately.
The picture I want you to keep is the tone knob on a guitar. Turning it down does not block any note. Every harmonic of the sound is turned down, and the high ones are turned down most. The circuit behind that knob is an RC circuit, so I use the one from Differential equations and analog systems (6.2). It is the continuous-time twin of the leaky integrator in Difference equations (6.1).
That page wrote the circuit as , where is the source and is the voltage across the capacitor. Here I rename the source as the input and the voltage as the output , so the equation is
Now feed in one spinning arrow, , as on the page Complex exponentials & phasors (3.4). Try an output that is the same arrow times one fixed complex number , so . The rule from 6.2, , with gives .
Put both into the equation and cancel the common factor :
The guess works, so the circuit answers an arrow with the same arrow, scaled and turned by the number . That is the property from Properties of LTI systems (5.4), now for a continuous-time system. One condition: this is the answer after the start-up part of 6.2, the natural part that decays, has died away.
What is as an arrow? On the page Complex numbers for signals (3.3), multiplying multiplies the lengths and adds the angles. Dividing undoes that. So has length and angle : you divide the lengths and subtract the angles.
Take , one step across and one step up. Its length is and its angle is . So
an arrow as long as the unit arrow, turned back by .
For s and an arrow spinning at rad/s, . Its length, the gain , is . Its angle is , and I call the amount turned back, , the lag.
Now go back to the picture at the top of the page. At 1 rad/s the arrow comes out spinning at the same rate, as long and behind: the example you just divided out. Then the input speeds up to 3 rad/s, and the output speeds up with it. The faster arrow comes out as long and behind. This is : , so the length is , and the angle .
So the answer to the prediction is neither. The output spins at the same rate as the input. Only its length and its angle change, and the faster input is cut more and lags more.
One more fact, so that real waves work. The equation has real coefficients. A cosine is the horizontal position of the arrow, as in 7.2, so the response to is the horizontal position of the response to the arrow. From here on I read all arrows that way.
A square wave, one arrow at a time
Now a repeating input. Take the square wave between and with fundamental rad/s, and keep s. From Fourier series coefficients (7.2) and 7.1, its first four arrows have lengths for . Each starts pointing down, at , because the harmonics of this wave are sines.
The system is linear, so the output is the sum of what each arrow produces on its own. Each arrow comes out as times itself. For s, has gain and lag . For the gains are and the lags are .
Watch each arrow come out of the box shorter and turned, and then the shape of the output wave.
A square wave through the box, harmonic by harmonic
The square wave at 1 rad/s as arrows 1, 3, 5 and 7; RC = 1 s.
A square wave is four arrows (and more). Each goes through the circuit on its own.
Describe this picture
The square wave’s four arrows are the input, and the box between input and output is labelled “RC”; the picture has no control. Each input arrow goes through the box in turn, 2.5 s each, and comes out shorter and rotated. Each row is labelled “k = 1” and so on, with the input length, the output length and the lag, for example 1.2732, 0.9003 and “45.0° back” for . Each harmonic has its own colour on both sides. From 10 s the output wave is drawn over a faint dashed copy of the input, and at 12 s the lags are listed in the harmonics’ colours: .
Arrow 3, for example, goes from to : it is as long and held back . The output wave at the end is the sum of every arrow that came out, these four and the smaller ones after them. It is the circuit’s exact response, so it includes every harmonic, not only the four drawn. It is smooth, delayed and has rounded corners. Each harmonic is held back by its own angle, not in proportion to , so the shape changes, not just the size.
Compare this with a plain delay. If the circuit only delayed the wave, Fourier series coefficients (7.2) says line would turn by times the first angle. A delay of s turns line 1 by at rad/s, so the lines would turn by . The RC turns them by . The harmonics slip against each other, and that is why the corners round off.
Write the whole recipe in one line. If , then
The line becomes , and nothing else changes. The arrow at gets , the mirror image of the arrow at , because the circuit is real. So the output is still a mirror pair, and still a real wave.
The same line shows something else. Every arrow comes out at the spin rate it went in with, so no arrow is created. An LTI system never adds a frequency that was not in its input. I come back to that in the worked example.
The maths behind it · diagonalising an LTI system
The Fourier series diagonalises every LTI system. Change basis to the harmonics, multiply each coordinate by its own eigenvalue , and change back. In discrete time the same statement is that the DFT matrix diagonalises circulant matrices, on the page The DFT as a matrix (13.5).
Turning the highs down: the tone knob
The gain is a smooth slope across the harmonics. The corner frequency is where it reads . You met that number in the first clip: at rad/s with s, the gain was and the lag .
A large puts the corner at a low frequency, so more of the harmonics are above it. The next instrument slides upward from s to s, so the corner slides from rad/s down to rad/s. Watch the slope pass under the bars, and the output wave lose its corners.
The tone knob
The square wave through an RC low-pass while RC rises from 0.05 s to 3 s.
A tiny RC: every bar is turned down a little, the high ones a bit more. The wave is almost unchanged.
Describe this picture
Two panels share one horizontal axis, frequency from 0 to 8 rad/s. The upper panel holds the bars for the harmonics at rad/s, arrow length from 0 to 1.3, with the input bars faint and the output bars in front. The lower panel holds the gain curve, from 0 to 1, with a dashed level at and a dot at the corner labelled with its frequency, such as “corner 2.58 rad/s”. A faint vertical line joins each bar to the gain it is multiplied by, and the output wave is drawn beside them. The clip is one continuous slide of 10 s, then it holds, with s. At the start the corner is off the edge of the frame, and a small arrow reads “corner: 20 rad/s →”, a number that falls as rises; the dot enters when the corner reaches 8 rad/s, at s, about 2.24 s into the clip. The readouts “RC” and “Corner” follow the slide, and chips “Gain at each bar” give the four gains. When the clip has finished, the corner dot can be dragged along the gain curve, or moved with the arrow keys, to set between s and s; the bars, the chips and the caption follow it. A button “Hear the output” plays the result.
With a tiny of s every bar is turned down a little, the high ones a bit more. The gains are , and the wave is almost unchanged. At 5 s, s, the gains are , and the corners of the wave are rounded: the higher the bar, the more it is turned down.
At 10 s, s, every bar is far down the slope. The gains are . The output is a rounded triangle, close to a single sine of amplitude lagging with pointed tops: the third harmonic is , about of the first. Nothing is blocked. Every harmonic is turned down, the high ones far more.
Watch the slope, and not a wall. Nothing is blocked at any setting. The first bar at s is of its input and the seventh is , so the seventh is turned down about times as hard. Smoothing a square wave means turning the high harmonics down more than the low ones, until what is left is nearly the first sine.
When the clip has finished, drag the corner dot along the gain curve to set yourself, and press Hear the output to hear the result.
Distortion as a number
Use the buttons “Hear the input” and “Hear the output”. The output is duller. They are not controls: they play what is on screen. Now ask what numbers would say that.
Engineers use the total harmonic distortion, THD. It compares the size of everything beyond the first harmonic with the size of the first. A pure sine has no harmonic beyond the first, so its THD is 0.
The page How big is a signal (1.3) defined the RMS, the square root of the power. Powers of different harmonics add, by Parseval’s relation in 7.2, and sizes do not. So I compare powers first, with for an arrow of length , and take the square root last:
The square root turns the ratio of powers into a ratio of sizes. It is usually quoted as a percentage.
The next instrument stacks the power in the first harmonic under the power in all the others, for the input and for the output. Watch the top block shrink faster than the bottom one as the filter engages.
Distortion as a number
Power in the first harmonic and in all the others, before and after the RC (RC rises to 1 s).
The square wave: 81% of its power in the first arrow, the rest in the others. Ratio 0.2337; its square root, 0.4834, is the THD: 48.3%.
Describe this picture
Two stacked bars, one for the input and one for the output, on a power axis from 0 to 1. In each, a bottom block labelled “first” is the power in the fundamental and a top block labelled “others” is the power in everything else, at their true sizes. Under each bar a three-line readout gives the ratio, its square root and the THD, for example “top ÷ bottom = 0.2337”, ”↓ square root = 0.4834” and “THD 48.3%”. For 6 s the box between the bars engages, showing as it rises from 0 to 1 s.
The square wave has 81 % of its power in the first arrow and the rest in the others. With no filter the input blocks are and , because the wave’s total power is 1. The ratio is and its square root is , so the THD is .
At 3 s, s, the output blocks are and . The ratio is , the square root , and the THD . At 6 s, s, the output blocks are and . The ratio is , the square root , and the THD is , against for the input. The upper harmonics were turned down far more than the first, so the THD fell.
Why it falls is the gain squared. At s the first harmonic’s power is multiplied by , and the third harmonic’s by . The first block halves, while the top block, which holds the third harmonic and everything above it, falls to about of its input size.
The maths behind it · variances of uncorrelated parts
THD and its relatives are ratios of variances of uncorrelated components, here the harmonics. A filter reduces the total variance by the squared gain of each component. The page Power spectral density (24.4) does this for random signals.
Worked example
- for s and rad/s. . Dividing: and , so has length and angle . For , , so ( rad). For : , , . A plain delay of s would give . The RC’s lags, expressed as times, are s.
- The output arrows. The lengths are with : . So
- THD. For the input, the fundamental carries and the rest carry , since the total is (). The ratio is and . For the output at s, harmonic carries . The fundamental carries and the rest carry . The ratio is and . At s the fundamental carries , the rest , the ratio is and .
- Smoothing hard, s. gives for . The first harmonic has amplitude at . The third has amplitude , about of the first. At s the gains are , and at s they are .
- No new frequencies. At s the first harmonic is multiplied by and the seventh by . Both are turned down, the seventh about times as hard, and neither is blocked. A repeating input with lines at 100, 300 and 500 Hz gives an LTI output with lines at 100, 300 and 500 Hz only, possibly smaller and possibly turned. So a clipper that turns a pure sine into a sine plus a third harmonic is not LTI.
Where you’ll meet this
An audio equaliser, a tone knob and a loudspeaker’s crossover all work this way: each harmonic is scaled and turned by the system’s value at its frequency. The distortion figure on an amplifier’s datasheet is the number of the last section, usually quoted as a percentage.
The next step is to look at for every frequency, not only at the harmonics, which is the subject of Frequency response and Bode plots (8.4). Letting the period grow without limit, so that the lines crowd into a curve, is the subject of the page From series to transform (8.1). Why a real system’s satisfies , and why its poles come in mirror pairs, is on the pages First- and second-order systems (6.3) and Poles, zeros and the s-plane (9.3). Real filters are chosen and built on the pages Filter specifications (18.1) and Analog prototype filters (20.1). The square wave’s sum of arrows, and the overshoot that stays near its edges, are on the page Convergence and the Gibbs phenomenon (7.3).
Reference card
| Quantity | Formula | Notes |
|---|---|---|
| Eigenfunction | LTI only; same spin rate in and out | |
| Dividing complex numbers | : length , angle | |
| RC low-pass | , | |
| Corner frequency | , lag there | |
| Periodic in, periodic out | same period, no new frequencies | |
| Real system | so the output is real: the mirror pair again | |
| THD | , | power ratio, then the square root; quoted as a percentage |