control systems - lehigh universityinconsy/lab/css/me389/lectures/lecture07_pid.pdf1 classical...

9
1 Classical Control – Prof. Eugenio Schuster – Lehigh University 1 Control Systems Lecture 7 PID Design Classical Control – Prof. Eugenio Schuster – Lehigh University 2 PID Controller PID: Proportional – Integral – Derivative P Controller: p K s C = ) ( - + ) ( s R ) ( s Y ) (s G ) ( s E ) ( s U . ) ( ) ( 1 1 ) ( ) ( , ) ( ) ( 1 ) ( ) ( ) ( ) ( s G s C s R s E s G s C s G s C s R s Y + = + = ) ( ) ( ), ( ) ( s E K s U t e K t u p p = = ) 0 ( 1 1 1 ) ( 1 1 lim ) ( lim 1 ) ( 0 0 G K s s G K s s sE e s s R p p s s ss + = + = = = Step Reference: = ) 0 ( 0 G K e p ss •Proportional gain is high •Plant has a pole at the origin True when: High gain proportional feedback (needed for good tracking) results in underdamped (or even unstable) transients.

Upload: others

Post on 14-Mar-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Control Systems - Lehigh Universityinconsy/lab/css/ME389/lectures/lecture07_PID.pdf1 Classical Control – Prof. Eugenio Schuster – Lehigh University 1 Control Systems Lecture 7

1

Classical Control – Prof. Eugenio Schuster – Lehigh University 1

Control Systems

Lecture 7 PID Design

Classical Control – Prof. Eugenio Schuster – Lehigh University 2

PID Controller PID: Proportional – Integral – Derivative

P Controller:

pKsC =)(-

+ )(sR )(sY)(sG)(sE )(sU

.)()(1

1)()(

,)()(1)()(

)()(

sGsCsRsE

sGsCsGsC

sRsY

+=

+=

)()(),()( sEKsUteKtu pp ==

)0(111

)(11lim)(lim1)(

00 GKssGKsssEe

ssR

ppssss +

=+

==⇒=→→

Step Reference:

∞→⇔= )0(0 GKe pss• Proportional gain is high • Plant has a pole at the origin True when:

High gain proportional feedback (needed for good tracking) results in underdamped (or even unstable) transients.

Page 2: Control Systems - Lehigh Universityinconsy/lab/css/ME389/lectures/lecture07_PID.pdf1 Classical Control – Prof. Eugenio Schuster – Lehigh University 1 Control Systems Lecture 7

2

Classical Control – Prof. Eugenio Schuster – Lehigh University 3

PID Controller

P Controller: Example (P_controller.m)

pK-

+ )(sR )(sY12 ++ ss

A)(sE )(sU

)1()(1)(

)()(

2 AKssAK

sGKsGK

sRsY

p

p

p

p

+++=

+=

!  Underdamped transient for large proportional gain !  Steady state error for small proportional gain

12

12

=

+=

n

pn AKζω

ω0

121

21

!! →!+

==⇒∞→pK

pn AKωζ

Classical Control – Prof. Eugenio Schuster – Lehigh University 4

PID Controller PI Controller:

sKKsC I

p +=)(-

+ )(sR )(sY)(sG)(sE )(sU

)()(,)()()(0

sEsKKsUdeKteKtu I

p

t

Ip !"#

$%& +=+= ∫ ττ

0)(1

1lim1

)(1

1lim)(lim1)(000

=

!"#

$%& ++

=

!"#

$%& ++

==⇒=→→→

sGsKKssG

sKK

sssEes

sRI

psI

pssss

Step Reference:

•  It does not matter the value of the proportional gain •  Plant does not need to have a pole at the origin. The controller has it!

Integral control achieves perfect steady state reference tracking!!! Note that this is valid even for Kp=0 as long as Ki≠0

.)()(1

1)()(

,)()(1)()(

)()(

sGsCsRsE

sGsCsGsC

sRsY

+=

+=

Page 3: Control Systems - Lehigh Universityinconsy/lab/css/ME389/lectures/lecture07_PID.pdf1 Classical Control – Prof. Eugenio Schuster – Lehigh University 1 Control Systems Lecture 7

3

Classical Control – Prof. Eugenio Schuster – Lehigh University 5

PID Controller

PI Controller: Example (PI_controller.m)

sKK I

p +-

+ )(sR )(sY12 ++ ss

A)(sE )(sU

( )AKsAKss

AKsK

sGsKK

sGsKK

sRsY

Ip

Ip

Ip

Ip

++++

+=

!"#

$%& ++

!"#

$%& +

=)1()(1

)(

)()(

23

DANGER: for large Ki the characteristic equation has roots in the RHP

0)1(23 =++++ AKsAKss Ip

Analysis by Routh�s Criterion

Classical Control – Prof. Eugenio Schuster – Lehigh University 6

PID Controller

PI Controller: Example (PI_controller.m)

Necessary Conditions:

0)1(23 =++++ AKsAKss Ip

0,01 >>+ AKAK Ip

This is satisfied because 0,0,0 >>> Ip KKA

AKsAKAKs

AKsAKs

I

Ip

I

p

0

1

2

3

11

11

−+

+

Routh�s Conditions:

>−+ 01 AKAK Ip

AKK PI

1+<

Page 4: Control Systems - Lehigh Universityinconsy/lab/css/ME389/lectures/lecture07_PID.pdf1 Classical Control – Prof. Eugenio Schuster – Lehigh University 1 Control Systems Lecture 7

4

Classical Control – Prof. Eugenio Schuster – Lehigh University 7

PID Controller PD Controller:

sKKsC Dp +=)(-

+ )(sR )(sY)(sG)(sE )(sU

( ) )()(,)()()( sEsKKsUdttdeKteKtu DpDp +=+=

( ) )0(111

)(11lim)(lim1)(

00 GKssGsKKsssEe

ssR

pDpssss +

=++

==⇒=→→

Step Reference:

PD controller fixes problems with stability and damping by adding �anticipative� action

.)()(1

1)()(

,)()(1)()(

)()(

sGsCsRsE

sGsCsGsC

sRsY

+=

+=

∞→⇔= )0(0 GKe pss• Proportional gain is high • Plant has a pole at the origin True when:

Classical Control – Prof. Eugenio Schuster – Lehigh University 8

PID Controller

PD Controller: Example (PD_controller.m)

-

+ )(sR )(sY12 ++ ss

A)(sE )(sU

( )( )

( )( ) )1(1)(1

)()()(

2 AKsAKssKKA

sGsKKsGsKK

sRsY

pD

Dp

Dp

Dp

++++

+=

++

+=

!  The damping can be increased now independently of Kp !  The steady state error can be minimized by a large Kp

AKAK

Dn

pn

+=

+=

12

12

ζω

ω

AKAKAKp

D

n

D

++

=+

=⇒121

21

ωζ

sKKsC Dp +=)(

Page 5: Control Systems - Lehigh Universityinconsy/lab/css/ME389/lectures/lecture07_PID.pdf1 Classical Control – Prof. Eugenio Schuster – Lehigh University 1 Control Systems Lecture 7

5

Classical Control – Prof. Eugenio Schuster – Lehigh University 9

PID Controller PD Controller:

sKKsC Dp +=)(-

+ )(sR )(sY)(sG)(sE )(sU

( ) )()(,)()()( sEsKKsUdttdeKteKtu DpDp +=+=

NOTE: cannot apply pure differentiation. In practice,

.)()(1

1)()(

,)()(1)()(

)()(

sGsCsRsE

sGsCsGsC

sRsY

+=

+=

sKDis implemented as

1+ssK

D

D

τ

Classical Control – Prof. Eugenio Schuster – Lehigh University 10

PID Controller

PID: Proportional – Integral – Derivative

!!"

#$$%

&++ sTsT

K DI

p11

-

+ )(sR )(sY)(sG)(sE )(sU

!!"

#$$%

&++=

'(

)*+

,++= ∫

sTsT

KsEsU

dttdeTde

TteKtu

DI

p

D

d

Ip

11)()(

)()(1)()(0

ττ DpDI

pI TKKTK

K == ,

PID Controller: Example (PID_controller.m)

Page 6: Control Systems - Lehigh Universityinconsy/lab/css/ME389/lectures/lecture07_PID.pdf1 Classical Control – Prof. Eugenio Schuster – Lehigh University 1 Control Systems Lecture 7

6

Classical Control – Prof. Eugenio Schuster – Lehigh University 11

PID Controller: Ziegler-Nichols Tuning

•  Empirical method (no proof that it works well but it works well for simple systems) •  Only for stable plants •  You do not need a model to apply the method

1)()(

+=

sKe

sUsY std

τ

Class of plants:

Classical Control – Prof. Eugenio Schuster – Lehigh University 12

PID Controller: Ziegler-Nichols Tuning

METHOD 1: Based on step response, tuning to decay ratio of 0.25.

dDdId

p

dI

dp

dp

tTtTt

KPID

tTt

KPD

tKP

5.0,2,2.1:

3.0,9.0:

:

===

==

=

τ

τ

τTuning Table:

Page 7: Control Systems - Lehigh Universityinconsy/lab/css/ME389/lectures/lecture07_PID.pdf1 Classical Control – Prof. Eugenio Schuster – Lehigh University 1 Control Systems Lecture 7

7

Classical Control – Prof. Eugenio Schuster – Lehigh University 13

PID Controller: Ziegler-Nichols Tuning

METHOD 2: Based on limit of stability, ultimate sensitivity method.

uK-

+ )(sR )(sY)(sG)(sE )(sU

•  Increase the constant gain Ku until the response becomes purely oscillatory (no decay – marginally stable – pure imaginary poles) •  Measure the period of oscillation Pu

Classical Control – Prof. Eugenio Schuster – Lehigh University 14

PID Controller: Ziegler-Nichols Tuning

METHOD 2: Based on limit of stability, ultimate sensitivity method.

8,

2,6.0:

2.1,45.0:

5.0:

uD

uIup

uIup

up

PTPTKKPID

PTKKPD

KKP

===

==

=

Tuning Table:

dud

u tPt

K 4,2 ==τ

The Tuning Tables are the same if you make:

Page 8: Control Systems - Lehigh Universityinconsy/lab/css/ME389/lectures/lecture07_PID.pdf1 Classical Control – Prof. Eugenio Schuster – Lehigh University 1 Control Systems Lecture 7

8

Classical Control – Prof. Eugenio Schuster – Lehigh University 15

PID Controller: Saturation

Actuator Saturates: -  valve (fully open) -  aircraft rudder (fully deflected)

cu(Output of the controller)

u(Input of the plant)

Classical Control – Prof. Eugenio Schuster – Lehigh University 16

PID Controller: Saturation

What happens? -  large step input in r -  large e -  large uc → u saturates -  eventually e becomes small -  uc still large because the integrator is �charged� -  u still at maximum -  y overshoots for a long time

sKK I

p +-

+ )(sR )(sY)(sG)(sE )(sUc )(sU

Page 9: Control Systems - Lehigh Universityinconsy/lab/css/ME389/lectures/lecture07_PID.pdf1 Classical Control – Prof. Eugenio Schuster – Lehigh University 1 Control Systems Lecture 7

9

Classical Control – Prof. Eugenio Schuster – Lehigh University 17

PID Controller: Saturation

Plant with Anti-Windup:

Plant without Anti-Windup:

Classical Control – Prof. Eugenio Schuster – Lehigh University 18

PID Controller: Saturation In saturation, the plant behaves as:

For large Ka, this is a system with very low gain and very fast decay rate, i.e., the integration is turned off.

Saturation/Antiwindup: Example (Antiwindup_sim.mdl)