B147 of 56
0 XP
  1. Hook
  2. Play
  3. Predict
  4. Name it
  5. Check
  6. Explain

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, e−πt/Q.
  • Raise Q: the ringing lasts longer. Each cycle the amplitude falls by the factor e−π/Q.
  • The readouts give that factor and the number of cycles until the amplitude halves, Qln⁡2π. 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?

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

X=F(k−mω2)2+(cω)2.

It peaks near ω0=k/m at about QF/k, with Q=mω0c=12ζ. The half-power bandwidth Δω, the width of the peak where X has fallen to 12 of its maximum, gives Q≈ω0Δω for light damping.

Q from a ringdown

Struck and left alone, successive peaks shrink by e−δ, where the logarithmic decrement is δ=2πζ1−ζ2≈πQ. Measuring over n cycles, δ=1nln⁡x0xn.

Normal modes from a matrix

For coupled masses, M𝐱¨=−K𝐱. Trying 𝐱=𝐯cos⁡ωt gives the eigenvalue problem K𝐯=ω2M𝐯: 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 1ζω0. 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 1−cos⁡πn.

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
  1. Natural frequency and damping ratio. ω0=2000/0.2=100rad/sζ=c2mω0=0.440=0.01 so Q = 50.
  2. Peak response. The displacement peaks at ω01−2ζ2=99.99rad/s with amplitude 50.0 times the static deflection F/k.
  3. Half-power bandwidth. It's about 10050=2rad/s from 99 to 101 rad/s.
  4. 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
  1. Logarithmic decrement. δ=2π×0.011−0.0001=0.06283
  2. Per cycle. Each peak is e−0.06283=0.9391 times the last.
  3. After five cycles. 0.93915=0.730
  4. Working backward. Reading the ratio of the first and sixth peaks from a scope and taking 15ln⁡10.730 recovers δ, and Q=πδ=50.0. 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
  1. Stiffness matrix. K=100(2−100−12−100−12−100−12)
  2. Mode frequencies. Its eigenvalues give ωj=2k/msin⁡jπ10 which is 6.18, 11.76, 16.18 and 19.02 rad/s.
  3. Mode shapes. The lowest mode's shape is (0.59,0.95,0.95,0.59), all moving together like half a sine wave along the chain; mode j fits j half-waves.
  4. The ceiling. The more often neighbors oppose, the more the springs stretch and the higher the frequency, and no mode can go faster than 2k/m = 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 k/m, 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 Q=πδ 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 (θ¨=−9.8Lsin⁡θ) 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 sin⁡rt (ωn = 1 rad/s, damping ratio z): x¨=−2z(x˙−rcos⁡rt)−(x−sin⁡rt). 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?

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.