BDSP Lecture 2
BDSP Lecture 2
Processing BDSP-513
Lecture 2
1
Overview
› Digital Signal Processing System
› Aliasing
› Over-sampling
3
Sampling of continuous signal
› An analog (continuous-time) signal defined at every point over the time
axis and amplitude axis.
› Sampling can solve such a problem by taking samples at the fixed time
interval T (represents the sampling interval or sampling period in
4
Sampling of continuous signal: Sample & hold
› Each sample maintains its voltage level during the sampling interval 𝑻 to
give the ADC enough time to convert it.
› This process is called sample and hold.
5
Nyquist–Shannon Sampling Theorem
› If an analog signal is not appropriately sampled, aliasing will occur, which
causes unwanted signals in the desired frequency band.
7
Nyquist–Shannon Sampling Theorem
› Examples:
8
Nyquist–Shannon Sampling Theorem
› Example: For the following analog signal, find the Nyquist sampling rate,
also determine the digital signal frequency and the digital signal.
Analog signal
9
Nyquist–Shannon Sampling Theorem
Example: Find the sampling frequency of the following signal.
› The low pass filter, called the anti-aliasing filter, removes all frequencies
above half the selected sampling rate.
11
Aliasing
› Figure illustrates sampling a 40 Hz sinusoid
› The sampling interval between sample points is T = 0.01s
and the sampling rate is thus fs = 100 Hz.
› The sampling theorem condition is satisfied
12
Aliasing
› Figure illustrates sampling a 90 Hz sinusoid
13
Sampling Low Pass Signals
14
Example 1
15
Solution 1
16
Solution 1
17
Example 2
18
Solution 2
19
Solution 2
20
Anti-aliasing Filtering
noise.
to limit the input analog signal, so that all the frequency components are
21
Anti-Aliasing Filtering
Due to nonzero attenuation of the magnitude frequency response of the anti- aliasing lowpass filter, the
aliasing noise from the adjacent replica still appears in the baseband.
We can also control the aliasing noise level by either using a higher-order lowpass filter or
increasing the sampling rate.
22
Aliasing noise level %
› According to Figure in Slide 22, we can derive the percentage of the
aliasing noise level using the symmetry of the Butterworth magnitude
function (which will be discussed in Chapter 8) and its first replica. It
follows that
Butterworth magnitude function
Using the above equation, we can estimate the aliasing noise level, or
choose a higher-order anti-aliasing filter to satisfy the requirement for the
percentage of aliasing noise level. 23
Example 1
Given the DSP system shown in Figures 2.16 to 2.18, where a sampling rate
of 8,000 Hz is used and the anti-aliasing filter is a second-order
Butterworth lowpass filter with a cutoff frequency of 3.4 kHz,
a. Determine the percentage of aliasing level at the cutoff frequency.
b. Determine the percentage of aliasing level at the frequency of 1,000 Hz.
24
Solution 1
25
Example 2
› Given the DSP system, where a sampling rate of 16,000 Hz is used and
the anti-aliasing filter is a second-order Butterworth lowpass filter with a
cutoff frequency of 3.4 kHz, determine the percentage of aliasing level at
the cutoff frequency.
26
Solution 2
27
Example 3
› Given the DSP system shown in Figure 2.16, where a sampling rate of
40,000 Hz is used, the anti-aliasing filter is a Butterworth lowpass filter
with a cutoff frequency of 8 kHz, and the percentage of aliasing level at
the cutoff frequency is required to be less than 1%, determine the order
of the anti-aliasing lowpass filter.
28
Solution 3
29
Anti-Image Filter
The DAC unit converts the processed digital signal y(n) to a sampled signal y s(t), and then the hold
circuit produces the sample-and-hold voltage yH (t). The transfer function of the hold circuit can be
derived to be:
30
Distortion %
› The magnitude and phase responses are given by:
› The magnitude frequency response acts like lowpass filtering and shapes the sampled signal
spectrum of Ys( f ). This shaping effect distorts the sampled signal spectrum Ys( f ) in the desired
frequency band, as illustrated in Figure 2.21. On the other hand, the spectral images are
attenuated due to the lowpass effect of sin(x)/x. This sample-and-hold effect can help us design
the anti-image filter.
31
A/D, D/A conversion and quantization
32
Quantization
› After the sampling, the discrete time continuous signal still carry infinite
information (can take any value) in terms of amplitude.
› The A/D converter chooses a quantization level for each analog sample.
› Example: If the DP has only a 3-bit word, the amplitude can be converted
35
Quantization
The quantization step size or resolution is calculated as:
Δ= Where,
R is the full scale range of the analog signal (i.e. Xmax - Xmin)
The strength of the signal compared to that of the quantization errors is measured by
36
dynamic range and signal-to-noise ratio.
Quantization: Example
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.
37
Quantization: example
38
Solution
39
Quantization error
› The error caused by representing a continuous-valued signal (infinite set)
by a finite set of discrete-valued levels.
The quantization errors is bounded by half of the step size that is:
41
Quantization Error
42
Three-bit A/D Conversion
43
Quantization Error
Quantization error can be reduced, however, if the number of quantization
levels is increased as illustrated in the figure
44
Quantization error: example
› Using the previous Example, determine the quantization error when the
analog input is 3.2 volts.
› Solution:
45
Quantization error: example
Solution
2A/2m
46
Quantization error: example
Solution
47
Digital-to-Analog (D/A) Conversion
Block Diagram of D/A Conversion
› This process begins by converting each digital code into an analog voltage that is
proportional in size to the number represented by the code.
48
Digital-to-Analog (D/A) Conversion
› This voltage is held steady through zero order hold until the next code is
available, one sampling interval later.
› These signals are removed with a smoothing analog low pass filter, the
last step in D/A conversion. 49
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.
50
Summary
› Discrete (digital) signal: signal that is discrete in time and can assume
51
Summary
52
Summary
53