adsp lec 02

Post on 21-Jul-2016

223 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

Advanced Digital Signal Processing

TRANSCRIPT

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

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;

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;

9/27/2011

4

x[n] via impulse functions

9/27/2011

5

Input: sum of weighted shifted impulses

Time Domain Analysis

9/27/2011

6

Linear Time-Invariant Systems

Linear

9/27/2011

7

Linear Time-Invariant Systems Linear Time-Invariant System

9/27/2011

8

Linear Time-Invariant System

Input: sum of weighted shifted impulses

9/27/2011

9

Using Linearity and Time-Invariance for the impulses

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

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]

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

9/27/2011

12

Example..(Continued)

Example-Convolution Of Two Sequences

9/27/2011

13

Stability

9/27/2011

14

Causality

Causality & Stability- Example

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

9/27/2011

16

Linear Constant-Coefficient Difference(LCCD) Equations

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

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:

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)

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.

9/27/2011

20

LTI summary

Complex Exp Input Signal

9/27/2011

21

The Frequency Response

Delay and First Difference

9/27/2011

22

More on the Ideal Delay

Discrete Time Fourier Transform

9/27/2011

23

Properties

Properties…(cont)

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

9/27/2011

25

DTFT- Sinusoids

DTFT of Unit Impulse

9/27/2011

26

Ideal Lowpass Filter

Example

9/27/2011

27

Magnitude and Angle Form

Magnitude and Angle Plot

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

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)

9/27/2011

30

Useful DTFT Pairs

Convolution Theorem

9/27/2011

31

Linear Phase… ( cont.)

9/27/2011

32

Frequency Response of DE

Matlab

9/27/2011

33

Example

Ideal Filters

9/27/2011

34

Ideal Filters

HP Digital Filter from LP Design

9/27/2011

35

BP Digital Filter from HP & LP

Ideal Lowpass Filter

9/27/2011

36

h[n] of ideal filter

Approximations

9/27/2011

37

Freq Axis

Inverse System

top related