DSP Chapter One
DSP Chapter One
DSP Chapter One
Chapter-1
2
Introduction to digital signal
processing
3
Analog vs. Digital Signal Processing
It consists of
• an analog filter called (anti-imaging) filter,
• an analog-to-digital conversion (ADC) unit,
• a digital signal (DS) processor,
• a digital-to-analog conversion (DAC) unit,
• and an analog filter called reconstruction (anti-image) filter.
5
Typical Digital Signal Processing System
6
Digital vs analog processing Digital
7
DSP…
8
Applications
9
Time domain Sampling
10
A/D & D/A Conversion
11
Analog to Digital (A/D) Conversion
12
Analog to Digital Conversion
A/D conversion can be viewed as a three step process
13
Analog to Digital Conversion
A/D conversion can be viewed as a three step process
14
Analog to Digital Conversion
Sample & Hold (Sampler)
15
Analog to Digital Conversion
Sample & Hold (Sampler)
16
Analog to Digital Conversion
Sample & Hold (Sampler)
19
Analog to Digital Conversion
Sample & Hold (Sampler)
• 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.
20
Nyquist–Shannon Sampling Theorem
21
Nyquist–Shannon Sampling Theorem
22
Nyquist–Shannon Sampling Theorem
Examples
23
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
24
Nyquist–Shannon Sampling Theorem
25
Nyquist–Shannon Sampling Theorem
Exercise
26
Aliasing
• When the minimum sampling rate is not respected, distortion
called aliasing occurs.
• The low pass filter, called the anti-aliasing filter, removes all
frequencies above half the selected sampling rate.
27
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
28
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
29
Aliasing
30
Anti Aliasing Filter
• A signal with no frequency component above a certain
maximum frequency is known as a band-limited signal.
32
Under Sampling
• If the sampling rate is lower than the required Nyquist rate, that
is fS < 2W, it is called under sampling.
33
Sampling of Band Limited Signals
Fs ≥ 2BW
34
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.
35
Sampling of Band Limited Signals
37
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.
38
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
39
Spectra of Sampled signals
40
Sampling Low Pass Signals
41
Exercise
Exercise-1: If the 20 kHz signal is under-sampled at 30 kHz, find the aliased
frequency of the signal.
42
Exercise
Exercise-4: Humans can hear sounds at frequencies between 0 and 20 kHz.
What minimum sampling rate should be chosen to permit perfect recovery
from samples?
43
Analog to Digital Conversion
Quantizer
47
Analog to Digital Conversion
4-bit Quantizer
48
Quantization Error
• The error caused by representing a continuous-valued signal
(infinite set) by a finite set of discrete-valued levels.
50
Analog to Digital Conversion
• Lets consider the signal which is to be quantized.
52
Analog to Digital Conversion
Quantization of unipolar data (maximum error = full step)
53
Analog to Digital Conversion
Quantization of unipolar data (maximum error = half step)
54
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.
55
Analog to Digital Conversion
Quantization of bipolar data (maximum error = half step)
56
Three-bit A/D Conversion
57
Dynamic Range
• Quantization errors can be determined by the quantization
step.
• Quantization errors can be reduced by increasing the number
of bits used to represent each sample.
• Unfortunately these errors can not be entirely eliminated and
their combined effect is called quantization noise.
where
• Px= Power of the signal ‘x’ (before quantization)
• Pq= Power of the error signal ‘xq’
59
Analog to Digital Conversion
60
2 bit Flash ADC
61
Digital-to-Analog (D/A) Conversion
62
Digital-to-Analog (D/A) Conversion
64
Digital-to-Analog (D/A) Conversion
Three bit D/A Conversion
65
Comparing Signals in the A/D & D/A Chain
66
Comparing Signals in the A/D & D/A Chain
67
Discrete-Time Signals and Systems
68
Discrete-Time Signals
• A signal defined only for discrete values of time is called a
discrete-time (DT) signal or simply a discrete signal
69
Discrete-Time Signals
• Figure (a): CT Signal
• Figure (b): DT Signal
71
Unit Impulse Function
The unit impulse function or unit sample sequence is defined as
the sequence with values
72
Unit Impulse Function
The unit impulse function δ[n] has an amplitude of zero at all
samples except n = 0, where it has the value 1.
73
Unit Impulse Function
Example:
74
Unit Step Function
The unit step function or unit step sequence is defined as the
sequence with values
75
Unit Step Function
Example:
x[n] = u[n] - u[n - 3]
76
Unit Step Function
Example: A digital signal is described as x[n] = 4(u[n] - u[n - 1]).
Write the function that describes x[n-3].
Answer
Substituting n = (n – 3) gives
77
Unit Ramp Function
78
Power Function
• Power functions take the form:
x[n] = Aα βn
• In the special case where α = e, such functions are called
exponential functions.
• When β is positive, the function grows.
• When β is negative the function decays.
• When α is negative, the signal samples alternate positive and
negative.
• The value of A is determine the magnitude/amplitude/value
of the function when n = 0
79
Power Function
• Example: x[n] = (-0.6)n
80
Exponential Function
• Exponential functions take the form:
x[n] = Ae βn
• Where e = 2.71828
• When β is positive, the function grows.
• When β is negative the function decays.
• When α is negative, the signal samples alternate positive and
negative.
• The value of A is determine the magnitude/amplitude/value
of the function when n = 0
81
Exponential Function
• Example: x[n] = e-0.5n
82
Complex Exponential Function
• A digital signal of the form
x[n] = Aejβn
84
Sinusoidal Sequence
Example: x[n] = 3sin(nπ/8)
85
Linear System
86
Linear System
87
Linear System
88
Linear System
89
Linear System
90
Time-Invariant System
91
Time-Invariant System
92
Time-Invariant System
93
Time-Invariant System
94
Time-Invariant System
95
Causal System
96
Causal System
Solution
1) Causal
2) Non-causal
97
Summary
98
Summary
99
End of Chapter-1
100