Week 3 Chapter 2
Week 3 Chapter 2
• For functions that vary with time, let s(t) be a continuous function (or
"signal") to be sampled, and let sampling be performed by measuring the
value of the continuous function every T seconds, which is called the
sampling interval or the sampling period. Then the sampled function is
given by the sequence:
x(t) Acos(o t )
• However, digital computers and computer programs can not
process analog signals.
• Instead they store discrete-time versions of analog signals
x[n] x(nTs )
• This is because digital computers can only store discrete
numbers.
– There are computers called analog computers which do process
continuous-time signals
• Since the computer only stores numbers, how does one know
what continuous-time signal it represents?
Sampling
• We can obtain a discrete-time signal by sampling a
continuous-time signal at equally spaced time
instants, tn = nTs
x[n] = x(nTs) -∞ < n < ∞
• The individual values x[n] are called the samples of
the continuous time signal, x(t).
• The fixed time interval between samples, Ts, is also
expressed in terms of a sampling rate fs (in samples
per second) such that:
fs = 1/ Ts samples/sec.
Continuous-to-Discrete Conversion
• By using a Continuous-to-Discrete (C-to-D)
converter, we can take continuous-time signals and
form a discrete-time signal.
• There are devices called Analog-to-Digital converters
(A-to-D)
• The books chooses to distinguish an C-to-D converter
from an A-to-D converter by defining a C-to-D as an
ideal device while A-to-D converters are practical
devices where real world problems are evident.
– Problems in sampling the amplitudes accurately
– Problems in sampling at the proper times
Discrete-Time Signals
• A discrete-time signal is
a sequence of numbers
and carry no 1
time-sequence. 0.2
0
-0.2 00 2 4 6 8 10
following diagram, -1
ˆ Ts
fs
̂ is the normalized or discrete-time frequency
Since we can have different signals with the same ̂, then
there can be an infinite number of continuous-time signal
which yield the same discrete-time sinusoid!
Two Problems with Sampling
• Problem 1: How many samples are enough to
have to represent a continuous time signal?
1
0
0 2 4 6 8 10
-1
Hz, we have:
̂ 2 (0.2)(1) .4
Discrete-Time Sinusoidal Signals
x[n] Acos(̂n )
̂ 2 (1.2)(1) 2.4 2.4 2 .4
x[n] Acos(2.4 n ) Acos(2 n 0.4 n ) Acos(0.4 n )
Aliasing
• This example
1
illustrates that two
sampled sinusoids can
produce the same 0
0 2 4 6 8 10
discrete-time signal.
-1
1. cos [2π(0.2) t]
2. cos [2π(1.2) t]
• When this occurs we say that that these signals
are aliases of each other.
Aliasing
• There are more alias signals for this example:
• 1. x(t) = cos (2π(0.2) t) => x[n] = cos (2π(0.2) 1n) = cos (0.4π n)
• 2. x(t) = cos (2π(1.2) t) => x[n] = cos (2π(1.2) 1n) = cos (2.4π n) = cos (0.4 π
n + 2 π n) = cos (0.4π n)
ˆl 0.4 2l for l 0,1,2,3,…
Since cos(2 - ) cos( ), ̂l 0.4 2l for l 0,1,2,3,…
3. x(t) = cos (2π(.8) t) => x[n] = cos (2π(.8) 1n) = cos (1.6π n) =
cos (2 π n - 0.4 π n) = cos (0.4π n)
• In summary, (for l = positive 1
or negative integer):
0
ˆ l
where l ˆl f s and ˆl ˆo 2l, ˆo is the principal alias, and l is an integer.
Ts
(ˆ o 2l) f s
Therefore, l ̂l f s (̂o 2l) f s and f l
2
(2l ˆ o ) f s
since cos( ) cos( ) cos(2 ), then we can have ̂ l 2l ̂o and f l
2
(2l ˆ o ) f s
or l 2l ̂o and f l
2
ˆ T
s
f s
• So we can use this equation to determine the frequency of the
continuous-time signal from the principal alias:
ˆfs
ˆ
Ts
• Note that the normalized frequency must be less than if the Nyquist
rate is used
2f MAX 2f MAX
̂ MAX Ts 2f MAX Ts
fs f s ( 2 f MAX )
• And the reconstructed continuous-time frequency must be
̂ f s f s f s
2 f ˆ f s f f max
2 2 2
Oversampling
• When we sample at a rate which is greater than the Nyquist
rate, we say we are oversampling.
• If we are sampling a 100 Hz signal, the Nyquist rate is 200
samples/second => x(t)=cos(2π(100)t+π/3)
• If we sample at 2.5 times the Nyquist rate, then fs = 500
samples/sec
• This will yield a normalized frequency at 2π(100/500) = 0.4π
1
0
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08
-1
Oversamplin
•
g
Since we are greater than the Nyquist rate, the normalized
frequency will be < π which means it is the principal alias.
• And we get back the original continuous frequency when we
do the reconstruction
• f = 0.4πfs / 2π = 0.4π500 / 2π = 0.2 (500) = 100 Hz
0.5
0
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08
-1
Undersamplin
•
g
Since it is > π, 2.5π is NOT the principal alias
• The principle alias is 2.5π - 2π = 0.5π
0.5
0
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08
-1
Aliasing and Folding
• Your book treats undersampling in terms of
aliasing and folding
• During reconstruction, both of these
phenomenon will produce erroneous results.
• The difference between aliasing and folding
has to do with which part of the spectrum
created the alias.
Discrete-to-Continuous Conversion
0 0
0 2 4 6 8 10 0 2 4 6 8 10
-1 -1