Lab · Lesson 6
Wavelets for engineers
Derive what a wavelet map shows for a steady tone and for a sharp knock, why every mark has the same area, and how to read an amplitude off a map, then size the marks for a fan on a calculator.
Read the whole lesson as notes · every step, derivation and worked example, on one page
1Goal Where we are going
A spectrum says which frequencies are in a signal, not when. A wavelet map says both. This is the map of the fan from the video: a steady hum along the bottom, and a flash each time it knocks.
This lesson derives what that map shows and how to read it. The working builds up below the board; click any heading there to fold it away.
By the end of this lesson we will have derived what a wavelet map shows for the two things a machine signal is made of. A steady tone of amplitude at gives a band, the same at every time :
A sharp knock at gives a flash whose length is set by the row:
and every mark on the map has the same area, whatever its frequency:
Then we size the marks for the fan in the video, and read an amplitude off a map by hand.
2What we already know The tools
Seven facts, lettered (A) to (G). The one doing most of the work is (E): the area under a bell times a turning arrow.
On the board, the shaded area is (the real part; the imaginary part cancels). Drag and compare the area with .
The Fourier transform, the continuous form of Lesson 4’s DFT: the signal is matched against an arrow turning at :
Euler, as in Lesson 5: a cosine is two arrows, and an arrow has length 1:
A change of variable. If , then
An arrow turns at radians per second, and
The Gaussian integral, for any real . Complete the square, ; the shifted bell still has area :
An impulse picks out one value of whatever it multiplies:
And a bell falls to half its height at
3Derivation The wavelet and its copies
One wave inside a bell, slid to a time and stretched by a scale . The wavelet transform is how well the signal matches each copy.
Drag the frequency: the copy gets shorter as it gets faster, but keeps the same shape.
A wavelet is a short wave inside a bell. The Morlet wavelet is an arrow (B) turning at inside a Gaussian:
To use it we slide it to a time and stretch it by a scale , in seconds. Writing as in (C):
The gives every copy the same energy. By (C), with and :
The wavelet transform matches the signal against each copy, exactly as (A) matches it against an arrow:
The star is the complex conjugate: it turns the arrow backwards, as the minus sign does in (A).
4Derivation Each scale is a frequency
The arrow inside a copy turns at radians per second, so the scale and the frequency are the same thing in different units.
Every copy holds about one cycle per : fast rows get a short burst, slow rows a long one.
Inside (4), the arrow’s angle is . It turns at radians per second, so by (D)
For example, the 25 Hz row of a map uses
The bell in (4) is : its width is proportional to . Cycles per second times seconds of bell:
So every copy holds the same number of wiggles. A fast row gets a short burst, a slow row a long one. Slide the frequency on the board.
5Derivation A steady tone
Put one tone through every row. Each row answers with a bell-shaped strength (11), largest in the row whose frequency matches the tone, and the same at every time .
On the board, each row’s answer divided by the peak. Move the tone and watch the half-height band stay ±20% wide.
Feed in one steady tone of amplitude , at radians per second. By (B) it is two arrows:
Put the forward arrow into (4) and change variable by (C), , :
The integral is (E) with :
The backward arrow gives the same with . Near the peak , so and is nothing. Set it aside, as in Lesson 5. Take the size, with :
No is left in (11): a steady tone is a steady band across the map. It is brightest where , that is where the row’s frequency (5) equals the tone’s. There the exponential is 1:
6Derivation A sharp knock
A knock contains every frequency, so every row lights up, but each one for a time proportional to its scale. The map of one knock is a cone pointing at the moment it happened.
The board is (15), drawn for one knock at the centre.
Now the opposite kind of signal: one sharp knock at , idealised as an impulse of strength :
Put it into (4). By (F) the integral just evaluates the wavelet at :
Take the size:
Every row lights up, because a knock contains every frequency. But each row lights only for a time proportional to its : a short flash in the fast rows, a long smear in the slow ones. On the map a knock is a cone pointing at .
7What it means Every mark has the same area
Measured at half height, a mark is long and tall. Multiply, and cancels: every mark on a wavelet map has the same area, 0.88. The board shows rows at 20, 40, 80, 160 and 320 Hz.
Switch to the short-time FFT: its marks have the same area too, but one shape for every row.
How big is each mark? Measure it at half height, (G).
In time, from (15): half height where . The full width of a knock’s flash is
In frequency, from (11): fix a row and ask which tones it hears at half height or more. By (5), , so the condition becomes
Multiply (16) and (18), using from (5):
Every mark on a wavelet map has the same area. What changes is its shape: tall and thin in the fast rows, short and wide in the slow ones. A short-time FFT uses one window for every row, so all its marks are the same shape. That is the whole difference.
8What it means Choosing ω₀
sets how many wiggles sit under the bell. More wiggles: sharper in frequency, longer in time. The area of a mark does not change.
Below about 5 the wavelet no longer averages to zero. 6 is the usual choice.
Both widths contain . Put into (16), and look again at (18):
A bigger puts more wiggles under the bell (7): sharper in frequency, blurrier in time. The product (19) does not move. It is the short-time FFT’s trade again, but set once as a fraction of , not as a fixed number of hertz.
Why not make small? A wavelet must average to zero, or it answers a constant offset. Use (E) on (1) with :
is the usual choice (Torrence and Compo, 1998): as short as it can be while (21) stays negligible.
9Worked example 1 The hum and the knock
The fan from the video: 1,500 rpm, a 25 Hz hum, and a knock once per turn that rings near 400 Hz. Size the marks by hand.
The dashed outlines on the map are the half-height sizes from the working: one knock at 400 Hz, and the same knock as the 25 Hz row would see it.
Worked example 1. A fan runs at 1500 rpm. It hums at 1X, and something knocks once per turn, ringing near 400 Hz. With : how big are the marks for the hum and for each knock, and do the knocks show up separately?
The scale of each row, by (5):
The time width of a flash, by (16):
The band each row hears, by (17) and (18):
At 400 Hz each knock is a flash 5.6 ms wide, and the knocks are 40 ms apart: 7 times the width, so they show as separate flashes, one per turn. In the 25 Hz row the same knocks would each last 90 ms, more than twice the gap, and run together. But that row pins the hum to 25 Hz ± 5 Hz.
No single short-time FFT does both. To split knocks 40 ms apart it needs a window shorter than 40 ms, and then by Lesson 5 its bins are at least Hz apart: the hum sits in bin 1, next to DC, with nothing around it.
10Worked example 2 Equally bright, not equally big
Two steady bands on one map, equally bright. With the convention the slow one is four times smaller than it looks.
Switch the convention on the board: with , equal amplitudes are equally bright.
Worked example 2. On the same fan’s map, the 25 Hz band and a steady 400 Hz gear-mesh band are equally bright: both read mm/s·√s. Which vibration is bigger?
By (12) we need for each row, with from (23):
Equally bright, but the 400 Hz vibration is four times bigger:
With the of (2), a reading grows like . Some tools use instead, which makes equal amplitudes equally bright. Check which one yours uses before reading amplitudes off a map, and use (12) when it is .
11Your turn Try it with a calculator
Your turn. In the interactive lesson above, this step gives you a new signal each time, checks your answers and writes out the full working, line by line.
12Summary On one card
Four boxed results. Scale is frequency; a tone is a band whose brightness gives its amplitude; a knock is a cone; and every mark has the same area, 0.88.
Next: sidebands, the twins a slow wobble puts around a fast tone.
Everything in this lesson on one card (Morlet wavelet, ):
A wavelet map answers which frequency and when. Its marks all have the same area: short bursts for fast things, long ones for slow things.