B1 · Lesson 47 · Oscillations lab
Resonance sweeps, ringdowns, normal modes, large swings and isolation, measured in code
An oscillator's quality factor can be measured two ways: sweep the drive frequency and read the width of the resonance, or strike it and count how fast the ringing dies. Real systems have several modes, large swings bend the period, and isolators must be checked against the vibration they face. In this lab you'll measure all of these with simulations and compare each measurement with the theory of lessons 40 to 46.
- A 1 Hz oscillator is struck and left to ring. The solid curve is its motion and the dashed one the envelope, .
- Raise Q: the ringing lasts longer. Each cycle the amplitude falls by the factor .
- The readouts give that factor and the number of cycles until the amplitude halves, . Counting cycles of a ringdown is one of the quickest ways to estimate Q on the bench.
Predict
A 440 Hz tuning fork's sound falls to half its amplitude in 2 s. Roughly what is its Q?
About 4000. In 2 s the fork rings 880 cycles, and halving takes cycles, so . A steel fork loses only about a 635th of its energy per cycle, which is why it sings for so long; a quartz crystal does a hundred times better still.
Name it
Q from a frequency sweep
For a mass m on spring k with damping c, driven by force F at ω, the amplitude is
It peaks near at about QF/k, with . The half-power bandwidth Δω, the width of the peak where X has fallen to of its maximum, gives for light damping.
Q from a ringdown
Struck and left alone, successive peaks shrink by , where the logarithmic decrement is . Measuring over n cycles, .
Normal modes from a matrix
For coupled masses, . Trying gives the eigenvalue problem : the eigenvalues are the squared mode frequencies, the eigenvectors the mode shapes.
Measuring by simulation
A periodic steady state is reached once the starting transient has died away, after many multiples of . Then the largest |x| over one drive period is the amplitude, read from samples finely spaced enough that the peak isn't missed: sampling a sine n times per cycle can read it low by up to .
Worked example
A 0.2 kg mass on a 2000 N/m spring has damping 0.4 N·s/m. Find its Q, its peak response and its half-power bandwidth.
Show the solution
- Natural frequency and damping ratio. so Q = 50.
- Peak response. The displacement peaks at with amplitude 50.0 times the static deflection .
- Half-power bandwidth. It's about from 99 to 101 rad/s.
- What it means for a sweep. A sweep in steps coarser than that would miss most of the peak.
Answer Q = 50; the response peaks at 99.99 rad/s at 50.0 times the static deflection, and the half-power bandwidth is about 2 rad/s.
Worked example
The same oscillator is struck. By how much does its amplitude fall per cycle, and after five cycles?
Show the solution
- Logarithmic decrement.
- Per cycle. Each peak is times the last.
- After five cycles.
- Working backward. Reading the ratio of the first and sixth peaks from a scope and taking recovers δ, and . Averaging over several cycles makes the estimate far less sensitive to noise on any one peak.
Answer each peak is 0.9391 times the one before, and after five cycles the amplitude is 0.730 of where it started.
Worked example
Four 1 kg masses sit in a line between two walls, joined to each other and to the walls by five 100 N/m springs. What are the mode frequencies?
Show the solution
- Stiffness matrix.
- Mode frequencies. Its eigenvalues give which is 6.18, 11.76, 16.18 and 19.02 rad/s.
- Mode shapes. The lowest mode's shape is , all moving together like half a sine wave along the chain; mode fits half-waves.
- The ceiling. The more often neighbors oppose, the more the springs stretch and the higher the frequency, and no mode can go faster than = 20 rad/s.
Answer the modes are at 6.18, 11.76, 16.18 and 19.02 rad/s.
Check
Step 1. Write q_from_sweep(m, k, c) that computes the amplitude per unit force on 200 001 frequencies from half to one and a half times , finds the peak, and returns (peak frequency, Q) with Q estimated as the peak frequency over the half-power bandwidth.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 2. Write ring_q(m, k, c) that releases the oscillator from x = 1 at rest, steps it with RK4 (h = 10⁻⁴ s for 1 s), records each peak (where the velocity changes from positive to negative), and returns with δ from the first and sixth recorded peaks.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 3. Write mode_frequencies(k, m, n) for n equal masses m in a line between two walls, joined by n + 1 springs k. Build the stiffness matrix and return the angular frequencies in increasing order.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 4. Write pendulum_period(theta0, L) that releases a pendulum () from rest at theta0 radians, steps it with RK4 (h = 10⁻⁴ s) until θ first crosses zero, interpolates the crossing time, and returns four times it.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
Step 5. Write measure_T(r, z) that simulates a mass on a spring and damper whose base moves as ( = 1 rad/s, damping ratio z): . Use RK4 with 100 steps per drive period for 300 periods, starting at rest, and return the largest |x| over the last period.
Python 3.14 with numpy and matplotlib, running in your browser. Tab indents; press Esc and then Tab to move on.
Check
A resonator ringing at 440 Hz takes 0.5 s for its amplitude to halve.
(a)
What is its Q?
(b)
What is its half-power bandwidth in hertz?
Write units the way you normally would: 1.5 Hz, 1500 mHz and 0.0015 kHz are the same answer.
Check
An oscillator with Q = 50 is struck. What fraction of its starting amplitude remains after 3 cycles?
Check
Three 0.5 kg masses sit between two walls, joined by four 50 N/m springs. What is the lowest mode's angular frequency?
Write units the way you normally would: 1.5 rad/s and 1500 mrad/s are the same answer.
Explain why
Why do a frequency sweep and a ringdown measure the same Q?
Both are governed by the same damping. In a ringdown the oscillator loses a fraction of its energy each cycle, so the amplitude decays as . A decaying sinusoid can only be built from frequencies spread around , and the faster the decay, the wider that spread, by roughly the reciprocal of the decay time. The driven response is the same oscillator answering one frequency at a time, and its resonance is wide by exactly that spread, . Lightly damped means a slow ringdown and a sharp peak; heavily damped means a quick ringdown and a broad one.
Practice
Keep practicing
5 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.