chapter 8 discrete-time signals and systems

36
EE 422G Notes: Chapter 8 Instructor: Zhang Chapter 8 Discrete-Time Signals and Systems 8-1 Introduction Most “real” signals and natural (physical) processes: continuous – time A : System Design Problem How the computer sees “ the rest”? an equivalent (Physical Process + Sensor +A/D + D/A )=> discrete- time system The Equivalent discrete-time system Modeled by a discrete-time model Page 8-1

Upload: lebao

Post on 03-Feb-2017

229 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

Chapter 8 Discrete-Time Signals and Systems

8-1 Introduction

Most “real” signals and natural (physical) processes: continuous – time

A : System Design Problem

How the computer sees “ the rest”? an equivalent(Physical Process + Sensor +A/D + D/A )=> discrete-time system

The Equivalent discrete-time system Modeled by a discrete-time model

System Design (Design of the computer control Algorithm):Based on discrete-time model description. Needs for discrete-time system analysis and design tool: Z-Transform (Similar position as Laplace Transform for continuous-time system.)

Page 8-1

Page 2: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

B. How does the computer understand the progress and behaviors of the process being monitored and controlled? By sampling the output of the continuous-time system! => How can we ensure that the sampled signal is a sufficient representation of its continuous-time origin. i.e., how fast we have to sample?

A question we must answer before z-transform based analysis!

C. Two basic parts of the chapter Part one : Theoretical frame work for determining how fast we have to sample. Part two : z-transform

Part one: How fast

8.2A Analog-to-Digital Conversion

1. Sample OperationNeeds to Know: (1) Sampling period: T (2) x(t) is sampled at t=nT (3) What do we mean by x(n) (4) Sampling function: p(t)

Page 8-2

Page 3: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

(5) Sampled signal xs = x(t)p(t)

Page 8-3

Page 4: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

2. Mathematical Description of Sampling Process

Sampled signal : xs(t) = x(t)p(t)

Objective: Derivation of xs(t)’s Fourier Series Expression (Time Domain)

Derivation :

Sampling function: A Periodical function, (thus can be expressed using Fourier series), with period T on fundamental frequency

With Fourier series coefficients:

3. Spectrum of sampled signal

Objective: Find the spectrum of the sampled signal xs(t).

Derivation :

Take Fourier Transform for

Page 8-4

Fourier Series Description of Sampling Function

General Equation for any periodical signal

general equation for Fourier coefficient of any periodical signal

general equation: always true for any r (width of the sampling pulse).

For n

Page 5: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

4. Spectral Characteristic of ‘Real Signal’

Most ‘real’ signals: continuous with time Highest frequency fh can be found X(f) = 0 if

5. How ‘sampling process’ modifies the spectrum

Consider a

If

Page 8-5

Modifier

Page 6: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

If

No spectrum modification

6. How fast we have to sample in order to keep the spectrum:

Condition

Should we consider ? Of course not!( implies that the real process changes faster than the sampling rate.)

Consider only => => Answer : Sampling rate: at least twice as the highest frequency of the “original process”

Sampling Theorem: ………….

7. What about if r 0 ? (show Figure 8-4)

8. Practical sampling rate:

8-2B Data Reconstruction

1. What’s Data Reconstruction? Original x(t) t 0 (anytime) Its samples xs(t) t = 0, T, 2T, … (Discrete time)Can we tell x(t) between sampled points ( nT < t < (n+1)T ) based on xs(t)?

Data Reconstruction problem!

Page 8-6

Constant with n

Similar as

Page 7: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

2. Data Reconstruction Method

What’s a filter? A system which processes the input to generate an output. It could be an algorithm (mathematical equation/operation set) or circuit/analog computer, depending on the form of xs(t) (digital number or analogy signal .)

Let’s see how a filter works!

Output

Weighted sum of the ‘should be point x(kT) and its surrounding points

|h(0)| should > h() 0 and |h()| decreases as

What is ? (In addition to being an algorithm)

Let’s see:

or

Consider xs(t)*h(t) :

Reconstruction Filter: with h(t) as impulse response!

Page 8-7

Discrete-time algorithm

a system with impulse response (system parameter) h() and input xs(t)!

The reconstruction algorithm

Page 8: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

Output of the reconstruction Filter (y(t)): Convolution of xs(t) and h() !

3. Design of Reconstruction Filter: Ideal case

Assumption : fs>2fh (xs(t) was generated at a frequency higher than the Nyquist rate).

1/2 fs > fh fh: highest frequency of the original signal

Ideal Filter

Question : why do we need this low-pass filter to reconstruct x(t) from xs(t)?answer : xs(t) contains frequencies higher than , but x(t)does not!

Question : Will any spectrum (other than x(t)’s introduced by sampling operation remains after the filter?

Answer: No. , has ensured that no overlapping between x(t)’s frequencies and the undesired frequencies in xs(t) introduced by sampling!

Implementation of Ideal Reconstruction Filter (Given the Impulse response of the filter) Inverse Fourier transform =>

Characteristic of the Ideal Reconstruction Filter: Non causal! Output at t ( y(t) ) must be generated using xs() > t => Not good for real-time application!

How to reconstruction x(t) from nT < t < nT + T ? Answer :

Page 8-8

Page 9: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

for example t = nT + 0.5T

l points before t = nT + 0.5T (k=n-l+1,…,n) l points after t = nT + 0.5T (k=n+1,…,n+l)

Page 8-9

Page 10: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

Part Two

8-3A The z-Transform

1. DefinitionFor Laplace transform, we are given a function x(t), For z-Transform, we are given a sampling sequence: x(0) , x(T), x(2T), …

Definition: z-transform of a given sequence x(0) , x(T), x(2T), …

is

Why do we define such a transform?

x(t)

If we want to compute this Laplace transform by computer

On the other hand

Relationship between z- and s-planeBasic Relationship :

(1) (note )

l.h.p. (s- plane) inside the unit circle (z- plane)

(2)

s: r.h.p. z: outside the unit circle

(3)

Page 8-10

x(nT): samples of

Page 11: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

s: j axis. z: unit circle

(4) s = 0 ( )

z = 1

2. Basic z-Transform pairs

Example 8-4: z-transform of unit pulse :

Solution :

Example 8-5 z-Transform of unit step sequence u(n):

Page 8-11

Note the difference between and

unbounded bounded

Similar as Laplace transform

Page 12: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

Solution :

How to understand? Step function u(t) :

Does give the same spectrum if T 0 ?

T 0 :

z-Transform gives the same spectrum as Laplace transform if the sampling rate

Example 8-6 : z-transform of unit exponential sequence

Solution:

Is this result reasonable?

Page 8-12

Page 13: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

Why? Because

Example 8-6 B

=>

Summary: Basic z-transform pairs

Would these be sufficient? No!

3. Extended z – transform pairs

Page 8-13

1 1 0

Page 14: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

4. Find z-transform using symbolic tool box

Example 8-7

Solution:

Analysis: (1) n : odd =>

(2) n : even =>

Page 8-14

Page 15: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

Very complex!

Using Symbolic ToolBoxsyms a n z % Declare symbolicxn = a^n*cos(n*pi/2); % Define x(n)xz = ztrans (xn, n, z); % Determine X(z)xz (enter)xz =

z^2/(a^2+z^2)

MatLab: always in terms of z instead of z-1.

8-3B Properties of z - transform

1. Linearity

2. Initial Value why?

3. Final value

Why? But,

Page 8-15

0 24

13

5

Page 16: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

Page 8-16

Page 17: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

8-3C Inverse z-Transform Two Basic Methods:

(1) Express X(z) into “Definition Form”

(very simple, use long division or MatLab: n = 8 X = dimpulse(num,den, n) (enter) gives the first n terms)

(2) Express X(z) into partial-fraction from

partial-fraction each term has an inverse transform expansion

what Terms? 1

What about if you have ?

11 11

11

kzze T

What about if you have ?

What about if you have ?

Let’s see: 21

11

121

1

21

)1(

1)1()1(1

zezBeBAz

zeB

zeAz

ze

T

T

TTT

Can we now find A and B? What is the inverse z-transform of

What to do if you have ?

Page 8-17

Page 18: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

)(11

)(11

21

11

11

21

)1)(1(1

11

11

11112

jzjz

jzjzjzjzz

oddnevenn

jjjz

ZnTxn

nnnn

0 )1(

]1)1[()(21])()[(

21)

11()(

2/

21

Important: before doing partial-fraction expansion, make sure the z-transform is in proper rational function of !

Example 8.9

Solution :

Heaviside’s Expansion Method:

(1) 1

1

1

11

2.01)1(

2.011)()1(

z

zzBA

zzXz

25.18.0

12.01

02.01

1

ABA

(2) 1

1

1

11

2.01)2.01(

1)2.01()()2.01(

z

zBz

zAzXz Bz

zAz

1

1

1 1)2.01(

11

)2.0( 02.01 1

zz 25.04/1)51/(1 B

nnTxzz

zX )2.0(25.025.1)(2.0125.0

125.1)( 11

Example 8-9B MatLab Method

(1) Find partial-fraction expansion

212

2

2.02.111

2.02.1)(

zzzz

zzX

b = 1; a = [1 –1.2 0.2];

Page 8-18

Page 19: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

[r, p, k] = residuez(b,a);

kk

zzpolep

p

zzr

r

11

11

2.0125.0

125.1

2.00.1

2.0125.0

0.1125.1

25.025.1

(2) Directly Find Inverse Transform

syms n, z; % Declare symbolic xz = 1/(1-1.2*z^(-1)+0.2*z^(-2)); % define X(z) xn = iztrans(xz,z,n); % compute x(n) xn xn = 5/4-(1/4)*(1/5)^n x(nT) = 1.25-0.25(0.2)n

Example 8-10

Solution :

Question: Define (or )

any relationship between and ?

21

1

21

121

21

2

22

2

2

2.02.11655

2.02.11)2.11(5)2.02.11(5

2.02.11)2.02.1(2.02.11)(

zzz

zzzzz

zzz

zzzz

zzzY

11

11

1

21

1

2.011

)2.01)(1(65

2.02.1165)(

zB

zA

zzz

zzzzV

25.6

4305

165|)2.01)((

25.18.0

12.0165|)1)((

51

1

51

11

1

11

1

1

1

1

zz

zz

zzzzVB

zzzzVA

Page 8-19

Page 20: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

n = 0 5 + 1.25 - 6.25 = 0 1.25 - 0.25 = 1n = 1 0 + 1.25 - 6.25*0.2 = 0 1.25 - 0.25*0.2 = 1.2n = 2 0 + 1.25 - 6.25*0.22 = 1 1.25 - 0.25*0.22 = 1.24n = 3 0 + 1.25 - 6.25*0.23 =1.2 1.25 - 0.25*0.23 = 1.248

Why? 6.25*0.2*0.2=0.25 =>y(n+2) = x(n)!

Does always imply ))((1 zYZ has two-step-delay than ))((1 zXZ ? Yes!

z-1 : Delay operator! (Must Assume X(nT)(the sequence to be z^(-1) processed)=0 for n<0)

8-3D Delay operator : z-k ( k steps ) ( k > 0 )

0

)(

0

0

0

)(

)(

)())((

)()())((

n

knk

n

knk

n

n

n

n

zkTnTxz

zkTnTxz

zkTnTxkTnTxZ

znTxzXnTxZ

We want to establish the relationship between Z(x(nT-kT)) and Z(x(nT)) !

Let’s see what’s :

(1) ? Yes!

(2)

0

)()(n

knzkTnTx

))((

)(0

)()(

0

)(

)(1

0

)(

0

nTxZ

zkTnTx

zkTnTxzkTnTx

kn

kn

kn

knkn

n

kn

kTnTkn

))((

))(())((

)(behind

stepsk )(

nTxZz

nTxZzkTnTxZ

nTxkTnTx

k

k

Page 8-20

Page 21: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

Question : If , what’s ))2(( TnTxZ ? Answer:

8-4 Difference Equation and Discrete-Time Systems

Continuous-Time System: Differential Equation, Laplace Transform Discrete-Time System: Difference Equation, z-Transform Properties of Continuous-Time SystemsProperties of Discrete-Time Systems

8-4A Properties of Discrete-Time Systems

System : Processes input to generate output

How to process : system-dependent

General symbolic notation for Discrete-Time System:

y( nT ) = H [ x(nT) ]

what does this operator or notation tell us? Processor

1. Shift-Invariant System(Time-Invariant Systems for continuous-time or general)An example of time-varying system

The “processing algorithm” which maps input to output changes!

What do we mean by a time-invariant system?

Shift-invariant systems: Physical: Mathematic:

Assume x(nT): x(0), x(T), … has generated y(nT): y(0), y(T), …

For example:

Page 8-21

Page 22: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

has

If we apply as input look at if

generated

Question: Is this system shift-invariant? Yes! Question: Is this example telling us ? Yes! Question: Is

or always true for different systems?No! only for time-invariant systems!

Shift-invariant system: if true for any n0 .

2. Causal and noncausal systems

Physical Description: A system is causal or nonanticipatory if the system’s response to an input does not depend on future values of the input.

Mathematical Description:

Causal system: Why? Although x1(nT) may not be the same as x2(nT) for n > n0 , such difference does not affect the output determined by input up to n = n0 .

3. Linear System

Page 8-22

What about for n > n0 ?

Page 23: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

Linear System Linear Systems: can be modeled as

or

response of the shift-invariant linear system at t=kT to an impulse input applied at t=0. (Or the response at to an impulse input applied at ) Causal systems:

Linear+causal+

Example:

Given x(0) = 1, x(T) = 2, x(2T) = 2, x(3T) = 1, … h(0) = 3, h(T) = 2, h(2T) = 1, h(3T) = 0, … MatLab: x = [1 2 2 1 1]; h = [3 2 1]; y = conv(x,h); y

3 8 11 9 7 3 1Example 8-13:

Can you write a program (algorithm) to calculate y(nT) = x(nT)*h(nT) ?Example 8-13: Symbolic Tool Box

syms n z % Declare Symbolicxn =(1/2)^n % x(n)hn = (1/3)^n % h(n) xz = ztrans(xn, n, z) % z-transform of x(n)hz = ztrans(hn, n, z) % z-transform of h(n)yz = xz*hz % multiply, not convolutionyn = iztrans (yz, z, n); % Do you know why?

Page 8-23

Convolution

Page 24: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

yn (enter)yn = 3*(1/2)^n-2*(1/3)^n % y(nT)=3(1/2)n – 2(1/3)n

* Analytic solution of convolution

i.e.

Example:

Find x(nT)*h(nT)Solution:

4. Stable system

Page 8-24

n<kn-k<0

Page 25: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

Consider linear shift-invariant systems only.

Definition of BIBO stable:for all bounded x(nT).

Derivation of Criterion

x(kT) bounded =>

Criterion:

How to use this criterion: Ah: h(0), h(1), … h(N), 0, 0, …

(causal)

causal + Limited N => stable

Why!

for any fixed n in ,

for example,

Page 8-25

Limited number of terms

Page 26: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

In general

Conclusion: limited terms of h => stable!

Example : stable?

What about ?

How to use this criterion: B If we know

Z(h(nT)) = H(z)

h(0) h(1) h(2)

Why? |0.2| < 1 !

What about

Not BIBO stable!

In general, deg(num) < deg(den)

(poles inside the unit circle!)

Page 8-26

Limited Terms

Page 27: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

Example 8-14:

Solution:

Stable

8-4B Difference Equations

1. Difference Equations

Problem: determine the output of the system at the present time : t = nT y(nT)

What information to use:(1) input: current input u(nT)

previous input u(kT) (k < n) future input u(kT) (k > n)causal system : no future input!Previous input

We do not need all of them use u(n-1), … , u(n-m)(2) output: previous output (its history): y(kT) (k < n) ? Yes.

future output y(kT) (k >n) ? No, no future output

previous outputs We do not need all of them! y(n-1), …. , y(n-r) would be sufficient!

Mathematical Equation

y(nT) : depends on

linear system

weights: Larger weight: more important in determining y(nT)

Page 8-27

Difference Equation

Page 28: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

Would the weights be the same? No! (r, m): system’s order

different systems: different order and weights (parameters)

2. z-transfer function

Different Equation

z-transform =>

z-transfer functionY(z) = H(z)X(z)

Why H(z) is the z-transform of impulse response h(nT) ?

8-4C Steady-State Frequency Response of a Linear Discrete-Time System

x(t)’s spectrum x(nT)’s spectrum

y(t)’s spectrum y(nT)’s spectrum

System’s frequency response

What is Y(z)/X(z) ? H(z) = Y(z)/X(z)

Page 8-28

Page 29: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

System frequency response

Page 8-29

Page 30: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

Property of frequency response T: sampling period

: sampling frequency

Frequency Response H: periodic function with period when the frequency increase by , the system’s frequency

response does not change.

Example: Input 1: T = 1 secondInput 2 : Generate the same output amplitude?

Normalized Frequency : frequency period

Frequency Response in terms of r (argument)

Amplitude Response or Phase Response or

Question: what are their physical meaning?

Example 8-15: y(nT) = x(nT) + x(nT-2T)Solution :

Page 8-30

Page 31: Chapter 8 Discrete-Time Signals and Systems

EE 422G Notes: Chapter 8 Instructor: Zhang

Comment: z-transform: good for analysis difference equation: computer program

Page 8-31