You are on page 1of 32

Digital Signal Processing ECR305_L1

Lecture – 1 Objectives

DSP

To learn & understand


 The fundamentals of signal and
Introduction systems
 How signals are processed?
IUB Dr. Abdur Razzak 1
What is a signal ? ECR305_L1

In this modern world we are surrounded by all kinds of signals in


various forms. Some of the signals are natural, but most of the
signals are manmade. Some signals are wanted or necessary
(speech), some are pleasant (music), while many are unwanted or
unnecessary in a given situation.

The distinction between useful and unwanted information is often


subjective as well as objective. Hence signal processing tends to be
application dependent.

In an engineering context, signals are carriers of information, both


useful and unwanted.

So extracting or enhancing the useful information from a mix of


conflicting information is the simplest form of signal processing.
IUB Dr. Abdur Razzak 2
What is a signal ? (contd..) ECR305_L1

A signal is basically a stream of information.

Signal is generally an electrical signal carried by:

A cable
Telephone line
Radio wave

IUB Dr. Abdur Razzak 3


What is a signal ? (contd..) ECR305_L1

What kinds of signals are there?

Analog INPUT: sounds or data

OUTPUT: electrical voltage or current

IUB Dr. Abdur Razzak 4


Classification of signals ECR305_L1

Single-channel and multichannel signal


 Single-channel: Signal generated from single source
 Multichannel: Signal generated from multiple source (ground acceleration
due to earthquake: 3-channel, ECG: 3- or 12-channel)

One-dimensional and multidimensional signal


 One-dimensional: Signal is a function of single independent variable
 Multidimensional: Signal is a function of multiple independent variable
 Still picture: 2-dimensional, I  I x, y 
 B/W TV picture: 3-dimensional signal I  I x, y, t 

Multichannel and multidimensional signal  I y x, y, t 


 Color TV picture: 3-channel, 3-dimensional Ix,y,t    I g x, y, t 
 I b x, y, t 
IUB Dr. Abdur Razzak 5
Classification of signals (contd..) ECR305_L1

Continuous-time signal xa t   A sin t   


x(t)
  2F rad/ sec

Discrete-time signal xn  A sin n   


x(n)   2f [rad/sample]

IUB Dr. Abdur Razzak 6


How signals are processed ? ECR305_L1

Signal processing is an operation designed for extracting,


enhancing, storing, and transmitting useful information.

The signals that we encounter in practice are mostly analog


signals. These signals, which vary continuously in time and
amplitude, are processed using electrical networks containing
active and passive circuit elements. This approach is known as
analog signal processing (ASP).

Example: Op-Amp is an Analog Signal Processor


x(t) y(t)
Analog Analog Signal Processor Analog
signal signal

IUB Dr. Abdur Razzak 7


What is DSP ? ECR305_L1

Signals can also be processed using digital hardware containing


adders, multipliers, and logic elements or using special-purpose
microprocessors.

However, one needs to convert analog signals into a form suitable


for digital hardware. This form of the signal is called a digital
signal.

It takes one of the finite number of values at specific instances in


time, and hence it can be represented by binary numbers, or bits.
The processing of digital signals is called DSP.

DSP is now becoming a first choice in many technologies and


applications, such as consumer electronics, communications,
wireless telephones, and medical imaging.
IUB Dr. Abdur Razzak 8
Why do signal need processing? ECR305_L1

Remove unwanted electrical noise

Improve signal quality

Extract specific or critical information

Speed common processes by creating specific tools

Digital Digital Signal Processor Digital


signal signal

IUB Dr. Abdur Razzak 9


Disadvantages of ASP & DSP ECR305_L1

Drawbacks of ASP
 A major drawback of ASP is its limited scope for performing
complicated of DSP over signal-processing applications.

 This translates into nonflexibility in processing and complexity in


system designs.

 All of these generally lead to expensive products.

Drawbacks of DSP
 The principal disadvantage of DSP is the limited speed of
operations limited by the DSP hardware, especially at very high
frequencies.
IUB Dr. Abdur Razzak 10
Advantages of DSP ECR305_L1

Some important advantages of DSP are:


1. Systems using the DSP approach can be developed using
software running on a general-purpose computer. Therefore DSP
is relatively convenient to develop and test, and the software is
portable.
2. DSP operations are based solely on additions and multiplications,
leading to extremely stable processing capability-for example,
stability independent of temperature.
3. DSP operations can easily be modified in real time, often by
simple programming changes, or by reloading of registers.
4. DSP has lower cost due to VLSI technology, which reduces costs
of memories, gates, microprocessors, and so forth.
IUB Dr. Abdur Razzak 11
Advantages of DSP (contd..) ECR305_L1

They are fast enough for real-time processing.


Programmable and versatile
– DSP chip + Software1 = cell phone
– DSP chip + Software2 = CD player
– DSP chip + Software3 = fax machine
– Etc..
Wave of the future

IUB Dr. Abdur Razzak 12


Two important operations of DSP ECR305_L1

The most DSP operations can be categorized as

 Signal analysis tasks

 Signal filtering tasks

IUB Dr. Abdur Razzak 13


Signal analysis ECR305_L1

This task deals with the measurement of signal properties. It is


generally a frequency-domain operation. Some of its applications
are

 spectrum (frequency and/or phase) analysis

 speech recognition

 speaker verification

 target detection

IUB Dr. Abdur Razzak 14


Signal filtering ECR305_L1

This task is characterized by the "signal in-signal out" situation.


The systems that perform this task are generally called filters. It
is usually (but not always) a time-domain operation. Some of the
applications are
 removal of unwanted background noise
 removal of interference
 separation of frequency bands
 shaping of the signal spectrum

In some applications, such as voice synthesis, a signal is first


analyzed to study its characteristics, which are then used in
digital filtering to generate a synthetic voice.
IUB Dr. Abdur Razzak 15
Digital signal processor ECR305_L1

DSP, or Digital Signal Processing, is the processing of signals by


digital means.

Digital Signal Processor: This is the heart of DSP and can


represent a generalpurpose computer or a special-purpose
processor, or digital hardware; and so on.

IUB Dr. Abdur Razzak 16


Digital signal processor(contd..) ECR305_L1

PrF: This is a pre-filter or an antialiasing filter, which


conditions the analog signal to prevent aliasing.

ADC: This is an analog-to-digital converter, which produces a


stream of binary numbers from analog signals.

DAC: This is the inverse operation to the ADC, called a digital-


to-analog converter, which produces a staircase waveform from a
sequence of binary numbers, a first step towards producing an
analog signal.

PoF: This is a post-filter (a LPF) to smooth out staircase


waveform into the desired analog signal.

IUB Dr. Abdur Razzak 17


Digital to analog converter ECR305_L1

Digital-to-analog conversion is simple and effectively


instantaneous. Properly weighted voltages are summed together
to yield the analog output.
For example, in figure, three weighted voltages are summed. The
three-bit binary code is represented by the switches.
Thus, if the binary
number is 1102, the
bottom and center
switches are on, and
the analog output is
6 volts. In actual
use, the switches
are electronic and
are set by the input
binary code.
IUB Dr. Abdur Razzak 18
Analog to digital converter ECR305_L1

Analog-to-digital (A/D) conversion is a two-step process and is not


instantaneous (there is a delay between the analog input and digital
output: the analog signal is first converted to a sampled signal and then
converted to a sequence of binary numbers, the digital signal.
The sampling rate (Nyquist sampling rate) must be at least twice the
bandwidth of the signal, otherwise there will be distortion or aliasing.
Analog signal sampled at periodic intervals and held over the sampling
interval by a device called a zero-order sample-and-hold (z.o.h.) that
yields a staircase approximation to the analog signal.
After sampling and holding, the dynamic range of the analog signal's
voltage is divided into discrete levels, and each level is assigned a
digital number. This is called quantization.
The difference between levels is M/2n volts, where n is the number of
binary bits used for the analog-to-digital conversion.
IUB Dr. Abdur Razzak 19
Analog to digital converter (contd..) ECR305_L1

Fig: Steps in analog to digital


conversion: a. analog signal; b.
analog signal after sample-and-hold;
c. conversion of samples to digital
numbers

IUB Dr. Abdur Razzak 20


Sampling of analog signal ECR305_L1

Periodic or uniform sampling:

IUB Dr. Abdur Razzak 21


Sampling of analog signal (contd..) ECR305_L1

If an analog signal is denoted by xa(t), then the sampled signal


will be denoted by

xa  nTs   x  n

n
t  nTs 
where Fs

in which the variable n is integer-valued and represents discrete


instances in time,

Ts = sampling time,

and Fs = sampling frequency

IUB Dr. Abdur Razzak 22


Sampling of analog signal (contd..) ECR305_L1

Consider an analog signal represented by


xa t   A sin t     A sin 2Ft   

 2 nF  F
Then x  n   xa  nTs   A sin  2 FnTs     A sin    f 
 Fs  Fs
 A sin  2 fn     A sin  n   

Comparing the above 2 equations give the relation between


continuous and digital angular frequency.
 n  t
  n  nTs since t  nTs
   T s
IUB Dr. Abdur Razzak 23
Sampling theorem ECR305_L1

A band-limited signal xa(t) with bandwidth F0 can be


reconstructed from its sample values x(n) = xa(nTs) if the
sampling frequency Fs = 1/Ts is greater than twice the bandwidth
F0 of xa(t).

In other words, the sampling frequency must be greater than 2


twice of the maximum frequency of the analog signal.

Fs  2F0

Fs  2Fmax

Otherwise there will be distortion or aliasing.

IUB Dr. Abdur Razzak 24


Example-1 ECR305_L1

Determine the discrete signal for the analog signal given


below. Consider the sampling rate is 40 Hz.

(i) x1 t   2 cos 20t

(ii) x2 t   2 cos100t
F  10  
Solution: x1 n   2 cos 2  n  2 cos 2  n  2 cos n
 
 Fs   40  2
F  50  5
x2 n   2 cos 2  n  2 cos 2  n  2 cos n
 
 Fs   40  2
  
 2 cos 2  n  2 cos n
 2 2
IUB Dr. Abdur Razzak 25
Example-2 ECR305_L1

Consider the analog signal x1 t   3 cos100t


Determine: (a) Nyquist rate (b) discrete time signal with Fs = 400 Hz (c)
Number of sample per period (d) draw the analog and digital signal on the
same graph for 40ms

Solution: (a) x1 t   3 cos100t  3 cos 2 50t


F  F max  50 Hz Nyquist rate Fs  2 F max  100 Hz
F  50  
(b) xn   3 cos 2  n  3 cos 2   n  3 cos n
 Fs   400  4

(c) T  1 / F  1 / 50  20ms Ts  1 / Fs  1 / 400  2.5ms


Number of samples/period, N  Fs / F  T / Ts  20 / 2.5  8
3

(d) 0

-1

-2

-3
0 0. 005 0. 01 0. 015 0. 02 0. 025 0. 03 0. 035 0. 04

IUB Dr. Abdur Razzak 26


Periodic and nonperiodic signals ECR305_L1

A signal x(n) is said to be periodic with a period N (N>0) if and


only if
xn  N   xn

The smallest value of N for which the above equation is satisfied


is called the fundamental period of the signal.

If there is no values of N that satisfies the above equation, then


the signal is nonperiodic or aperiodic.

Example: A signal xn   A sin 2f 0 n  is periodic when f0 is a


rational number and can be expressed by
k
f0 
N
where k and N are integers.
IUB Dr. Abdur Razzak 27
Periodic and nonperiodic signals (contd..) ECR305_L1

Consider a signal xn   A sin 2f 0 n   

The signal is to be periodic if

A sin 2f 0 N  n      A sin 2f 0 n   

This relation is true if

2f 0 N  n     2f 0 n     2k


k
which gives 2f 0 N  2k or f0 
N
where k is an integer.
IUB Dr. Abdur Razzak 28
Example-3 ECR305_L1

Solution:

IUB Dr. Abdur Razzak 29


Homework-1 (not for submission) ECR305_L1

Problem 1.2~1.5, 1.9, 1.10

Install MATLAB and start practicing ASAP!

IUB Dr. Abdur Razzak 30


References ECR305_L1

1. John G. Proakis, Digital Signal Processing, Pearson, 4th


Edition, Seventh Impression, 2011. (pp. 1–37)

2. Vinay K. Ingle, and John G. Proakis, Digital Signal


Processing using MATLAB, Thomson Learning
Bookware Companion Series, 2007. (pp. 1–5)

IUB Dr. Abdur Razzak 31


Next class ECR305_L1

Discrete-Time
Signals

IUB Dr. Abdur Razzak 32

You might also like