Fourier Transforms and Sampling

advertisement
Fourier Transforms and Sampling
Samantha R Summerson
19 October, 2009
1
Fourier Transform
Recall the formulas for the Fourier transform:
F {s(t)}
=
F −1 {S(f )}
=
Z ∞
S(f ) =
s(t)e−j2πf t dt,
−∞
Z ∞
s(t) =
S(f )ej2πf t df.
−∞
Suppose s(t) is periodic. Then we can write it using the Fourier series,
∞
X
s(t) =
cl e
j2πlt
T
.
l=−∞
We can compute the Fourier transform of the signal using its Fourier series representation.
!
Z ∞
∞
X
j2πlt
S(f ) =
cl e T
e−j2πf t dt,
−∞
∞
X
=
=
l=−∞
∞
X
l=−∞
l=−∞
Z
∞
cl
e
j2πlt
T
e−j2πf t dt,
−∞
l
cl δ f −
.
T
The function δ(t) is the Dirac delta function:
δ(t) =
1
0
t=0
.
t 6= 0
This means that in order to find the Fourier transform of a periodic signal, we only need to find the Fourier
series coefficients.
Example 1. Find the Fourier transform of
s(t) = cos(2πf0 t).
We can re-write the signal using Euler’s formula:
s(t) =
1 j2πf0 t 1 −j2πf0 t
e
+ e
.
2
2
1
Thus, the Fourier series coefficients are
1
2
ak =
k = −1, 1
,
o/w
0
and so the Fourier transform is
1
1
S(f ) = a−1 δ f +
+ a1 δ f −
,
T
T
1
1
=
δ (f + f0 ) + δ (f − f0 ) .
2
2
In general, for non-periodic signals, the Fourier transform has many nice properties. I recommend
looking at CTFT tables online or in the course book. Two nice properties to highlight are the operations of
differentiation and integration in the time domain. Consider a signal s(t) and take the derivative.
y(t)
=
=
=
=
=
d
s(t),
dt Z
d ∞
S(f )ej2πf t df,
dt −∞
Z ∞
d j2πf t S(f )
e
df,
dt
−∞
Z ∞
S(f )j2πf ej2πf t df,
−∞
Z ∞
Y (f )ej2πf t df
−∞
Thus,
d
s(t) ↔ j2πf S(f ).
dt
Differentiating in the time domain corresponds to mutliplying by j2πf in the frequency domain. Similarly,
we can show that integrating in the time domain corresponds to dividing by j2πf in the frequency domain
(if S(0) = 0).
Z t
1
s(τ )dτ ↔
S(f )
j2πf
−∞
2
Sampling
We can create discrete-time signals by sampling continuous-time signals at regular intervals of length Ts . If
we multiply a continuous-time signal s(t) with a train of Dirac delta functions, we have a sampled signal:
s(t) ×
∞
X
δ(t − nTs )
∞
X
=
n=−∞
n=−∞
∞
X
=
s(t)δ(t − nTs ),
s(nTs )δ(t − nTs ).
n=−∞
The sampling period, or interval, is Ts , and the sampling frequency, or rate, is fs = T1s . If s(t) is band-limited,
we can prevent aliasing (overlap in the frequency domain) by selecting Ts such that
Ts <
1
,
2W
2
where W is the bandwidth of the signal. This is the as the Nyquist-Shannon Sampling theorem. We refer to
f = 2T1 s as the Nyquist frequency since it is the highest frequency at which a signal can contain energy and
remain compatible with the sampling theorem.
If we wish to filter a discrete-time signal that originates from a continuous-time signal, does it matter
the order in which we perform the operations, i.e. if we sample and then filter versus filter and then sample?
Consider the two systems shown below:
s(t)
Sampler
s(n)
H(f )
y1 (n)
Figure 1: System 1: Sampling and then filtering.
s(t)
H(f )
x(t)
Sampler
y2 (n)
Figure 2: System 2: Filtering and then sampling.
Does y1 (n) = y2 (n) for these systems? In class we showed that
X
k
F {s(n)} =
ak S f −
.
Ts
We will use this result in order to show that, in fact, the two signals are not equal. In the first system, the
Fourier transform for s(n), the output of the sampler, is exactly the formula we have above. If we put this
signal through a LTI filter, the Fourier transform of the output is
Y1 (f )
= F {s(n)}H(f ),
X
k
=
ak S f −
H(f ).
Ts
For the second system, we know that
X(f ) = S(f )H(f ),
and then we can use the same formula above for the spectrum of the sampled signal:
Y2 (f )
= F {y2 (n)} ,
X
k
,
=
bk Xf f −
T
X
k
k
=
bk S f −
H f−
.
T
T
We can see in general the two formulas are not equal. Let’s consider the above problem in pictures.
Sampling the signal creates multiples copies of the spectrum of the signal centered at different frequencies.
If we low-pass filter this sampled signal using a filter with passband size W Hz, as in the first system,
then we will get the original signal back and the spectrum Y1 (f ) is the same as S(f ). If we use the LPF first
on s(t), the spectrum is unchanged since it falls within the passband. If we then sample, as in the second
system, the spectrum of the output, Y2 (f ), is the spectrum of s(nT ). Thus, the two signals are different
since their frequency content is different.
3
|S(f )|
f
−W
W
Figure 3: Magnitude of the spectrum of s(t).
|S(f )|
...
...
f
−W
W
Figure 4: Magnitude of the spectrum of s(nT ).
Example 2. What should the sampling period be for the sinc function,
s(t) = sinc(πt)?
Recall that the sinc function is defined as
sinc(πt) =
We know that
sin(2πW t)
↔ S(f ) =
πt
sin(πt)
.
πt
1
0
−W < f < W
.
o/w
Thus, our signal has bandwidth W = 21 . By the sampling theorem, we require
T <
1
2
1
2
= 1.
Any sampling interval less than one will suffice (equivalently, any sampling frequency greater than one). If
we select T = 12 , then
sin π 12 n
s(n) =
,
π 12 n

1
n=0



0
n even
=
.
2
n = 1, 5, 9, ...


 πn
−2
n = 3, 7, 11, ...
πn
4
Download