You are on page 1of 11

1.

Fourier Transform of Discrete Time Aperiodic Signals If the innite sum converges, x(n)ejn
n=

X (ej ) = X (ej (+2k)) =

=
n=

x (n )

ej(mn)d

x(n)ej (+2k)n
n= j

= 2 x(m) +
n=,n=m

x (n )

ej(mn)d

= X (e ) X (ej ) is periodic with period 2 . So, it has a Fourier Series. x(n) can be calculated by integrating both sides

= 2 x(m) +
n=,n=m

ej(mn) x (n ) j (m n )

= 2x(m) From the above, solving for x(m), 1 x (m ) = 2 =


1/2

X (e )e

jm

X (ej )ejmd X (f )ej 2f mdf

1/2

=
n=

x(n)ejn ejmd

CL 692 Digital Control, IIT Bombay

c Kannan M. Moudgalya, Autumn 2006

2.

Fourier Transform of a Moving Average Filter - Example


Magnitude

1 y (n) = [u(n + 1) + u(n) + u(n 1)] 3

1 0.8 0.6 0.4 0.2 0

y (n ) =
k =

g (k ) u (n k )

0.5

1.5

2.5

3.5

3.5 3 2.5 Phase 2 1.5 1 0.5 0 0 0.5 1 1.5 w 2 2.5 3 3.5

= g (1)u(n + 1) + g (0)u(n) + g (1)u(n 1) 1 g (1) = g (0) = g (1) = 3

G e

jw

=
n=

g (n)z n|z =ejw


1 2 3 4 5 6 7

Arg (G) =

0 0 w < 23 23 w<

|G ejw

1 jw e + 1 + ejw 3 1 = (1 + 2 cos w) 3 1 | = | (1 + 2 cos w)| 3 =


2

w = 0 : 0 . 0 1 : pi ; subplot ( 2 , 1 , 1 ) p l o t (w , abs (1+2 cos (w ) ) / 3 ) , g r i d , y l a b e l ( Magnitude ) subplot ( 2 , 1 , 2 ) p l o t (w , angle (1+2 cos (w ) ) ) , g r i d , x l a b e l ( w ) , y l a b e l ( Phase )

CL 692 Digital Control, IIT Bombay

c Kannan M. Moudgalya, Autumn 2006

3.

Fourier Transform of a Dierencing Filter - Example


1

y (n) = u(n) u(n 1) g (0) = 1, g (1) = 1 G ejw = G(z )|z =ejw

2 3

w = 0 : 0 . 0 1 : pi ; p l o t (w , abs (1+ s i n (w / 2 ) ) ) , g r i d , . . . x l a b e l ( w ) , y l a b e l ( Magnitude )

= =1e

g (n)z n|z =ejw


n= jw

= ejw/2 ejw/2 ejw/2 w = 2jejw/2 sin 2 w |G| = 2| sin | 2

1 2 3

s y s d = t f ( [ 1 1] ,1 , 1); w = logspace ( 2 , 0 . 5 ) ; bode ( s y s d , w)

CL 692 Digital Control, IIT Bombay

c Kannan M. Moudgalya, Autumn 2006

4.

Additional Properties of Fourier Transform


We can summarize these properties as G ejw = G ejw

Symmetry of real and imaginary parts for real valued sequences

G e

jw

=
n=

g (n)e

jwn

=
n=

g (n) cos wn j
n=

g (n) sin wn

Symmetry of magnitude and phase angle for real valued sequences |G ejw | = G ejw G ejw
1/2 1/2

G ejw =
n=

g (n)ejwn

= G ejw G ejw = |G(ejw )| g (n) sin wn

=
n=

g (n) cos wn + j
n=

This shows that the magnitude is an even function. In a similar way, Arg G ejw = Arg G ejw

Comparing the above two equations, we get Re G ejw Im G ejw = Re G ejw = Im G ejw

Bode plots have to be drawn for w in [0, ] only.

CL 692 Digital Control, IIT Bombay

c Kannan M. Moudgalya, Autumn 2006

5.

Sampling and Reconstruction


1/2

u(n) = ua (nTs ),

< n < (1)

LHS =
1/2

U (f )ej 2f n df 1 Fs
Fs /2

FT pair for analog, discrete signals: Ua (F ) =


ua (t)e

j 2F t

= dt RHS = dF. (2) =

U
Fs /2

F Fs

ej 2nF/Fs dF

ua (t) =

Ua (F )e u(n)e
n= 1/2

j 2F t

Ua (F )ej 2nF/Fs dF
(k +1/2)Fs (k 1/2)Fs Fs /2 Fs /2 Fs /2 Fs /2 Fs /2 Fs /2

U (f ) = u(n) =
1/2

j 2f n

Ua (F )ej 2nF/Fs dF

k = j 2f n

U (f )e

df

(3)

=
k =

Ua (Q + kFs )ej 2n(Q+kFs )/Fs dQ Ua (Q + kFs )ej 2nQ/Fs dQ Ua (F + kFs )ej 2nF/Fs dF Ua (F + kFs ) ej 2nF/Fs dF

Substituting Eq. 3 and Eq. 2 in Eq. 1,


1/2

=
k =

U (f )ej 2f n df =
1/2

Ua (F )ej 2F nTs dF Ua (F )e
j 2nF/Fs

=
k = F s /2

dF =

Fs /2

k =

CL 692 Digital Control, IIT Bombay

c Kannan M. Moudgalya, Autumn 2006

6. U F Fs

Fast Sampling Preserves All Required Information

= Fs
k =
ua (t)

Ua(F + kFs) = Fs[ + Ua(F Fs) + Ua(F ) + Ua(F + Fs) + ]


Ua (F ) 1 Fo Fs B U
Fs 2

U
Fo + Fs F

F0 Fs

= FsUa(F0)

t ua(nT ) = u(n)

Fo B
F Fs

Fs

U is scaled version of Ua - shape not aected by sampling. Can recover Ua from U . U (F/Fs) is periodic in F with a period Fs: = = U F0 + kFs Fs ,

t Ts 3 2 Fs
s F 2

F
Fs 2 3 2 Fs

F0 Fs

F0 + Fs Fs k = 1, 2 =U

=U

F0 Fs Fs

CL 692 Digital Control, IIT Bombay

c Kannan M. Moudgalya, Autumn 2006

7. U

Slow Sampling Results in Aliasing F Fs


ua (t)

= Fs
k =

Ua(F + kFs) = Fs[ + Ua(F0 Fs) + Ua(F0) + Ua(F0 + Fs) +


Ua (F )

t B U
F Fs

F B

Consequence of aliasing: F0 Fs = Fs[Ua(F0 Fs) + Ua(F0)] = Fs[overlapping value + Ua(F0)] U Cannot recover Ua from U , as the high frequency components have changed.

Fs

t Ts

s F 2

Fs 2

U u(n)

F Fs

Fs

t Ts

s F 2

Fs 2

CL 692 Digital Control, IIT Bombay

c Kannan M. Moudgalya, Autumn 2006

8.

What to Do When Aliasing Cannot be Avoided?


Ua (F )

1 Fs U

F Fs

U a ( F + Fs )

Ua (F ) Ua (F )

U a ( F Fs )

1 Fs U

F Fs

U a ( F + Fs )

Ua (F )

U a ( F Fs )

CL 692 Digital Control, IIT Bombay

c Kannan M. Moudgalya, Autumn 2006

9.

Sampling Theorem To calculate analog signal at t, we need sampled values for all future times, corresponding to n > 0 Hence for control purposes, this reconstruction is not useful. Provides absolute minimum limit of sampling rate. If sampling rate is lower than this minimum, no lter (whether causal or not) can achieve exact reproduction of the continuous function from the sampled signals.

Suppose highest frequency contained in an analog signal ua(t) is Fmax = B . It is sampled at a rate Fs > 2Fmax = 2B . ua(t) can be exactly recovered from its sample values:

sin ua(nTs)

ua(t) =
n=

Ts (t Ts (t

nTs)

nTs)

If Fs = 2Fmax, Fs is denoted by FN , the Nyquist rate. Not causal: check n > 0


CL 692 Digital Control, IIT Bombay

c Kannan M. Moudgalya, Autumn 2006

10.

Frequency Domain Interpretation of ZOH Recall normalized frequency: f = F/Fs, fmax = B/Fs

Gain of Sample and Hold (see Text), |SH | =


1

sin f f

Minimum sampling rate Fs,1 = 2B fmax,1 = 0.5 Sample at twice the minimum Fs,2 = 4B fmax,2 = 0.25 Maximum deviation = 10% Sample at 4 times minimum Fs,3 = 8B fmax,3 = 0.125

0.9

0.8

0.7

0.6 SH

0.5

0.4

0.3

0.2

0.1

0.05

0.1

0.15

0.2

0.25 f

0.3

0.35

0.4

0.45

0.5

Maximum deviation = 3% Fast sampling is better

Least distortion for f Max. distortion for f


CL 692 Digital Control, IIT Bombay

0 0.5
10

c Kannan M. Moudgalya, Autumn 2006

11.

Rules for Sampling Rate Selection

Minimum sampling rate = twice band width Problems Not really band limited Systems are generally nonlinear Shannons reconstruction cannot be implemented, have to use ZOH Solution: sample faster Number of samples in rise time = 4 to 10 Sample 10 to 30 times bandwidth Use 10 times Shannons sampling rate cTs = 0.15 to 0.5, where, c = crossover frequency
CL 692 Digital Control, IIT Bombay

11

c Kannan M. Moudgalya, Autumn 2006

12.

Filtering - Motivation

Measurements are often corrupted by high frequency noise, which have to be ltered before further processing. Systems that transmit the low frequency information while removing the eect of high frequency noise are known as low pass lters and this action is known as low pass ltering. Sometimes we are interested in monitoring of a transient response so as to take early corrective action. Often this requires a derivative action that works on the basis of the slope of the response curve. We will see later that this requires the usage of the high frequency content of the response. Indeed we may be interested in ltering of the frequency content in some arbitrary frequency range while passing the others. Will demonstrate that such things can be achieved by suitable choice of pole and zero locations.

CL 692 Digital Control, IIT Bombay

12

c Kannan M. Moudgalya, Autumn 2006

13.

Filter Design

Apply input u(k ) = ak 1(k ) If e1 is large, input is present in the output y . to an LTI system with with If e1 is small, eect of u is removed. z z transfer function G(z ). G (z ) = e0 + e1 za za Want to know what happens + { terms due to the poles of G(z )} to frequency content of u by z za G (z ) |z =a = G(a) e1 = G(z ). Let a be of the form z za ej and let G(z ) not have a If we want to pass the input signal ak in pole at a. the output, choose G(a) large z za z Y (z ) = e0 + e1 za + {terms due to poles of G(z )} Y (z ) = G ( z ) A small G(a) would result in the reduction of this input signal in the output Large G(a) can be achieved if G(z ) has a pole close to a A zero of G(z ) near a will ensure the rejection of the eect of u on the output.

CL 692 Digital Control, IIT Bombay

13

c Kannan M. Moudgalya, Autumn 2006

14.

Approach to Filter Design

If input frequency w0 is to be passed through G(z ), place poles of G(z ) near w0 If it is to be ltered, place zeros of G(z ) near w0 Unique frequency values are in (, ] w close to 0 corresponds to low frequencies while w close to corresponds to high frequencies
High Low Pass
High Frequency Low Frequency

Notice that e with w (, ] denes the unit circle. As a result, we can mark the low and high frequency regions as in the gure:
CL 692 Digital Control, IIT Bombay

jw

Pass

14

c Kannan M. Moudgalya, Autumn 2006

15.

Low and High Pass Filters

To pass signals of frequency w0, we should place poles near w0 To reject w0, we should place zeros near w0
Im(z)
Im(z)

O O O

Re(z)

O Re(z) O O

Low pass lter Place the poles inside unit circle for stability If complex, choose in conjugate pairs

High pass lter

CL 692 Digital Control, IIT Bombay

15

c Kannan M. Moudgalya, Autumn 2006

16.

Low Pass Filter Example - 1


1 Magnitude

G1 (z ) =

0.5 z 0.5

0.8 0.6 0.4 0.2

G1 (z )|z =1 = 1, so that its steady state gain is 1. Substituting z = ejw , we get 0.5 G1 (e ) = jw e 0.5
jw

0.5

1.5

2.5

50 Phase

0.5 (cos w 0.5) + j sin w (cos w 0.5) j sin w = 0.5 (cos w 0.5)2 + sin2 w 0.5 |G1 (ejw )| = 1.25 cos w sin w G1 (ejw ) = tan1 cos w 0.5 = This lter magnies the signal frequencies near w = 0 in relation to other frequencies

100

150 0 0.5 1 1.5 Frequency 2 2.5 3

CL 692 Digital Control, IIT Bombay

16

c Kannan M. Moudgalya, Autumn 2006

17.

Low Pass Filter Example - 2


1 0.8

To G1 , add a zero at z = 1 G2 (z ) = 0.25 z+1 z 0.5


Magnitude

0.6 0.4 0.2

Notice that the factor 0.25 is included so as to make |G2 (z )|z=1 = 1.


0

0.5

1.5

2.5

G2 (ejw ) ejw + 1 cos w + j sin w + 1 = jw = K e 0.5 cos w + j sin w 0.5 [(cos w + 1) + j sin w][(cos w 0.5) j sin w] = (cos w 0.5)2 + sin2 w (cos2 w + 0.5 cos w 0.5) + sin2 w G2 (ejw ) = 0.25 sin2 w + cos2 w + 0.25 cos w j sin w(cos w 0.5 cos w 1) + sin2 w + cos2 w + 0.25 cos w (0.5 + 0.5 cos w) 1.5j sin w G2 = 0.25 1.25 cos w G1 solid line, G2 broken line |G2 (ejw )| < |G1 (ejw )| w > 0. Thus, G2 is a better low pass lter.

50 Phase

100

150 0 0.5 1 1.5 Frequency 2 2.5 3

CL 692 Digital Control, IIT Bombay

17

c Kannan M. Moudgalya, Autumn 2006

18.

Low Pass Filter Example - 3


k = n i i = 0 k = n, i=nk=0 On simplifying,
0

Calculate the response of G3 (z ) = z+1 for input u(n) = (1)n 1(n) z1 G3 (z ) = z 1 + z1 z1 g3 (n) = 1(n) + 1(n 1)

y (n) = 2
k =n

(1)k 1(n) (1)n 1(n)

y (n) =
i=

g (i)u(n i) [1(i) + 1(i 1)]u(n i)


i=

= =
i=0 n

1 (1)n+1 =2 1(n) (1)n 1(n) 1 (1) = 1(n) 1 (1)n+1 (1)n = 1(n) This shows that (1)n has been ltered. This is because the lter has a zero at (1, 0).

u(n i) +
i=1

u(n i)

=2
i=0 n

u(n i) u(n) (1)ni 1(n) (1)n 1(n)


i=0

= 2

CL 692 Digital Control, IIT Bombay

18

c Kannan M. Moudgalya, Autumn 2006

19.

Fourier Transform of a Moving Average Filter - Example


Magnitude

1 y (n) = [u(n + 1) + u(n) + u(n 1)] 3

1 0.8 0.6 0.4 0.2 0

y (n ) =
k =

g (k ) u (n k )

0.5

1.5

2.5

3.5

3.5 3 2.5 Phase 2 1.5 1 0.5 0 0 0.5 1 1.5 w 2 2.5 3 3.5

= g (1)u(n + 1) + g (0)u(n) + g (1)u(n 1) 1 g (1) = g (0) = g (1) = 3

G e

jw

=
n=

g (n)z n|z =ejw


1 2 3 4 5 6 7

Arg (G) =

0 0 w < 23 23 w<

|G ejw

1 jw e + 1 + ejw 3 1 = (1 + 2 cos w) 3 1 | = | (1 + 2 cos w)| 3 =


19

w = 0 : 0 . 0 1 : pi ; subplot ( 2 , 1 , 1 ) p l o t (w , abs (1+2 cos (w ) ) / 3 ) , g r i d , y l a b e l ( Magnitude ) subplot ( 2 , 1 , 2 ) p l o t (w , angle (1+2 cos (w ) ) ) , g r i d , x l a b e l ( w ) , y l a b e l ( Phase )

CL 692 Digital Control, IIT Bombay

c Kannan M. Moudgalya, Autumn 2006

20.

Fourier Transform of a Dierencing Filter - Example


1

y (n) = u(n) u(n 1) g (0) = 1, g (1) = 1 G ejw = G(z )|z =ejw

2 3

w = 0 : 0 . 0 1 : pi ; p l o t (w , abs (1+ s i n (w / 2 ) ) ) , g r i d , . . . x l a b e l ( w ) , y l a b e l ( Magnitude )

= =1e

g (n)z n|z =ejw


n= jw

= ejw/2 ejw/2 ejw/2 w = 2jejw/2 sin 2 w |G| = 2| sin | 2

1 2 3

s y s d = t f ( [ 1 1] ,1 , 1); w = logspace ( 2 , 0 . 5 ) ; bode ( s y s d , w)

CL 692 Digital Control, IIT Bombay

20

c Kannan M. Moudgalya, Autumn 2006

21.

Discrete Fourier Transform

Fourier Transform pair for continuous signals:


x[t] =

X [F ]e

j 2F t

dF

X [F ] =

x[t]ej 2F tdt

Fourier Transform pair for discrete time signals (DTFT):

X (e ) =
n=

x (n )e

jn

1 x (m ) = 2

X (ej )ejmd

Discrete Fourier Transform (DFT):


N 1

G (k ) =
n=0

g (n)ej 2nk/N

1 g (n ) = N

N 1

G(k )ej 2nk/N


k =0

Fast Fourier Transform (FFT): Fast method to implement DFT

CL 692 Digital Control, IIT Bombay

21

c Kannan M. Moudgalya, Autumn 2006

You might also like