adsp lec 02

37
9/27/2011 1 Dr. Tahir Zaidi Advanced Digital Signal Processing Lecture 2 Signal Representation and Time Domain Analysis Basic Types of Digital Signals Basic Types of Digital Signals

Upload: anum-tauqir

Post on 21-Jul-2016

223 views

Category:

Documents


0 download

DESCRIPTION

Advanced Digital Signal Processing

TRANSCRIPT

Page 1: ADSP Lec 02

9/27/2011

1

Dr. Tahir Zaidi

Advanced Digital Signal Processing

Lecture 2

Signal Representation and Time Domain Analysis

Basic Types of Digital Signals Basic Types of Digital Signals

Page 2: ADSP Lec 02

9/27/2011

2

Basic Types of Digital Signals

Sine and Exp Using Matlab

% sine generation: A*sin(omega*n+theta)

% exponential generation: A^n

n = 0: 1: 50;

% amplitude

A = 0.87;

% phase

theta = 0.4;

% frequency

omega = 2*pi / 20;

% sin generation

xn1 = A*sin(omega*n+theta);

% exp generation

xn2 = A.^n;

Page 3: ADSP Lec 02

9/27/2011

3

Basic Operations

Operations in Matlab

xn1 = [1 0 3 2 -1 0 0 0 0 0];

xn2 = [1 3 -1 1 0 0 1 2 0 0];

yn = xn1 + xn2;

Page 4: ADSP Lec 02

9/27/2011

4

x[n] via impulse functions

Page 5: ADSP Lec 02

9/27/2011

5

Input: sum of weighted shifted impulses

Time Domain Analysis

Page 6: ADSP Lec 02

9/27/2011

6

Linear Time-Invariant Systems

Linear

Page 7: ADSP Lec 02

9/27/2011

7

Linear Time-Invariant Systems Linear Time-Invariant System

Page 8: ADSP Lec 02

9/27/2011

8

Linear Time-Invariant System

Input: sum of weighted shifted impulses

Page 9: ADSP Lec 02

9/27/2011

9

Using Linearity and Time-Invariance for the impulses

Sum of wt. Shifted impulses – sum of wt. Shifted impulse responses

Page 10: ADSP Lec 02

9/27/2011

10

LTI System

Two ways

As the representation of the output as a sum of delayed and scaled impulse responses.

As a computational formula for computing y[n] (“y at time n”) from the entire sequences x and h.

Form x[k]h[n-k] for -∞<k<+∞ for a fixed n

Sum over all k to produce y[n]

Page 11: ADSP Lec 02

9/27/2011

11

Convolution in the time domain: [ ] [ ] [ ]k

y n x k h n k

y[n] = 2 –3 3 3 –6 0 1 0 0

Example-Convolution of Two Rectangles

Page 12: ADSP Lec 02

9/27/2011

12

Example..(Continued)

Example-Convolution Of Two Sequences

Page 13: ADSP Lec 02

9/27/2011

13

Stability

Page 14: ADSP Lec 02

9/27/2011

14

Causality

Causality & Stability- Example

Page 15: ADSP Lec 02

9/27/2011

15

Difference Equation

For all computationally realizable LTI systems, the input and output satisfy a difference equation of the form

This leads to the recurrence formula

which can be used to compute the “present” output from the present and M past values of the input and N past values of the output

Page 16: ADSP Lec 02

9/27/2011

16

Linear Constant-Coefficient Difference(LCCD) Equations

Linear Constant-Coefficient Difference (LCCD) Equations…( Continued)

Page 17: ADSP Lec 02

9/27/2011

17

Linear Constant-Coefficient Difference (LCCD) Equations….( Continued)

First-Order Example

Consider the difference equation

y[n] =ay[n−1] +x[n]

We can represent this system by the following block diagram:

Page 18: ADSP Lec 02

9/27/2011

18

Exponential Impulse Response

With initial rest conditions, the difference Equation has impulse response

y[n] =ay[n−1] +x[n]

h[n] =anu[n]

Linear Constant-Coefficient Difference (LCCD) Equations….( Continued)

Page 19: ADSP Lec 02

9/27/2011

19

Digital Filter

Y = FILTER(B,A,X)

filters the data in vector X with the filter described by

vectors A and B to create the filtered data Y. The filter

is a "Direct Form II Transposed" implementation of the

standard difference equation:

a(1)*y(n) = b(1)*x(n) + b(2)*x(n-1) + ... +

b(nb+1)*x(n-nb) - a(2)*y(n-1) - ... - a(na+1)*y(n-na)

[Y,Zf] = FILTER(B,A,X,Zi)

gives access to initial and final conditions, Zi and Zf, of

the delays.

Page 20: ADSP Lec 02

9/27/2011

20

LTI summary

Complex Exp Input Signal

Page 21: ADSP Lec 02

9/27/2011

21

The Frequency Response

Delay and First Difference

Page 22: ADSP Lec 02

9/27/2011

22

More on the Ideal Delay

Discrete Time Fourier Transform

Page 23: ADSP Lec 02

9/27/2011

23

Properties

Properties…(cont)

Page 24: ADSP Lec 02

9/27/2011

24

Symmetric Properties

DTFT Properties:

x[n] X(e j )

x*[n] X*(e j )

x[n] x[n] X(e j ) X(e j )

even even

x[n] x[n] X(e j ) X(e j )

odd odd

x[n] x*[n] X(e j ) X*(e j )

real Hermitian symmetric

Consequences of Hermitian Symmetry

If

then

And

X(e j ) X*(e j )

Re[X(e j )] is even

Im[X(e j )] is odd

X(e j ) is even

X(e j ) is odd

If x[n] is real and even, X(e j ) will be real and even

and if x[n] is real and odd, X(e j ) will be imaginary and odd

Page 25: ADSP Lec 02

9/27/2011

25

DTFT- Sinusoids

DTFT of Unit Impulse

Page 26: ADSP Lec 02

9/27/2011

26

Ideal Lowpass Filter

Example

Page 27: ADSP Lec 02

9/27/2011

27

Magnitude and Angle Form

Magnitude and Angle Plot

Page 28: ADSP Lec 02

9/27/2011

28

Example

Real and Even ( Zero Phase)

Consider an LTI system with an even unit sample response

DTFT is

e 2 j + 2 e

j + 3 + 2 e j + e

2 j

2 cos( 2 ) + 4 cos( ) + 3

Page 29: ADSP Lec 02

9/27/2011

29

Real & Even (Zero Phase)

Frequency response is real, so system has “zero” phase shift

This is to be expected since unit sample response is real and even.

Linear Phase

H(z) e2 j + 2e j + 3+3e j + e2 j

e2 j (e2 j + 2e j + 3+2e j + e2 j )

e2 j (2cos(2 )+ 4cos( )+3)

Page 30: ADSP Lec 02

9/27/2011

30

Useful DTFT Pairs

Convolution Theorem

Page 31: ADSP Lec 02

9/27/2011

31

Linear Phase… ( cont.)

Page 32: ADSP Lec 02

9/27/2011

32

Frequency Response of DE

Matlab

Page 33: ADSP Lec 02

9/27/2011

33

Example

Ideal Filters

Page 34: ADSP Lec 02

9/27/2011

34

Ideal Filters

HP Digital Filter from LP Design

Page 35: ADSP Lec 02

9/27/2011

35

BP Digital Filter from HP & LP

Ideal Lowpass Filter

Page 36: ADSP Lec 02

9/27/2011

36

h[n] of ideal filter

Approximations

Page 37: ADSP Lec 02

9/27/2011

37

Freq Axis

Inverse System