new review: controller designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9....

69
Review: Controller Design in Frequency Domain

Upload: others

Post on 10-Oct-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Review: Controller Design

in Frequency Domain

Page 2: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Feedback Control System

( ) ( )Closed-loop Transfer Function: ( )

1 ( ) ( )

Open-loop Transfer Function: ( ) ( )

T

D s G sG s

D s G s

D s G s

Page 3: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Root Locus

( ) 1

( ) 11

1

Characteristic Equation: 1 0

Pole: 1

K

Y s KsKR s s K

s

s K

s K

Page 4: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Root Locus

Page 5: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Root Locus

2

2

( ) ( 1)

( )1

( 1)

1 1 40

2

K

Y s Ks s

KR s s s K

s s

Ks s K s

Page 6: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Root Locus

Page 7: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Frequency Response

( )( )

( )

Y sG s

U s ( ) sinu t A t

1 2

( )( )

n

b sG s

s p s p s p

2 2( ) ( ) ( ) ( )

AY s G s U s G s

s

*

0 01 2

1 2

( ) n

n

Y ss p s p s p s j s j

1 2 *

1 2 0 0( ) np tp t p t j t j t

ny t e e e e e

Page 8: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Frequency Response

*

0 0( ) j t j ty t e e

0 2 2

( )

( ) ( )2

( )2

s j

j G j

A AG s s j G j

s j

AG j e

j

*

0 2 2

( )

( ) ( )2

( )2

s j

j G j

A AG s s j G j

s j

AG j e

j

Page 9: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Frequency Response

( ) ( )

( ) ( )

( ) ( ) ( )2 2

( )2 2

( ) sin ( )

j G j j t j G j j t

j t G j j t G j

A Ay t G j e e G j e e

j j

e eA G j

j j

A G j t G j

Page 10: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Frequency Response and Poles

2

22 2

1( )

2 / 2 / 1

n

n n n n

G ss s s s

2

( )

1

/ 2 / 1n n

G s

s s

Page 11: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Pole Locations

Page 12: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

( )G s

0.3 0.5

Page 13: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

( )G s

0.7 0.9

Page 14: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Bode Plot

10( ) 20log ( )dB

G j G j

Page 15: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Bode Plot

1 2

1 2

( )m

s z s zG s K

s s p s p

1 2

1 2

( ) ( )ms j

j z j zG j G s K

j j p j p

0

1 2

1 1( )

1 1

a b

m

j jG j K

j j j

Page 16: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Bode Plot

10 10 0

1 2

10 0

1 2

10 0 10 10

10 10 1 10 2

1 1( ) 20log ( ) 20log

1 1

1 120log

1 1

20log 20log 1 20log 1

20log 20log 1 20log 1

a b

mdB

a b

m

a b

m

j jG j G j K

j j j

j jK

j j j

K j j

j j j

Page 17: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Bode Plot

0

1 2

0

1 2

1 1( )

1 1

1 1

1 1

a b

m

a b

m

j jG j K

j j j

K j j

j j j

Page 18: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Bode Plot

0

mK s

1 ,1/ 1s s

2 2

/ 2 / 1 ,1/ / 2 / 1n n n ns s s s

Page 19: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

0

mK s

10 0 10 0 10

10 0 10

20log 20log 20log

20log 20 log

m mK j K j

K m

Page 20: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

위상

0

mK s

0 0

0 0 90

m mK j K j

K m j K m

Page 21: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

1s

10 10

10 10

1 20log 1 20log 1 0 1/

1 20log 1 20log 1/dB

dB

j j

j j

2

10 101 20log 1 20log 1dB

j j

Page 22: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

1s

Page 23: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

1s

1 1 0 1/

1 1 45 1/

1 90 1/

j

j j

j j

Page 24: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

1s

Page 25: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

1/ 1s

10 10

10 10

120log 1 20log 1 0 1/

1

120log 1 20log 1/

1

dB

dB

jj

jj

Page 26: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

1/ 1s

Page 27: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

1/ 1s

11 0 1/

1

11 45 1/

1

190 1/

1

j

jj

jj

Page 28: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

1/ 1s

Page 29: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Example

1000

( )10

G ss s

1000 100( )

10 0.1 1s j

G js s j j

10

10

10020log

20log 100 20log

40 20log

j

Page 30: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Example

Page 31: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Example

Page 32: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

2

1/ / 2 / 1n ns s

102

2

102

120log 1 0

/ 2 / 1

120log /

/ 2 / 1

n

n n dB

n n

n n dB

j j

j j

Page 33: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

2

1/ / 2 / 1n ns s

Page 34: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

2

1/ / 2 / 1n ns s

2

1 1

2/ 2 / 1n

n nj j

120log 20log 2

2

Page 35: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

2

1/ / 2 / 1n ns s

2

2

2 2

2

11 0

/ 2 / 1

12 90

/ 2 / 1

1/ 180

/ 2 / 1

n

n n

n

n n

n n

n n

j j

jj j

j j

Page 36: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

2

1/ / 2 / 1n ns s

Page 37: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

2

1/ / 2 / 1n ns s

Page 38: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Example

2

10000( )

2 100G s

s s s

2

2

100( )

/100 2 /100 1

100

/10 0.2 /10 1

s j

G js s s

j j j

Page 39: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Example

Page 40: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Example

10 10

120log 20log 5 14

2dB

Page 41: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Example

Page 42: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Nyquist Plot

Nyquist path

Page 43: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Nyquist Plot

Nyquist path

Page 44: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Nyquist Plot

Page 45: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Nyquist Plot

Page 46: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Stability Margin

Page 47: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Stability Margin

Page 48: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Stability Margin

Page 49: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Stability Margin

Gain Margin

Phase Margin

Page 50: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Stability Margin

Gain Margin

Phase Margin

180 180

10 10 180 180

10

180 180

0 ( ) ( )

20log 1 20log ( ) ( )

120log

( ) ( )

dBGM dB G j H j

G j H j

G j H j

180 ( ) ( )c cPM G j H j

Page 51: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Stability Margin

Gain Margin

Phase Margin

Page 52: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Control System

Continuous-time controller

Page 53: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

PD Controller

( ) 1 dD s K T s

Page 54: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Example

1( )

( 1)G s

s s

0lim

( 1)v

s

KK s K

s s

1 1ss

v

eK K

( ) 100(1 0.1 )D s s

Page 55: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Example

Page 56: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Example

Page 57: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Lead Compensator

1( )

1

TsD s K

Ts

Page 58: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Lead Compensator

1 11tan tan

1

jTT T

j T

10 max 10 10

1 1 1log log log

2 T T

max

1

T

1 1

max

1tan tan

max

1tan

2

max

1sin

1

max

max

1 sin

1 sin

Page 59: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Lead Compensator

10 max max 10

120log ( ) ( ) 0.5 20logKG j H j

max

1T

Page 60: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Example

100.5 20log 1/ 9dB

max

1 10.17

16.7 0.13T

1 0.17 1( ) 100

1 0.13(0.17 ) 1

Ts sD s K

Ts s

max 50 0.13

Page 61: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Example

Page 62: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Example

Page 63: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

MATLAB lead.m

num=100;den=[1 1 0];G=tf(num,den)

u=linspace(1,1,200);t=linspace(0,10,200);

[y]=lsim(feedback(G,1),u,t);figure(1)plot(t,y);grid on

w=logspace(0,3,200);[mag,phase]=bode(num,den,w);[gm,pm,wcg,wcp]=margin(G)figure(2)margin(num,den)

Page 64: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

MATLAB lead.m

phimax=50;

alpha=(1-sin(pi*phimax/180))/(1+sin(pi*phimax/180))

10*log10(1/alpha)

[w' 20*log10(mag) phase ]

wmax=16.5;

T=1/(wmax*sqrt(alpha));

num1=[T 1];

den1=[T*alpha 1];

Page 65: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

MATLAB lead.m

num=conv(num1,num);den=conv(den1,den);[mag,phase]=bode(num,den,w);[gm,pm,wcg,wcp]=margin(mag,phase,w)figure(3)margin(num,den)

[y]=lsim(feedback(tf(num,den),1),u,t);figure(4)plot(t,y);grid on

D=tf(num1,den1)Dz=c2d(D,1/2000,'tustin')

Page 66: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

MATLAB lead.m

alpha =

1.3247e-001

ans =

8.7787e+000

ans =

1.0000e+000 3.6990e+001 -1.3500e+002

1.4481e+001 -6.4528e+000 -1.7605e+0021.4993e+001 -7.0545e+000 -1.7618e+0021.5522e+001 -7.6562e+000 -1.7631e+0021.6071e+001 -8.2580e+000 -1.7644e+0021.6638e+001 -8.8599e+000 -1.7656e+0021.7226e+001 -9.4618e+000 -1.7668e+002

Page 67: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

MATLAB lead.m

-50

0

50

100M

agnitu

de (

dB

)

10-2

10-1

100

101

102

-180

-135

-90

Phase (

deg)

Bode Diagram

Gm = Inf dB (at Inf rad/sec) , Pm = 5.72 deg (at 9.97 rad/sec)

Frequency (rad/sec)

Page 68: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

MATLAB lead.m

-100

-50

0

50

100

Magnitu

de (

dB

)

10-2

10-1

100

101

102

103

-180

-135

-90

Phase (

deg)

Bode Diagram

Gm = Inf dB (at Inf rad/sec) , Pm = 53.4 deg (at 16.6 rad/sec)

Frequency (rad/sec)

Page 69: New Review: Controller Designccrs.hanyang.ac.kr/webpage_limdj/automation/lecture4.pdf · 2020. 9. 11. · D=tf(num1,den1) Dz=c2d(D,1/2000,'tustin') MATLAB lead.m alpha = 1.3247e-001

Digital Implementation

Tustin’s Method

2 1

1

2 11

1( ) 1( )

2 1( ) 11

1s

s

zs

T z

s

zT

T zU z TsD z K K

zE z TsT

T z

1

( ) 2 ( ) 2 ( 1) 2 ( 1)2

s s s

s

u k K T T e k K T T e k T T u kT T