0% found this document useful (0 votes)
40 views

Digital Signal Processing: Dr. Muayad

Digital Signal Processing deals with commonly occurring analog signals like speech, music, and biomedical signals. These analog signals are first converted to digital signals using analog-to-digital converters. Then various operations can be performed on the digital signals using digital processors, like analyzing signals for voice recognition or extracting medical information. The digital signals can also be converted back to analog using digital-to-analog converters. There are different types of signals based on whether they are continuous or discrete in time and value, and whether they are deterministic or random. Analog-to-digital conversion is needed to process analog signals digitally.

Uploaded by

Ali Kareem
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views

Digital Signal Processing: Dr. Muayad

Digital Signal Processing deals with commonly occurring analog signals like speech, music, and biomedical signals. These analog signals are first converted to digital signals using analog-to-digital converters. Then various operations can be performed on the digital signals using digital processors, like analyzing signals for voice recognition or extracting medical information. The digital signals can also be converted back to analog using digital-to-analog converters. There are different types of signals based on whether they are continuous or discrete in time and value, and whether they are deterministic or random. Analog-to-digital conversion is needed to process analog signals digitally.

Uploaded by

Ali Kareem
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Digital Signal Processing

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.

Figure (1.1) Time waveform of “She sells sea shells.”

1.2 Applications of DSP


Given an analog signal (see Figure 1.1), the following applications are
possible:
 Preparing the analog signal for communication through a
communication channel.
Years of study and research have shown that one efficient means of
communicating the signal across a channel is as shown in Figure 1.2.
The signal is first converted from analog to digital (A/D), then modulated
with a high frequency carrier and transmitted from an antenna. Likewise,
at the receiver, the modulated signal is received by an antenna,

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.

Figure (1.2) Block diagram of digital communications system.

 Analyzing the analog signal for use in a voice recognition


telephone system.
Today, it is common to encounter voice recognition systems when we call
businesses, railway and airline reservation lines, banks, and a host of
other places. In these systems, the analog signal is sampled and then
analyzed using a Fast Fourier Transform (FFT), as shown in Figure 1.3
The analyzed frequency spectrum data is input into a microprocessor,
which matches the latter spectrum with a stored signal spectrum. If a

3
good match is determined between the two signal spectra, then a
particular operation is initiated.

Figure (1.3) Voice recognition systems.

 Analyzing the analog signal to obtain useful information. This


application is useful for biomedical signals, such as EKG (heart)
and EEG (brain). In such a case, the analog signal is sampled and
then analyzed using a FFT. The FFT spectrum of the EKG, for
example, can reveal several useful parameters about the patient,
such as high potassium levels (hyperkalemia) or low potassium
levels (hypokalemia).

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

The first equation varies linearly with the independent variable t


(time) and a second described a signal of two independent variable x and
y that could represent the two spatial coordinates in a plane.
Example of a natural signal that varies with time is a speech signal
which may be described as a sum of several sinusoids of different
amplitude and frequency. While the example of the signal that vary with
two independent variables is an image signal.
A system may also be defined as a physical device that performs an
operation on a signal. For example, a filter used to reduce the noise and
interference corrupting a desired information-bearing signal is called a
system. In this case the filter performs some operation(s) on the signal,
which has the effect of reducing (filtering) the noise and interference
from the desired information-bearing signal.
A Signal processing is the operations that performed on the signal means
processed the signal.

1.4 Basic Elements of a Digital Signal Processing System

Digital signal processing provides an alternative method for


processing the analog signal, as illustrated in Figure 1.4. To perform the
processing digitally, there is a need for an interface between the analog
signal and the digital processor. This interface is called an analog-to-
digital (A/D) converter. The output of the A/D converter is a digital signal
that is appropriate as an input to the digital processor.

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.

Figure (1.4) The block diagram of digital signal processing

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 5t 1  4
j 3t
x 2 (t )  Ae  A cos 3t  jA sin 3t 1.5

In some application signals are generated by multiple sources or


multiple sensors, such signal can be represented in vector form. This
vector of signal refers to multi channel signal.
The signal is said to be m-dimension if its value is a function of
m independent variable. If the signal is a function of a single independent
variable, the signal is called one dimensional signal.
The black and white television picture may be represented as
I(x,y,t) since the brightness is a function of time .hence the TV picture
may be treated as a three-dimensional signal. In contrast, a color TV
picture may be described by three intensity function of the form
I r ( x, y, t ), I b ( x, y, t ), I g ( x, y, t ) corresponding to the brightness of the three

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.

3. Continuous – Valued versus Discrete – Valued Signals


The values of a continuous-time or discrete-time signal can be
continuous or discrete. If a signal takes on all possible values on a finite
or an infinite range, it said to be continuous-valued signal. Alternatively,
if the signal takes on values from a finite set of possible values, it is said
to be a discrete - valued signal. A discrete – time signal having a set of
discrete values is called a Digital signal. In order for a signal to be
processed digitally, it must be discrete in time and its value must be
discrete (i.e. it must be a digital signal).

4. Deterministic signal and Random signal: -


The mathematical analysis and processing of signals requires the
availability of a mathematical description for the signal itself. This
mathematical description, often referred to as the signal model so, any
signal that can be uniquely described by an explicit mathematical
expression, table of data or a well defined rule is called a Deterministic
signal

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.

1.6 Analog-To-Digital and Digital-To-Analog Conversion


1.6.1 Analog-To-Digital convertor
Most signals of practical such as speech, radar, sonar, and audio
signals are analog. To process analog signals by digital means it is first
necessary to convert them into digital form. That is, to convert them to a
sequence of numbers having a finite precision. This procedure is called
analog-to-digital (A/D) conversion, and the corresponding devices are
called A/D convertors (ADCs).
The analog to digital conversion can perform through three steps as
shown in figure (1-2):
1. Sampler: - This is the conversion of a continuous-time signal into
discrete-time signal obtained by taking samples of the
continuous-time signal at discrete-time instant. Thus if xa (t )

is input to the sampler, the output is xa (nT )  x(n) where T is


called the sampling interval.
2. Quantization: - This is the conversion of a discrete-time
continuous-valued signal into a discrete-time discrete-valued
(digital) signal. The value of each signal sample is represented by
a value selected from a finite set of possible values. The
difference between the unquantized sample x(n) and the
quantized output x q (n) is called the quantization error.

9
3. Coding: - In the coding process, each discrete value of xq(n) is
represented by a b-bit binary sequence.

Discrete time Quantized signal


Analog signal signal Digital signal
Sampler Quantizes Codes
xa (t ) x(n) xq (n)

Figure (1.5) The basic parts of A/DC

1.7 Sampling of analog signal


There are many ways to sample an analog signal. One of them is the
periodic or uniform sampling, which is the type of sampling used must
often in practice. This is described by the relation
x(n)  xa (nT )   n   1.7

Where x(n) is the discrete-time signal obtained by "taking samples" of


two successive samples is called the sampling period or sample interval
and its reciprocal 1 / T  Fs is called sampling rate (sample per second)
as shown in Figure (1.6)

xa (t ) xa (nT )  x(n)
Analog signal Fs  1 / T Discrete time signal

Sampler

Figure (1.6) 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

Periodic sampling that shown in Figure (1.7) establishes a


relationship between the time variable t and n of continues-time and
discrete-time signals, respectively. Indeed, these variables are linearly
related through the sampling rate Fs  1 / T ,as
n
t  nT  1.8
Fs

As a consequence of equation (1.8) , there exist a relationship


between the frequency variable F(or Ω) for analog signals and the
frequency variable f (or ω) for discrete time signals.
F
f  1.9
Fs

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

Figure (1.8) Illustration of aliasing

12
Example 1-1:- Consider the analog signal x(t )  3cos100t

1. Determine the minimum sampling rate required to avoid aliasing


2. Suppose that the signal is sampled at the rate Fs  200H z what the
discrete time signal obtained after sampling?
3. Suppose that the signal is sampled at the rate Fs  75H z what the
discrete time signal obtained after sampling?
Solution:-
1. The frequency of the analog signal is F  50H z . hence the
minimum rate required to avoid aliasing is Fs  100H z
2. The discrete time signal is x(nT )  3 cos100nT
1
Ts 
Fs

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

Example1- 2:- Consider the analog signal


x(t )  3cos2000t  5sin 6000t  10cos12000t

1. what is the maximum frequency of the analog signal


2. what is the Nyquist rate
3. Assume we sample this signal using sampling rate
Fs  5000H z sample/sec .what is the discrete time signal obtained
after sampling?

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 6000n 12000n
x(nT )  3 cos 2000 .  5 sin  10 cos
5000 5000 5000
1 2
x(n)  13 cos 2n( )  5 sin 2n( )
5 5

1.8 Quantization of Continues –Amplitude Signals


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, is called quantization. The error introduced in
representing the continuous-valued signal by a finite set of discrete value
levels is called quantization error or quantization noise.
The quantization error is a sequence eq (n) defined as the difference
between the quantized value and the actual sample value. Thus
e q ( n)  x q ( n )  x ( n ) … (1.13)
The values allowed in the digital signal are called quantization
levels L, whereas the distance ∆ between two successive quantization
levels is called the quantization step size or resolution. The rounding
quantizer assigns each sample of x(n) to the nearest quantization level.
The quantization error eq (n) in rounding is limited to the range of
 
  e q ( n) 
2 2
If xmin and xmax represent the minimum and maximum value of x(n)and L
is the number of quantization levels ,then

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 t0 

Solution: - the analog signal is shown in Figure (1.9)

0.9

0.8
x(t)

0.7

0.6

0.5

0.4
0 1 2 3 4 5 6 7 8
t

Figure (1.9) The graphical representation of the analog signal

When sampling the above signal at Fs  1H z then the discrete-time


continuous-valued signal will be illustrated in Figure (1.10)

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

Figure (1.11) Illustration of quantization


The quantization error can be calculated according to equation (1.13) as
shown in Figure (1.12)

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

Figure (1.12) The quantization error

1.9 Coding of Quantized Samples


The coding process in an A/D convertor 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 bit we can create 2 b different
binary numbers. Hence we have 2 b  L or equivalently b  log 2 L . Thus the
number of bits required in the coder is the smallest integer greater than or
equal to log 2 L . In the previous example, it can be seen that we need a
coder with b=4 bits.

1.10 Digital-To-Analog converters


To convert the digital signal into an analog signal, we can use the
digital-to-analog (D/A) convertor, the task of a D /A convertor is to
interpolate between samples.
The simplest DAC is zero order hold or staircase approximation as shown
in Figure (1.13), which simply holds constant the value of one sample
until the next one is received.

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(100t )
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

You might also like