Chapter 2: Sampling of Continuous-Time Signals
• Introduction
• Periodic Sampling of Analog Signals
• Aliasing
• The Sampling Theorem and Reconstruction
• Changing the Sampling-Rate Using Discrete-time Processing
• Quantization of Continuous-Amplitude Signals
• Coding of Quantized Samples
• Digital-to-Analog Converters
ASTU | ECEG 3205|A.Y 2022-2023
Introduction
• Most signals of practical interest, such as speech, biological signals, seismic
signals, communication signals such as audio and video signals are analog.
• To process analog signals by digital means, its first necessary to convert them into
digital form.
Sampling:
Conversion of continuous-time signal into a discrete-time signal by taking
“samples” of the continuous-time signal at discrete-time instants.
If (t) is the input to the sampler, the o/p is (nT) =x[n], where T is sampling
interval.
Quantization:
Conversion of a discrete-time continuous-valued signal into a discrete-time,
discrete-valued (digital) signal.
ASTU | ECEG 3205|A.Y 2022-2023
Introduction
The difference between the un quantized sample x[n] and the quantized o/p is
called quantization error.
Coding:
Each discrete valued is represented by a b-bit binary sequence.
Fig: on Basic parts of Analog-to-Digital Converter below
ADC
---------------------------------------------------
Sampler Quantizer Coder
--------------------------------------------------- Digital signal
Analog signal discrete-time signal quantized signal
ASTU | ECEG 3205|A.Y 2022-2023
Sampling of Analog Signals
Periodic or uniform sampling:
x[n] = , -∞ ∞
x[n] is a discrete-time signal obtained by “taking samples” of the
analog signal at every T seconds.
ASTU | ECEG 3205|A.Y 2022-2023
Sampling of Analog Signals
T is time interval between successive samples
Sampling period
= , sampling frequency
t = nT = time-variable of discrete-time
Time variable of continuous-time
• Continuous-time sinusoidal signal:
(t) = A, -∞ ∞
Is characterized by three parameters:
Amplitude (A), (frequency in ), and the phase ( in radians).
ASTU | ECEG 3205|A.Y 2022-2023
Sampling of Analog Signals
• Exponential signal:
(t) = A
=
(t) = A= +
A sinusoidal signal can be obtained by adding two equal –amplitude
complex-conjugate exponential signals.
ASTU | ECEG 3205|A.Y 2022-2023
Discrete-time sinusoidal signals
• , -∞ ∞:discrete-time sinusoidal signal
n: an integer variable (sample number)
frequency (ample)
• x[n] = , -∞ ∞
f: frequency (dimension: cycles per sample)
ASTU | ECEG 3205|A.Y 2022-2023
Discrete-time Sinusoidal Signals
• A discrete-time sinusoid is periodic only if its frequency f is a
rational number.
x[n +N] =x[n], for Ɐn (periodic with period N)
The small value of N is called the fundamental period.
• For a sinusoid with a frequency to be periodic
cos((N+n)+θ] = cos(+θ)
This is true if and only if there exists an integer k
Such that: N =
=
ASTU | ECEG 3205|A.Y 2022-2023
Discrete-time Sinusoidal Signals
i.e., a discrete-time sinusoid is periodic if its frequency can be expressed as the
ratio of two integers( i.e., is rational)
• Discrete-time sinusoids whose frequencies are separated by an integer multiple of
are identical.
-n
=
Consider analog sinusoidal signal
Sampled periodically at a rate =
ASTU | ECEG 3205|A.Y 2022-2023
Discrete-time Sinusoidal Signals
= x[n] = Acos(T+θ)
= Acos(+θ)
• Frequency of analog signal F(Ω) and frequency of discrete-time signal f(or ω) are
linearly related as:
f= or or equivalently ω = ΩT
ω = 2πf
• The range of the frequency variable F or Ω for continuous-time sinusoidal is:
-∞ ∞ (Ω = 2πf) :sampling frequency
-∞ ∞ F: frequency of analog signal
f:frequency of digital signal Ω:relative or normalized frequency
ASTU | ECEG 3205|A.Y 2022-2023
Discrete-time Sinusoidal Signals
• For discrete-time sinusoids:
Relations Among frequency variables
Continuous-time signals discrete-time signals
Ω = 2πF ω = 2πf
Hz
ω = Ω T; f =
-∞ ∞ Ω = ;F = f.
-∞ ∞
ASTU | ECEG 3205|A.Y 2022-2023
Discrete-time Sinusoidal Signals
• The fundamental difference between continuous-time and discrete-
time signals is in their range of values of the frequency variables F
and f, Ω and ω.
•Periodic sampling of a continuous-time signal implies a mapping of
the infinite frequency range for the variable F (or Ω) into a finite
frequency range for the variable f (or ω).
Since the highest frequency in a discrete-time signal is ω = π or f = ,
with a sampling range ,
==
=π=
Therefore, sampling introduces an ambiguity.
ASTU | ECEG 3205|A.Y 2022-2023
Discrete-time Sinusoidal Signals
Example: consider two analog sinusoidal signals
=(10)t
=(50)t which are sampled at = 40Hz
corresponding discrete-time sequence
=()n =
=()n =
= =
=
Thus, the sinusoidal signals are identical and consequently
indistinguishable.
ASTU | ECEG 3205|A.Y 2022-2023
Aliasing
• If we are given the sampled values generated by n, there is some ambiguity as
to whether these sampled values corresponds to (t) or (t) .
Aliasing:
An effect that causes different signals to become indistinguishable (or alias of
one another) when sampled.
For the previous example:
=(10)t
=(50)t
Since yields exactly the same value as when the two sampled at =40 samples
per second we say that the frequency = 50Hz is an alias of the frequency =
10Hz at sampling rate of 40 samples per second.
ASTU | ECEG 3205|A.Y 2022-2023
Aliasing …
is not the only alias of ,at the sampling rate of 40 samples per second.
The frequency = 90Hz, is also an alias of ,as is the frequency =130Hz
and so on.
All of the sinusoids ( +40k)t, k = 1, 2, 3, 4, . . . Sampled at 40 samples per
second yield identical values.
• In general, the sampling of a continuous-time sinusoidal signal:
=
With a sampling rate of = results in a discrete-time signal:
= where = ,is the relate frequency of the sinusoid.
ASTU | ECEG 3205|A.Y 2022-2023
Aliasing …
If we assume that , the frequency of x[n] is in the range , which is the
frequency range of the discrete-time signals.
If the sinusoids = where = + k, k =are
sampled at a rate of the , its clear that the frequency is outside the fundamental
frequency range
The sampled signal: x[n] = =
=
=
The frequencies = + k, -∞ ∞ (k is an integer) are indistinguishable from the
frequency after sampling and hence they are alias of .
ASTU | ECEG 3205|A.Y 2022-2023
Aliasing …
Fig: Illustration of aliasing
ASTU | ECEG 3205|A.Y 2022-2023
The sampling theorem and Reconstruction
• If
the highest frequency contained in an analog signal (t) is =B and the signal
is sampled at a rate ≥2 =2B, then (t) can be exactly recovered from its sample
values by interpolation function.
g(t) =
Thus
(t) = )g(t-)
Where = (nT) = x[n] are the samples of (t).
When the sampling (t) is performed at the minimum sampling rate = 2B, the
reconstruction formula becomes:
(t) = )
ASTU | ECEG 3205|A.Y 2022-2023
The Sampling Theorem and Reconstruction
• The sampling rate =2B = 2 is called the Nyquist rate.
Examples 1: consider the analog signal given as
(t) =3 + 10- what is the Nyquist rate for this signal?
Solution: The frequencies present in the signal above are: =25Hz, =150Hz, =50Hz
thus, =150Hz and =300Hz
The Nyquist rate is =300Hz = 2
Note: It should be observed that the signal component 10 sampled at the Nyquist
rate = 300Hz, results in the samples 10 which are identical to zero.
We are sampling the analog signal at its zero-crossing points and hence we miss
the signal component completely.
ASTU | ECEG 3205|A.Y 2022-2023
The Sampling Theorem and Reconstruction
• Thissituation would not occur if the sinusoid is offset in phase by some
amount θ.
10+ θ) sampled at the Nyquist rate =300 samples per second yields:
10+ θ)
= 10(+ θ)
=10
=10
Thus, if ,or π, the samples of the sinusoids taken at the Nyquist rate
are not all zero.
ASTU | ECEG 3205|A.Y 2022-2023
The Sampling Theorem and Reconstruction
Example 2: consider the analog signal given by:
(t)=32000t +56000 t + 101200t
a). What is the Nyquist rate for this signal
b). Assume now that we sample this signal using a sampling rate =5000. What is the
discrete-time signal obtained after sampling?
c). What is the analog signal (t) we can reconstruct from the samples if we use ideal
interpolation?
Solution:
a). The frequencies existing in the analog signals are: =1kHz, =3kHz, =6kHz thus,
=6kHz and 2 = 12kHz.
the Nyquist rate is: =12kHz
ASTU | ECEG 3205|A.Y 2022-2023
The Sampling Theorem and Reconstruction
b). Since we have chosen =5kHz, the folding frequency is =2.5kHz and this is the
max frequency that can be represented uniquely by the sampled signal.
X[n] = (nT) = ()
= 310
= 310
= 310
Note:= –
= +
Finally, we obtain: x[n] = 13
ASTU | ECEG 3205|A.Y 2022-2023
The Sampling Theorem and Reconstruction
On the other hand since =5kHz, the folding frequency is = 2.5kHz. The
frequency is less than and thus its not affected by aliasing. However, the
other two frequencies are above the folding frequency and they will be
changed by the aliasing effect
= -= -2kHz
= -=1kHz
= , =- and =
c). Since only the frequency components at 1kHz and 2kHz are present in the
sampled signal (b) the analog signal we can recover is:
(t)=132000t -5000 t which is obviously different from the original (t). This is
caused by the aliasing effect due to the low sampling rate.
ASTU | ECEG 3205|A.Y 2022-2023
Changing the Sampling Rate using Discrete-time
processing
• We have seen that a continuous-time signal can be represented by a discrete-
time signal consisting of sequence of samples,
x[n] =
• Alternatively, even if x[n] was not obtained originally by sampling, we can
always use the band limited interpolation formula to find a continuous-time
band limited signal whose samples are x[n] =
• Its often necessary to change the sampling rate of a discrete-time signal.
I. Sampling rate reduction by an integer factor
= x[nM] =
M
Sampling
period T Sampling period
ASTU | ECEG 3205|A.Y 2022-2023 T’ = MT
Changing the Sampling Rate using Discrete-Time Processing
is identical to the sequence that would be obtained from by sampling with
period =MT
• The sampling rate can be reduced by a factor of M without aliasing if the original
sampling rate was at least M times the Nyquist rate or if the bandwidth of the
sequence is first reduced by a factor of M by discrete-time filtering.
• Down sampling also known as decimation removes samples from a signal.
= D so that where D: is an integer
: is the old sampling rate (number : is the new sampling rate)
• Increasing the sampling rate involves operation analogous to D/C conversion.
Consider x[n] is a signal whose sampling rate we wish to increase by a factor of
L.
ASTU | ECEG 3205|A.Y 2022-2023
Changing the Sampling Rate Using Discrete-Time Processing
=
Where: the underlying continuous-time signal
=
X[n] =T)
=x= , n =
LPF
L Gain = L
Cutoff =
Sampling sampling sampling
period T
ASTU | ECEG 3205|A.Y 2022-2023
period = period =
Changing the Sampling Rate Using Discrete-Time Processing
•The system on the left on the above block diagram is called sampling rate
expander. Its output is
= x[], n =
0, otherwise
• The new sampling frequency is greater than the old sampling frequency:
Where is the old sampling frequency and is the new sampling frequency.
Also, the new sampling frequency has to be an integer multiple of the original
sampling frequency:
=D 1 where D is an integer.
ASTU | ECEG 3205|A.Y 2022-2023
Continued ….
ASTU | ECEG 3205|A.Y 2022-2023
Quantization of Continuous-Amplitude Signals
• A digital signal is a sequence of numbers (samples) in which each number
represented by a finite number of digits (finite precision).
Quantization:
• The process of converting a discrete-time continuous-amplitude signal into a
digital signal by expressing each sample value as a finite number of digits.
The error introduced in represented the continuous-valued signal by a finite set of
discrete value levels is called quantization error.
= Q[x[n]]
Where: :the sequence of quantized samples at the output of the quantizer
Q[x[n]]: the quantizer operation
x[n]: the sampled sequence
ASTU | ECEG 3205|A.Y 2022-2023
Continued …
ASTU | ECEG 3205|A.Y 2022-2023
Continued …
= –x[n]
=the quantization error
• Let us consider the discrete-time signal.
x[n]= ,n
0
• x[n] is obtained by sampling the analog exponential signal = t
With the sampling frequency =1Hz.
Rounding:
Assigns each sample of x[n] to the to the nearest quantization level
ASTU | ECEG 3205|A.Y 2022-2023
Continued …
Truncation:
• Assigns each sample of x[n] to the quantization level below it.
• The quantization error in rounding is limited to the range of to , i.e.,
• Quantization step size or reduction.
=
Where represents the max and min value of quantization levels.
ASTU | ECEG 3205|A.Y 2022-2023
Continued …
• Dynamic range:
If the dynamic range is fixed, increasing the quantization levels results
in decrease of the quantization step size which decreases the
quantization error and increases the quantization accuracy.
• Quantization of analog signals always results in a loss of information
and hence its irreversible.
ASTU | ECEG 3205|A.Y 2022-2023
Coding of Quantized Samples
• The coding process in an ADC assigns a unique binary number to each
quantization level.
• If we have L levels, we need at least L different binary numbers.
With a word length of b digits (bits) we can create different binary
numbers.
or b
Thus, the number of bits required in the coder is the smallest integer
greater than or equal to .
• In general, the higher the sampling speed and the finer the quantization,
the more expensive the device becomes commercially.
ASTU | ECEG 3205|A.Y 2022-2023
Digital-to-Analog Conversion (DAC)
• Used to convert a digital values into an analog voltage
• Performs inverse operation of ADC
• Vout α Digital Value
•DAC task is to interpolate between samples.
ASTU | ECEG 3205|A.Y 2022-2023
DAC : Performance Specifications
• Resolution
• Reference Voltages
• Settling Time
• Linearity
• Speed
• Error
ASTU | ECEG 3205|A.Y 2022-2023
Thank You!
ASTU | ECEG 3205|A.Y 2022-2023