discrete -time signals and systems sampling –ii sampling ...sampling at diffe--rent rates from...
TRANSCRIPT
Yogananda Isukapalli
Discrete - Time Signals and Systems
Sampling – IISampling theorem & Reconstruction
2
Sampling at diffe--rent ratesFrom these figures,it can be concludedthat it is very important to sample the signaladequately to avoidproblems in reconstruction, which leads us toShannon’s samplingtheorem
Fig:7.1
Claude Shannon: The man who started the digital revolution
1916-2001
Shannon arrived at the revolutionaryidea of digital representation by sampling the information source at an appropriate rate, and converting the samples to a bit stream
Before Shannon, it was commonly believed that the only way of achievingarbitrarily small probability of errorin a communication channel was to reduce the transmission rate to zero.
All this changed in 1948 with the publication of “A Mathematical Theory of Communication”—Shannon’s landmark work
Shannon’s Sampling theorem
max
max
A continuous signal ( ) with frequencies no higher than can be reconstructed exactly from its samples [ ] [ ], if the samples are taken at a ra 2 ,te where 1 s
s
s s
x t
x n x nf
f fT
f T³=
=
This simple theorem is one of the theoretical Pillars of digital communications, control and signal processing
Shannon’s Sampling theorem,• States that reconstruction from the samples is possible, but it doesn’t specify any algorithm for reconstruction• It gives a minimum sampling rate that is dependent only on the frequency content ofthe continuous signal x(t)• The minimum sampling rate of 2fmax is called
the “Nyquist rate”
Example1: Sampling theorem-Nyquist rate( ) 2cos(20 ), ?x t t find the Nyquist frequencyp=
max
max
( ) 2cos(2 (10) )
10 10
, 2 20snyq
x t tThe only frequency in the continuous timesignal is Hzf Hz
Nyquist sampling rate Sampling ratef f Hz
p=-
\ =
= =
Continuous-time sinusoid of frequency 10Hz
Sampled at Nyquist rate, so, the theorem states that 2 samples are enough per period. Intuitivelyit doesn’t seem to be enough, there must be a sophisticated algorithm for reconstruction
Fig:7.2
max
max
( ) cos(10 ) sin(22 ) cos(2 (5) ) sin(2 (11) )
5 11,11 2 22
x t t tt t
The frequencies in the signal are andf Hz
Nyquist frequency f Hz
p pp p
= += +
\ =
= =
Example2: Nyquist rate
Fig:7.3
Example3: Nyquist rateThe positive side of the spectrum is shown below,find the ‘Nyquist rate’ of sampling for this signal?
0 21 48 f Hz
The range of the spectrum is from 21 to 48fmax=48HzNyquist sampling rate, fs=2 fmax=96Hz
Fig:7.4
Frequency mapping
0ˆ 2 sf Tw p=
ˆ discrete time frequencyw -
02 f continuous time frequencyw p= -
0
0
0
( ) cos(2 ), [ ] cos(2 )
s
s
Continuous signal with frequency fx t A f t sampled at a rate fx n A f n f
pp
==
ˆˆ ˆ
s
s
s
TT f
w ww w w\ =
= =
Thus there is a corresponding continuous-timefrequency for every discrete-time frequency
However, the converse is not true, due to aliasingand folding. Principal aliases are the generallyaccepted basis for obtaining a continuous-timefrequency from a discrete-time one
Frequency mapping contd….
With the “Nyquist sampling rate”:
max
max max
ˆ
' ' ,
2ˆ , 1, 2,3....
2 , 2ˆ2
s s
ii i s
s
s
i ii i s
T fLet there be i frequencies in the continuoustime signal mapping them into discrete timefrequencies
ff i
ff f Nyquist rate
f ff
f f
w w w
pw w
p pw w
= =-
-
= = =
=
= = =
!
maxmax
max
min
ˆ
ˆ
ˆ
ff
correspondingly for negative frequencies
Thus the discrete - time frequencies are guaranteedto be in the range - <
pw p
w p
p w p
= =
= -
£The above result is the combined effect of Applying‘Nyquist rate’ to the principal alias domain
max max
ˆ
1 1 - -
2 2s i s i
- < also implies that the continuous frequencyobtained from a discrete one is guaranteed to be in the
range of f f f or f f f
p w p£
< £ < £
Spectrum view of frequency mappingConsider a continuous-time sinusoid x(t) withfrequency f0
0 0( ) cos( ) cos(2 )x t A t A f tw f p f= + = +
12
jAe f
Fig. 7.5
w
12
jAe f-
0w0w-
Notice that the spectrum is plotted against w0
0
0
0
[ ] ( ) cos(( ) )This discrete-time spectrum has, ˆ 2 , 0, 1, 2,...ˆ 2 , 0, 1, 2,...
s s
s
s
x n x n f A f n
f l l =f l l =
w f
w w pw w p
= = +
= + ± ±
= - + ± ±
The continuous-time signal sampled at a rate fs
Fig. 7.6
*12
jAe f
w
*
0 sfw0 sfw- pp-0 2sfw p- +0
0 2sfw p+0 2sfw p-0 2sfw p- -
*
Mag
nitu
de
fundamental domain obtained with Nyquist rate
Principal aliases
Frequenciesassociated withprincipal +ve frequency, 0 sfw
Frequenciesassociated withprincipal –ve frequency,notice conjugatefor magnitude.folded aliases arealso associated with –ve frequencies
0 sfw-
Example1: Over Sampling• In most applications sampling rate is chosen to be higher than Nyquist rate to avoid problems in reconstruction
• The sampling rate in CD’s is 44.1kHz. The highest frequency we can hear is 20kHz, so sampling rate is slightly higher than 40kHz
• Consider sampling a 100Hz sinusoid at 500samples/sec
Fig:7.7
Fig:7.8
2 100ˆ 0.4500
2(100) 200 , 500
s s
s
s
T f
Nyquist rate Hz but f Hzf Nyquist rate
pw w w p= = = =
= = =
>>
Notice that both principal aliases are well with in the limit of . In the reconstruction only frequencies in this range are used to get continuous frequencies
ˆ- <p w p£
Fig:7.9
Example2: Under Sampling, aliasing
2(100) 200 , 125
s
s
Nyquist rate Hz but f Hzf Nyquist rate
= = =<<
The effect of under sampling can be seen in the time-domain plot itself Fig:7.10
Fig:7.11
2 100ˆ 1.6125s sT f pw w w p= = = =
( , ]ˆ
0.4 in 25
Notice that prinipal aliases are beyond the rangeAnd their aliases are in the primary rangeMapping results an analog frequency of Hz
p pp w p
p
-- < £
Fig:7.12
Example3: Sampling at the rate of signal frequency
Analog spectrum,notice that the signal and the sampling frequencies are same, 100Hz 2(100) 200 , 100
s
s
Nyquist rate Hz but f Hzf Nyquist rate
= = =
<<<
sampling at the signal frequency means picking up the same value from each cycle
Fig:7.13
Fig:7.14
2 100ˆ 2100s sT f pw w w p= = = =
2 , 2ˆ '0 ' -
Notice that prinipal aliases are at andAnd is their common alias, which is in the range
p pp w p
-< £
The result is obvious as we have the same value for each sample
Fig:7.15
This movie illustrates the phenomenon of aliasing. A 600 Hz sinusoid is sampled at 500 samples per second.
This movie illustrates the phenomenon of folding. A 600 Hz sinusoid is sampled at 750 samples per second.
A 600 Hz sinusoid is sampled at 2000 samples per second. Since the samples are taken at more than two times the frequency of the cosine wave, there is no aliasing.
Apparent frequencyIf the Nyquist rate is not followed, the apparentfrequency will not be the actual frequency
max
max
2 ,
0 2 , 2s apparant actual
s s
f f f f
f f folding occurs at f
³ =
£ <
If the sampling rate is not enough, the chirpsignal could sound likethis , remember howan actual chirp is supposed to sound
Fig:7.16
A Mechanical viewpoint of samplingIn this movie the video camera is sampling at a fixed rate of 30 frames/second. Observe how the rotating phasor aliases to different speeds as it spins faster.
In this movie the video camera is sampling at afixed rate of 30 frames/second. Observe how the rotating phasors alias to a different speed as the disk spins faster. The fact that the four phasors are identical further contributes to the aliasing effect.
A/DConverter
C/DConverter
A/DConverter
D/CConverter
Signal Sensors
Processing Actuators
Fig:7.17, General System
Samples of continuous time signal are processed as required in this stage, output is also discrete samples
Fig:7.18
Reconstruction
Ideal Reconstruction
Ideal C-D converter was defined as:( ) [ ] [ ]s sx t x nT x n f= =
Ideal D-C converter is governed by an inverse relation to that of C-D converter
( ) [ ] -
sn f ty t y n n
== ¥ < < ¥
Fig:7.19
Ideal Reconstruction contd….
The simple substitution of ‘n=fst’, is only valid if the signal consists of one or more sinusoids or if the signal can be expressed as a mathematicalformula
0
0
[ ] cos(2 )( ) cos(2 )
sy A fy An nt tf
Tp fp f
= += +
Most of the real world signals can’t be reducedinto a simple mathematical equation from the discrete samples
•D-C conversion involves filling in the signal values between sampling instances tn=nTs
•“Interpolation” can be used to approximate the behavior of ideal D-C converter
( ) [ ] ( )sn
y t y n p t nT¥
=-¥
= -å
The above equation describes a broad class of D-C converters. Where p(t) is the characteristicPulse shape of the converter
Mathematical proof of the sampling theorem gives the ideal pulse shape, which is a sinc function
Fig:7.20
sin( )( )( )
s
s
t Tp tt Tp
p=
Square PulseThe simplest of all is the ‘square pulse’ defined as,
1 11 ( ) 2 2
0
s sT t Tp t
otherwise
ì - < £ï= íïî
Each term will create flat region of Amplitude y[n] centered at
[ ] ( )sy n p t nT-st nT=
Since the effect of the flat pulse is to hold or replicate each sample for seconds, it is alsoknown as ‘zero-order hold reconstruction’
sT
Movie Illustrates a similar process
In all the examples sampling rate is greater than Nyquist rate
Fig:7.21
Obviously the more no. of samples we have the betterwe should be able to reconstruct the signal
Notice that the sampling is much higher than previous case
Movie Illustrates a similar process
Fig:7.22
Triangular Pulse
1 ( )
0 s s st T T t T
p totherwise
ì - - < £= íî
It is a pulse of 1st order polynomial, defined as,
In this case the output y(t) of the D-C converterat any time ‘t’ is the sum of the scaled pulsesthat overlap at that time instant. The performanceis better than a square pulse
Movie Movie
More than Nyquist 4 times Nyquist
Fig:7.23 Fig:7.24
Cubic spline interpolation: A third order polynomialwith exactly a similar process as a triangular pulseMore than Nyquist 4 times Nyquist
Movie MovieThe results with this pulse are extremely close to original !!
Fig:7.25 Fig:7.26
1.James H. McClellan, Ronald W. Schafer and Mark A. Yoder, “Signal Processing First”, Prentice Hall, 20032. http://www.research.att.com/~njas/doc/ces5.html,
Shannon’s Biography
Reference