EEE 311: Digital Signal Processing-I

ranchocucamongabrrrAI and Robotics

Nov 6, 2013 (3 years and 9 months ago)

81 views

EEE 311:

Digital Signal Processing
-
I

Course Teacher:

Dr. Newaz Md. Syfur Rahim




Associated Professor,




Dept of EEE, BUET, Dhaka 1000.

Syllabus: As mentioned in your course calendar

Reference Books:

1.

Digital Signal Processing: Principles, Algorithms, and Applications


John G. Proakis

2.

Digital Signal Processing: A Practical Approach


Emmanuel C. Ifeachor

3.

Schaum’s Outlines of Digital Signal Processing

4.

Modern Digital Signal Processing


Roberto Cristi

Co
urse Outlines:


This course will cover
Chapt
er 1 through 5 of Proakis’s and

Chapter 5 through 7 of Ifeachor
’s book
.
































Signals Systems and Signal Processing

A
signal

is a function of one or more independent variables that usually represent time and/ or space.
A signal contains
some kind of information that can be conveyed, displayed, or manipulated. Examples of signals of particular interests
are:



Speech, which we enco
unter in telephony, radio, and everyday life.



Biomedical signals, such as electrocardiogram



Sound and music, such as reproduced by CD player



Video and image, which people watch on television



Radar signals, which are used to determine the range and bearing
of distant targets

A
system

is a practical device that performs an operation on a signal to modify the signal or extract additional
information from it. A system may be electrical, mechanical, thermal, hydraulic or an algorithm.

By
signal processing

we mea
n the type of operations that is performed by the system to the signal. Digital signal
processing is concerned with the digital representation of signals and the use of digital processors to analyze, modify, or
extract information from signals. The signals

used in most DSP are derived from analog signals which have been sampled
at regular intervals and converted into a digital form.
DSP is now used in many areas where analog methods were
previously used and in applications which are difficult or impossible
with analog method.

A
dvantages of DSP

The main attractions of DSP are due to the following advantages:



Digital signal can withstand channel noise and distortion much better than analog signal.



Repeaters can be used for long distance digital communication



Digital system can be easily modified with software that implements the specific applications.



Digital signals can be coded to reduce error rate.



Storage of digital signal is easy and inexpensive and does not deteriorate with age.



Reproduction of digital m
essages is extremely reliable without distortion



DSP allows sophisticated applications such as speech recognition and image compression to be implemented
with low power portable devices



The accuracy is only determined by the number of bits used.



No drift i
n performance with temperature or age



Linear phase response can be achieved and complex adaptive filtering algorithms can be implemented using DSP
techniques.

DSP designs can be expensive when large bandwidth signals are involved. The ADCs/ DACs may not
have sufficient
resolution for wide bandwidth DSP applications. In some DSP systems if an insufficient number of bits are used to
represent variables serious degradation in system performance may result.

A
pplications of DSP

DSP has revolutionized many
areas of science and engineering. They are summarized below:



Measurements and analysis:

Preconditioning the measured signal by rejecting the disturbing noise and
interference. The digital filters can be found in ECG and EEG equipment to record the weak sig
nals in the
presence of heavy background noise and interference. DSP techniques are also used for the analysis of radar and
sonar echoes. In most GPS receivers today advanced DSP techniques are employed to enhance resolution and
reliability.
[+ patient mon
itoring, X
-
ray storage, enhancement]



Telecommunications:

DSP is used in telephone systems for DTMF (dual
-
tone multi
-
frequency) signaling, echo
cancelling of telephone lines, equalizers for high
-
speed telephone modems, etc. Error
-
correcting codes are used
t
o protect digital signals from bit errors during data trans
-
missions. Data compression algorithms are utilized to
reduce the number of data bits to represent given information. DSP is used for speech coding in GSM (global
system for mobile communication) t
elephones, in modulators and demodulators etc.

[+video conferencing, data
communication]



Audio and television:

Digital signal processing is mandatory in CD players, digital audio tape (DAT) and digital
compact cassette (DCC) recorder. Digital methods are a
lso used in digital audio broadcasting (DAB). HDTV
systems are utilizing lots of digital image processing techniques.



Digital image processing:

Digital image processing
is

used for restoring blurred or distorted images, data
compression, identification an
d analysis of pictures and photos.
[+pattern recognition, satellite weather map,
facsimile]



Automotive:

In automotive business DSP is used for control purposes. For example, ignition and injection
control system, intelligent suspension system, anti
-
skid br
akes, climate control systems, intelligent cruise
controllers, airbag controllers etc. Some speech recognition and speech synthesis are being tasted in
automobiles. Experiments have been performed for background noise cancellation in cars using adaptive di
gital
filters.

Basic Elements of DSP Systems

The block diagram of atypical DSP system is shown in Figure below.


The analog input filter is used to band
-
limit the input signal before digitization to reduce aliasing. The ADC converts the
analog input sig
nal into a digital form. The heart of the system is the digital processor (Motorola MC68000, Texas
Instruments TMS320C25). The digital processor may implement one of the several DSP algorithms, such as, digital
filtering. After processing the signal may be

stored in a computer memory for later use or it may be displayed graphically
on a display unit.

Sampling



Sampling is the acquisition of a continuous signal at discrete time intervals.

The sampled signal is continuous in
amplitude but defined only in
discrete points in time.

The process is shown in
Figure above.
The signal obtained in this
way

is called discrete
-
time signal and is represented as
( )
x n
.





( ) ( )
a
x n x nT

;

n
  

where,
T

is the sampling period. The inverse of it is sampling frequency,
s
F
.
[ 1/]
s
F T



Basic signals

1.

Unit sample or unit impulse,
( )
n





1 0
( )
0 0
n
n
n








Note:

Any D.T. signal can be expanded into,

( ) ( ) ( )
k
x n x k n k



 

.

2.

Unit step,
( )
u n





3.

Sinusoidal signals

A continuous
-
time sinusoidal signal is defined as,
0
( ) cos( )
x t A t

  
. A discrete
-
time sinusoid is obtained by
sampling a continuous
-
time sinusoid with sampling interval,
s
T
as,


0 0
( ) ( ) cos( ) cos( )
s s
x n x nT A nT A n
  
     

where,
0
0 0 0
2
2
s
s
F
T f
F

 
   
is called the digital frequency.

4.

Exponential signal,
n
a
(or
n
e

where,
a e


and
j
  
 
)


Some peculiarities of discrete
-
time sinusoids

There are two unexpected properties of discrete
-
time sinusoids which distinguish them with continuous
-
time sinusoids.

1.

A continuous
-
time sinusoid is always periodic regardless of it
s frequency,

. But a Discrete
-
time sinusoid is
periodic only if

is
2

times some rational number.

2.

A discrete
-
time sinusoid does not have unique waveform for each value of

. In fact, discrete
-
time sinusoids
with frequencies separated by the multiples of
2

are identical.
Thus a sinusoid
0 0
cos cos( 2 ) cos
k
n k n n
   
  
where k is an integer.

A discrete
-
time sinusoid
0
( ) cos( )
x n A n
 
 

is periodic with period
0
N
, if
0
( ) ( )
x n x n N
 
. Applying this condition
we get,
0 0
2
N m
 


or,
0
0
2
m
N




.

0
N
and m are integers.

1 0
( )
0 0
n
u n
n






( ) 1.5 ( 2) ( 1) 1.2 ( ) 0.5 ( 2)
1.6 ( 3)
x n n n n n
n
   

      
 

Figure above shows three sinusoids
,
4
cos,cos andcos0.8
4 17
n n n
 
. The period of first and the second sinusoids are 8
and 17 respectively.
The third sinusoid is not periodic.

From the second property it can be said that
sinusoidal signal has unique waveform over a range of
2

. We may select
this range to be


to

, 0 to
2

,

to
3

etc.
We shall select this range as


to

. We call this range as
the
fundamental range of frequencies
.

Thus a sinusoid of any frequency

is identical to some sinusoid
of frequency
f

in
the fundamental range


to

.

Thus,


cos(8.7 ) cos(0.7 )
n n
   
  

and
cos(9.6 ) cos( 0.4 )
n n
   
   
.

Therefore, the frequency
8.7

is identical to the frequenc
y
0.7

in the fundamental range. Also the frequency
9.6

is
identical to the frequency
0.4


in the fundamental range.

Further reduction in frequency range

Consider,
cos(9.6 ) cos( 0.4 ) cos(0.4 )
n n n
     
     
.

This result shows that a sinusoid of any frequency

can always be expressed as a sinusoid of frequency
f

, where
f

lies in the frequency range 0 to

.

A syst
ematic procedure to reduce the frequency of a sinusoid
cos( )
n
 

is to express

as,


2
f
m
  
 

;

f
 

and m is an integer.

Non
-
uniqueness of discrete
-
time sinusoid

Figure below shows how two different continuous time sinusoids of different frequencies generate identical discrete
-
time sinusoid.


Highest oscillation rate in discrete
-
time sinusoid

The rate of oscillation of a sinusoid increases continuously as

increases from
0 to

. The rate of oscillation decreases


As

increases from
to 2
 
.
This is illustrated in Figure above. A frequency
( )
x


actually appears as the frequency
( )
x


.


Sampling continuous
-
time sinusoid and aliasing

If two sequences
1 1 1
( ) cos( )
x n A n
 
 
and
2 2 2
( ) cos( )
x n A n
 
 
have frequencies and phases related by,



2 1 2 1
2,
k
    
  

or,

2 1 2 1
2,
k
    
    

with k an integer, then the two sinusoidal sequences have the same samples
, i.e.
1 2
( ) ( )
x n x n

.

This is illustrated in
Figure below.


Here,
1

,
1
2
 

,
1


and
1
2
 
 
represents the same signal
in the time domain.

If we limit the digital frequency

within the
interval
to
 

then there is one to one correspondence
between the signals and their frequency representation.
For
each frequency in the interval
to
 

the corresponding
aliases are all outside the interval
to
 

itself.

Now, the
range of unique digital frequencies,


  
  

T
 
    


Or,
//
T T
 
  
or,
s s
F F
 
  



Or,
2 2
s s
 
  

This implies that the highest frequency of an analog signal
must be less than half the sampling frequency to avoid
aliasing.

0
0
0
15
or
8 8
7
or
4 4
3
or
2 2
 

 

 





Example:

Consider the analog signal
( ) 3cos 2000 5sin6000 10cos12000
a
x t t t t
  
  
. What is the Nyquist rate for this
signal? If the sampling rate is 5000 samples/sec what is the discrete
-
time signal obtained a
fter sampling? What is the
analog signal
( )
a
y t
we c
an reconstruct from the samples if we use ideal interpolation?

-------------------------

Nyquist rate is the minimum sampling frequency to avoid aliasing. This is double the maximum fre
quency of input signal.

Here,

1 2 3
1000 Hz, 3000 Hz and 6000 Hz.
F F F
  

Thus, Nyquist rate,
12000 Hz
N
F

.


2000 6000 12000
( ) ( ) 3cos 5sin 10cos
5000 5000 5000
a s
x n x nT n n n
  
   
2 6 12
3cos 5sin 10cos
5 5 5
n n n
  
  

Or,
2 4 2
( ) 3cos 5sin(2 ) 10cos(2 )
5 5 5
x n n n n
  
 
    
2 4 2
3cos 5sin 10cos
5 5 5
n n n
  
  

Or,
2 4
( ) 13cos 5sin
5 5
x n n n
 
 
.


1 2
1 2
,
5 5
f f
  

For perfect reconstruction,
1 1
1
5000 Hz=1000 Hz
5
s
F f F
   
, and
2 2
2
5000 Hz=2000 Hz
5
s
F f F
    
.

Thus,
( ) 13cos 2000 5sin4000
a
y t t t
 
 
.

Note that,
1
F
is less than 2500 Hz.

So no aliasing will occur.
2
F
is greater than 2500 Hz by 500 Hz. So this frequency will
appear as a lower frequency of (2500

-

500)=2000 Hz. Alternately, (3000
-
5000)=
-

2000 Hz.

The third frequency will

change to (6000
-

5000)

= 100
0 Hz.

Quantization and Encoding

Quantization is a process that converts data from infinite or high precision to finite or lower precision.
The error
introduced in representating the continuous
-
valued signal by a finite set of discrete value levels is calle
d quantization
error and is denoted by
( )
e n
.






ˆ
( ) [ ( )]
ˆ
( ) ( ) ( )
x n Q x n
e n x n x n



 


The distance

between two successive quantization levels is called
quantization step size

or
resolution
.


The quantizer

has (L+1) decision levels
1 2 1
,,,
L
x x x


that divide the amplitude range for
( )
x n
into L intervals.








For an input
( )
x n
that falls in the interval
k
I
, the quantizer assig
ns a value within the interval
ˆ
( )
x k
to
( )
x n
.
This
process is shown in Figure above.

1
k k
x x

  
.

The number of levels in a quantizer is generally of the form,
1
2
B
L



for a B+1 bit binary code

word
.




A 3
-
bit uniform quantizer in which the quantizer output is rounded to the nearest quantization level is shown in Figure
below.


With
L

quantization levels, the range of the quantizer is,
1
2
B
R

  
.

If the quantizer input is bounded,
max
( )
x n X

.