discrete systems & z-transforms · f(t) cne 0 f t e dt t c t t jn t n / 2 / 2 ( ) 0 1 f t dt t...

46
1 Discrete Systems & Z-Transforms © 2014 School of Information Technology and Electrical Engineering at The University of Queensland http://elec3004.org Lecture Schedule: Week Date Lecture Title 1 2-Mar Introduction 3-Mar Systems Overview 2 9-Mar Signals as Vectors & Systems as Maps 10-Mar [Signals] 3 16-Mar Sampling & Data Acquisition & Antialiasing Filters 17-Mar [Sampling] 4 23-Mar System Analysis & Convolution 24-Mar [Convolution & FT] 5 30-Mar Discrete Systems & Z-Transforms 31-Mar [Z-Transforms] 6 13-Apr Frequency Response & Filter Analysis 14-Apr [Filters] 7 20-Apr Digital Filters 21-Apr [Digital Filters] 8 27-Apr Introduction to Digital Control 28-Apr [Feedback] 9 4-May Digital Control Design 5-May [Digitial Control] 10 11-May Stability of Digital Systems 12-May [Stability] 11 18-May State-Space 19-May Controllability & Observability 12 25-May PID Control & System Identification 26-May Digitial Control System Hardware 13 31-May Applications in Industry & Information Theory & Communications 2-Jun Summary and Course Review 30 March 2015 - ELEC 3004: Systems 2

Upload: others

Post on 24-Aug-2020

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

1

Discrete Systems & Z-Transforms

© 2014 School of Information Technology and Electrical Engineering at The University of Queensland

TexPoint fonts used in EMF.

Read the TexPoint manual before you delete this box.: AAAAA

http://elec3004.org

Lecture Schedule: Week Date Lecture Title

1 2-Mar Introduction

3-Mar Systems Overview

2 9-Mar Signals as Vectors & Systems as Maps

10-Mar [Signals]

3 16-Mar Sampling & Data Acquisition & Antialiasing Filters

17-Mar [Sampling]

4 23-Mar System Analysis & Convolution

24-Mar [Convolution & FT]

5 30-Mar Discrete Systems & Z-Transforms 31-Mar [Z-Transforms]

6 13-Apr Frequency Response & Filter Analysis

14-Apr [Filters]

7 20-Apr Digital Filters

21-Apr [Digital Filters]

8 27-Apr Introduction to Digital Control

28-Apr [Feedback]

9 4-May Digital Control Design

5-May [Digitial Control]

10 11-May Stability of Digital Systems

12-May [Stability]

11 18-May State-Space

19-May Controllability & Observability

12 25-May PID Control & System Identification

26-May Digitial Control System Hardware

13 31-May Applications in Industry & Information Theory & Communications

2-Jun Summary and Course Review

30 March 2015 - ELEC 3004: Systems 2

Page 2: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

2

Convolution ℱ: Fourier Series

(Periodic functions)

ℒ ℱ: (𝜉 = 𝜎 + 𝑖𝜏)

(ℝ ℂ) ℂ: Poles & Zeros DFFT Z-Transform

Lecture Overview

ODE

ℒ: Laplace (s)

Transfer functions

Cascade of LCC ODE

Convolution

Z-Transform

• Course So Far:

• Lecture(s):

30 March 2015 - ELEC 3004: Systems 3

For c(τ)= :

1. Keep the function f (τ) fixed

2. Flip (invert) the function g(τ) about the vertical axis (τ=0)

= this is g(-τ)

3. Shift this frame (g(-τ)) along τ (horizontal axis) by t0.

= this is g(t0 -τ)

For c(t0):

4. c(t0) = the area under the product of f (τ) and g(t0 -τ)

5. Repeat this procedure, shifting the frame by different values

(positive and negative) to obtain c(t) for all values of t.

Graphical Understanding of Convolution

30 March 2015 - ELEC 3004: Systems 4

Page 3: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

3

Graphical Understanding of Convolution (Ex)

30 March 2015 - ELEC 3004: Systems 5

Complex Numbers and Phasors

Y

X

Re j

R

Rcos( )

Rsin( )

Re ( cos , sin )

cos sin

(cos sin )

j R R

R jR

R j

Positive Frequency

component

30 March 2015 - ELEC 3004: Systems 6

Page 4: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

4

Complex Numbers and Phasors

Y

X

Re j

R

R cos( )

Rsin( )

Re ( cos( ), sin( ))

cos( ) sin( )

(cos sin )

j R R

R jR

R j

Negative frequency

component

30 March 2015 - ELEC 3004: Systems 7

Positive and Negative Frequencies • Frequency is the derivative of phase

more nuanced than : 1

𝜏= 𝑟𝑒𝑝𝑒𝑡𝑖𝑡𝑖𝑜𝑛 𝑟𝑎𝑡𝑒

• Hence both positive and negative frequencies are possible.

• Compare – velocity vs speed

– frequency vs repetition rate

30 March 2015 - ELEC 3004: Systems 8

Page 5: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

5

• Q: What is negative frequency?

• A: A mathematical convenience

• Trigonometrical FS – periodic signal is made up from

– sum 0 to of sine and cosines ‘harmonics’

• Complex Fourier Series & the Fourier Transform – use exp(jωt) instead of cos(ωt) and sin(ωt)

– signal is sum from 0 to of exp(jωt)

– same as sum - to of exp(-jωt)

– which is more compact (i.e., less chalk!)

Negative Frequency

30 March 2015 - ELEC 3004: Systems 9

Rotating wheel and peg

Top

View

Front

View

Need both top and front

view to determine rotation

Another way to see Aliasing Too!

30 March 2015 - ELEC 3004: Systems 10

Page 6: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

6

Frequency Response

Fourier Series Fourier Transforms

30 March 2015 - ELEC 3004: Systems 11

Typical Linear Processors • Convolution h(n,k)=h(n-k)

• Cross Correlation h(n,k)=h(n+k)

• Auto Correlation h(n,k)=x(k-n)

• Cosine Transform h(n,k)=

• Sine Transform h(n,k)=

• Fourier Transform h(n,k)=

cos2

Nnk

sin2

Nnk

exp jN

nk2

30 March 2015 - ELEC 3004: Systems 12

Page 7: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

7

• Signal measured (or known) as a function of an independent

variable – e.g., time: y = f(t)

• However, this independent variable may not be the most

appropriate/informative – e.g., frequency: Y = f(w)

• Therefore, need to transform from one domain to the other – e.g., time frequency

– As used by the human ear (and eye)

Transform Analysis

Signal processing uses Fourier, Laplace, & z transforms etc

30 March 2015 - ELEC 3004: Systems 13

Sinusoids and Linear Systems

If

or

x t A t( ) cos( ) 0 0

x n A nt( ) cos( ) 0 0

then in steady state

h(t) or h(n)

x(t) or x(n) y(t) or y(n)

y t AC t( ) ( )cos( ( )) 0 0 0 0

y n AC T nt T( ) ( )cos( ( )) 0 0 0 0

30 March 2015 - ELEC 3004: Systems 14

Page 8: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

8

• The pair of numbers C(ω0) and q(ω0) are the complex gain of

the system at the frequency ω0 .

• They are respectively, the magnitude response and the phase

response at the frequency ω0 .

Sinusoids and Linear Systems

y t AC t( ) ( )cos( ( )) 0 0 0 0

y n AC T nt T( ) ( )cos( ( )) 0 0 0 0

30 March 2015 - ELEC 3004: Systems 15

• Why probe system with sinusoids?

• Sinusoids are eigenfunctions of linear systems???

• What the hell does that mean?

• Sinusoid in implies sinusoid out

• Only need to know phase and magnitude (two parameters) to

fully describe output rather than whole waveform – sine + sine = sine

– derivative of sine = sine (phase shifted - cos)

– integral of sine = sine (-cos)

• Sinusoids maintain orthogonality after sampling (not true of

most orthogonal sets)

Why Use Sinusoids?

30 March 2015 - ELEC 3004: Systems 16

Page 9: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

9

Frequency Response

Fourier Series Fourier Transforms

30 March 2015 - ELEC 3004: Systems 17

Fourier Series

• Deal with continuous-time periodic signals.

• Discrete frequency spectra.

A Periodic Signal

T 2T 3T

t

f(t)

Source: URI ELE436

30 March 2015 - ELEC 3004: Systems 18

Page 10: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

10

Two Forms for Fourier Series

T

ntb

T

nta

atf

n

n

n

n

2sin

2cos

2)(

11

0Sinusoidal

Form

Complex

Form:

n

tjn

nectf 0)( dtetfT

cT

T

tjn

n

2/

2/

0)(1

dttfT

aT

T2/

2/0 )(

2tdtntf

Ta

T

Tn 0

2/

2/cos)(

2

tdtntfT

bT

Tn 0

2/

2/sin)(

2

Source: URI ELE436

30 March 2015 - ELEC 3004: Systems 19

• Any finite power, periodic, signal x(t) – period T

• can be represented as () summation of – sine and cosine waves

• Called: Trigonometrical Fourier Series

Fourier Series

00 0

1

( ) cos( ) sin( )2

n n

n

Ax t A n t B n t

• Fundamental frequency ω0=2/T rad/s or 1/T Hz

• DC (average) value A0 /2

30 March 2015 - ELEC 3004: Systems 20

Page 11: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

11

0 1 2 3 4 5 6 -2

-1

0

1

2

time (t)

y =

f(t

)

0 1 2 3 4 5 6 7 8 0

0.5

1

1.5

frequency (f)

Am

plit

ude

Frequency representation (spectrum) shows signal contains:

• 2Hz and 5Hz components (sinewaves) of equal amplitude

30 March 2015 - ELEC 3004: Systems 21

• An & Bn calculated from the signal, x(t) – called: Fourier coefficients

Fourier Series Coefficients

,3,2,1)sin()(2

,2,1,0)cos()(2

2/

2/

0

2/

2/

0

ndttnwtxT

B

ndttnwtxT

A

T

T

n

T

T

n

Note: Limits of integration can vary,

provided they cover one period

30 March 2015 - ELEC 3004: Systems 22

Page 12: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

12

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 -1.5

-1

-0.5

0

0.5

1

1.5

time (s)

signal (black), approximation (red) and harmonic (green)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 -1.5

-1

-0.5

0

0.5

1

1.5

time (s)

harm

onic

30 March 2015 - ELEC 3004: Systems 23

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 -1.5

-1

-0.5

0

0.5

1

1.5

time (s)

signal (black), approximation (red) and harmonic (green)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 -1.5

-1

-0.5

0

0.5

1

1.5

time (s)

harm

onic

30 March 2015 - ELEC 3004: Systems 24

Page 13: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

13

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 -1.5

-1

-0.5

0

0.5

1

1.5

time (s)

signal (black), approximation (red) and harmonic (green)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 -1.5

-1

-0.5

0

0.5

1

1.5

time (s)

harm

onic

30 March 2015 - ELEC 3004: Systems 25

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 -1.5

-1

-0.5

0

0.5

1

1.5

time (s)

signal (black), approximation (red) and harmonic (green)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 -1.5

-1

-0.5

0

0.5

1

1.5

time (s)

harm

onic

30 March 2015 - ELEC 3004: Systems 26

Page 14: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

14

Example: Square wave

))cos(1(2

cos11coscoscos

)sin()sin()sin()(

0sinsin

)cos()cos()cos()(

).2(

;21,1

;10,1

)(

2

1

1

0

2

1

1

0

2

0

2

1

1

0

2

1

1

0

2

0

nn

B

n

n

nnn

n

n

tn

n

tnB

dttndttndttntxB

n

tn

n

tnA

dttndttndttntxA

tx

t

t

tx

n

n

n

n

n

periodic! i.e., x(t + 2) = x(t)

No cos terms as sin(n) = 0 n

x(t) has odd symmetry

Sin terms only

cos(2n) = 1 n

30 March 2015 - ELEC 3004: Systems 28

Example: Square wave

etc

harmonic)(fifth )5sin(5

4

harmonic)(fourth 0

harmonic) (third)3sin(3

4

harmonic) (second0

al)(fundament)sin(4

x(t)

gives, terms theExpanding

)sin())cos(1(2

)(

is, seriesFourier ricTrigonomet Therefore,

1

t

t

t

tnnn

txn

• Only odd harmonics;

• In proportion

1,1/3,1/5,1/7,…

• Higher harmonics

contribute less;

• Therefore, converges

30 March 2015 - ELEC 3004: Systems 29

Page 15: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

15

How to Deal with Aperiodic Signal?

A Periodic Signal

T

t

f(t)

If T, what happens? Source: URI ELE436

30 March 2015 - ELEC 3004: Systems 30

tjn

n

nT ectf 0)(

Fourier Integral

n

tjnT

T

jn

T edefT

002/

2/)(

1

dtetfT

cT

T

tjn

Tn

2/

2/

0)(1

T

20

2

1 0

T

n

tjnT

T

jn

T edef 00

0

2/

2/)(

2

1

Let T

20

0 dT

n

tjnT

T

jn

T edef 002/

2/)(

2

1

dedef tjj

T )(2

1

Source: URI ELE436

30 March 2015 - ELEC 3004: Systems 31

Page 16: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

16

dedeftf tjj)(2

1)(

Fourier Integral

F(j)

dtetfjF tj

)()(

dejFtf tj)(2

1)( Synthesis

Analysis

Source: URI ELE436

30 March 2015 - ELEC 3004: Systems 32

Fourier Series vs. Fourier Integral

n

tjn

nectf 0)(Fourier

Series:

Fourier

Integral:

dtetfT

cT

T

tjn

Tn

2/

2/

0)(1

dtetfjF tj

)()(

dejFtf tj)(2

1)(

Period Function

Discrete Spectra

Non-Period

Function

Continuous Spectra

Source: URI ELE436

30 March 2015 - ELEC 3004: Systems 33

Page 17: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

17

Complex Fourier Series (CFS)

• Also called Exponential

Fourier series

– As it uses Euler’s relation

• FS as a Complex phasor

summation

j

tjnwtjnwtnw

tjnwtjnwtnw

twjAtwAtjwA

2

)exp()exp()sin(

2

)exp()exp()cos(

implies,which

)sin()cos()exp(

000

000

000

n

n tjnwXtx )exp()( 0Where Xn are the

CFS coefficients

30 March 2015 - ELEC 3004: Systems 34

Complex Fourier Coefficients

• Again, Xn calculated from

x(t)

• Only one set of coefficients,

Xn

– but, generally they are

complex

2/

2/

0 )exp()(1

T

T

n dttjnwtxT

X

Remember: fundamental ω0 = 2/T !

30 March 2015 - ELEC 3004: Systems 35

Page 18: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

18

Relationships

• There is a simple

relationship between

– trigonometrical and

– complex Fourier

coefficients,

.0,2

;0,2

2

00

njBA

njBA

X

AX

nn

nn

n

Therefore, can calculate simplest form and convert

Constrained to be

symmetrical, i.e.,

complex conjugate

*

nn XX

30 March 2015 - ELEC 3004: Systems 36

Example: Complex FS

• Consider the pulse train

signal

• Has complex Fourier series:

).(

;2

,0

;2

0,

)(

Ttx

Tt

tA

tx

T

2exp

2exp

exp1

exp)(1

00

0

2

2

0

2

2

0

jnjn

Tjn

A

dttjnAT

dttjntxT

X

T

T

n

A

Note: n is the

ind. variable

Note: ×

by / …

30 March 2015 - ELEC 3004: Systems 37

Page 19: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

19

Example: Complex FS

• Which using Euler’s identity

reduces to:

Tw

nwT

A

nw

nw

T

AX n

2

)2(sa2

)2sin(

0

0

0

0

sin2sincossincos

sincossincos

expexp

jjj

jj

jj

Note: letting 2

0

n

Note:

cos(-) = cos(): even

sin(-) = -sin(): odd

30 March 2015 - ELEC 3004: Systems 38

Frequency Response

Fourier Series Fourier Transforms

30 March 2015 - ELEC 3004: Systems 54

Page 20: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

20

• A Fourier Transform is an integral transform that re-expresses

a function in terms of different sine waves of varying

amplitudes, wavelengths, and phases.

• When you let these three waves interfere with each other you

get your original wave function!

Fourier Transform

1-D Example:

Source: Tufts Uni Sykes Group

30 March 2015 - ELEC 3004: Systems 55

Fourier Series • What we have produced is a processor to calculate one

coefficient of the complex Fourier Series

• Fourier Series Coefficients = Heterodyne and average over

observation interval T

CT

h t e dtk

jT

ktT

1

2

0

( )

30 March 2015 - ELEC 3004: Systems 56

Page 21: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

21

• If we change the limits of integration to the entire real line,

remove the division by T, and make the frequency variable

continuous, we get the Fourier Transform

ELEC 3004: Systems 30 March 2015 - 57

Fourier Transform

C h t e dtj t( ) ( )

Fourier Transform (is not the Fourier Series per se)

Fourier

Series

Discrete

Fourier

Transform

Continuous

Fourier

Transform

Fourier

Transform

Continuous

Time

Discrete

Time

Per

iodic

A

per

iodic

Source: URI ELE436

30 March 2015 - ELEC 3004: Systems 58

Page 22: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

22

• Fourier series – Only applicable to periodic signals

• Real world signals are rarely periodic

• Develop Fourier transform by – Examining a periodic signal

– Extending the period to infinity

Fourier Transform

30 March 2015 - ELEC 3004: Systems 59

• Problem: as T , Xn 0 – i.e., Fourier coefficients vanish!

• Solution: re-define coefficients – Xn’ = T × Xn

• As T – (harmonic frequency) nω0 ω (continuous freq.)

– (discrete spectrum) Xn’ X(ω) (continuous spect.)

– ω0 (fundamental freq.) reduces dω (differential) • Summation becomes integration

Fourier Transform

30 March 2015 - ELEC 3004: Systems 60

Page 23: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

23

Fourier Transform Pair

dtetfjF tj

)()(

dejFtf tj)(2

1)( Synthesis

Analysis

Fourier Transform:

Inverse Fourier Transform:

Source: URI ELE436

30 March 2015 - ELEC 3004: Systems 63

dtetfjF tj

)()(

Continuous Spectra

)()()( jjFjFjF IR

)(|)(| jejF FR(j)

FI(j)

()

Magnitude

Phase

Source: URI ELE436

30 March 2015 - ELEC 3004: Systems 64

Page 24: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

24

-10 -8 -6 -4 -2 0 2 4 6 8 10 0

0.2

0.4

0.6

0.8

1

Pulse width = 1

x(t

)

time (t)

-20 -5 0 5 20 -0.5

0

0.5

1

X(w

)

Angular frequency (w)

rect(t)

sinc(w/2)

Time limited

Infinite bandwidth

30 March 2015 - ELEC 3004: Systems 66

-10 -8 -6 -4 -2 0 2 4 6 8 10 0

0.2

0.4

0.6

0.8

1

Pulse width = 2

x(t

)

time (t)

-10 -5 0 5 10 -0.5

0

0.5

1

1.5

2

X(w

)

Angular frequency (w)

rect(t/2)

2 sinc(w/)

Parseval’s Theorem

30 March 2015 - ELEC 3004: Systems 67

Page 25: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

25

-10 -8 -6 -4 -2 0 2 4 6 8 10 0

0.2

0.4

0.6

0.8

1

Pulse width = 4

x(t

)

time (t)

-10 -5 0 5 10 -1

0

1

2

3

4

X(w

)

Angular frequency (w)

rect(t/4)

4 sinc(2w/)

30 March 2015 - ELEC 3004: Systems 68

-10 -8 -6 -4 -2 0 2 4 6 8 10 0

0.2

0.4

0.6

0.8

1

Pulse width = 8

x(t

)

time (t)

-10 -5 0 5 10 -2

0

2

4

6

8

X(w

)

Angular frequency (w)

rect(t/8)

8 sinc(4w/)

30 March 2015 - ELEC 3004: Systems 69

Page 26: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

26

-40 -30 -20 -10 0 10 20 30 40 -0.25

0

0.5

1

Symmetry: F{sinc(t/2)} = 2 rect(-w)

x(t

)

time (t)

-5 -4 -3 -2 -1 0 1 2 3 4 5 0

2

X(w

)

Angular frequency (w)

2 rect(-w)

sinc(t/2)

Infinite time

Finite bandwidth

‘Ideal’ Lowpass filter 30 March 2015 - ELEC 3004: Systems 70

• Linearity – F {a x(t) + b y(t)} = a X(ω) + b Y(ω)

• Time and frequency scaling – F {x(at)} = 1/a X(ω/a)

– broader in time narrower in frequency • and vice versa

• Symmetry (duality) – 2x(-ω) = X(t) exp(-jωt)dt

• i.e., Fourier transform ‘pairs’

Properties of Fourier Transform

Time limited signal limited has infinite bandwidth;

Signal of finite bandwidth has infinite time support

30 March 2015 - ELEC 3004: Systems 71

Page 27: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

27

Properties of Fourier Transform

• if…

• x(t) is real

• x(t) is real and even

• x(t) is real and odd

• Then…

• X(-ω) = X(ω)*

– {X(ω)} is even

– {X(ω)} is odd

– |X(ω)| is even

– X(ω) is odd

• X(ω) is real and even

• X(ω) is imaginary and odd

30 March 2015 - ELEC 3004: Systems 72

Fourier Transforms

-15 -10 -5 0 5 10 15

-1

-0.5

0

0.5

1

t

x(t

)

-ω0 0

ω0

0

1

2

3

ω

X(w

)

x(t) = cos(ω0t)

(real & even)

X(w) = [(ω-ω0)

+ (ω+ω0)]

(real and even)

1

0 0

1| | exp

2X x t F X x t j t

Note: cos(ω0t) has energy! But is dual of (w – ω0)

30 March 2015 - ELEC 3004: Systems 73

Page 28: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

28

Fourier Transforms

x(t) = sin(ω0t)

(real and odd)

X(w) = j[(ω+ω0)

- (ω-ω0)]

(imaginary & odd)

-15 -10 -5 0 5 10 15

-1

-0.5

0

0.5

1

t

x(t

)

-ω0 0

ω0 3 4

-4

-2

0

2

4

{X

(w)}

Note: sin & cos have same Mag spectrum, Phase is only difference

30 March 2015 - ELEC 3004: Systems 74

• Time Shift – F {x(t - )} = exp(-j w)X(w)

• time shift phase shift

• Convolution and multiplication – F {x(t) y(t)} = X(ω) Y(ω)

• i.e., implement convolution in Fourier domain

– F {x(t) y(t)} = 1/2 (X(ω) Y(ω)) • i.e., Fourier interpretation of multiplication (e.g., frequency modulation)

Properties of Fourier Transform

30 March 2015 - ELEC 3004: Systems 75

Page 29: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

29

-15 -10 -5 0 5 10 15 0

0.2

0.4

0.6

0.8

1

1.2

Frequency (rad/s)

|exp

(-j

)|

-15 -10 -5 0 5 10 15 -200

-100

0

100

200

Frequency (rad/s)

ph

ase

(d

egre

es)

Magnitude and Phase of exp(-j w)

modifies phase only

as

cos2 +

sin2 =1

30 March 2015 - ELEC 3004: Systems 76

0

0.5

1

x(t) = rect(t)

0

0.5

1

h(t) = rect(t)

-1 0 1 2 0

x(t)*h(t) = tri(t)

-0.5

0

0.5

1 X(w) = sinc(w/2)

-0.5

0

0.5

1 H(w) = sinc(w/2)

-20 -10 0 10 20 0

0.5

1 X(w)H(w) = sinc

2 (w/2)

F

F

F

ZOH

ZOH

FOH

30 March 2015 - ELEC 3004: Systems 77

Page 30: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

30

• Differentiation in time

• Integration in time

More properties of the FT

n

n

dF x t j X

dt

dF x t j X

dt

Differentiation ×ω (Note: HPF & DC x zero)

1

0

t

F x t dt X Xj

Integration /ω + DC offset (LPF & opposite of differentiation)

30 March 2015 - ELEC 3004: Systems 78

More Fourier Transforms

ω

F(w) = (2/t)(ω - 2n/t)

t

f(t) =(t - nt) = (t)

… … … …

F

ω

F(w) = (2/t) (ω - n/t)

t

f(t) = (t - 2nt)

… … … …

F

Impulse train, ‘comb’ or ‘Shah’ function

30 March 2015 - ELEC 3004: Systems 79

Page 31: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

31

More Fourier Transforms

t

f(t) = (t)

ω

F(ω) = 1

F

ω

F(ω) = 2(ω)

t

f(t) = 1

F

Limit of previous as t and t 0 respectively

Note: f(t) = 1 has energy! But is dual of (t)

Note: u(t) also has energy! But F{u(t)} = F{(t)} i.e., apply integration property

30 March 2015 - ELEC 3004: Systems 80

• If F{x(t)} = X(w) – F{x(2t)} =?

– F{x(t/4)} =?

• F{(t)} = ?

• F{1} = ?

“Pop Quiz”: Questions

30 March 2015 - ELEC 3004: Systems 81

Page 32: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

32

… No Worries LectopiaLand !

• If F{x(t)} = X(ω) – F{x(2t)} = 1/2X(ω/2)

• narrower in t broader in freq

– F{x(t/4)} = 4X(4ω) • broader in t narrower in freq (but increased amplitude)

• F{(t)} = 1 – i.e. flat spectrum (all frequencies equally)

• F{1} = (ω) – i.e. impulse at DC only

Pop Quiz: Answers!

30 March 2015 - ELEC 3004: Systems 82

• Represents (usually finite energy) signals – as sum of cosine waves

• at all possible frequencies

• |X(ω)|dω/2 is amplitude of cosine wave – i.e., in frequency band ω to ω + dω

• X(ω) is phase shift of cosine wave

• Also represents finite power, periodic signals – Using (ω)

• Distribution with frequency of – both magnitude & phase

– called a Frequency spectrum (continuous)

Interpretation of Fourier Transform

30 March 2015 - ELEC 3004: Systems 83

Page 33: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

33

Fourier Image Examples

Lena Bridge

30 March 2015 - ELEC 3004: Systems 84

Fourier Magnitude and Phase

20*log10(abs(fft(Lena))) angle(fft(Lena))

0 10 20 30 40 50 60 70 80 90 1000

0.5

1

Frequency

Magnitude

1/f

‘random’

range()

Bridge spectra look similar

30 March 2015 - ELEC 3004: Systems 85

Page 34: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

34

Magnitude and Phase Only

ifft(abs(fft(Lena)) + angle(0)) ifft(abs(fft(Bridge)) + angle(fft(Lena)))

Lena magnitude only Lena phase + bridge magnitude

Note: titles are illustrative only and are not the actual Matlab commands used!

30 March 2015 - ELEC 3004: Systems 86

FFT Fourier Transform (not just yet – we’ll come back to this)

30 March 2015 - ELEC 3004: Systems 98

Page 35: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

35

• For a discrete time sequence we define two classes of

Fourier Transforms:

• the DTFT (Discrete Time FT) for sequences having

infinite duration,

• the DFT (Discrete FT) for sequences having finite

duration.

Fourier Analysis of Discrete Time Signals

30 March 2015 - ELEC 3004: Systems 99

• Given a sequence x(n) having infinite duration, we define the

DTFT as follows:

The Discrete Time Fourier Transform (DTFT)

X DTFT x n x n e

x n IDTFT X X e d

j n

n

j n

( ) ( ) ( )

( ) ( ) ( )

1

2

x n( )

nN 1

X ( )

discrete time continuous

frequency

….. …..

30 March 2015 - ELEC 3004: Systems 100

Page 36: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

36

Observations:

• The DTFT is periodic with period ;

• The frequency is the digital frequency and therefore it is limited to

the interval

)(X 2

Recall that the digital frequency is a normalized frequency relative to

the sampling frequency, defined as

sF

F 2

0

0

2/sF2/sFsF sF F

22

one period of )(X

30 March 2015 - ELEC 3004: Systems 101

Example

0 1N

1

][nx

n

2/sin

2/sin

1

1)(

2/)1(

1

0

Ne

e

eeX

Nj

j

NjN

n

nj

DTFT

since

30 March 2015 - ELEC 3004: Systems 102

Page 37: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

37

Fast Fourier Transform Algorithms • Consider DTFT

• Basic idea is to split the sum into 2 subsequences of length N/2

and continue all the way down until you have N/2

subsequences of length 2

Log2(8)

N

30 March 2015 - ELEC 3004: Systems 103

Radix-2 FFT Algorithms - Two point FFT • We assume N=2^m

– This is called Radix-2 FFT Algorithms

• Let’s take a simple example where only two points are given n=0, n=1; N=2

Source: http://www.cmlab.csie.ntu.edu.tw/cml/dsp/training/coding/transform/fft.html

y0

y1

y0

Butterfly FFT

Advantage: Less

computationally

intensive: O(N/2*log(N))

30 March 2015 - ELEC 3004: Systems 104

Page 38: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

38

• First break x[n] into even and odd

• Let n=2m for even and n=2m+1 for odd

• Even and odd parts are both DFT of a N/2 point sequence

• Break up the size N/2 subsequent in half by letting 2mm

• The first subsequence here is the term x[0], x[4], …

• The second subsequent is x[2], x[6], …

1

1)2sin()2cos(

)]12[(]2[

2/

2

2/

2/

2/2/

2/

2/

2/

2

12/

0

2/

12/

0

2/

N

N

jN

N

m

N

N

N

m

N

Nm

N

mk

N

mk

N

N

m

mk

N

k

N

N

m

mk

N

W

jeW

WWWW

WW

mxWWmxW

General FFT Algorithm

30 March 2015 - ELEC 3004: Systems 105

Example

1

1)2sin()2cos(

)]12[(]2[][

2/

2

2/

2/

2/2/

2/

2/

2/

2

12/

0

2/

12/

0

2/

N

N

jN

N

m

N

N

N

m

N

Nm

N

mk

N

mk

N

N

m

mk

N

k

N

N

m

mk

N

W

jeW

WWWW

WW

mxWWmxWkX

Let’s take a simple example where only two points are given n=0, n=1; N=2

]1[]0[]1[]0[)]1[(]0[]1[

]1[]0[)]1[(]0[]0[

1

1

0

0

1.0

1

1

1

0

0

1.0

1

0

0

0.0

1

0

1

0

0

0.0

1

xxxWxxWWxWkX

xxxWWxWkX

mm

mm

Same result

30 March 2015 - ELEC 3004: Systems 106

Page 39: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

39

FFT Algorithms - Four point FFT

First find even and odd parts and then combine them:

The general form:

30 March 2015 - ELEC 3004: Systems 107

FFT Algorithms - 8 point FFT

http://www.engineeringproductivitytools.com/stuff/T0001/PT07.HTM

Applet:

http://www.falstad.com/fourier/directions.html

30 March 2015 - ELEC 3004: Systems 108

Page 40: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

40

Poles and Zeros

30 March 2015 - ELEC 3004: Systems 109

Poles and Zeros

Source: Boyd, EE102,5-12

30 March 2015 - ELEC 3004: Systems 110

Page 41: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

41

Poles and Zeros

Source: Boyd, EE102,5-13

30 March 2015 - ELEC 3004: Systems 111

Pole Zero Plot

Source: Boyd, EE102,5-14

30 March 2015 - ELEC 3004: Systems 112

Page 42: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

42

Partial Fraction Expansion

Source: Boyd, EE102,5-15

30 March 2015 - ELEC 3004: Systems 113

Partial Fraction Expansion Example

Source: Boyd, EE102,5-16

30 March 2015 - ELEC 3004: Systems 114

Page 43: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

43

How to Handle the Digitization?

(z-Transforms)

30 March 2015 - ELEC 3004: Systems 115

The z-transform

• The discrete equivalent is the z-Transform†:

𝒵 𝑓 𝑘 = 𝑓(𝑘)𝑧−𝑘∞

𝑘=0

= 𝐹 𝑧

and

𝒵 𝑓 𝑘 − 1 = 𝑧−1𝐹 𝑧

Convenient!

†This is not an approximation, but approximations are easier to derive

F(z) y(k) x(k)

30 March 2015 - ELEC 3004: Systems 116

Page 44: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

44

The z-Transform

• It is defined by:

Or in the Laplace domain:

𝑧 = 𝑒𝑠𝑇

• Thus: or

• I.E., It’s a discrete version of the Laplace:

𝑓 𝑘𝑇 = 𝑒−𝑎𝑘𝑇 ⇒ 𝒵 𝑓 𝑘 =𝑧

𝑧 − 𝑒−𝑎𝑇

30 March 2015 - ELEC 3004: Systems 117

The z-transform • In practice, you’ll use look-up tables or computer tools (ie. Matlab)

to find the z-transform of your functions

𝑭(𝒔) F(kt) 𝑭(𝒛)

1

𝑠

1 𝑧

𝑧 − 1

1

𝑠2

𝑘𝑇 𝑇𝑧

𝑧 − 1 2

1

𝑠 + 𝑎

𝑒−𝑎𝑘𝑇 𝑧

𝑧 − 𝑒−𝑎𝑇

1

𝑠 + 𝑎 2

𝑘𝑇𝑒−𝑎𝑘𝑇 𝑧𝑇𝑒−𝑎𝑇

𝑧 − 𝑒−𝑎𝑇 2

1

𝑠2 + 𝑎2

sin (𝑎𝑘𝑇) 𝑧 sin𝑎𝑇

𝑧2− 2cos𝑎𝑇 𝑧 + 1

30 March 2015 - ELEC 3004: Systems 118

Page 45: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

45

ℒ(ZOH)=??? : What is it?

• Lathi

• Franklin, Powell, Workman

• Franklin, Powell, Emani-Naeini

• Dorf & Bishop

• Oxford Discrete Systems:

(Mark Cannon)

• MIT 6.002 (Russ Tedrake)

• Matlab

Proof!

• Wikipedia

30 March 2015 - ELEC 3004: Systems 119

• Assume that the signal x(t) is zero for t<0, then the output

h(t) is related to x(t) as follows:

Zero-order-hold (ZOH)

x(t) x(kT) h(t) Zero-order

Hold Sampler

30 March 2015 - ELEC 3004: Systems 120

Page 46: Discrete Systems & Z-Transforms · f(t) cne 0 f t e dt T c T T jn t n / 2 / 2 ( ) 0 1 f t dt T a T T /2 /2 0 ( ) 2 f t n tdt T a T T n 0 / 2 / 2 ( ) cos 2 ft n tdt T b T T n 0 / 2

46

• Recall the Laplace Transforms (ℒ) of:

• Thus the ℒ of h(t) becomes:

Transfer function of Zero-order-hold (ZOH)

30 March 2015 - ELEC 3004: Systems 121

… Continuing the ℒ of h(t) …

Thus, giving the transfer function as:

Transfer function of Zero-order-hold (ZOH)

𝓩

30 March 2015 - ELEC 3004: Systems 122