Digital Signal Processing
Lecture-03
Arnisha Akhter
Lecturer, Dept. of CSE
Jagannath University
Aliasing
• When the minimum sampling rate is not respected, distortion
called aliasing occurs.
• Aliasing causes high frequency signals to appear as lower
frequency signals.
• To be sure aliasing will not occur, sampling is always preceded
by low pass filtering.
• The low pass filter, called the anti-aliasing filter, removes all
frequencies above half the selected sampling rate.
2
Aliasing
• Figure illustrates sampling a 40 Hz sinusoid
• The sampling interval between sample points is T = 0.01 second,
and the sampling rate is thus fs = 100 Hz.
• The sampling theorem condition is satisfied
3
Aliasing
• Figure illustrates sampling a 90 Hz sinusoid
• The sampling interval between sample points is T = 0.01 second,
and the sampling rate is thus fs = 100 Hz.
• The sampling theorem condition is not satisfied
4
Aliasing
5
Sampling Effect in Time Domain
Example of Aliasing in the time domain
of various sinusoidal signals ranging
from 10 kHz to 80 kHz with a sampling
frequency Fs = 40 kHz.
6
Time & Frequency Domains
• There are two complementary signal descriptions.
• Signals seen as projected onto time or frequency domains.
7
Signal & Spectrum
8
Frequency Range of Analog & Digital Signals
• For analog signals, the frequency range is from -∞ Hz to ∞ Hz
• For digital signals, the frequency range is from 0 Hz to Fs/2 Hz
9
Anti Aliasing Filter
• A signal with no frequency component above a certain
maximum frequency is known as a band-limited signal.
• In our case we want to have a signal band-limited to ½ Fs.
• Some times higher frequency components (both harmonics
and noise) are added to the analog signal (practical signals are
not band-limited).
• In order to keep analog signal band-limited, we need a filter,
usually a low pass that stops all frequencies above ½ Fs.
• This is called an “Anti-Aliasing” filter.
10
Anti Aliasing Filter
• Anti-aliasing filters are analog filters.
• They process the signal before it is sampled.
• In most cases, they are also low-pass filters unless band-pass
sampling techniques are used.
11
Under Sampling
• If the sampling rate is lower than the required Nyquist rate, that
is fS < 2W, it is called under sampling.
• In under sampling images of high frequency signals erroneously
appear in the baseband (or Nyquist range) due to aliasing.
12
Sampling of Band Limited Signals
Signals whose frequencies are restricted to a narrow band of
high frequencies can be sampled at a rate similar to twice the
Bandwidth (BW) instead of twice the maximum frequency.
Fs ≥ BW
13
Sampling of Band Limited Signals
• While this under-sampling is normally avoided, it can be
exploited.
• For example, in the case of band limited signals all of the
important signal characteristics can be deduced from the copy
of the spectrum that appears in the baseband through
sampling.
• Depending on the relationship between the signal frequencies
and the sampling rate, spectral inversion may cause the shape
of the spectrum in the baseband to be inverted from the true
spectrum of the signal.
14
Sampling of Band Limited Signals
Figure: Signal recovered
From Nyquist range are
Base band versions of the
Original signal. Sampling rate is
Important to make sure no aliasing
and spectral inversion occurs.
(a) Fs = 80 kHz, signal spectrum
is Inverted in the baseband.
(b) Fs = 100 kHz, the lowest
Frequencies In the signal alias
to the highest frequencies.
(c) Fs = 120 kHz, No spectral
15
Inversion occurs.
Over Sampling
• Oversampling is defined as sampling above the minimum
Nyquist rate, that is, fS > 2fmax.
• Oversampling is useful because it creates space in the
spectrum that can reduce the demands on the analog anti-
aliasing filter.
16
Over Sampling
• In the example below, 2x oversampling means that a low order analog filter is
adequate to keep important signal information intact after sampling.
• After sampling, higher order digital filter can be used to extract the information.
17
Over Sampling
• The ideal filter has a flat pass-band and the cut-off is very sharp,
since the cut-off frequency of this filter is half of that of the
sampling frequency, the resulting replicated spectrum of the
sampled signal do not overlap each other. Thus no aliasing
occurs.
• Practical low-pass filters cannot achieve the ideal
characteristics.
• Firstly, this would mean that we have to sample the filtered
signals at a rate that is higher than the Nyquist rate to
compensate for the transition band of the filter
18
Sampling Low Pass Signals
19
Analog to Digital Conversion
Quantizer
• After the sampling, the discrete time continuous signal still
carry infinite information (can take any value) in terms of
amplitude.
• Quantization is the process to reduce infinite information of
the amplitude.
• Quantizer do the conversion of discrete time continuous
valued signal into a discrete-time discrete-value signal.
• The value of each signal sample is represented by a value
selected from a finite set of possible values.
20
Analog to Digital Conversion
Quantizer
• The A/D converter chooses a quantization level for each
analog sample.
• Number of levels of quantizer is equal to L = 2N
• An N-bit converter chooses among 2N possible quantization
levels.
• So 3 bit converter has 8 quantization levels, and 4 bit
converter has 8 quantization levels.
21
Analog to Digital Conversion
The quantization step size or resolution is calculated as:
Δ = Q = R/2N
where
R is the full scale range of the analog signal (i.e. Ymax - Ymin)
N is the number of bits used by the converter
• Resolution of a quantizer is the distance between two
successive quantization levels
• More quantization levels, a better resolution!
• What's the downside of more quantization levels?
The strength of the signal compared to that of the quantization
errors is measured by dynamic range and signal-to-noise ratio.
22
Analog to Digital Conversion
4-bit Quantizer
23
Analog to Digital Conversion
4-bit Quantizer
24
Quantization Error
• The error caused by representing a continuous-valued signal
(infinite set) by a finite set of discrete-valued levels.
• The larger the number of quantization levels, the smaller the
quantization errors.
• The quantization error is calculated as the difference between
the quantized level and the true sample level.
• Most quantization errors are limited in size to half a
quantization step Q or Δ .
25
Quantization Error
• Suppose a quantizer operation given by Q(.) is performed on
continuous-valued samples x[n] is given by Q(x[n]), then the
quantization error is given by
26
Analog to Digital Conversion
• Lets consider the signal which is to be quantized.
In the figure, we can see that there is a difference between the
original signal (Blue Line) and the quantized signal (Red Lines).
This is the error produced while quantization
27
Analog to Digital Conversion
Quantization error can be reduced, however, if the number of
quantization levels is increased as illustrated in the figure
28
Analog to Digital Conversion
Quantization of unipolar data (maximum error = full step)
29
Analog to Digital Conversion
Quantization of unipolar data (maximum error = half step)
30
Analog to Digital Conversion
Example: Analog pressures are recorded using a pressure transducer as
voltages between 0 and 3 V. The signal must be quantized using a 3-bit
digital code. Indicate how the analog voltages will be covered to digital
values.
The quantization step size is
Q = 3 V/23 = 0.375 V
The half of quantization step is
0.1875 V
31
Analog to Digital Conversion
Quantization of bipolar data (maximum error = half step)
32
Three-bit A/D Conversion
33
Dynamic Range
•
34
Signal-to-Quantization-Noise Ratio
• Provides the ratio of the signal power to the quantization
noise (or quantization error)
• Mathematically,
where
• Px= Power of the signal ‘x’ (before quantization)
• Pq= Power of the error signal ‘xq’
35
Analog to Digital Conversion
36
Digital-to-Analog (D/A) Conversion
Block Diagram of D/A Conversion
37
Digital-to-Analog (D/A) Conversion
• Once digital signal processing is complete, digital-to-analog
(D/A) conversion must occur.
• This process begins by converting each digital code into an
analog voltage that is proportional in size to the number
represented by the code.
• This voltage is held steady through zero order hold until the next
code is available, one sampling interval later.
• This creates a staircase-like signal that contains frequencies
above W Hz.
• These signals are removed with a smoothing analog low pass
filter, the last step in D/A conversion.
38
Digital-to-Analog (D/A) Conversion
• In the frequency domain, the high frequency elements
present in the zero order hold signal appear as images, copies
of the original signal spectrum situated around integer
multiples of the sampling frequency.
• The smoothing analog filter removes these images and so is
given the name of Anti-Imaging Filter.
• Only the frequencies in the baseband, between 0 and fS/2 Hz,
remain.
39
Digital-to-Analog (D/A) Conversion
Three bit D/A Conversion
40
Comparing Signals in the A/D & D/A Chain
41
Comparing Signals in the A/D & D/A Chain
42
Summary
43
Summary
44