19
Lecture 17: Introduction to Control (part III) 1. Example 2. PID Control Learn about the effect of tuning the P, I, and D gains 3. Steady-state error and system type ME 431, Lecture 17 1 0 controlinput t P D I de Ke K K e dt dt

Lecture 17: Introduction to Control (part III) 1.Example 2.PID Control Learn about the effect of tuning the P, I, and D gains 3.Steady-state error and

Embed Size (px)

Citation preview

Page 1: Lecture 17: Introduction to Control (part III) 1.Example 2.PID Control Learn about the effect of tuning the P, I, and D gains 3.Steady-state error and

Lecture 17: Introduction to Control (part III)

1. Example2. PID Control

• Learn about the effect of tuning the P, I, and D gains

3. Steady-state error and system type

ME 4

31

, L

ect

ure

17

1

0control input

t

P D I

deK e K K e dt

dt

Page 2: Lecture 17: Introduction to Control (part III) 1.Example 2.PID Control Learn about the effect of tuning the P, I, and D gains 3.Steady-state error and

Example

• For the following system, design the PD controller (i.e. find KP and KD ) so that the closed-loop step response:• settles to within 2% of its final value in less than 0.5 sec• does not overshoot its final value more than 10% • and for a unit ramp, the ss error is less than 0.02

Page 3: Lecture 17: Introduction to Control (part III) 1.Example 2.PID Control Learn about the effect of tuning the P, I, and D gains 3.Steady-state error and

Example (continued)

• Find the closed-loop transfer function

• Translate transient specifications into transfer function parameters and plot region of the complex plane where the closed-loop poles must be located

Page 4: Lecture 17: Introduction to Control (part III) 1.Example 2.PID Control Learn about the effect of tuning the P, I, and D gains 3.Steady-state error and

Example (continued)

Page 5: Lecture 17: Introduction to Control (part III) 1.Example 2.PID Control Learn about the effect of tuning the P, I, and D gains 3.Steady-state error and

Example (continued)

• Translate into requirements on KP and KD, also include steady-state requirement

Page 6: Lecture 17: Introduction to Control (part III) 1.Example 2.PID Control Learn about the effect of tuning the P, I, and D gains 3.Steady-state error and

Example (continued)

Page 7: Lecture 17: Introduction to Control (part III) 1.Example 2.PID Control Learn about the effect of tuning the P, I, and D gains 3.Steady-state error and

PID Control

• PID controllers are ubiquitous

• Very intuitive, easy to implement

• Provide sophistication in that the control is based not only on the current error, but also the history of the error (integral of error) and the anticipated future error (derivative of error)

ME 4

31

, L

ect

ure

17

( )( )

( )I

P D

KU sC s K K s

E s s

7

Page 8: Lecture 17: Introduction to Control (part III) 1.Example 2.PID Control Learn about the effect of tuning the P, I, and D gains 3.Steady-state error and

PID Control

• We will examine effect of PID control on a canonical 2nd order system to gain insight

ME 4

31

, L

ect

ure

17

2( )

bP s

s as b

( ) ( ) ( )

( ) 1 ( ) ( )

Y s C s P s

R s C s P s

2

( )

(1 ( ))

bC s

s as b C s

8

Page 9: Lecture 17: Introduction to Control (part III) 1.Example 2.PID Control Learn about the effect of tuning the P, I, and D gains 3.Steady-state error and

P Control

• Control effort is proportional to the amount of error

• Cannot set ωn and ζ independently (only one d.o.f.)

ME 4

31

, L

ect

ure

17

( ) PC s K

(1 )n Pb K

2

( )

( ) (1 )P

P

bKY s

R s s as b K

2 n a 2 2 (1 )n P

a a

b K

2 (1 )n Pb K

2

( ) ( )

( ) (1 ( ))

Y s bC s

R s s as b C s

9

Page 10: Lecture 17: Introduction to Control (part III) 1.Example 2.PID Control Learn about the effect of tuning the P, I, and D gains 3.Steady-state error and

P Control

• Effect on steady-state performanceSteady-state value for a unit step reference

larger Kp makes yss 1 … error goes to zero

ME 4

31

, L

ect

ure

170lim ( )ss sy sY s

y(t)

t

1ss error

0 2

1lim

(1 )p

sP

bKs

s as b K s

=(1 )

P

P

bK

b K1

1P

P

K

K

10

Page 11: Lecture 17: Introduction to Control (part III) 1.Example 2.PID Control Learn about the effect of tuning the P, I, and D gains 3.Steady-state error and

PD Control

• With derivative control, do not have to wait for error to get large before control action becomes large, control anticipates the error• Never use D control by itself, amplifies

noise

• Not canonical form, but trends are meaningful• Can place two poles anywhere (2 d.o.f.)

ME 4

31

, L

ect

ure

17

( ) P DC s K K s 2

( )( )

( ) ( ) (1 )P D

D P

b K K sY s

R s s a bK s b K

2

( ) ( )

( ) (1 ( ))

Y s bC s

R s s as b C s

11

Page 12: Lecture 17: Introduction to Control (part III) 1.Example 2.PID Control Learn about the effect of tuning the P, I, and D gains 3.Steady-state error and

PI Control

• Control effort gets larger as error is accumulated

• Cannot use canonical relations because third order with a zero, but tends to make system slower and more oscillatory

ME 4

31

, L

ect

ure

17

( ) IP

KC s K

s

2

( )

( )1

IP

IP

Kb K

Y s sKR s

s as b Ks

3 2 1P I

P I

b K s K

s as b K s bK

2

( ) ( )

( ) (1 ( ))

Y s bC s

R s s as b C s

12

Page 13: Lecture 17: Introduction to Control (part III) 1.Example 2.PID Control Learn about the effect of tuning the P, I, and D gains 3.Steady-state error and

PI Control

ME 4

31

, L

ect

ure

170lim ( )ss sy sY s

• Effect on steady-state performanceSteady-state value for a unit step reference

therefore, steady-state error is zero for a step reference, even for small KI (just takes longer to reach steady state)

0 3 2

1lim

1P I

sP I

b K s Ks

s as b K s bK s

1I

I

bK

bK

13

Page 14: Lecture 17: Introduction to Control (part III) 1.Example 2.PID Control Learn about the effect of tuning the P, I, and D gains 3.Steady-state error and

PID Summary

• Some intuition about the effect of the terms:• Increasing KP: Same amount of error generates a

proportionally larger amount of control … makes system faster, but overshoot more (less stable)

• Increasing KD: Allows controller to anticipate an increase in error, adds damping to the system (reduces overshoot) … can amplify noise

• Increasing KI: Control effort builds as error is integrated over time, helps reduce steady-state error, but can be slow to respond

Note: these guidelines do not hold for all situations … look specifically at how poles are affected

ME 4

31

, L

ect

ure

17

14

Page 15: Lecture 17: Introduction to Control (part III) 1.Example 2.PID Control Learn about the effect of tuning the P, I, and D gains 3.Steady-state error and

PID Control

• For systems that are not canonical first or second order, need to use trial and error … can look for reduced-order approx• Following are helpful, though not always true

ME 4

31

, L

ect

ure

17

KP ↑ KD ↑ KI ↑ss error ↓ --- ↓

rise time ↓ --- ?settling time --- ↓ ? (↑)

overshoot ↑ ↓ ? (↑)15

Page 16: Lecture 17: Introduction to Control (part III) 1.Example 2.PID Control Learn about the effect of tuning the P, I, and D gains 3.Steady-state error and

System Type

• In previous example, saw that adding integral control enabled our plant to track a step input with zero steady-state error

• This trend is true in general, the presence of pure integrators (poles at the origin) reduce steady-state error to all types of inputs

• The number of integrators is identified by a system’s type

ME 4

31

, L

ect

ure

17

16

Page 17: Lecture 17: Introduction to Control (part III) 1.Example 2.PID Control Learn about the effect of tuning the P, I, and D gains 3.Steady-state error and

System Type

• Definition: The number of poles at the origin in the forward path of a unity feedback control system is called the system’s type

• Poles at origin can be in the controller or the plant

ME 4

31

, L

ect

ure

17

1the above for ( ) ( ) has type

( 4)n

sC s P s n

s s

17

Page 18: Lecture 17: Introduction to Control (part III) 1.Example 2.PID Control Learn about the effect of tuning the P, I, and D gains 3.Steady-state error and

System Type

Error for a unity-feedback system

ME 4

31

, L

ect

ure

17

Step Inputr(t) = 1

Ramp Inputr(t) = t

Accel Inputr(t) = ½t2

Type 0 system

nonzero ∞ ∞

Type 1 system

0 nonzero ∞

Type 2 system

0 0 nonzero 18

Page 19: Lecture 17: Introduction to Control (part III) 1.Example 2.PID Control Learn about the effect of tuning the P, I, and D gains 3.Steady-state error and

System Type

ME 4

31

, L

ect

ure

17

Step Inputr(t) = 1

Ramp Inputr(t) = t

Accel Inputr(t) = ½t2

Type 0 system

∞ ∞

Type 1 system

0 ∞

Type 2 system

0 0

ss1 2 3

( 1)( 1)( 1)if ( ) ( ) then e equals

( 1)( 1)( 1)a b c

n

K T s T s T sC s P s

s T s T s T s

1

1 K

1

K

1

K

19