Professional Documents
Culture Documents
Let us compute the Fourier series for the function f (x ) = x on the interval [ , ]. f is an odd function, so the an are zero, and thus the Fourier series will be of the form bn sin nx. n =1
f (x ) =
Furthermore, the bn can be written in closed form. Using integration by parts, 2 bn = x sin nx dx 0 = 2 2 n2
n2
= =
2 n
2
n2 n
cos n .
Thus the above expression is equal to 2 / n when n is odd and 2 / n when n is even. Therefore our Fourier series is 2 2 2 f (x ) = 2sin x sin 2x + sin 3x sin 4x +
sin 5x 5 4 3
3
... .
0 -3 -2 -1 -1 1 2 3
-2
-3
3 2 1 0 -3 -2 -1 -1 -2 -3 1 2 3
Approximate Spectrum
2
1.5
0.5
10
12
14
16
18
20
-0.5
-1
Magnitude of Spectrum
2 1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 2 4 6 8 10 12 14 16 18 20
Another Example
let f be a box function dened on [ , ] as follows
f (x ) =
0 if | x | > 1. 1 if | x | 1.
This function contains two discontinuities. We have arranged for this function to be an even function, so that its Fourier series is of the form a f (x ) = 2
0
an cos nx. n =1
Computing the an is easy to do by hand if we simply observe that f is nonzero only over [1, +1]. Thus 1 ... an = f (x ) cos nx, n = 0, 1, 2, 1 1 = cos nx 1
+1 +1 +1
sin nx n
|1
2
sin n. %
f (x ) =
(1
n =1
2
sin n cos nx ).
Four terms:
1.2
0.8
0.6
0.4
0.2 x 0 -3 -2 -1 1 2 3
20 terms:
0.8
0.6
0.4
0.2 x 0 -3 -2 -1 1 2 3
50 terms:
0.8
0.6
0.4
0.2 x 0 -3 -2 -1 1 2 3
F ( ) =
f (x ) e
+
i x dx,
When f is even or odd, the Fourier transform reduces to the cosine or sine transform: 2 Fc () = 0
+
f (x ) cos x dx.
2 Fs () = 0
f (x ) sin x dx.
These latter two functions can be directly related to the an and bn terms in a Fourier series.
Fs () =
x sin x dx
x =
10 w
15
20
1.5
0.5
10
12
14
16
18
20
-0.5
-1
box(x ) =
"#
0 if | x | > 1. 1 if | x | 1.
Then
F ( ) =
box(x ) e 1
i
1
i x dx
e i x dx
x =1
$ $$$$$
e i x
| x = 1
i
'e '''
%e & %%%%
Recalling that e i = cos i sin , the cosine terms cancel out, and since i 2 = 1, sin F () = 2 ()(((( = 2sinc().
10
boxk (x ) =
0 if | x | > k. 1 if | x | k.
4 2*sin(2*w)/w 3
2 2*sin(w)/w
-15
-10
-5
5 w
10
15
11
Important Theorems
Suppose F () = FT( f ) and G () = FT(g ) are the spectra (i.e., Fourier transforms) of f and g, respectively, assuming they exist. The convolution theorem states that FT( f *g ) = F G. In other words, convolution in spatial domain is equivalent to multiplication in frequency domain. The analogous theorem called the modulation theorem expresses the duality of the converse operations: FT( f g ) = 1. .. (F*G ) .
We therefore have a duality: multiplication of functions in one domain is equivalent under the Fourier transform to convolution in the other.
12
A low-pass lter h is one that, under a convolution with any function f, admits only the frequencies of f that fall within a specic bandwidth (i.e., frequency interval) [ h , h ].
There is only one ideal (family of) low-pass lter for 1-D signals.
13
The only ideal low-pass lter is a sinc in spatial domain or box in frequency domain.
signal sinc
filtered signal
14
Then f (t ) can be uniquely represented by a sequence of samples f (i t ), i Z if s > 2m . I.e., our sampling rate must exceed twice the maximum frequency of the function.
15
Important Fact 1: f (x ) * (x a ) = f (x a ). Convolution with creates a copy of f shifted by a units. Important Fact 2: Let (x ) denote a box of half-width and of area one centred at position x = 0. Let f (x ) be a function that is smooth around [, +]. Then f (x ) (x ) f (0) (x ). As 0, (x ) (x ), f (x ) (x ) f (0) (x ). This multiplication, has the effect of sampling f at x = 0. More generally, f (x ) (x a ) f (a ) (x a ), for an arbitrary a R. Thus outside of an integral sign, works as a sampling operator.
16
Sampling Train Visualise an innite sequence of impulses or -functions, with one impulse placed at each sampling position i T as in
( it)
...
...
s (t ) =
The summation can be thought of the glue that holds a sequence of impulses together, and because t > 0, the impulses are spaced so that they do not overlap.
17
Sampling Operation We saw that we could effectively sample a function f at a any desired position a by placing a -function at a and multiplying it with f. Therefore, multiplying f with s takes samples of f at our desired positions: f (i t ) (t i t ). i =
+
fs = f s =
...
...
( it) f
18
Basic Argument
Suppose f and s have spectra F and S, respectively. Since fs is a product of two functions f and s, then the modulation theorem states that its Fourier transform is a convolution: FT( fs ) = Fs () = 10 00 F ( ) * S ( ) .
For our purposes f , and therefore F, is an arbitrary function. However, we can compute the spectrum of s. It indeed turns out that the spectrum of a train of impulses of spacing t is another train of impulses in frequency domain with spacing 2/t, which we dened above to be s . Formally, 2 ( k s ). FT(s ) = S () = 111 t k = We can put this back into our expression for Fs : Fs = 12 22 F ( ) * S ( )
+ +
t k =
F ( k s ) .
- m
- s
- s
- m
m s
- m
We need to prevent overlap of the spectra, for otherwise wed have no hope of extracting a single spectrum. Therefore, m < s m . This implies that s > 2m , which establishes the theorem.
20
- s
- m
We use a box lter in frequency domain to extract one copy of the spectrum of F from Fs : F () = Fs () B (), and by the convolution theorem, we can reconstruct f by convolution: f (t ) = fs (t ) * sincB (t ), where sincB (t ) is the inverse Fourier transform of B. Exercise: Suppose our box B is to have width b and height t. Then show that b t t b sincB (t ) = 787777 sinc ( 9:999 ). So a sinc is both an ideal low-pass lter AND an ideal reconstruction function (i.e., interpolant).
21
Analytic Filtering
One possibility: to lter a signal s with a lter f, rather than compute a convolution, we instead:
; < =
compute Fourier transforms S and F. compute SF. take the inverse Fourier transform.
# # Analytic filtering of signal s with filter f in # frequency domain. # filter := proc(s,f,x) local S,F,SF,sf,w; S := evalc(fourier(s,x,w)); F := evalc(fourier(f,x,w)): SF := S*F: # NOTE: regular multiplication sf := evalc(invfourier(SF,w,x)); end:
22
23
1.5 1 0.5
-1 -0.5
-1 -1.5
24
Summary
If we know that a signal is bandlimited (and we know what that limit is), then we have a lower bound for the minimum sampling density. If the signal is not bandlimited, we can prelter it into one that is. Then we can compute the right sampling rate.
But Is It Practical?
In a word, mostly no, sometimes yes, and occasionally, maybe.
25