Sie sind auf Seite 1von 132

1

Sampling: an introduction
Filters for sampling
Representation of a CT Signal by Its Samples: Sampling
Converting to a sequence
The Effect of Under-sampling: Aliasing
Reconstruction of a Signal from Its Samples: Interpolation
Examples
Discrete-Time Processing of Continuous-Time Signals
Sampling with Zero-Order Hold
Sampling of Discrete-Time Signals (not in the exam)
Summary
ELEC364: Signals And Systems
Sampling and reconstruction
Dr. Aishy Amer
Concordia University
Electrical and Computer Engineering
Figures, examples and some text in these course slides are taken from the following sources:
A. Oppenheim, A.S. Willsky and S.H. Nawab, Signals and Systems, 2nd Edition, Prentice-Hall, 1997
Signals and Systems: Analysis Using Transform Methods and MATLAB, M. J. Roberts, McGraw Hill, 2004
Yao Wang, EE3414 --- Multimedia Communication Systems I, http://eeweb.poly.edu/~yao/EE3414/
Slides by Robert Akl, http://www.cse.unt.edu/~rakl/
2
A continuous-time signal:
music, speech, image, video,
the fluctuation of air pressure at the entrance of the
ear canal
Sampling is
An operation that transforms a CT signal into a DT
signal (a sequence of numbers)
The DT signal gives the values of the CT signal
read at intervals of T seconds
The reciprocal of the sampling interval is called
sampling rate fs
Sampling: introduction
3
Sampling: introduction
Sampling
A crucial step in converting CT signals x(t), to DT
signals x[n]
With x[n] we can take advantage of the
advanced discrete time systems technologies to
process them
How do we perform sampling?
Taking snap shots of x(t) every T second
T: Sampling period
x(nT), n=,-1,0,1,Samples
4
Sampling: introduction
Key Question for Sampling:
How do we determine T?
The frequency range of the signal.
Can we reconstruct the original CT
signal x(t) from its samples, under
certain conditions?
Nyquist sampling theorem
5
Sampling: introduction
6
Outline
Introduction to sampling
Filters for sampling
Representation of a CT Signal by Its Samples: Sampling
Converting to a sequence
The Effect of Under-sampling: Aliasing
o Reconstruction of a Signal from Its Samples: Interpolation
o Discrete-Time Processing of Continuous-Time Signals
o Sampling with Zero-Order Hold
o Sampling of Discrete-Time Signals
o Summary
7
Frequency content in signals
Importance of sinusoidal signals:
An arbitrary signal can be expressed as a sum of many sinusoidal signals
with different frequencies, amplitudes and phases
Phase: how much the max. of the sinusoidal signal is shifted away from t=0
Phase is translation in time

2
) (
2
1
] [ d e e X n x
n j j
8
Frequency content in signals
Music notes are essentially sinusoids at different frequencies
9
Frequency content in signals
Sinusoidal signals have a distinct (unique) frequency
An arbitrary signal x(t) does not have a unique frequency
x(t) can be decomposed into many sinusoidal signals with different
frequencies, each with different magnitude and phase
Fourier transform: given a value of , the FT gives back a complex
number
It is magnitude and phase (translation in time) of the sinusoidal component at
that frequency
Fourier analysis:
find frequency spectrum for signals

2
) (
2
1
] [ d e e X n x
n j j

=
n
n j j
e n x e X

] [ ) (
) (
j
e X
10
Frequency content in signals

=
+
=
+

2
2
2
) (
2
1
] [
DT P CT : Transform Fourier DT Inverse
] [ ) (
P CT DT : Transform Fourier DT
d e e X n x
e n x e X
n j j
n
n j j
Note: the function e^j is periodic with N=2
11
Frequency content in signals
12
Frequency content in signals

=
j
e z
Continuous-time
analog signal
x(t)
Continuous-time
analog signal
x(t)
Discrete-time
analog sequence
x [n]
Discrete-time
analog sequence
x [n]
Sample in time
Sampling period = T
s
=2f
= T
s
,
scale
amplitude
by 1/T
s
Sample in
frequency,
= 2n/N,
N = Length
of sequence
Continuous
Fourier Transform
X(f)
Continuous
Fourier Transform
X(f)


f -
dt e x(t)
ft 2 j -
Discrete
Fourier Transform
X(k)
Discrete
Fourier Transform
X(k)
1 0
e [n] x
1
0 = n
N
nk 2
j -

N k
N

Discrete-Time
Fourier Transform
X()
Discrete-Time
Fourier Transform
X()
2 0
e [n] x
- = n
j -

n
Laplace
Transform
X(s)
s = +j
Laplace
Transform
X(s)
s = +j

s -
dt e x(t)
st
z-Transform
X(z)
z-Transform
X(z)


z
= n
n -
z [n] x
s = j
=2f
C
C
C
C
C D
D

=
j
e z
13
Frequency content in signals
14
Frequency content in signals
A constant signal:
only zero frequency component (DC component)
A sinusoid signal:
contain only a single frequency component
Periodic signals :
contain the fundamental frequency and harmonics : Line spectrum
Slowly varying signal: contain low frequency only
Fast varying signal: contain very high frequency
Sharp transition signal: contain from low to high frequency
Real signals such as music, speech,
contain both slowly varying and fast varying components, wide
bandwidth
15
Why frequency representation?
Clearly shows the frequency composition a signal
Can change the magnitude of any frequency
component arbitrarily by a filtering operation
A filter blocks some frequency content from a signal
Can shift the central frequency by modulation
A core technique for communication, which uses
modulation to multiplex many signals into a single
composite signal, to be carried over the same physical
medium
Processing of signals (e.g. speech and music) speech and music)
16
Filtering
Filters separate what is desired from what is not
desired
A filter blocks some frequency content from a signal
It may change the shape of the signal
Lowpass -> smoothing, noise removal
Highpass -> edge/transition detection
High emphasis -> edge enhancement
A filter can be seen as a transfer function H(f)
Y(f) = H(f)X(f) or y[n]=h[n]*x[n]
17
Filtering
An ideal filter passes all signal power in its
passband without distortion and completely
blocks signal power outside its passband
Distortion means that the signal shape is
changed after the filtering
A distortion-less filter has an impulse response
of the form h[n]= A (n-m) H( f ) = Ae(-j2fm)
This is because a filter can multiply by a constant
or shift in time without distortion
18
Ideal Filters
Lowpass -> smoothing, noise removal
Highpass -> edge/transition detection
Bandpass -> Retain only a certain frequency range
Bandstop -> most frequencies unaltered,
attenuates those in a specific range
to very low levels
19
Typical Filters
sinc functions
20
Filtering
All the impulse responses of ideal
filters are sinc functions, or related
functions, which are infinite in extent
Two-sided impulse responses, i.e.,
all ideal filter impulse responses begin
before time, t = 0
This makes ideal filters non-causal
Ideal filters cannot be physically
realized, but closely approximated
21
Low Pass Filtering
(Remove high freq, make signal
smoother)
22
High Pass Filtering
(remove low freq, detect edges)
23
Filtering in Temporal Domain
(Convolution)
24
Real filters
25
Noise filter
Noise is present in most signals
Noise is high frequency content
If the noise band is much wider than the signal band a large
improvement in signal fidelity is possible
26
Outline
Introduction
Filters for sampling
Representation of a CT Signal by Its Samples: Sampling
Converting to a sequence
The Effect of Under-sampling: Aliasing
o Reconstruction of a Signal from Its Samples: Interpolation
o Examples
o Discrete-Time Processing of Continuous-Time Signals
o Sampling with Zero-Order Hold
o Sampling of Discrete-Time Signals
o Summary
27
Observation: x
1
(t), x
2
(t), x
3
(t) have the same samples
By doing sampling, we lose a lot of information (the
values of x(t) between the sampling points)
Fig. 7.1
Representation of a CT Signal
by Its Samples: Sampling
28
Sampling methods
Impulse train
Zero-order hold
29
Impulse-Train Sampling
o Use a periodic impulse train multiplied
by the continuous-time signal x(t)
) ( ) ( ) ( t p t x t x
p
=

+
=
=
n
nT t t p ) ( ) (
sampling period
sampling function
(7.1)
(7.2)
T
s
/ 2 =
sampling frequency
30
x(t)
p(t)
xp(t)
t 0
x(t)
L
L
0
t
) (t p
1
T
t 0
xp(t)
T x(0)
x(T)

+
=
=
n
p
nT t nT x t x ) ( ] [ ) (
Fig. 7.2
Impulse-Train Sampling
(7.3)
31

) ( T x
0
) (t x
t
0
) (t x
p
) (t x
) (t p
T
T 2 T 3 T 3 T 2
t
1
) (t p
T


0
) (t x
p
t
) 0 ( x
32
Analysis of Sampling
The Fourier Transform X() of a DT signal
x[n] is a function of the continuous variable
, and it is periodic with period 2
Given a value of , the Fourier transform
gives back a complex number that can be
interpreted as magnitude and phase
(translation in time) of the sinusoidal
component at that frequency
Sampling the CT signal x(t) with interval T,
we get the DT signal x[n]=x[nT] which is a
function of the discrete variable n
33

d j P j X j X
p
)) ( ( ) (
2
1
) ( =

+

T
s
/ 2 =
sampling frequency
(7.4)

+
=
=
k
s
k
T
j P ) (
2
) (

(7.5)
Multiplication Property
Analysis of Sampling

+
=
=
k
s p
k j X
T
j X )) ( (
1
) (
(7.6)

+
=
=
n
p
nT t nT x t x ) ( ] [ ) (
34
Analysis of Sampling
2 , no overlap between shifted replicas of ( )
s M
x j >
35

x(t) H(j)
) (t x
r
) (t x
p
) ( j X
p

+
=
=
n
nT t t p ) ( ) (
Reconstruction of x(t) from
sampled signals
Fig 7.4 (a)
Exact Recovery by an Ideal Lowpass Filter (LPF):
36
) ( j X
0 M

M

1
) ( j X
p
0 M

M

s

s

T
1
M s
2 >
) ( j X
r
0 M

M

1
) ( j H
0 c

c

T
) (
M s c M
< <
Fig 7.4 (b-e)
Reconstruction of x(t)
from sampled signals
If there is no overlap between shifted spectra, a LPF can recover x(t)
from x
p
(t).
37
Let x(t) be a band-limited signal with
X(j)=0 for
Then x(t) is uniquely determined by its
samples x(nT), n=0,1, 2, , if
The Sampling Theorem
M
> | |
M s
2 >
T
s

2
=
38
Given the samples x(nT), we can reconstruct x(t)
by generating a periodic impulse train in which
successive impulses have amplitudes that are
successive sample values
This impulse train is then processed through an
ideal lowpass filter with gain T and cutoff
frequency greater than and less than
The resulting output signal x(t) will exactly equal
x(t)
The Sampling Theorem
M s

M

Nyquist rate = 2
Nyquist frequency = Nyquist rate / 2=
M
M

t 0
xp(t)
T x(0)
x(T)
39
The Sampling Theorem
A continuous-time signal x(t), whose spectral
content is limited to frequencies smaller
than wm (i.e., it is band-limited to )
can be perfectly recovered from its sampled
version x[n], if the sampling rate is larger
than twice the bandwidth (i.e., if )
Physical interpretation: must get at least
two samples within each cycle
M
> | |
M s
2 >
40
Sampling: Applications
Audio sampling:
Human hearing: 2020,000 Hz range
Sampling rate is at
44.1 kHz (CD), 48 kHz (professional audio), or 96kHz
The sampling rate is a consequence of the Nyquist theorem
Speech sampling:
The energy of human speech: 5Hz - 4 kHz range
Sampling rate: 8 kHz
(Used by nearly all telephony systems)
Video sampling:
Standard-definition television (SDTV): 720x480 pixels (US) or 704x576 pixels
(UE)
High-definition television (HDTV): 1440x1080
Sampling-rate conversion: Given a digital signal, change its sampling rate
Necessary for image display when original image size differs from the display size
Necessary for converting speech/audio/image/video from one format to another
Sometimes we reduce sample rate to reduce the data rate
Down-sampling: reduce the sampling rate
Up-Sampling: increase the sampling rate
41
Outline
Introduction
Filters for sampling
Representation of a CT Signal by Its Samples: Sampling
Converting to a sequence
The Effect of Under-sampling: Aliasing
o Reconstruction of a Signal from Its Samples: Interpolation
o Examples
o Discrete-Time Processing of Continuous-Time Signals
o Sampling with Zero-Order Hold
o Sampling of Discrete-Time Signals
o Summary
42
Estimate sampling frequency
from x(t)
Find the shortest ripple in x(t)
In the shortest ripple, there should be
at least two samples
The inverse of its length (Tmin) is
approximately the maximum
frequency (fmax) of the signal
Need at least two samples in this
interval (ripple), in order not to miss
the rise and fall pattern
43
Converting to a sequence
(C/D Conversion)
Fig. 7.21
44
Converting to a sequence
(C/D Conversion)
Illustration of C/D Conversion in the Frequency-Domain
Fig. 7.22
45
CT
(7.18)
Converting to a sequence
(C/D Conversion)
46
Converting to a sequence
(C/D Conversion)
DT
(7.19, 7.20)
(7.21)
47
Outline
Introduction
Filters for sampling
Representation of a CT Signal by Its Samples: Sampling
Converting to a sequence
The Effect of Under-sampling: Aliasing
o Reconstruction of a Signal from Its Samples: Interpolation
o Examples
o Discrete-Time Processing of Continuous-Time Signals
o Sampling with Zero-Order Hold
o Sampling of Discrete-Time Signals
o Summary
48
When undersampling
2
s M

The Effect of Undersampling: Aliasing
Fig. 7.3
(a, b, d)
49
o Aliasing: overlapping in frequency domain
The Effect of Undersampling: Aliasing
( ) ( )
r
X j X j
50
The Effect of Undersampling: Aliasing
) ( j X

0
0

0

) ( j X
p

0
0

) (
0

s
s

2
s

t t x
0
cos ) ( =
) ( cos ) (
0
t x t t x
r
= =
6
0
s

=
An example:
Fig. 7.15
51
) ( j X
p

0
0

) (
0

s
s

2
s

Aliasing
6
4
0
s

=
) ( ) cos( ) (
0
t x t t x
s r
=
The Effect of Undersampling: Aliasing
52
The Effect of Undersampling: Aliasing
Fig. 7.16
0
6
s

=
0
2
6
s

=
53
0
4
6
s

=
The Effect of Undersampling: Aliasing
0
5
6
s

=
Fig. 7.16
54
The Effect of Undersampling:
Aliasing
Aliasing is the presence of unwanted components in the reconstructed
signal
These components were not present when the original signal was
sampled
In addition, some of the frequencies in the original signal may be lost in
the reconstructed signal
Aliasing occurs because signal frequencies can overlap if the sampling
frequency is too low
Frequencies "fold" around half the sampling frequency - which is why
this frequency is often referred to as the folding frequency
Sometimes the highest frequency components of a signal are simply
noise, or do not contain useful information
To prevent aliasing of these frequencies, we can filter out these
components before sampling the signal using ANTI-Aliasing filter (a low-
pass filter that filters out high frequency components and lets lower
frequency components through)
55
Demo: Aliasing
The Effect of Under-sampling: Aliasing
Run applet under
http://www2.egr.uh.edu/~glover/applets/S
ampling/Sampling.html
56
Outline
Introduction
Filters for sampling
Representation of a CT Signal by Its Samples: Sampling
The Effect of Under-sampling: Aliasing
o Reconstruction of a Signal from Its Samples: Interpolation
o Examples
o Discrete-Time Processing of Continuous-Time Signals
o Sampling with Zero-Order Hold
o Sampling of Discrete-Time Signals
o Summary
57
Reconstruction of a Signal from Its
Samples: Interpolation Methods
Interpolation: connecting samples using interpolation
kernels
Band-limited (ideal) Interpolation:
Time-domain Interpretation of Reconstruction of
Sampled Signals
Zero-Order Hold:
e.g. scanned images
First-Order Hold:
Linear interpolation: commonly used in plotting
Common practical pre-filter: averaging within one
sampling interval
58
Band-limited Interpolation

+
=
= =
n
p r
nT t h nT x t h t x t x ) ( ) ( ) ( ) ( ) (
t
t T
t h
c
c c

) sin(
) ( =
(7.9)
(7.10)
sinc function
59
Band-limited Interpolation
) (
)) ( sin(
) ( ) (
nT t
nT t T
nT x t x
c
c
n
c
r

=

+
=

(7.11)
C.T. FT
60
) (t x
t
) (t x
p
t
) (t x
r
t
Fig. 7.10
Band-limited Interpolation
Graphic Illustration of Time-domain Interpolation
Band limited signal x(t)
Impulse Train of Samples of x(t)
Ideal band-limited interpolation in
which the impulse train is replaced
by the superposition of sinc
functions [(7.11)]
61
Zero-Order Hold Interpolation
Zero-order hold filter converts a DT signal to a CT signal
by holding each sample value for one sample interval
62
Ideal interpolating
filter
| ) ( | j H
r
T
s

2
s

2
s
0
Zero-order
hold
Fig 7.11
Zero-Order Hold Interpolation
Transfer functions of the zero-order hold and of the ideal interpolating filter
63
First-Order Hold: Linear
interpolation
Fig. 7.9
Fig. 7.13
Impulse-train sampling followed by convolution with a triangular impulse response
64
First-order versus zero-order
hold filters
First-order hold filter: the signal is
reconstructed as a piecewise linear
approximation to the original signal
that was sampled
Zero-order hold filter converts a
discrete-time signal to a continuous-
time signal by holding each sample
value for one sample interval
65
Reconstruction of a sampled signal
with a zero-order hold
66
Comparison of frequency responses of ideal lowpass
and zero-order hold reconstruction filters
67
Reconstruction of a sampled signal with a first-order hold
68
Comparison of frequency responses of ideal lowpass, zero-
order hold, and first-order hold reconstruction filters
69
Reconstruction of a sampled signal with ideal lowpass filter
70
Sampling and Interpolation of Images
Fig. 7.12
71
Sampling and Interpolation of Images
Fig. 7.12 & Fig 7.14
72
Outline
Introduction
Filters for sampling
Representation of a CT Signal by Its Samples: Sampling
The Effect of Under-sampling: Aliasing
o Reconstruction of a Signal from Its Samples: Interpolation
o Examples
o Discrete-Time Processing of Continuous-Time Signals
o Sampling with Zero-Order Hold
o Sampling of Discrete-Time Signals
o Summary
73
Example 1
For the following system
find the FT of the output signal if
Suppose
) (t x
c

n
nT t ) (
) (t x
p
Conversion to
a sequence
) ( ] [ nT x n x
c
=

>
< <
< < +
=
M
M
M
M
M
c
j X

, 0
0 , 1
0 , 1
) (
M s
2 >
74
Example 1
Solution: according to the diagram given:
T
n j X
T
j X
n
s s c p


2
)), ( (
1
) ( = =

= =
n
c p
j
T
n
j X
T T
j
X e X ))
2
( (
1
) ( ) (

75
Example 1
The Fourier transform of x[n] is
1/T
-2pi-wmT -2pi -2pi+wmT
0 -wmT wmT 2pi-wmT 2pi 2pi+wmT
76
Problem 7.39
A signal ( ) is obtained through impulse train
sampling of a sinusoidal signal ( ) whose frequence
is equal to half the sampling frequence .
s
s
( ) = cos( ) and ( ) ( ) ( ),
2
x t
p
x t
x t t x t x nT t nT
p

+ =
2
where
n
T
s

=
=
Example 2
77
s
(a) Find ( ) such that ( ) =cos( )cos( )+ ( )
2
Using Trigonometric identities,
s s s
cos( )=cos( )cos( ) - sin( )sin( )
2 2 2
s
( ) -sin( )sin( ) (1)
2
g t x t t g t
t t t
g t t

+
=
Example 2
78
(b) Show that ( ) = 0, for n=0, 1, 2,...
2
By replacing with , and by in the equation (1), we get
s
2
( ) = -sin( )sin( )=-sin( )sin( ), the right hand side of the
2
equation is equal to
g nT
t nT
T
g nT nT n
T



zero for n=0, 1, 2,...
Example 2
79
(c) Using the results of the previous two parts, show
that if ( ) is applied as the input to an ideal lowpass
s
filter with cutoff frequence , the resulting output is
2
s
y( ) =cos( )cos( ).
2
x t
p
t t

Example 2
80
F r o m p a r t s ( a ) a n d ( b ) , w e g e t
( ) ( ) ( )
s
( ) c o s ( ) c o s ( ) + ( )
2
s
( )c o s ( ) c o s ( ) .
2
W h e n t h e s y s t e m i s p a s s e d t h r o u g h a l o w p a s s f i l t e r ,
w e a r e p e r f o r m i n g
x t x n T t n T
p
n
t n T n T g N T
n
t n T n T
n


+
=

=
+

=

`
=
)
+
=

=
a b a n d - l i m i t e d i n t e r p o l a t i o n , t h e
s
r e s u l t i s t h e s i g n a l ( ) = c o s ( ) c o s ( ) .
2
y t t

Example 2
81
Example 7.1
Consider Sinusoidal signal
s
( ) = cos( )
2
x t t

+
Suppose that this signal is sampled, using impulse sampling, at
exactly twice the frequency of the sinusoid, i.e., at sampling
frequency
S
As shown in Problem 7.39, if this impulse-sampled signal is applied
as the input to an ideal lowpass filter with cut frequency
S
/2., the
resulting output is:
s
( )=cos( )cos( )
2
r
x t t

Example 3
82
As a consequence, we see that perfect reconstruction of
x(t) occurs only in the case in which the phase is zero
(or an integer multiple of 2. Otherwise, the signal x
r
(t)
does not equal x(t).
As an extreme example, consider the case in which
= - /2, so that
s
( )=sin( )
2
x t t

Example 3
83
The values of the signal at integer multiples of the sampling
period 2 /
S
are zero.
Consequently. sampling at this rate produces a signal that
is identically zero, and when this zero input is applied to the
ideal lowpass filter, the resulting output x
r
(t) is also
identically zero.
Fig. 7.17
Example 3
84
Example 4
A system uses the sampling frequency fs=20 kHz to
process audio signal that is frequency limited at 10 kHz, but
the lowpass filter still allows frequencies up to 30 khz pass
through even at small amplitudes. What signal will we get
back from the samples?
Solution:
for sampling rate fs=20 kHz, the Nyquist interval is [-10kHz,
10kHz]
the audio frequency 0 10 kHz will be recovered as is
The audio frequency from 10 20 kHz will be aliased into
the frequency range 10 0 kHz, and the audio frequency
from 20 30 kHz will be aliased into the frequency range 0
10 kHz
The resulting audio will be distorted due to the
superposition of the 3 frequency bands
85
It is important to note that the sampling theorem explicitly
requires that the sampling frequency be greater than twice
the highest frequency in the signal, rather than greater than
or equal to twice the highest frequency
The next example illustrates that sampling a sinusoidal
signal at exactly twice its frequency (i.e., exactly two
samples per cycle) is not sufficient
Example 5: Strobe Effect
86
Example 5: Strobe Effect
Fig. 7.18
Stroboscopic effect: higher frequencies
are reflected into lower frequencies
A disc rotating at a constant rate with a
single radial line marked on the disc
The flashing strobe illuminates the disc for
extremely brief time intervals at a periodic
rate
The flashing strobe acts as a sampling
system
87
When the strobe frequency is much higher than the
rotational speed of the disc, the speed of rotation of
the disc is perceived correctly
When the strobe frequency becomes less than twice
the rotational frequency, the rotation appears to be at
a lower frequency than is actually the case
If we track the position of a fixed line on the disc at
successive samples, then when
0
<
s
<2
0
,
samples of the disc will show the fixed line in
positions that are successively displaced in a
counterclockwise direction, opposite to the
clockwise rotation of the disc itself
Example 5: Strobe Effect
88
At one flash per revolution, corresponding to
s
=
0
, the
radial line appears stationary (i.e., the rotational frequency
of the disc and its harmonies have been aliased to zero
frequency)
Similar effect observed in western movies
The wheels of a stagecoach appear to be rotating more slowly
sometimes in the wrong direction. In this case, the sampling
process corresponds to fact that moving pictures are a
sequence of individual frames with a rate (usually between 18
and 24 frames per second) corresponding to the sampling
frequency
Example 5: Strobe Effect
89
Example 5: Strobe Effect
Practical Application of Aliasing : Sampling Oscilloscope
Displaying on an oscilloscope screen waveforms having very short
time structures, e.g. thousandths of nanoseconds. The idea is to
sample the fast waveform x(t) once each period, at successively later
points in successive periods
Fig. P7.38(a)
90
The increment should be an appropriately chosen sampling
interval in relation to the bandwidth of x(t)
If the resulting impulse train is then passed through an
appropriate interpolating lowpass filter, the output y(t) will be
proportional to the original fast waveform slowed down or
stretched out in time [i.e., y(t) is proportional to x(at), where a < 1 ]
Fig. P7.38(b)
Example 5: Strobe Effect
91
Example 6
Consider the following sinusoidal signal with the
fundamental frequency f = 4kHz:
g(t) = 5cos(2ft) = 5cos(8000t).
The sinusoidal signal is sampled at a sampling rate
fs = 6000 samples/second and reconstructed withan
ideas low-pass filter (LPF) with the following transfer
function:
H1(jw) = 1/6000 : |w| <= 6000
0 : otherwise
a) Determine the reconstructed signal y(t). Give details of
derivations of Gs(jw).
b) Is the reconstruction perfect? If yes, justify and if no,
suggest how can it be achieved. Give details.
92
Examples
93
94
95
Outline
Introduction
Filters for sampling
Representation of a CT Signal by Its Samples: Sampling
The Effect of Under-sampling: Aliasing
o Reconstruction of a Signal from Its Samples: Interpolation
o Examples
o Discrete-Time Processing of Continuous-Time Signals
o Sampling with Zero-Order Hold
o Sampling of Discrete-Time Signals
o Summary
96
DT LTI systems
The impulse response h[n] completely characterizes
an LTI system
n Convolutio ] [ ] [ ] [ ] [ ] [ ] [ n h n x n y k n h k x n y
k
= =

DT LTI systems are described mathematically by


difference equations ] [ ] 2 [ ] 1 [ 2 ] [ 3 n x n y n y n y = + +
97
DT Processing of CT signals
using a DT system
Fig. 7.24
98
DT Processing of CT
Signals
DT-S ) (t y
c
) (t x
c
C/D
Conversion
D/C
Conversion
) ( ] [ nT x n x
c d
= ) ( ] [ nT y n y
c d
=
T T
) ( ] [ nT x n x
c d
=
) ( ] [ nT y n y
c d
=
Fig. 7.20
Reason for this: We can take advantage of the vast variety of
general- or special-purpose discrete time signal processing devices
99
C/D Conversion
Two steps: sampling in time and
quantization the amplitude
Sampling x[n] = x(nT)
Quantization: map amplitude values
into a set of discrete values +-pQ
(with an quantization interval)
x[n] = Q(x[n])
100
C/D Conversion
Fig. 7.21
101
C/D Conversion
Illustration of C/D Conversion in the Frequency-Domain
Fig. 7.22
102
CT
(7.18)
C/D Conversion
103
C/D Conversion
DT
(7.19, 7.20)
(7.21)
104
D/C Conversion
y
d
[n] y
c
(t)
Reverse of the process of C/D conversion
Fig. 7.23
105
DT Processing of CT Signals:
Frequency-domain Illustration
Fig. 7.25
106
DT Processing of CT Signals
Assuming No Aliasing
(7.24)
(7.25)
107
DT Processing of CT Signals
( )
2
( )
0
2
j T
s
d
C
s
H e
H j

<

>

( ) ( ) ( )
C C C
Y j X j H j =
Fig. 7.26 ( 7.25)
108
Example: Problem 7.29
Solution on page 15-16 in elec364/assign/Solution/SolutionELEC364Chap7.pdf
109
Example: Digital Differentiator
Construction of Band-limited Digital Differentiator
Desired:
(7.27)
(7.28)
110
Example: Digital Differentiator
( ) ( ),
j
d
H e j
T


= <
Fig. 7.27 Fig. 7.28

( )
0
c
C
c
j
H j


<

=

>

, 2
s c
T = =
(7.27)
(7.28)
111
Example: Half-sample delay

( )
0
j
c
C
c
e
H j

<

>

- /
( ) ,
j T
j
d
H e e

= <
Fig. 7.29
, 2
s c
T = =
(7.34)
( 7.35)
112
Outline
Introduction
Filters for sampling
Representation of a CT Signal by Its Samples: Sampling
Converting to a sequence x[n]
The Effect of Under-sampling: Aliasing
o Reconstruction of a Signal from Its Samples: Interpolation
o Examples
o Discrete-Time Processing of Continuous-Time Signals
o Sampling with Zero-Order Hold
o Sampling of Discrete-Time Signals
o Summary
113
Sampling with Zero-Order Hold
Fig. 7.5
Zero-order
hold
) (
0
t x
) (t x
o So far: Sampling using impulse train & reconstruction using ideal filter
o In practice, ideal impulses and ideal low-pass filters are not
implementable
oThey are replaced by non-ideal filters
A non-ideal system samples x(t) at a given instant and holds that value
until the next instant, at which a sample should be taken
114
o Zero-order hold: impulse-train sampling followed
by an LTI system with a rectangular impulse
response
Sampling with Zero-Order Hold
Fig. 7.6
115
(


) 2 / sin( 2
) (
2 /
0
T
e j H
T j
x(t)
) (t r
) (t x
p
) ( j H
) (t p
t
0 T
1
) (
0
t h
) (
0
t x
) (t h
r
) ( j H
r

) 2 / sin( 2
) (
) (
2 /
T
j H e
j H
T j
r
=
(7.7)
(7.8)
Fig. 7.7
Sampling with Zero-Order Hold
o Cascade of a zero-order hold system
with a reconstruction filter
o Reconstruction
116
Fig. 7.8
Magnitude and phase for the reconstruction filter for a zero-order hold.
Sampling with Zero-Order Hold
Reconstruction filter
( )
r
H j
( )
r
H j
117
Example: Problem 7.24
Sampling with a square signal
118
Outline
Introduction
Filters for sampling
Representation of a CT Signal by Its Samples: Sampling
The Effect of Under-sampling: Aliasing
o Sampling with Zero-Order Hold
o Reconstruction of a Signal from Its Samples: Interpolation
o Examples
o Discrete-Time Processing of Continuous-Time Signals
o Sampling of Discrete-Time Signals (not in exam)
o Summary
119
Sampling of Discrete-Time
Signals
Impulse-Train Sampling
x[n] xp[n]
] [ ] [

+
=
=
k
kN n n p

=
, 0
], [
] [
n x
n x
p
if n=an integer multiple of N
otherwise
(7.38)
(7.39)
[ ] [ ] [ ]
[ ] [ ]
p
k
x n x n p n
x k N n k N
+
=
=
=

120
Sampling of Discrete-Time Signals
n
x[n]
n
p[n]
n
xp[n]
Fig. 7.31
Time domain illustration
121

+
=
=
k
s
j
k
N
e P ) (
2
) (

=
1
0
) (
) (
1
) (
N
k
k j j
p
s
e X
N
e X

Sampling of Discrete-Time Signals
Frequency domain analysis
Fig. 7.32
(7.40)
(7.41)
(7.42)


d e X e P e X
j j j
p
) ( ) (
2
1
) (
) (
2

=
) (
j
e X
0
M

M

2 2
1
) (
j
e P

2
s

N
2
) (
M s

M s
2 >
) (
j
p
e X
0
M

M

2 2
N
1
s

122
M s
2 <

0
2
N
1
s

Aliasing
Sampling of Discrete-Time
Signals
Frequency domain analysis
123
Sampling of Discrete-Time
Signals
Exact Recovery Using Ideal Lowpass Filter:
Fig 7.33
124
Sampling of Discrete-Time
Signals
DT Decimation & Interpolation: Down-sampling
Decimation
DT Sampling
Fig. 7.34
125
Sampling of Discrete-Time
Signals
/
( ) ( )
j j N
b p
X e X e

=
( )
j
X e

Frequency domain illustration of the relationship between DT
Sampling and decimation
Fig. 7.35
(7.54)
( )
j
b
X e

( )
j
P
X e

126
Sampling of Discrete-Time
Signals
Higher Equivalent Sampling Rate: Up-sampling
Fig. 7.37
127
Sampling of Discrete-Time
Signals
Spectra for upsampling by a factor of 2
Fig. 7.37
128
Sampling of Discrete-Time
Signals
2 9
9 2

=
Example 7.5. Down-sampling + up-sampling
2
4
9

<
129
Sampling of Discrete-Time
Signals
2 1
9 2 9

=
2 1
9 2 9

=
Example 7.5. Down-sampling + up-sampling
Fig. 7.38
9
9

=
130
Outline
Introduction
Filters for sampling
Representation of a CT Signal by Its Samples: Sampling
The Effect of Under-sampling: Aliasing
o Sampling with Zero-Order Hold
o Reconstruction of a Signal from Its Samples: Interpolation
o Examples
o Discrete-Time Processing of Continuous-Time Signals
o Sampling of Discrete-Time Signals
o Summary
131
Summary
The Fourier Transform of a DT signal is a function of the continuous variable , and it is
periodic with period 2
Given a value of , the Fourier transform gives back a complex number that can be
interpreted as magnitude and phase (translation in time) of the sinusoidal component at that
frequency
Sampling is a multiplication with a periodic impulse train
FT of sampled signal: original FT + shifted versions at multiples of ws
Sampling the CT signal x(t) with interval T, we get the DT signal x[n]=x[nT] which is a
function of the discrete variable n
Sampling a CT signal with sampling rate fs produces a DTsignal whose FT (or frequency
spectrum) is the periodic replication of the original signal, and the replication period is fs
The Fourier variable for functions of discrete variable is converted into the frequency
variable f (in Hertz) by means of f=/(2T)
The information carried by a signal can be defined either in terms of its Time Domain pattern
or its Frequency Domain spectrum
The amount of information in a continuous analog signal can be specified by a finite number
of values: samples
The Sampling Theorem states that we can collect all the information in a signal by sampling
at a rate 2w_m, where w_m is the signal bandwidth
We can, therefore, reconstruct the actual shape of the original continuous signal at any instant
in between the sampled instants
This reconstruction is not a guess but a true reconstruction
132
Summary
How the sampling is derived using the FT ..
Lowpass filters for reconstruction ..
The sampled signal spectrum contains the original
spectrum and its replicas (aliases) at kws, k=+/- 1,2,.
We need a prefilter when sampling a signal
To avoid alising
The filter should be a lowpass filter with cutoff
frequency at fs /2
Sample-and-hold and linear interpolation
Why the ideal interpolation filter is a lowpass filter with
cutoff frequency at fs/2
The ideal interpolation kernel is the sinc function.
Why to apply a pre-filter before smapling

Das könnte Ihnen auch gefallen