Fourier Series Suppose f : [0, 2π] → C and: X f (x) = an cos nx n=0 How could we find the an if we know f ? Having a look at cos : cos(0x) cos(1x) cos(2x) Average 1 Average 0 Average 0 Z 0 2π f (x) dx = X an Z 2π cos nx dx = 2πa0 0 n=0 How do we find the rest of the an ? 1 cos nx cos mx = 1/2(cos(m + n)x + cos(m − n)x) Z 2π f (x) cos mx dx 0 = X an Z 2π cos nx cos mx dx 0 n=0 = πam We can do a complex version. If: ∞ X f (x) = an einx n=−∞ ⇒ Z 2π e−inx f (x) dx = 2πan 0 And an integral version. If: Z ∞ f (x) = a(ω)eiωx dω −∞ Z ∞ ⇒ e−iωx f (x) dx = 2πa(ω) −∞ So what functions can we write as 2 P an einx ? Lp and friends The sets of functions people look at: L2 ([0, 2π]) Z = f : [0, 2π] → C| 2π |f (x)|2 dx < ∞ 0 L1 (R) Z = f : R → C| ∞ |f (x)| dx < ∞ −∞ L3 (N) = ( an |n ∈ N, ∞ X ) |an |3 < ∞ n=0 {einx : n ∈ Z} are a basis for L2 ([0, 2π]). {eiωx : ω ∈ R} are a bit like a basis for L2 (R). So by adding up our einx ’s we get quite a lot of functions. 3 This seems a bit pointless. If v(x) = eiωx then : d d iωx v= e = iωeiωx = iωv dx dx So with Fourier analysis we can write things is terms of eigenvectors for differentiation. Good for solving stuff like the wave equation: ∂2 1 ∂2 − 2 2 =0 2 ∂x v ∂t And so for signal processing. It also tells us about the frequencies present in a signal. 4 2 e−x cos(7x): 2 F(e−x cos(7x)) 5 The catch The Fourier transform tells us nothing about when the frequencies occur. It only tells us how much they occur on the whole. This means at a glance we can’t tell the difference between: 2 G and: 2 G ( α7 = 1.498, α9 = 1.681 , α5 = 1.334, α−7 = 0.667, α0 = 1 ) 6 Close Encounter: F(Close Encounter): 7 Windowed Fourier Transforms Cut your signal into little bits, and look at what frequencies they have. You use a ‘Window’ to do the cutting. 2 e−x χ[−1,1] 1 + cos x So you center your window over the bits you’re interested in, multiply and take the Fourier transform. 8 F(Close Encounter): 0.5 1.5 3.5 4.5 9 2.5 Why Wavelets ? Well you have to choose how wide your window is. If you don’t know in advance you’re in trouble. Also if the frequency you’re interested in has period longer than your window you’re in trouble! With wavelets you link your window size to the frequency you are looking for. We can take a 2 window ( e−x ) and a wave ( sin x ) and glue them together. 2 ψ(x) = e−x sin x F(ψ) ψ 10 If you’re looking for frequency µ you scale : 2 ψ(µx) = e−(µx) sin µx And if you want to look at a certain position x0 you slide : −(µ(x−x0 ))2 ψ(µ(x − x0 )) = e sin µ(x − x0 ) This approach often works, and is responsible for much of the industry related to wavelets. There is another way to make wavelets.... ...using multi-resolution analysis. 11 Multi-Resolution Approximation With traditional Fourier series, we can chop our sum and hopefully get a good approximation of what we want. With multi-resolution approximation we want to get something ‘twice’ as good as the last at each level. 12 Approximation To approximate something we: 1. Take some “basis” function g. 2. Move it to our nodes. 3. Multiply by some coefficients. 4. Sum the results. 13 Our approximations are: X V0 = { an g(x − n) : n ∈ Z} To improve your resolution, move your nodes twice as close together: Vj+1 = {f (2x) : f ∈ Vj } And the next level should be at least as good as the last: Vj ⊂ Vj+1 And the Vj should get into all the nooks and crannies. +∞ [ Vj is dense. j=−∞ 14 Our approximations are like ‘averages’ over length 21j . At each stage we add on the local 1 detail at the new scale 2j+1 . fj+1 (x) Vj+1 = fj (x) + dj (x) = Vj ⊕ Wj We know that the Vj were related by Vj+1 = {f (2x) : f ∈ Vj } so we make the Wj be related by the same. We also know that V0 is the span of the g(x − n), so we hope W0 is spanned by some w(x − n). This w(x) will be out wavelet! So how do we find suitable g and w ? 15 Dilation Equations Remember g ∈ V0 ⊂ V1 but V1 is the span of g(2x − k), so: X ck g(2x − k) g(x) = k 1. Integrating the dilation equation gives: Z Z X g(x) dx = ck g(2x − k) dx X 1Z = ck g(x) dx 2 P So ck = 2. 2. Wanting the g(x − n) to be orthonormal P means ck ck−2m = δ0m for any m. P 3. If (−1)k k m ck = 0 for m = 0, 1, . . . p − 1 gives some very interesting info: • 1, x, x2 , . . . xp−1 are in your space. • Error ≈ O( 21pj ) in Vj . 16 Famous values of ck Haar Wavelets have c0 = 1, c1 = 1 : g(x) w(x) √ Daubechies Wavelets have c0 = + 3), √ √ √ 1 1 1 c1 = 4 (3 + 3), c2 = 4 (3 − 3), c3 = 4 (1 − 3): 1 (1 4 g(x) w(x) 17 Applications • Video and Audio compression. • Image and data analysis. • Solving differential equations. • Keeping mathematicians in a job. 18