EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent...

27
EEE413 Digital Signal Processing (Fall 2015) 1 EE EE E E 413 413 Digital Signal Processing Digital Signal Processing Instructor: Instructor: Levent Eren Levent Eren Dept. of Electrical and Dept. of Electrical and Electronics Electronics Engineering Engineering İzmir İzmir University of University of Economics Economics Office Hours: Tuesday 14-16 Wednesday 13-15 homes homes . . ieu ieu .edu .edu .tr .tr / / leren leren / / eee413 eee413 Some of the lecture notes are obtained Some of the lecture notes are obtained from from Güner Arslan’s Website Güner Arslan’s Website

Transcript of EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent...

Page 1: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

EEE413 Digital Signal Processing (Fall 2015) 1

EEEEEE 413413Digital Signal ProcessingDigital Signal Processing

Instructor: Instructor: Levent ErenLevent Eren

Dept. of Electrical and Dept. of Electrical and ElectronicsElectronics Engineering Engineering

İzmir İzmir University of University of EconomicsEconomicsOffice Hours: Tuesday 14-16

Wednesday 13-15

homeshomes..ieuieu.edu.edu.tr.tr//lerenleren//eee413eee413

Some of the lecture notes are obtained from Some of the lecture notes are obtained from

Güner Arslan’s WebsiteGüner Arslan’s Website

Page 2: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

EEE413 Digital Signal Processing (Fall 2015) 2

Course Details

• Objective– Establish a background in Digital Signal Processing Theory

• Required Text– Discrete-Time Signal Processing, – Pearson International Edition, Upper Saddle River, NJ 07458, 2010,

ISBN 9780132067096. Prentice Hall, 3rd Edition– A. V. Oppenheim, R. W. Schafer,

• Grading– Midterm: 20%– Lab: 30%– Quizzes (2) 20%– Homework: 10%– Final: 20%

Page 3: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

EEE413 Digital Signal Processing (Fall 2015) 3

Useful References• Text Books

– DSP First A Multimedia Approach• James McClellan, Ronald Schafer, Mark Yoder

– Digital Signal Processing, A Computer Science Perspective • Jonathan Stein

– A Course in Digital Signal Processing• Boaz Porat

• Web Sites– Matlab Tutorial

• http://www.utexas.edu/cc/math/tutorials/matlab6/matlab6.html

Page 4: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

EEE413 Digital Signal Processing (Fall 2015) 4

DSP is Everywhere• Sound applications

– Compression, enhancement, special effects, synthesis, recognition, echo cancellation,…

– Cell Phones, MP3 Players, Movies, Dictation, Text-to-speech,…• Communication

– Modulation, coding, detection, equalization, echo cancellation,…– Cell Phones, dial-up modem, DSL modem, Satellite Receiver,…

• Automotive– ABS, GPS, Active Noise Cancellation, Cruise Control, Parking,…

• Medical– Magnetic Resonance, Tomography, Electrocardiogram,…

• Military– Radar, Sonar, Space photographs, remote sensing,…

• Image and Video Applications– DVD, JPEG, Movie special effects, video conferencing,…

• Mechanical– Motor control, process control, oil and mineral prospecting,…

Page 5: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

EEE413 Digital Signal Processing (Fall 2015) 5

Course Outline• Introduction to Digital Signal Processing• Sampling of Continuous-Time Signals

– Periodic (Uniform) Sampling (4.1)– Frequency-Domain Representation of Sampling (4.2)

• Discrete-Time Signals and System– Discrete-Time Signals: Sequences (2.1)– Discrete-Time Systems (2.2)– Linear Time-Invariant Systems (2.3)– Properties of Linear Time-Invariant Systems (2.4)– Linear Constant-Coefficient Difference Equations (2.5)– Freq. Domain Representation of Discrete-Time Signals (2.6)– Representation of Sequences by Fourier Transforms (2.7)– Symmetry Properties of the Fourier Transform (2.8)– Fourier Transform Theorems (2.9)– Reconstruction of a Bandlimited Signal from Its Samples (4.3)

Page 6: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

EEE413 Digital Signal Processing (Fall 2015) 6

Course Outline• The Z-Transform

– Z-Transform (3.1)– Properties of the Region of Convergence of the z-Transform (3.2)– The Inverse Z-Transform (3.3)– Z-Transform Properties (3.4)

• Transform Analysis of Linear Time-Invariant Systems– The Frequency Response of LTI Systems (5.1)– Constant-Coefficient Difference Equations (5.2)– Frequency Response for Rational System Functions (5.3)– Relationship between Magnitude and Phase (5.4)– All-Pass Systems (5.5)– Minimum-Phase Systems (5.6)

• Filter Design Techniques– Design of Discrete-Time IIR Filters from Continuous-Time Filters

(7.1)– Design of FIR Filters by Windowing (7.2)– Optimum Approximation of FIR Filters (7.4)

Page 7: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

EEE413 Digital Signal Processing (Fall 2015) 7

Course Outline• Structures for Discrete-Time Systems

– Block Diagram Representation (6.1)– Signal Flow Graph Representation (6.2)– Basic Structures for IIR Systems (6.3)– Transposed Forms (6.4)– Basic Structures for FIR Systems (6.5)– Finite Precision Numerical Effects (6.6)– Effects of Coefficient Quantization (6.7)– Effects of Round-Off Noise in Digital Filters (6.8)

• The Discrete-Fourier Transform– Discrete Fourier Series (8.1)– Properties of the Discrete Fourier Series (8.2)– The Fourier Transform of Periodic Signals (8.3)– Sampling the Fourier Transform (8.4)– The Discrete Fourier Transform (8.5)– Properties of the DFT (8.6)

• Computation of the Discrete-Fourier Transform

Page 8: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

EEE413 Digital Signal Processing (Fall 2015) 8

Signal Processing• Humans are the most advanced signal processors

– speech and pattern recognition, speech synthesis,…

• We encounter many types of signals in various applications– Electrical signals: voltage, current, magnetic and electric fields,…– Mechanical signals: velocity, force, displacement,…– Acoustic signals: sound, vibration,…– Other signals: pressure, temperature,…

• Most real-world signals are analog– They are continuous in time and amplitude– Convert to voltage or currents using sensors and transducers

• Analog circuits process these signals using– Resistors, Capacitors, Inductors, Amplifiers,…

• Analog signal processing examples– Audio processing in FM radios– Video processing in traditional TV sets

Page 9: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

EEE413 Digital Signal Processing (Fall 2015) 9

Limitations of Analog Signal Processing• Accuracy limitations due to

– Component tolerances– Undesired nonlinearities

• Limited repeatability due to– Tolerances– Changes in environmental conditions

• Temperature• Vibration

• Sensitivity to electrical noise• Limited dynamic range for voltage and currents• Inflexibility to changes • Difficulty of implementing certain operations

– Nonlinear operations– Time-varying operations

• Difficulty of storing information

Page 10: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

EEE413 Digital Signal Processing (Fall 2015) 10

Digital Signal Processing• Represent signals by a sequence of numbers

– Sampling or analog-to-digital conversions

• Perform processing on these numbers with a digital processor– Digital signal processing

• Reconstruct analog signal from processed numbers– Reconstruction or digital-to-analog conversion

A/D DSP D/Aanalogsignal

analogsignal

digital signal

digital signal

• Analog input – analog output – Digital recording of music

• Analog input – digital output– Touch tone phone dialing

• Digital input – analog output– Text to speech

• Digital input – digital output– Compression of a file on computer

Page 11: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

11

Fundamental concepts in DSP

• DSP applications deal with analogue signals– the analogue signal has to be converted to

digital form

A/D

A/D

D/A

D/A

(Signal

Processing

Algorithm)

DSPI

Q

Anti-alias.Filter

Anti-alias.Filter

F

R

Anti-

Filter

Anti-

Filter

Reconst.&

Reconst.&

image

image

Page 12: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

A typical biomedical measurement system

12

Page 13: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

Transducers

• A “transducer” is a device that converts energy from one form to another.

• In signal processing applications, the purpose of energy conversion is to transfer information, not to transform energy.

• In physiological measurement systems, transducers may be – input transducers (or sensors)

• they convert a non-electrical energy into an electrical signal.• for example, a microphone.

– output transducers (or actuators) • they convert an electrical signal into a non-electrical energy.• For example, a speaker.

13

Page 14: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

14

• The analogue signal – a continuous variable defined with infinite precision

is converted to a discrete sequence of measured values which are represented digitally

• Information is lost in converting from analogue to digital, due to:– inaccuracies in the measurement – uncertainty in timing – limits on the duration of the measurement

• These effects are called quantisation errors

Page 15: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

• ADC consists of four steps to digitize an analog signal:1. Filtering2. Sampling3. Quantization4. Binary encoding

Before we sample, we have to filter the signal to limit the maximum frequency of the signal as it affects the sampling rate.

Filtering should ensure that we do not distort the signal, ie remove high frequency components that affect the signal shape.

Analog-to Digital Conversion

15

Page 16: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

Signal Encoding: Analog-to Digital Conversion

0 2 4 6 8 100

2

4

6

8

10

Time (sec)

x(t)

0 2 4 6 8 100

1

2

3

4

5

6

7

8

9

10

Sample Number

x(t)

an

d x

(n)

0 2 4 6 8 100

2

4

6

8

10

Sample Number

x(n

)

Digitization

Continuous

Discrete

Continuous (analog) signal ↔ Discrete signal

x(t) = f(t) ↔ Analog to digital conversion ↔ x(n) = x(1), x(2), x(3), ... x(n)

16

Page 17: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

17

Page 18: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

18

Sampling

• The sampling results in a discrete set of digital numbers that represent measurements of the signal – usually taken at equal intervals of time

• Sampling takes place after the hold– The hold circuit must be fast enough that the

signal is not changing during the time the circuit is acquiring the signal value

• We don't know what we don't measure• In the process of measuring the signal, some

information is lost

Page 19: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

• Analog signal is sampled every TS secs.• Ts is referred to as the sampling interval. • fs = 1/Ts is called the sampling rate or sampling

frequency.• There are 3 sampling methods:

– Ideal - an impulse at each sampling instant– Natural - a pulse of short width with varying

amplitude– Flattop - sample and hold, like natural but with single

amplitude value• The process is referred to as pulse amplitude

modulation PAM and the outcome is a signal with analog (non integer) values

Sampling

19

Page 20: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

20

Page 21: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

Recovery of a sampled sine wave for different sampling rates

21

Page 22: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

22

Page 23: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

23

Page 24: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

24

Page 25: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

25

Page 26: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

According to the Nyquist theorem, the sampling rate must be at least 2 times the highest frequency contained in the signal.

26

Sampling Theorem

Fs 2fm

Page 27: EEE413 Digital Signal Processing (Fall 2015) 1 EEE 413 Digital Signal Processing Instructor: Levent Eren Dept. of Electrical and Electronics Engineering.

EEE413 Digital Signal Processing (Fall 2015) 27

Pros and Cons of Digital Signal Processing• Pros

– Accuracy can be controlled by choosing word length– Repeatable– Sensitivity to electrical noise is minimal– Dynamic range can be controlled using floating point numbers– Flexibility can be achieved with software implementations– Non-linear and time-varying operations are easier to implement – Digital storage is cheap– Digital information can be encrypted for security– Price/performance and reduced time-to-market

• Cons– Sampling causes loss of information– A/D and D/A requires mixed-signal hardware– Limited speed of processors– Quantization and round-off errors