This document provides a proof of the sampling theorem through analysis in the time and frequency domains. It presents the key steps of ideal low-pass filtering to eliminate aliasing, downsampling to reduce the sample rate, upsampling by inserting zeros, and final filtering to recover the original signal from the reduced set of samples. Diagrams and MATLAB scripts are used to visualize the transformations in the frequency spectra at each step and demonstrate that the output of the system is equal to the input when it is ideally band-limited.
Micro-Scholarship, What it is, How can it help me.pdf
L23 315 f11
1. L23 315 F11
EE 315
Fall 2011
SAMPLING THEOREM PROOF
Introduction:
The sampling theorem for sequences is valid for sequences that are
ideally band limited to 1/(2n); the Fourier transform has a cycle that is
identically zero for frequencies larger than 1/(2n). Such band-limited
sequences can be recovered from equally spaced samples that are
separated by the integer n. Thus the amount of storage required to store
such a sequence can be reduced by a factor of n.
The sampling theorem is represented in the block diagram below.
The input is to an ideal low pass filter that eliminates any aliasing
frequency components in the input signal. If the input sequence is ideally
band limited, the output of this filter, fin[*] is equal to the input sequence,
in[*] . The second system in the cascade merely outputs every nth
component of the filtered input sequence: sfin[*]= fin[n*]. The third
system in the cascade, the up sampler, merely replaces the deleted
components of the filtered input, sfin[ ], with zeroes. This zero padded
sequence is then input to the initial filter. The output of this cascade of four
systems is equal to the filtered input, fin[*].
Block Diagram:
Analysis of the System:
This system is best understood in the frequency domain; and is
easiest to understand with visual plots of the Fourier transforms of the
sequences involved.
The first Fourier transform is plotted below; since Fourier transforms
are complex valued in general, a two dimensional “face” represents this
three dimensional nature of the Fourier transform; the shading of the eyes
at small frequency magnitudes represents that the Fourier transform is
different at positive and negative frequencies. When the sequence is real,
the Fourier transform at a negativefrequency equals the conjugate of the
corresponding positive frequency.
1
2. The input is drawn to represent the potential presence of frequency
components at aliasing frequencies. For this visualization, the down
sampling factor is two, n=2. In the cycle of the periodic Fourier transform,
the aliasing components are at frequencies with magnitudes between ¼
and ½. For a general down sampling factor of n, the aliasing components
are at frequency magnitudes greater than 1/(2n).
The Anti-Aliasing Filter:
Since the transfer function of the anti-aliasing filter is, in general,
given as below: the transfer function of a cycle of the anti-aliasing filter is
zero when the magnitude of the frequency is greater than1/(2n). The
output of the initial anti-aliasing filter is ideally band limited to a centered
band of width 1/n.
ì ì
ï 1, ·- * <
1 ï IN(·), ·-* < 1
ï
L(·) = í
2n , FIN(·) = í
2n ,
ï 0, otherwise ï
î ï 0,
î
otherwise
Since the cycle of the transfer function is identically zero at
frequencies above 1/(2n), the cycle of the Fourier transform is also zero at
frequencies with magnitudes above 1/(2n). The sequence at the output
of the anti aliasing filter is ideally band limited to 1/(2n). The visualization of
the output of the anti aliasing filter follows.
The unit pulse response of this ideal low pass filter can be easily
evaluated with symbolic Matlab; such a Matlab script follows.
Symbolic Matlab Script:
>>syms f k n real;l=int(exp(i*2*pi*f*k),f,-1/n/2,1/n/2)
<l=sin((pi*k)/n)/(pi*k)>
>>zero=simplify(l-(sinc(k/n))/n)
<zero=0>
The unit pulse response of this ideal low pass filter is upr[*]= (1/ n)sinc(*/ n) .
2
3. The Down Sampler:
The second system in the cascade of four systems is the down
sampler where the sampling rate is reduced by a factor of n; the down
sampler output only contains every nth sample of the input sequence,
sfin[*]=fin[n*]. The relation between the input and output Fourier transforms
of a down sampler was shown earlier to be:
1 n-1 æ ·- j ö
SFIN(·) = å FIN ç
÷.
n j=0 è n ø
The Fourier transform at the output of the down sampler, by a factor of n,
is scaled in amplitude by (1/n), stretched in frequency by a factor of n,
and is repeated periodically with period unity.
The visualization of the Fourier transform of the output of the down
sampler has been scaled in amplitude by 1/n and stretched by a factor of
n to fill the entire band of frequencies. The periodic repetition of the
Fourier transform does nothing to the shape of the Fourier transform since
it is periodic with unity period. The amplitude of the Fourier transform is
merely multiplied by n; however, it had already been divided by n. The
net effect on the amplitude of the Fourier transform is to leave the
amplitude unchanged at A.
3
4. The up sampler is defined in the frequency domain; the output Fourier
transform is merely the input Fourier transform compressed by a factor of
n: SFINS(·) = SFIN(n·) . The down sampler output Fourier transform is thus
periodic with period ½; the figure that follows visualizes the down sampler
output. The low frequency portion of this Fourier transform is identical to
the output of the anti aliasing filter; if an anti aliasing filter is used to filter
the down sampler output the filter output will be equal to the output of
the anti aliasing filter.
In some sense, this anti aliasing filter serves to interpolate for the zero
ì
ï SFINS(·), ·-* < 1
ï
OUT(·) = í
2n = FIN(·)
ï
ï 0,
î
otherwise
A visualization of the sampling system output Fourier transform follows; It is
identical to the output of the anti aliasing filter; when the system input is
ideally band limited the input to the sampling system is then equal to the
output of the sampling system.
4
5. The numeric Matlab script below illustrates the manner in which the final
filter interpolates the up sampled signal. The unit pulse response of the
final filter; the down sampling factor is n=3. The unit pulse response of the
filter is upr[*]= sinc(*/ n) ; It is assumed there are only three non zero
components in the up sampler:
ì
ï 1, * = 0
ï 3, * = 3
ï
sfins [*] = í
3 ï 2, * = 6
ï
ï 0, otherwise
î
Numeric Matlab Script:
>>n=3;sfins=[1 3 2];
>>dt=.01;t=-10:dt:10;s1=sfins(1)*sinc(t./n);s2=sfins(2)*sinc((t-3)./n);
s3=sfins(3)*sinc((t-6)./n);
>>plot(t,s1,':',t,s2,':',t,s3,':',t,s1+s2+s3),hold on,plot(3*(0:2),sfins,'*'),
xlabel('*,t'),ylabel('sfins(*),sfins(t)'),title(n+3)
5