lecture 8 sampling theorem
TRANSCRIPT
Fundamentals of Digital Signal Processing
Lecture 8 Sampling Theorem
Fundamentals of Digital Signal ProcessingSpring, 2012
Wei-Ta Chu2012/3/20
1 DSP, CSIE, CCU
The Concept of Aliasing� Aliasing (化名): two names for the same person, or
thing
� Consider and
Aliasing is solely due to the fact that trigonometric
DSP, CSIE, CCU2
� Aliasing is solely due to the fact that trigonometric functions are periodic with period
� These continuous cosine signals are equal at integervalues n
Sampled with Ts = 1
The Concept of Aliasing� The frequency of x2[n] is , while the
frequency of x1[n] is . When speaking about the frequencies, we say that is an alias of
� E.g. Show that is an alias of
� The following formula holds for the frequency aliases:
DSP, CSIE, CCU3
� The following formula holds for the frequency aliases:
� Where is the smallest of all the aliases, it’s sometimes called the principal alias.
The Concept of Aliasing� Note that , so we can generate
another alias for x1[n] as follows:
� A general form for all the alias frequencies of this type
DSP, CSIE, CCU4
� These aliases of a negative frequency are called folded aliases
The Concept of Aliasing� Extra relation between folded aliases and the principal
alias
folded aliases
principal aliases
DSP, CSIE, CCU5
� Note that the algebra sign of the phase angles of the folded aliases must be opposite to the sign of the phase angle of the principal alias
Summary� We can write the following general formulas for all
aliases of a sinusoid with frequency
� Because the following signals are equal for all n
DSP, CSIE, CCU6
Spectrum of a Discrete-Time Signal� Drawing the spectrum representation of the principal
alias along with several more of the other aliases.
� Spectrum of discrete-time signal跟spectrum of continuous-time signal的意義稍有不同� In continuous case, all the spectrum components were
added together to synthesize the continuous-time signal.
DSP, CSIE, CCU7
added together to synthesize the continuous-time signal. � In discrete case, we simply need to select one spectrum
component to synthesize the discrete-time signal.
Spectrum of continuous-time signal
The Sampling Theorem� How frequently we must sample in order to retain
enough information to reconstruct the original continuous-time signal from it samples?
A continuous-time signal x(t) with frequenciesShannon Sampling Theorem
DSP, CSIE, CCU8
A continuous-time signal x(t) with frequenciesno higher thanfmax can be reconstructed exactlyfrom its samplesx[n]=x(nTs), if the samples aretaken at a ratefs=1/Ts that is greater than 2fmax.
The Sampling Theorem� The minimum sampling rate of 2fmax is called the
Nyquist rate. � We can see examples of the sampling theorem in many
commercial products. � E.g. CDs use a sampling rate of 44.1 kHz for storing
music signals in a digital format. This number is slightly more than two times 20 kHz, which is the generally
DSP, CSIE, CCU9
more than two times 20 kHz, which is the generally accepted upper limit for human hearing.
� Reconstruction of a sinusoid is possible if we have at least two samples per period.
� What happens when we don’t sample fast enough? � Aliasing occurs
Ideal Reconstruction� Since the sampling process of the ideal C-to-D
converter is defined by the substitution t=n/fs, we would expect the same relationship to govern the ideal D-to-C converter
DSP, CSIE, CCU10
� This substitution is only true wheny(t) is a sum of sinusoids
Ideal Reconstruction� An actual D-to-A converter involves more than this
substitution, because it must also “fill in” the signal values between the sampling times, tn=nTs.
� In Section 4-4, we will see how interpolation can be used to build an A-to-D converter that approximates the behavior of the ideal C-to-D converter.
DSP, CSIE, CCU11
the behavior of the ideal C-to-D converter.
� In Chapter 12, we will use Fourier transform theory to show how to build better A-to-D converters by incorporating a lowpass filter.
Ideal Reconstruction� If the ideal C-to-D converter works correctly for a
sampled cosine signal, then we can describe its operation as frequency scaling.
� For example, the discrete-time frequency of y[n] isthe continuous-time frequency of y(t) is
DSP, CSIE, CCU12
� The discrete-time signal has aliases. Which discrete-time frequency will be used? � The selection is the lowest possible frequency
components (the principal aliases)� When converting from to analog frequency, the output
frequency always lies between and
Summary� The Shannon sampling theorem guarantees that if x(t)
contains no frequencies higher than fmax and if fs>2fmax, then the output signal y(t) of the ideal D-to-C converter is equal to the signal x(t)
DSP, CSIE, CCU13
Spectrum View of Sampling� Suppose we start with a continuous-time sinusoid,
, whose spectrum consists of two spectrum lines at with complex amplitudes of
� The sampled discrete-time signal
DSP, CSIE, CCU14
has two spectrum lines at , but it also must contain all the aliases at
Spectrum View of Sampling
� When a discrete-time sinusoid is derived by sampling, the alias frequencies all are based on the normalized value, , of the frequency of the continuous-time
DSP, CSIE, CCU15
value, , of the frequency of the continuous-time signal.
� We will see what happens at different sampling rates.
Over-Sampling� Oversampling: sampling at a rate higher than twice the
highest frequency so that we will avoid the problems of aliasing and folding.
� at a sampling rate fs=500 samples/sec, we are sampling two and a half times faster than the minimum required by the sampling theorem.
DSP, CSIE, CCU16
theorem.
� The input analog frequency of 100 Hz maps to , so we plot
spectrum lines at � We also draw all aliases at
Over-Sampling
Because
DSP, CSIE, CCU17
� The D-to-C converter must select just one pair of spectrum lines� Always selects the lowest possible
frequency for each set of aliases (principal alias frequencies)
Over-Sampling� For the oversampling case where the original
frequency f0 is less than fs/2, the original waveform will be reconstructed exactly.
� In the example, f0=100 Hz and fs=500, so the Nyquistcondition of the sampling theorem is satisfied, and the output y(t) equals the input x(t).
DSP, CSIE, CCU18
output y(t) equals the input x(t).
Aliasing Due to Under-Sampling� When fs < 2f0, the signal is under-sampled.
� For example, fs = 80 Hz and f0 = 100 Hz.
� The discrete-time frequency
� All aliases
DSP, CSIE, CCU19
� Examine the D-to-C process, we use the lowest frequency spectrum lines from the discrete-time spectrum.
Aliasing Due to Under-Sampling� Another way to state this
result is to observe that the same samples would have been obtained from a 20 Hz sinusoid.
� Notice that the alias
DSP, CSIE, CCU20
� Notice that the alias frequency of 20 Hz can be found by subtracting fs
from 100 Hz.
Aliasing Due to Under-Sampling� When the sampling rate and the
frequency of the sinusoid are the same.
� Samples are always taken at the same place on the waveform, so we get the equivalent of sampling a constant (DC), which is the
DSP, CSIE, CCU21
a constant (DC), which is the same as a sinusoid with zero frequency.
�
� The aliases
� Principal alias frequency
Folding Due to Under-Sampling� fs=125 samples/sec
DSP, CSIE, CCU22
� The one at is an alias of . This is an example of folding.
Folding Due to Under-Sampling� An additional fact about folding is that the sign of the
phase of the signal will be changed.
� If the original 100-Hz sinusoid had a phase of , then the phase of the component at would be and it follows that the phase of the aliased component at would also be .
DSP, CSIE, CCU23
aliased component at would also be .
Folding Due to Under-Sampling� After reconstruction, the
phase of y(t) would be
� When we sample a 100 Hz sinusoid at a sampling rate of 125 samples/sec, we get the same samples that we
DSP, CSIE, CCU24
the same samples that we would have gotten by sampling a 25 Hz sinusoid, but with opposite phase.
Maximum Reconstructed Frequency� The output frequency is always less than
� For a sampled sinusoid, the ideal D-to-C converter picks the alias frequency closet to and maps it to the output analog frequency via .
� Since the principal alias is guaranteed to lie between and , the output frequency will always lie
DSP, CSIE, CCU25
and , the output frequency will always lie between and
Maximum Reconstructed Frequency� Using a linear FM chirp signal as the input, and then
listening to the reconstructed output signal.
� Suppose the instantaneous frequency of the input chirp increases according to Hz; i.e.
� After sampling, we have
DSP, CSIE, CCU26
� After sampling, we have
� Once y(t) is reconstructed from x[n], what would you hear?
Maximum Reconstructed Frequency� The output cannot have a frequency higher than ,
even though the input frequency is continually increasing.
� (1) When the input frequency goes from 0 to , will increase from 0 to and the aliases will not need to be considered.
DSP, CSIE, CCU27
to be considered.
(1)
Hz
Maximum Reconstructed Frequency� (2) When the input frequency increasing from
to , the corresponding frequency for x[n] increases from to , and its negative frequency companion goes from to . The principal alias of the negative frequency component goes from to . The reconstructed output
DSP, CSIE, CCU28
goes from to . The reconstructed output signal will have a frequency going from to
(2)
Maximum Reconstructed Frequency� The terminology folded frequency comes from the fact
that the input and output frequencies are mirror images with respect to , and would lie on top of one another if the graph were folded about the line.
DSP, CSIE, CCU29
fs = 2000 Hz