Digital Signal Processing: Dr. Muayad
Digital Signal Processing: Dr. Muayad
Lecture 1
Dr. Muayad
3rd year
1
Introduction to Digital Signal Processing
1.1 Introduction
Digital Signal Processing (DSP) primarily deals with commonly
occurring signals such as speech, music, video, EKG or ECG (heart), and
EEE (brain).These signals occur naturally in analog continuous-time
form, as shown in Figure 1.1, which depicts a typical speech signal,
representing the phrase “She sells sea shells” said over a time span of
about 1.8 seconds.
2
demodulated, and then converted back from digital to analog format
(D/A). In DSP, we are primarily focused on baseband signals, i.e., the
A/D and D/A conversion stages.
3
good match is determined between the two signal spectra, then a
particular operation is initiated.
4
1.3 SIGNALS, SYSTEMS, AND SIGNAL PROCESSING
A signal is defined as any physical quantity that vary with time or
any independent variables. Mathematically, the signal can be described as
a function of one or more independent variable for example
x1 (t ) 5t 1 2
x( s, y ) 3s 2 y 10sy 1.3
5
The digital signal processor may be a large programmable digital
computer or small micro processor programmed to perform the desired
operation on the input signal. Or it may be a hardwired digital signal
processor configured to perform a specific set of operations on input
signal. Programmable machine provide the flexibility to change the signal
processing operation through a change in the software, whereas
hardwired machines are difficult to reconfigure. In digital processing of
signals on a digital computer, the operation performed on a signal
consists of a number of mathematical operations as specified by a
software program.
We must provide another interface from the digital domain to the
analog domain. Such an interface is called a digital to analog (A/D)
convertor .However, there are other practical involving signal analysis,
where the desired information is conveyed in digital form and no D/A
convertor is required such as the digital processing of radar signals in
which the information extracted (position of the aircraft and its speed)
may be printed on the paper. So no need for a D/A convertor in this case.
6
1.5 Classification of signals:-
1. Multi channel and multi dimension signals:-
As explained, a signal is described by a function of one or more
independent variables. The value of the function (i.e. ., the independent
variable) can be a real-valued scalar quantity, a complex –valued
quantity, or perhaps a vector.
For example
x1 (t ) A sin 5t 1 4
j 3t
x 2 (t ) Ae A cos 3t jA sin 3t 1.5
principle color (red, green, blue) as a function of time. Hence the color
TV picture is a three-channel, three-dimensional signal, which can be
represented by the vector
I r ( x, y , t )
I ( x, y , t ) I b ( x, y , t ) 1.6
I g ( x, y , t )
7
2. Continuous Time versus Discrete Time Signal: -
Signals can be classified into four different categories depending on the
characteristic of the time variable and the values they taken.
Continuous time signals or analog signals are defined for every value of
time and they take on values in the continuous interval between to .
Mathematically, these signals can be describing by a function of
continuous variable. While the discrete time signals are defined only at
certain specified values of time, these time instants are taken at equally
spaced interval. Thus a discrete time signal can be represented
mathematically by a sequence of real or complex numbers.
8
Random signal: - it is the signal that can not be described to any
reasonable degree of accuracy by mathematical formulas or such
description is too complicated to be of any practical use. The analysis and
description of random signal using statistical techniques instead of
formulas.
9
3. Coding: - In the coding process, each discrete value of xq(n) is
represented by a b-bit binary sequence.
xa (t ) xa (nT ) x(n)
Analog signal Fs 1 / T Discrete time signal
Sampler
10
1
0.8
0.6
Xa(t)
0.4
0.2
0
0 0.5 1 1.5 2 2.5 3
t
0.8
0.6
X(n)
0.4
0.2
0
0 T 2T 0.5 1 1.5 2 2.5 3
n nT
Figure (1.7) Periodic sampling of an analog signal
11
Or equivalently, as
ω=ΩT …1.10
The sampling theorem introduced by Nyquist and later by Shannon
is used to determine the appropriate sampling rate. To avoid the problem
of aliasing, the sampling rate Fs is selected so that
Fs 2Fmax 1.11
FN 2Fmax …1.12
where Fmax is the largest frequency component in the analog signal
Where FN is the Nyquist rate.
An example of aliasing is illustrated in Figure (1.8), where two
1 7
sinusoids with frequencies F1 Hz and F2 Hz yields identical
8 8
samples when a sampling rate of Fs 1Hz is used
1
f2=-7/8 Hz
f1=1/8 Hz
0.5
x1(t),x2(t)
-0.5
-1
0 1 2 3 4 5 6 7 8
t
12
Example 1-1:- Consider the analog signal x(t ) 3cos100t
n
x(n) 3 cos
2
3. If the signal is sampled at the rate Fs 75H z ,the discrete time
signal is
100 4 2 2
x(n) 3 cos n 3 cos n 3 cos(2 n) 3 cos n
75 3 3 3
13
Solution:-
2000
F1 1kH z
2
6000
1. F2 3kH z
2
12000
F3 6kH z
2
The maximum frequency of this signal is 6 kHz
2. Fs FN 2Fmax 12kH z
3. since Fs 5kH z
1 6000n 12000n
x(nT ) 3 cos 2000 . 5 sin 10 cos
5000 5000 5000
1 2
x(n) 13 cos 2n( ) 5 sin 2n( )
5 5
14
xmax xmin
… (1.14)
L 1
We define the dynamic range of the signal xmax xmin . Note that if the
dynamic range is fixed, increasing the number of quantization levels
results in a decrease of the quantization step size. Thus the quantization
error decreases and the accuracy of the quantizer increases.
To illustrate the quantization process, let's take the following example
Example (1-3):- Consider the analog signal x(t) is an input to analog to
digital convertor ,what is the output of sampler and quantizer if the
sampling rate is 1Hz. Let the number of quantization level =11
0.9 t 0 t
Where x(t ) , take only 9 samples.
0 t0
0.9
0.8
x(t)
0.7
0.6
0.5
0.4
0 1 2 3 4 5 6 7 8
t
15
1
0.8
0.6
x(n)
0.4
0.2
0
0 1 2 3 4 5 6 7 8
n
Figure (1.10) The graphical representation of the discrete-time continuous-
valued signal
We discuss the quantization by rounding. The rounding process is
graphically illustrated in Figure (1.11).
In our example, we have xmax 1 , xmin 0 and L=11, which lead to ∆=0.1.
0.9
x(t)
0.8 xq(n)
level of quantization
0.7
0.6
Range
xq(n)
of the 0.5
quantizer
0.4
0.3
0.2
0.1
0
0 1 2 3 4 5 6 7 8
n
16
0.03
0.02
0.01
0
eq(n)
-0.01
-0.02
-0.03
-0.04
-0.05
0 1 2 3 4 5 6 7 8
n
17
Step Response
0.7
0.6
The analog signal
0.5
0.4
Amplitude
x(nT) Output of DAC
0.3
0.2
0.1
0
0 1 2 3 4 5
Time (sec)
nT
Figure (1.13) The output of Zero-Order-Hold
1.6 Homework
1. for the same example(1-3), let the number of bit =3 sketch the
following signal
a. sampled signal b. quantization signal c. quantization error
signal
2. Consider the following analog signal x(t ) 3 sin(100t )
a. Sketch the signal for five samples.
b. Let the signal sampled with a sampling rate Fs 300 samples/s.
Determine the frequency of the discrete time signal.
18