Impulse response: the oscillator as a linear system
The puzzle: the bell that ignores the hammer¶
Strike a bell with a wooden mallet and it sounds soft; with a steel hammer, bright and loud; with a felt beater, muffled. Three obviously different sounds. Now hum along with each one. The pitch is identical every time.
You can hit it harder, softer, faster, in a different place, with a different material — and you cannot make the bell sing a different note. Something about the strike is being thrown away, and something about the bell is deciding what is left.
The answer to the second question is yes, exactly and in one line, and by the end of this module you will have done it on data.
Predict before you calculate¶
Commit to an answer for each before running anything. Write them down.
You kick a hanging mass twice, the two kicks one full period apart. Compared with a single kick, is the later ringing bigger, cancelled, or unchanged? What if the second kick lands half a period after the first?
A constant force is switched on and left on. Does the mass glide smoothly to its new equilibrium , or overshoot and ring on the way?
Can the mass move before the kick — can depend on the force at times later than ? If your answer is no, what exactly forbids it?
You drive at in a burst of 3 cycles, then in a burst of 30 cycles. Ten times the drive: roughly how many times the response?
Explore the model¶
Two animations, both generated from the same wavelab.oscillators code the laboratory runs.
Kicks arriving at random times, each with its own strength and sign (top), and what the oscillator does about it (bottom). Every kick spawns one faint ringdown, always the same shape, always beginning exactly where its own arrow lands and never earlier. The bold curve is nothing but their sum. Watch the third and fourth kicks partly cancel what the second one built: superposition is addition, and addition includes subtraction.
A constant force switched on at and never changed again (top), and four oscillators answering it (bottom). The force has exactly one feature in its whole history; the responses ring for twenty seconds. All four end at the same place, — the dashed line — so the only difference between them is the route. Overshoot grows with : none at all when the damping is critical, and 85% above the final value at .
Run the laboratory now, then come back. Three things are worth doing before you read on:
Drop two kicks on the time axis and slide the second one around. Find the spacings that build the ringing up and the spacings that nearly kill it, and check them against the period you can measure from a single kick.
Take one ringdown, transform it, and lay module 02’s swept response curve on top. Nothing in the sweep was used to produce the ringdown.
Turn the drive frequency of a burst slightly off resonance and watch the response fall away. The shape you are tracing out with a stopwatch is a Lorentzian.
Derive the result¶
A kick sets a velocity. Apply a force that is enormous and brief — total impulse , delivered in a time short compared with everything else in the problem. Integrate the equation of motion across that instant. The term survives; and do not, because and are bounded and the interval is vanishing. So
A kick moves nothing and changes the velocity. Everything after the kick is therefore free decay — module 02’s undriven problem, with a particular starting condition. Define the impulse response as the motion after a unit impulse, :
Every feature of that expression is one of the four things you already know. It starts at zero, because a kick does not teleport the mass. It leaves the origin at slope , because that is the velocity the kick supplied. It oscillates at — the bell’s own frequency, not the hammer’s — and it decays at , so it is still audible after about cycles. There is the answer to the bell: the mallet sets the amplitude and only the amplitude, and the pitch was never its to choose.
Any force is a train of kicks. Chop an arbitrary into slices of width . The slice at delivers an impulse , and — this is the whole of linearity and time invariance — the oscillator answers it exactly as it answers any other kick, only scaled and shifted: . Add the answers:
The upper limit is and not , and it is causality that put it there: vanishes for , so the future of the force cannot reach the present of the motion. This is the bold curve in the first animation, and it is the answer to prediction 3.
Two kicks now become arithmetic. Kick twice, a time apart, and the later ringing is the sum of two decaying sinusoids that differ in phase by and in size by . Space them one period apart and they are in phase, giving times a single kick — 1.73 at , not 2, because the first has faded a little by the time the second arrives. Space them half a period apart and they are in antiphase, leaving , which is 0.15 at . Nearly cancelled, and not exactly cancelled: perfect destruction would need two equal amplitudes, and damping has already shrunk the first.
The frequency response. Transform with the course’s forward kernel, . Because vanishes for the integral is one-sided — module 04’s exponential pair, with a sine in front of it:
Now compare that with module 02, which sweeps a drive and measures a complex amplitude . The two are the same function with the sign of one term flipped:
The conjugate is not a blemish to be tidied away; it is module 00’s negative-frequency thread arriving for the last time. The course’s phasor rides a time factor , which under the forward kernel lives in the negative-frequency half of the spectrum. So the sweep’s arrow at is the spectrum’s value at , and because is real. Get this sign backwards and every phase lag in the module reverses — the mass leads the force instead of trailing it.
Multiply instead of convolving. The convolution theorem, module 04’s, turns the integral into a product:
Three curves and one multiplication: what you push with, what the system will let through, and
what you get. It is the picture module 04 drew for signals, now with a physical system in
the middle, and it will be the picture module 40-psf-otf draws for images.
A step, worked out. Switch on a constant force at and convolve. The particular solution is the new equilibrium , and the homogeneous part is whatever carries the mass there from the old one:
Read the answer to prediction 2 off it. The bracket does not climb monotonically to 1; it overshoots and rings, at , dying over — 85% past the target at , 44% at , and only at critical damping not at all. A featureless force does not produce a featureless motion. The oscillator answers with its own frequency no matter what you ask it, which is the same lesson the bell taught, and this time there was not even a bang to blame it on.
Prediction 4 falls out of the same reasoning. Driving on resonance, the response builds as and saturates at after roughly cycles. Three cycles at reaches 1.45 in units of ; thirty cycles reaches 2.50, the saturated value. Ten times the drive bought 1.7 times the response, because after the first cycles the oscillator is losing energy exactly as fast as the drive supplies it.
The dictionary. Write Kirchhoff’s loop rule for a series RLC circuit driven by , with the charge on the capacitor:
That is this module’s equation with the symbols renamed. Under
every result on this page transfers untouched: the same , the same , the same Lorentzian. Nothing was derived about springs. What was derived was the behaviour of any system obeying a linear second-order equation, and the mass on the spring was a convenient place to watch it happen.
Verify computationally¶
Each check below is also a test in the project’s suite, so these claims cannot silently rot.
1. Convolution against integration. convolution_response builds the motion by summing
kicks; simulate_forced steps the differential equation forward in time and knows nothing
about Green functions. Pointed at the same step, ramp, burst and noise records they agree,
and the disagreement falls fourfold each time the step is halved — the second-order
convergence each method separately claims.
2. The resonance curve from one kick. fourier.spectrum is applied to a computed
ringdown and the result laid over module 02’s steady_state_response, conjugated.
3. Two kicks, timed. Kicks spaced one period apart give times the single response, kicks a half period apart give , and kicks a quarter period apart give — measured, and matching the closed forms.
4. Two routes to from one record. The laboratory’s punchline, run under eight independent seeds. The same noisy ringdown is read in the time domain, where comes from how fast the envelope decays, and in the frequency domain, where it comes from how wide the line is. They agree to better than , and nothing but the data passes between them.
There is one trap in step 4, and the library is built around it. q_from_bandwidth finds the
half-power points by interpolating between samples, which is the right thing to do on a
swept curve, where the experimenter chooses how finely to sample. Nobody chooses the grid of
a ringdown’s spectrum: its bin spacing is while its linewidth is , so a
record holding amplitude e-foldings gets bins across the full width whatever
is — fewer than two, for a realistic record. Recording for longer is not the escape it looks
like, since ten bins would need thirty-one e-foldings, by which point the signal is 10-14
of where it started. The fix is to fit the whole lineshape rather than interpolate two points
on it, which is what q_from_linewidth does and why it exists.
Transfer the idea¶
Imaging is this module with replaced by . A lens answers a point of light with a small blur — the point spread function — and answers an extended object by superposing one blur per point, which is a convolution. becomes the PSF and becomes the optical transfer function; module
40-psf-otfis this page with two spatial coordinates instead of one temporal one, and almost nothing else changes.The atom as a kicked oscillator. Module
16-light-in-matterbinds an electron with a spring; its absorption line is for that oscillator, and its ringdown is fluorescence.Cavity ringdown. Modules
26-fabry-perotand44-resonatorsmeasure mirror losses by filling a cavity with light, switching the light off, and timing the decay. That is this module’s experiment performed on photons, and the linewidth it implies is again.Every wavelet is an impulse response. Module
28-huygensbuilds a propagating wave by treating each point of a wavefront as a source of secondary wavelets and adding them up. Same structure, same word: the wavelet is the medium’s Green function in space.Electronics, permanently. The RLC dictionary is not an analogy to be admired once. Any result you meet in circuit theory about transfer functions, step responses, ringing, or bandwidth is a result about this oscillator.
Check your understanding¶
A bell is struck with a felt beater, then with a steel hammer of the same mass moving at the same speed. Compared with the felt strike, what does the steel strike change about the sound?
A. The amplitude, and the mixture of the bell’s own modes it excites — but not the frequency of any mode. B. The frequency of the ringing, because a stiffer impact drives the bell faster. C. The decay rate, because a harder strike puts in more energy and takes longer to dissipate. D. Nothing measurable — the impulse response is a fixed property of the bell.
Check your answer
Correct answer: A — The amplitude, and the mixture of the bell’s own modes it excites — but not the frequency of any mode.
A. Right. A kick sets a velocity and nothing else, so the motion afterwards is free decay: it rings at omega_d, which belongs to the bell. A harder, shorter strike delivers a larger impulse and its spectrum is flatter, so it feeds the higher modes more strongly — brighter, louder, same pitches.
B. The impact drives nothing after it is over, and it is over almost immediately. Once the hammer has left, the equation of motion has no force term at all, so the bell solves its own free-decay problem at its own omega_d. Nothing about the mallet appears in that frequency.
C. Decay is exponential, so the time to fall by a given factor does not depend on where it started: gamma/2 is a property of the bell. A harder strike is louder for longer only in the sense that it starts higher up the same exponential.
D. G(t) is fixed, but the response is G scaled by the impulse J, so amplitude certainly changes. The invariant claim is narrower and more interesting: the shape in time is always the same, and only its size is yours to choose.
An oscillator with Q = 10 is kicked twice with equal impulses, the second kick landing exactly half a period after the first. What does the ringing look like afterwards?
A. Almost cancelled, at about 15% of a single kick — but not exactly zero. B. Exactly cancelled — the two contributions are in antiphase and destroy each other completely. C. Doubled — two kicks put in twice the impulse, so the response is twice as large. D. Unchanged — the second kick arrives when the mass is at its turning point and does no work.
Check your answer
Correct answer: A — Almost cancelled, at about 15% of a single kick — but not exactly zero.
A. Right. Half a period puts the two contributions in antiphase, so they subtract, and the amplitude ratio is 1 - e^(-pi/2Q) = 0.15 at Q = 10. It is not zero because the first kick’s ringing has already decayed a little by the time the second arrives, so the two amplitudes being subtracted are not equal.
B. They are in antiphase, but cancellation also needs equal amplitudes, and damping has shrunk the first one by e^(-pi/2Q) before the second arrives. Exact cancellation would require Q to be infinite, which is the undamped oscillator that never settles.
C. Impulses add, but responses add as signed functions of time, and here the second arrives when the first contribution is moving the other way. Doubling is what you get from kicks spaced a whole period apart, and even then only 1 + e^(-pi/Q) = 1.73 times, not 2.
D. A kick changes the velocity regardless of where the mass happens to be, so it always alters the motion. What the timing decides is the sign of that alteration relative to the ringing already present.
A constant force is switched on at t = 0 and never changed again. The oscillator has Q = 10 and starts at rest. Describe the displacement afterwards.
A. It overshoots the new equilibrium by about 85% and rings at omega_d before settling at F0/k. B. It glides smoothly up to F0/k without ever passing it, because the force never decreases. C. It rises to F0/k and stays there immediately, since a constant force has a constant response. D. It oscillates forever around F0/k, since the force keeps supplying energy.
Check your answer
Correct answer: A — It overshoots the new equilibrium by about 85% and rings at omega_d before settling at F0/k.
A. Right, and this is the module’s central surprise. The force has exactly one feature in its whole history, and the response has dozens. The system answers with its own frequency whatever it is asked, and the overshoot exp(-pi gamma / 2 omega_d) depends only on Q — 85% at Q = 10, 44% at Q = 2, zero at critical damping.
B. This is the misconception the module exists to break: a linear system’s displacement does not follow the shape of the force applied to it. Monotonic approach is what happens at critical damping or heavier; at Q = 10 the mass arrives with a velocity it has to lose, and losing it takes 2/gamma of ringing.
C. F0/k is where it ends, and that is the steady-state answer to a zero-frequency drive. Getting there is a transient, and the transient is the whole content of this question. The mass has inertia, so it cannot acquire its new position instantly.
D. A constant force supplies no net energy once the mass has stopped moving, and the damper removes what is there. The ringing decays as e^(-gamma t/2) exactly as a ringdown does — it is a ringdown, about the shifted equilibrium.
You record a single ringdown of an unknown resonator and take the magnitude of its Fourier transform. What have you got?
A. The resonator’s frequency-response magnitude — module 02’s entire swept resonance curve, from one strike. B. The spectrum of the hammer blow, since that is what put the energy in. C. A single sharp line at omega_d, because the ringdown is a decaying sinusoid at that frequency. D. Nothing useful without also recording the force, since a transfer function needs an input and an output.
Check your answer
Correct answer: A — The resonator’s frequency-response magnitude — module 02’s entire swept resonance curve, from one strike.
A. Right, and it is the reason engineers test structures with a hammer rather than a shaker. The transform of the impulse response is the frequency response, and one kick contains every frequency at once, so a single record carries the amplitude and phase the sweep would have measured point by point.
B. The spectra multiply — x-hat = G-hat F-hat — so what you see is the product. An ideal kick has a flat spectrum, which is exactly why it is the useful probe: it divides out, leaving the resonator’s own response and nothing of the hammer’s.
C. A line of zero width would need a sinusoid lasting forever. The decay is what gives the line its width — gamma, full width at half maximum — and that width is precisely the information you want, since Q = omega0/gamma. A decay in time is a Lorentzian in frequency.
D. True in general, and that is why the impulse is special: its transform is a known constant, so the output alone determines the transfer function up to that constant. It is the one input you do not have to measure.
Which of these observations would be forbidden by causality alone, given that the system is linear and time-invariant?
A. The mass has already begun moving one second before the force is first applied. B. The mass is still moving ten seconds after the force has been switched off. C. The displacement is largest at a moment when the applied force is zero. D. A brief force produces a motion lasting a thousand times longer than the force itself.
Check your answer
Correct answer: A — The mass has already begun moving one second before the force is first applied.
A. Right. Causality is exactly the statement G(t) = 0 for t < 0, which puts the upper limit t on the convolution integral and makes x(t) depend only on the force at times up to t. Motion before the force is the one thing on this list that no choice of m, b, k could produce.
B. Perfectly allowed, and characteristic: the response outlives the force by about 2/gamma. Memory of the past is not a violation of causality — dependence on the future is. This is the ringdown, and it is where you measure Q.
C. Allowed and routine. At resonance the displacement lags the force by a quarter cycle, so the peak displacement lands exactly where the force passes through zero. Nothing about that involves the future of the force.
D. This is the impulse response itself, and it is the module’s opening observation: the kick lasts milliseconds and the bell rings for seconds. Causality restricts which direction in time the influence runs, not how long it lasts.
A series RLC circuit has L = 10 mH, R = 2.0 ohm and C = 1.0 microfarad. Using the dictionary m <-> L, b <-> R, k <-> 1/C, what is the quality factor Q of this circuit?
Check your answer
Correct answer: 50.0 (± 1.0)
Q = sqrt(L/C)/R = sqrt(0.010 / 1.0e-6) / 2.0 = sqrt(10000) / 2.0 = 100/2.0 = 50. The same arithmetic as sqrt(mk)/b for the mechanical oscillator, because it is the same equation with the symbols renamed. The resonant frequency is omega0 = 1/sqrt(LC) = 10^4 rad/s, about 1.6 kHz.
You transform a measured ringdown and hand the spectrum to a colleague, who applies a half-power bandwidth estimator to it and reports Q = 16 for a resonator you know to be near Q = 20. The data are clean and the estimator is correctly implemented. What went wrong, and what should they do instead?
Check your answer
Nothing is wrong with either the data or the code — the trap is the frequency grid. A record of duration T has bins spaced 2 pi / T, while the line it must resolve has width gamma. Those two are not independent: a record holding n amplitude e-foldings has T = 2n/gamma, so the number of bins across the full width is gamma T / 2 pi = n / pi, independent of Q entirely. A realistic record of three to five e-foldings therefore gives under two bins across the line, and interpolating half-power crossings between two samples of a curve you have barely sampled reads systematically low.
Recording for longer is the obvious escape and a poor one: ten bins would need thirty-one e-foldings, by which point the signal is 10^(-14) of where it started and buried far below any noise floor. Zero-padding interpolates the lineshape more finely but adds no information, so it improves the appearance more than the estimate. The fix is to stop using two points and use them all: fit the whole Lorentzian lineshape, with the peak frequency and the width as free parameters. That is what oscillators.q_from_linewidth does, and it is why it exists alongside q_from_bandwidth, which remains the right tool for a swept measurement where the experimenter chooses the sampling. Note also that the envelope route, q_from_ringdown, is untouched by any of this — it never leaves the time domain — which is why the laboratory measures Q both ways and compares.
Exam-style problems for this module — the ones worth doing with a pen — are collected in the problem set.
Explain it in your own words¶
Answer in a few sentences each. No number will save you.
Explain to a musician why hitting a bell harder makes it louder but never higher, and what would have to be true of the bell for a harder strike to change the pitch.
What, physically, is the oscillator’s “memory”? How long does it last, and what sets that duration? Give the answer in cycles as well as in seconds.
Describe convolution in words, to someone who has not seen an integral sign. You may use the word “kick” as often as you like.
Suppose someone showed you a measured that was nonzero for . What absurdity follows? Name something you could then build.
Advanced: the name, the other solution, and undoing a convolution¶
The name. is a Green function, and the definition is more general than the use made of it above. Given a linear differential operator , the Green function is the solution of
that is, the response to a unit spike of source. Here
and the spike is the kick. The reason this is worth a name is that it works for any linear
operator: replace with the wave operator and you get the propagating wavelets of
module 28-huygens; replace it with the Laplacian and you get the potential of a point charge.
Solving a linear problem once for a point source solves it for every source, by superposition.
The solution we threw away. The equation has more than one solution, and the difference between any two of them solves — a free oscillation, which can be added at will. Fixing for picks one out, the retarded Green function. The other natural choice, for , is the advanced one, and it is a perfectly good solution of the differential equation describing a mass that rings with growing amplitude and is brought to rest by a kick that has not happened yet. There is no equation to rule it out. We rule it out because we have never seen one, which is a statement about the world and not about the algebra — and, it is worth saying, a statement physicists have had to revisit more than once at the edges of electrodynamics.
Undoing it. If , then surely : measure the motion, divide by the known response, recover the force that caused it. This is deconvolution, and it is how you would sharpen a blurred photograph. Try it in the laboratory’s last cell and watch it fall apart. The trouble is that is small far from resonance, so dividing by it multiplies whatever is there by a large number — and what is there, out where the signal is small, is noise. With no noise at all the recovery is exact. Add noise at one part in 106 and the recovered force is still recognisable; at one part in 104 it is already twice too large; at one part in 100 it overshoots by a factor of a hundred and looks like nothing whatever.
The crude rescue is to refuse to divide where is small, simply zeroing those
frequencies. That keeps the answer bounded and throws away real information along with the
noise. Doing better than crude — deciding how much to trust each frequency, given what you
know about the noise — is a genuine subject, and module 53-computational-imaging takes it up
properly. The reason to see the wreckage now is that it explains a limit you will meet
repeatedly: you cannot recover what the system did not transmit, and no amount of arithmetic
afterwards will put it back.