A washing machine at spin-up, a wing in a gust, a cable in a crosswind: each is the damped oscillator of 5.3 Mechanical Vibrations: Spring–Mass–Damper pushed periodically. 5.4 Nonhomogeneous Equations: Undetermined Coefficients supplied the machinery (G=1/P(iω), the modification rule). The designer’s question: at which frequency does a push of fixed size do the most harm, how much, and how fast does it build? Each answer is checked against an integrator.
▶ VideoTransient and steady state, the amplitude and phase curves, beats, growth at resonance, and why a bridge can fail without resonancecaptions only
Transcript
A mass, spring and damper pushed by F zero cosine omega t: mass point four, stiffness ten, damping point four, force point four. So omega zero is five, zeta point one. Pushed at omega four from rest, a free part dies like e to the minus point five t, leaving the steady state.
Divide the force by P of i omega. At r equals point eight, P over omega zero squared is point three six plus point one six i. The gain is one over its length, about two point five four; the lag is its angle, about point four two.
Sweep the drive frequency. Each dot is an amplitude measured in a full simulation; the curve is the formula. Far below resonance the gain is one. At omega zero it is five, one over two zeta. Far above, it falls.
Zoom in: three frequencies are easy to confuse. The forced amplitude peaks at about four point nine five, below the free ringing frequency, about four point nine seven, below omega zero. Damper loss grows with frequency, dragging the peak down. Peak gain: about five point oh two five.
The lag rises from zero to pi, and is pi over two at omega zero for every damping. There spring and inertia cancel, so the damper alone opposes the push: c x prime equals F. Far above, inertia wins and x opposes F.
Q is the gain at resonance, one over two zeta: five. The half-power width is where A squared falls to half its value at r equals one. For zeta point one it is about point two oh four, and two zeta is two percent off; at zeta point three, twenty-one percent.
With no damping, a drive off resonance gives beats: a fast carrier in a slow envelope, by sum to product. First nodes: about fifteen point seven seconds at omega four point six, sixty-two point eight at four point nine. As omega reaches omega zero, the beat never ends.
With damping, growth starts on the undamped line and levels off at point two metres: the envelope is point two times one minus e to the minus point five t. Measured against it, the ratio is about point eight six at two seconds, about one by six. Ninety-five percent first arrives at six point five six four.
The force delivers F times velocity; the damper burns c times velocity squared; averages match. At omega four, about point oh three three watts. At omega zero velocity is in phase with the force: the curves coincide, and the mean is F zero squared over two c, point two watts. Stored over lost energy gives Q, five.
Accuracy depends on h times omega zero. Below point five, doubling N cuts the RK4 error about sixteen times; at three point nine, it explodes. And a solver sees only samples: at h point two, a drive at about thirty-six point four looks like a drive at five, giving amplitude about point one seven, not point zero zero zero seven seven.
From memory, Tacoma Narrows was flutter, not resonance: the wind force depends on the motion and can make damping negative, so the toy grows like e to the point one t with no periodic force. Vortex shedding is genuine forcing: St times U over D, fifty hertz here.
An honest limit: the spring is not linear. With a cubic term the peak bends and the answer depends on history. At omega five the amplitude is about point four nine, not one. At five point four, the same push gives about point two six or about point eight.
To recap: gain and lag; three frequencies; Q sets width and fill time; beats become capped growth; power balances; flutter is not resonance. Next: higher-order linear equations.
The driven oscillator
Divide mx′′+cx′+kx=F0cosωt by m and use ω02=k/m, 2ζω0=c/m:
x′′+2ζω0x′+ω02x=mF0cosωt.
One system runs through: m=0.4 kg, k=10 N/m, c=0.4 N s/m, F0=0.4 N. So ω0=5 rad/s, ζ=0.1, F0/m=1, and the static deflectionF0/k=0.04 m is the yardstick: the gain is A/(F0/k).
With P(s)=s2+2ζω0s+ω02 we have P(iω)=ω02[(1−r2)+2iζr] with r=ω/ω0. The rule yp=∣P∣Fcos(ωt−φ), φ=argP, gives
A(ω)=(1−r2)2+(2ζr)2F0/k,φ(ω)=atan2(2ζr,1−r2)
since (F0/m)/ω02=F0/k. The imaginary part 2ζr is never negative, so φ runs from 0 to π; a plain arctangent would hide the jump past r=1, where the real part changes sign.
Slow push, r≪1. The spring balances the force: x≈(F0/k)cosωt, gain near 1, lag near 0.
At r=1. Spring force and inertia cancel (ω02−ω2=0), so only the damper opposes the push: cx′=F. Then x′ is in phase with F, x lags by π/2 for everyζ, and the gain is 1/(2ζ).
Fast push, r≫1. Inertia wins, mx′′≈F, so x≈−F/(mω2) opposes the force (lag near π) and the gain falls like 1/r2.
Block A of the lab integrates the ODE with RK45 and fits acosωt+bsinωt to the tail:
r
ω
gain, formula
gain, measured
lag, formula
lag, measured
0.4
2
1.185114
1.185114
0.094952
0.094952
0.8
4
2.538365
2.538365
0.418224
0.418224
1.0
5
5.000000
5.000000
1.570796
1.570796
1.1
5.5
3.287980
3.287980
2.332943
2.332943
2.0
10
0.330409
0.330409
3.009041
3.009041
Matching the cos and sin parts for xp=acosωt+bsinωt gives a 2×2 system:
(p−qqp)(ab)=(F0/m0),p=ω02−ω2,q=2ζω0ω.
The matrix is ∣P∣ times a rotation by −φ, so solving it shrinks the force vector by ∣P∣ and turns it by +φ: (a,b)=A(cosφ,sinφ).
◆ InteractiveSweep the drive frequency through resonance and watch the measured amplitude and lag land on the formulas; switch to a single frequency (transient plus steady state) or to beats
Loading simulation…
In sweep mode each dot is measured from one full drive cycle; the dashed curves are the formulas. Slow the sweep and the dots sit on the curve; speed it up and they lag, since the oscillator needs about 1/(ζω0) to adjust. In single-frequency mode x is the steady state plus a fading transient.
Where is the peak? Three different frequencies
Minimise D(r)=(1−r2)2+4ζ2r2. With u=r2, D=u2−2(1−2ζ2)u+1 has its minimum at u=1−2ζ2, a legal r2 only for ζ<1/2. Then
For ζ≥1/2=0.7071 the minimum is at r=0 and the curve only falls. Three frequencies are easy to confuse: ω0, where the lag is π/2; ωd=ω01−ζ2, where the free oscillator rings; and ωpeak, where the forced amplitude is largest. Since 1−2ζ2<1−ζ2<1, ωpeak<ωd<ω0. The damper term 4ζ2r2 grows with r and penalises the high side, so the peak sits low. Block B finds the peak from the formula and as the argmax of a fine grid (in brackets):
ζ
ωpeak
ωd
peak gain
gain at ω0
excess
0.1
4.94975 [4.94970]
4.97494
5.02519
5.00000
0.504%
0.3
4.52769 [4.52775]
4.76970
1.74714
1.66667
4.828%
0.5
3.53553 [3.53550]
4.33013
1.15470
1.00000
15.470%
0.7
0.70711 [0.70710]
3.57071
1.00020
0.71429
40.028%
0.8
none
3.00000
1.00000
0.62500
n/a
At ζ=0.1 the peak is 0.5% above the resonant gain and 1.0% below ω0; at ζ=0.5 the gain at ω0 has fallen to the static value; at ζ=0.7 the peak is 0.02% above the static deflection and resonance has effectively disappeared.
Quality factor and bandwidth
Define Q=A(ω0)/(F0/k)=1/(2ζ), the resonant gain. It is also exactly 2π×(stored energy)/(energy lost per cycle) at steady-state resonance (derived below); in a free ring-down the same ratio needs 4πζ≪1 (5.3 Mechanical Vibrations: Spring–Mass–Damper).
The half-power bandwidth is the width where A2 (stored energy) is at least half its value at r=1: (1−r2)2+4ζ2r2=8ζ2, a quadratic in u=r2 with roots
r±2=1−2ζ2±2ζ1+ζ2,Δω=ω0(r+−r−)≈2ζω0=Qω0.
The lower root exists only for ζ<1/(22)=0.3536. Block C gives the exact width and the shortcut:
ζ
r−
r+
exact r+−r−
2ζ
shortcut error
0.05
0.945978
1.046482
0.100504
0.1
−0.50%
0.1
0.882611
1.086737
0.204126
0.2
−2.02%
0.3
0.439979
1.202671
0.762692
0.6
−21.33%
The shortcut is good to 2% for ζ≤0.1 (Q≥5) and poor at 0.3, because the half-power points are not equidistant from r=1. For absorbed power (derived below), proportional to (2ζr)2/[(1−r2)2+(2ζr)2], the half points solve 1−r2=±2ζr, so r=1+ζ2∓ζ and the width is exactly 2ζ; block C’s “power width” equals 2ζ to six digits for all five ζ it tries (0.01 to 0.3).
Beats: the first picture of resonance
Drive an undamped oscillator from rest, ω=ω0: x′′+ω02x=fcosωt, x(0)=x′(0)=0, f=F0/m. The particular solution is ω02−ω2fcosωt; subtracting ω02−ω2fcosω0t makes x(0)=0 and keeps x′(0)=0. By cosA−cosB=2sin2A+Bsin2B−A,
A fast carrier at (ω0+ω)/2 sits inside an envelope of height 2f/∣ω02−ω2∣. The sine factor oscillates at ∣ω0−ω∣/2, but the envelope is its absolute value, so the swell repeats every 2π/∣ω0−ω∣. Mechanism: the driven oscillation and the free one that x(0)=0 forces into existence start in opposition, drift in phase at rate ω0−ω, add to twice the driven amplitude after half a beat and cancel after a full one.
Block D integrates ζ=0 and finds the envelope nodes (where x2+(x′/carrier)2 vanishes):
ω
ω0−ω
carrier
first node
2π/(ω0−ω)
max∣x∣
bound 2f/∣ω02−ω2∣
4.6
0.4
4.8
15.708
15.708
0.51972
0.52083
4.9
0.1
4.95
62.832
62.832
2.02020
2.02020
The bound needs a carrier peak exactly at the envelope crest: true for 4.9, missed by 0.2% for 4.6. As ω→ω0, 2sin(Δt/2)/Δ→t and
For ζ>0 and ω=ω0 the steady state is 2ζω02fsinω0t. Adding e−ζω0t(c1cosωdt+c2sinωdt) and imposing x(0)=x′(0)=0 gives c1=0, c2ωd=−f/(2ζω0):
x(t)=2ζω02f[sinω0t−ωdω0e−ζω0tsinωdt].
Two nearly equal sinusoids subtract (a beat cut short by the decay), so for light damping the envelope is
Aenv(t)≈2ζω02f(1−e−ζω0t),
which starts as ft/(2ω0), the undamped line, and levels off at the steady amplitude. The time scale is 1/(ζω0)=2 s, which is 1/(2πζ)=Q/π=1.59 cycles per e-fold. Block E compares the largest ∣x∣ in each drive cycle with Aenv:
t
measured
envelope
ratio
2
0.108565
0.126424
0.8587
4
0.164423
0.172933
0.9508
6
0.189950
0.190043
0.9995
12
0.199424
0.199504
0.9996
The ratio is within about 0.1% from t=6 on; at t=2 it is 14% low because the amplitude is still growing fast during the cycle. The time to 95% is ln20/(ζω0)=5.991 s; the first time ∣x∣ reaches 0.19 is 6.564 s, later by less than the half-period 0.628 s between peaks.
A high Q therefore means a tall, narrow resonance that is slow to fill and to ring down, and a sweep faster than about (ζω0)2 per second measures an oscillator that has not had time to respond.
Energy: power in, power out
In the steady state x=Acos(ωt−φ) and x′=−Aωsin(ωt−φ). The force delivers Fx′. Because cosωtsin(ωt−φ) averages to −21sinφ over a period,
⟨Fx′⟩=21F0Aωsinφ,⟨cx′2⟩=21cω2A2.
They are equal: E=21mx′2+21kx2 obeys E′=x′(F−cx′), which is periodic in the steady state, so its average is zero. With A=F0/(k−mω2)2+(cω)2,
with equality exactly at ω0. The mechanism is phase: at ω0 the velocity is in phase with the force, which always pushes along the motion. Block F averages the simulated velocity over ten drive periods:
ω
A (m)
φ
mean Fx′ (W)
mean cx′2 (W)
21F0Aωsinφ
21cω2A2
4
0.101535
0.418224
0.032989
0.032990
0.032990
0.032990
5
0.200000
1.570796
0.199999
0.199999
0.200000
0.200000
and F02/(2c)=0.16/0.8=0.2 W. At resonance the stored energy is constant, E=21kA2, and the loss per cycle is 0.2⋅2π/ω0=πcω0A2, so 2πE/ΔE=k/(cω0)=1/(2ζ) exactly; block F prints 5.000000.
The same ω inside the integrator
A simulation must resolve two frequencies: the drive ω and the oscillator’s own ω0, which the transient excites and which sets the stability limit. Block G integrates ζ=0.1 over [0,40] with RK4, N steps per drive period (error: largest deviation from RK45 over the steady amplitude):
N
ω=5: hω0, error
ω=2: hω0, error
4
1.571, 3.64×10−1
3.927, 2.60×1039
8
0.785, 3.09×10−2
1.963, 3.61×10−1
16
0.393, 2.00×10−3
0.982, 2.90×10−2
32
0.196, 1.25×10−4
0.491, 1.94×10−3
64
0.098, 7.76×10−6
0.245, 1.19×10−4
Once hω0<0.5 each doubling of N cuts the error by about 16 (4.1 Local Error, Global Error & Order). Steps per drive period is the wrong yardstick: at ω=2 the same N gives a 2.5 times larger h. At N=4, hω0=3.927 is past the RK4 stability limit (2.6 to 2.9 in the table of 5.3 Mechanical Vibrations: Spring–Mass–Damper) and the run explodes. Forward Euler with 1024 steps per period reaches 3.18×10−2, what RK4 gets with N=8: 1024 against 8×4=32 force evaluations.
Aliasing. A solver reads the forcing only at its stage times, and cosines differing in frequency by 2π/h agree at every tn=nh. Block H takes h=0.2 and a drive at ωa=5+2π/h=36.41593, far above resonance, where the true response amplitude is 0.000768 m. Symplectic Euler (4.7 Energy & Symplectic Integrators) reads cosωatn=cos5tn: its numbers differ from the ω=5 run by at most 2.7×10−14, and its amplitude 0.16596 is a resonance that does not exist. RK4 also reads midpoints, aliasing differently but still wrongly: 0.06818, about 89 times the truth; at h=0.001 it gives 0.000768. Seeing the forcing at all needs h<π/ωa=0.0863 (Nyquist).
Tacoma Narrows: flutter, not resonance (from memory)
The Tacoma Narrows Bridge opened in July 1940 and failed on 7 November 1940 in a steady wind (from memory; I give no figures I could not verify). The textbook story, that wind vortices matched the bridge’s natural frequency, is not what the later analyses I remember support: a steady wind has no periodic force at that frequency, and the deck showed a growing torsional oscillation.
The mechanism is a different equation. In resonance the force is given and independent of x; in aeroelastic flutter the aerodynamic force depends on the motion itself, on twist and its rate. The part proportional to the rate acts like damping, and above a critical wind speed it has the wrong sign. Moved to the left side it gives x′′+2ζeffω0x′+ω02x=0 with ζeff=ζ−κ(U), κ growing with wind speed U. When ζeff<0 the roots have positive real part: negative damping, exponential growth with no periodic force.
Block J is a toy, not Tacoma data: ζeff=−0.02, ω0=5, x(0)=0.01. The envelope grows like e0.1t (e-fold time 10 s), by e6=403.43 in 60 s, and the largest ∣x∣ for t∈[50,60] is 3.9159. Resonance is capped at Q times the static deflection; this has no linear cap.
Vortex shedding and lock-in (from memory)
Steady flow past a circular cylinder of diameter D sheds vortices alternately at f=StU/D, with Strouhal number St≈0.2 over a wide range of Reynolds numbers (a rule of thumb from memory). Each vortex pushes the cylinder sideways, so the lateral force oscillates at f: for a stiff structure this is this lesson’s forced oscillator. Block K: D=0.04 m, U=10 m/s give 50.0 Hz, and a 12 Hz cable mode is excited at U=fnD/0.2=2.40 m/s.
Once the cylinder moves appreciably, the shedding (from memory) stays at the structure’s frequency over a range of U instead of following StU/D: lock-in, where the forcing depends on the response.
An honest limit: the spring is not linear
The curve assumed a Hooke spring, but real structures stiffen or soften with amplitude. Add a cubic term, x′′+2ζω0x′+ω02x+βx3=cosωt (a Duffing oscillator). For amplitude A the effective frequency rises to about ω2≈ω02+43βA2 (a standard estimate, from memory; block I evaluates it), so the peak bends right, and where it overhangs there are two stable amplitudes at one drive frequency. Block I uses ζ=0.02, β=10:
ω
start from rest
start from x(0)=1.2
linear formula
5.0
0.4892
0.4892
1.0000
5.4
0.2636
0.8026
0.2327
At the linear peak the true amplitude is under half the prediction, and at 5.4 the same force and frequency give 0.2636 or 0.8026 depending on history.
In the sim, sweep mode with ζ=0.02, β=10 and sweep rate 0.005 (readout rate ratio 0.500, not infinitely slow): going up, “largest measured gain” reaches 22.218 (A=0.8887 m) at ω=5.610 and the amplitude then collapses; the estimate above gives ω02+43β(0.8887)2=5.5609. Sweeping down, the largest is 19.134 (A=0.7654 m) at ω=5.195.
Lab: curve, peak, Q, beats, ring-up and power (blocks A to F)
🐍 PythonLab 1: steady-state curve, peak, Q and bandwidth, beats, ring-up, power balance
⌘/Ctrl + Enter
Lab: step size, aliasing, a cubic spring, flutter and Strouhal (blocks G to K)
🐍 PythonLab 2: RK4 steps per drive period, aliasing, a cubic spring, a self-excited toy and f = St U / D
⌘/Ctrl + Enter
Exercise: compute the resonance curve
Implement steady_state (solve the 2×2 system), measured_amplitude (integrate to steady state and measure) and peak_frequency (the argmax of the curve).
🧪 Coding exerciseExercise: the amplitude curve from a 2x2 solve, from an integration, and its peak✓ passed
⌘/Ctrl + Enter
💡 M = [[p, q], [-q, p]] with p = w0^2 - w^2 and q = 2 zeta w0 w; a, b = np.linalg.solve(M, [f, 0]); A = hypot(a, b), phi = atan2(b, a).
Problems
✏️ Pen & paperA motor on rubber mounts●○○
A 12 kg motor on mounts of stiffness 3000 N/m and damping 60 N s/m applies a vertical force 40cosωt N. (a) Find ω0 and ζ. (b) At ω=10 rad/s find the steady amplitude and lag. (c) Find ωpeak, the peak amplitude, and the frequency above which the amplitude is below the static deflection.
(b) r2=0.4, ζr=0.1, so 1−r2=0.6, 2ζr=0.2, gain 1/0.4=1.581139, and with F0/k=0.0133333 m, A=0.0210819 m. The lag is atan2(0.2,0.6)=0.321751 rad.
(c) ωpeak=15.8113881−0.05=15.41104 rad/s, peak gain 1/(2ζ1−ζ2)=3.202563, i.e. 42.70 mm. The gain is 1 when r4−2r2+4ζ2r2=0, i.e. r2=2−4ζ2=1.9, r=1.378405, ω=21.7945 rad/s.
✏️ Pen & paperReading Q from a shaker test●●○
A model wing shaken with constant force amplitude moves 0.2 mm at very low frequency and 5.0 mm at resonance, f0=40 Hz. (a) Estimate Q and ζ. (b) Find the exact half-power points of A2 and compare with 2ζf0. (c) Driven from rest at 40 Hz, how long until the envelope reaches 90% of steady, and how many cycles is that?
Show worked solution
(a) Q=5.0/0.2=25, so ζ=0.02.
(b) r±2=1−2ζ2±2ζ1+ζ2 gives r−=0.979383, r+=1.019416, i.e. 39.175 and 40.777 Hz: a width of 1.6013 Hz against 2ζf0=1.6 Hz.
(c) ζω0=0.02⋅2π⋅40=5.026548 s−1, and 1−e−ζω0t=0.9 gives t=ln10/5.026548=0.458085 s, which is 18.3 cycles.
✏️ Pen & paperBeats, then damping●●●
An undamped oscillator x′′+64x=3cos7.8t starts at rest. (a) Solve it. (b) Write it as a product of sines and find the largest possible amplitude, the beat period and the carrier cycles per beat. (c) Add damping ζ=0.02 (x′′+0.32x′+64x=3cos7.8t): find the steady amplitude and lag, and the time for the transient to fall to 5% of its start. How much of one beat appears?
Show worked solution
(a) ω02−ω2=64−60.84=3.16 and 3/3.16=0.949367, so x=0.949367(cos7.8t−cos8t).
(b) x=1.898734sin(0.1t)sin(7.9t), with largest amplitude at most 1.898734. The envelope ∣sin0.1t∣ repeats every π/0.1=31.4159 s, and the carrier cycles per beat are 7.9/0.2=39.5.
(c) P(7.8i)=3.16+2.496i, ∣P∣=4.026861, so the steady amplitude is 3/4.026861=0.744997 and the lag is atan2(2.496,3.16)=0.668536 rad. The transient falls as e−0.16t, to 5% at ln20/0.16=18.7233 s, about 60% of the beat. Beats are a transient here: the long-time response is 0.745, 39% of the undamped maximum.
✅ Concept check
For a damped oscillator with $0 \lt \zeta \lt 1/\sqrt2$, which ordering of the forced-amplitude peak $\omega_{\text{peak}}$, the free ringing frequency $\omega_d$ and $\omega_0$ is correct?
Why: The peak minimises (1 - r^2)^2 + 4 zeta^2 r^2 at r^2 = 1 - 2 zeta^2; the free ringing frequency is omega_0 sqrt(1 - zeta^2); the lag is pi/2 at omega_0.
✅ Concept check
A structure's resonant gain (amplitude at resonance divided by the static deflection) is measured to be 40. What is its damping ratio ζ?
Why: At r = 1 the gain is 1/(2 zeta) exactly, so zeta = 1/(2 * 40) = 0.0125.
✅ Concept check
Why is the Tacoma Narrows failure better described as flutter than as simple resonance?
Why: Resonance is a forced response with a bounded gain; flutter is an instability of the system once the motion-dependent aerodynamic term makes the effective damping negative.
Key Takeaways
The steady state has gain 1/(1−r2)2+(2ζr)2 in units of F0/k and lag atan2(2ζr,1−r2), exactly π/2 at r=1.
The amplitude peaks at ω01−2ζ2 (only for ζ<1/2), below ωd and ω0; the gain at ω0 is Q=1/(2ζ).
The half-power width has r±2=1−2ζ2±2ζ1+ζ2; 2ζω0 is 2% low at ζ=0.1, 21% low at 0.3, and exact for absorbed power 21cω2A2.
Undamped forcing from rest gives beats (repeat 2π/∣ω0−ω∣); ω→ω0 gives tsinω0t/(2ω0), capped by damping on the time scale 1/(ζω0).
Tacoma Narrows was flutter, a self-excited instability from negative effective damping (from memory); vortex shedding at f=StU/D is a genuine forcing that can lock in.
Numerically, hω0 and hω both matter, forcing sampled at h cannot tell ω from ω+2π/h, and a cubic spring bends the peak and makes it history-dependent.
Finished this lesson?
Mark it complete to track your progress (saved in this browser). Reading every section does this for you.