University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

58
University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia

Transcript of University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

Page 1: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Proportional Control

Spring 2015

Jack StankovicUniversity of Virginia

Page 2: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Outline

• Definition and Value of Proportional Control

• (Review) Desirable Properties of a Controller

• Analyzing Proportional Control– Root Locus

• P-Controller Design / Pole Placement Design

Page 3: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Proportional Control

• Control Law– It quantifies how to set control input to the target system

• Proportional Control Law

u(k) = Kpe(k)

• Kp is a constant that is chosen when designing the proportional controller

Page 4: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Kp G(z)R(z) E(z) Y(z)+

-

+ +U(z)

D(z)

Proportional Control

Feedback ControlUsing P Control

(set the control proportionalto the error)

Controller Target System

Page 5: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

43.0

47.0

)(

)()(

zzU

zYzG

Note: Simulation is in time domain

System youwant to control

Systemstarts atzero

Goal

Steady State GainG(1) = y(ss)/u(ss)

and if goal is y(ss) = 10=> u(ss) = 12

OPENLOOP

Page 6: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Why is u(ss) = 12

• G(1) = y(ss)/u(ss)

• G(1) = .47/(1-.43) = .82

• y(ss)/u(ss) = 10/u(ss) = .82 (goal is 10)

• 12 = u(ss)

Page 7: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Disturbance

Outputnot atdesired Value

y(ss) = 26.3

Page 8: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Why is y(ss) = 26.3

• G(1) = y(ss)/[u(ss) + d(ss)]

• .82 = y(ss)/(12 + 20) * recall from before .47/(1-.43) = .82

• .82 * 32 = y(ss)

• 26.3 = y(ss)

Page 9: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Let Kp = 2

Just guessTrial and Error

Page 10: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Output

Page 11: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Proportional Controller

Kp G(z)

R(z) E(z) T(z)+

-

+ +U(z)

D(z)

Feedback using Proportional Control in the presence of measurement noise

+ +

N(z)

Y(z)

Page 12: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Simulation of a P Controller with disturbance and noise

G(z)=0.47/(z-0.43), and Kp=2

SteadyStateError

Page 13: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Advantages of Proportional Control

•Does not require precise analytical model of the system being controlled

•Simple implementation

•Proper for applications with simple requirements (Overshoot, settling time, stability)

Page 14: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Deficiency of Proportional Control

• May cause steady-state error to be nonzero

– Disturbance input is non zero– Noise input

• May cause oscillations

• Generally, one or more of the requirements for response time, overshoot, and oscillation may be impossible to fulfill at any proportional gain setting

Page 15: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Review - Desirable Properties

of Controllers•SASO

•S: Stability•A: Accurate, steady-state error•S: Settling Time•O: Maximum Overshoot

Page 16: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Desirable Properties of Controllers

• SASO Properties in the step response of a closed-loop system.

Settling time

Overshoot

Controlledvariable

Time

Reference

%

Steady StateTransient State

Steady state error

Page 17: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Analyze Properties of Controllers

•Stability

–For any bounded input over any amount of time, the output will also be bounded. “BIBO”

– In P-Control, stability is assessed by determining if the poles of the closed-loop transfer function have a magnitude less than 1 (pole must be in the unit circle)

Page 18: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Analyze Properties of Controllers

•Accuracy

– Quantified by the magnitude of the steady state control error.

– In P-Control, accuracy is assessed by computing the steady-state gain.

»There is a zero steady-state error if and only if this gain is 1.

Page 19: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Analyze Properties of Controllers

•Accuracy

ssssk

ss yrkykre

)()(lim

Page 20: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Analyze Properties of Controllers

•Accuracy

•Note also that steady-state error can be reduced by using a larger Kp.

))1(1)(1(

1

ifonly

0

HGK

e

p

ss

(see handoutfor derivation)

Page 21: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Analyze Properties of Controllers

•Settling Time

– Settling time is a function of the closed-loop poles and is estimated using the following equation by employing the dominant pole approximation.

pks log

4

Page 22: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Analyze Properties of Controllers

•Overshoot

– Overshoot is a property of the response to a step change in the reference input.

– Overshoot is also suggestive of oscillatory behavior since a large overshoot is typically followed by a large undershoot.

– Analyzed by an approximation

Page 23: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Analyze Properties of Controllers

•Maximum Overshoot - Mp

•Mp is used to denote the maximum overshoot to a unit step input.

•Mp = |y(max) – y(ss)| / |y(ss)|

Page 24: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Maximum Overshoot

•For the first order STABLE system–By definition Mp=0 if y(ss) > y(max)

–Mp=|p1| otherwise

Page 25: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Analyze Properties of Controllers

•Second order STABLE system (Approx.)

• if real dominant pole p1>=0

• if real dominant pole p1<0• if dominant poles

0pM

1pM p /rM p

jrepp 21,

Note: Poles are in unit circle if stable

Page 26: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Analyze Properties of Controllers

K(z) G(z)

R(z) E(z) T(z)+

-

+ +U(z)

D(z)

Closed-loop system

+ +

N(z)

Y(z)

H(z)

W(z)

Page 27: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Analyze Properties of Controllers

•Closed-loop Transfer Functions

)()()(1

)()(

)(

)()(

zHzGzK

zKzG

zR

zYZFR

)()()(1

)(

)(

)()(

zHzGzK

zG

zD

zYZFD

)()()(1

1

)(

)()(

zHzGzKzN

zTZFN

)()()()()()()( zNzFzDzFzRzFZT NDR

Page 28: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Method to analyze p-controller

• From the example, three transfer functions have the same poles, which are the solutions to the characteristic equation

• To visualize the relation between Kp and closed-loop poles, we introduce the root locus of the system

0)()()(1 zHzGzK

Page 29: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Root Locus

• The root locus is a graphical procedure for determining the poles of a closed-loop system given the poles and zeros of a forward-loop system.

• Graphically, the locus is the set of paths in the complex plane traced by the closed-loop poles as the root locus gain is varied from zero to infinity.

Page 30: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Root Locus

• In p-control, the root locus is the locations of all possible roots of the characteristic equation as Kp varies from zero to infinity

Page 31: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

• IBM Lotus Domino Server with measurement delay

K(z) G(z)

R(z) E(z)+

-

U(z)

P control with Measurement Delay

Y(z)

H(z) = Z-

2

W(z)

Example

Page 32: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Example

• IBM Lotus Domino Server with measurement delay

• 43.0

47.0

)(

)()(

zzU

zYzG

2

1

)(

)()(

zzY

zWzH

Pole at .43

Two poles atzero

Page 33: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

43.0

47.0

)(

)()(

zzU

zYzG H(z) = 1/z*z

Example of Root Locus for 3 Pole SystemGiven Below

Two polesAt zero

PoleAt.43

1 + K(z)G(z)H(z)

Page 34: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Analyze Properties of Controllers

•In P-Control, the closed-loop system is stable at the values of Kp that make all the poles lie inside the unit circle.

•Any system that has at least one zero at infinity will always become unstable for a large enough Kp.

Page 35: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Root Locus/Matlab

•Specify transfer function>>G = tf(np,dp)

where np = numerator polynomial

dp = denominator polynomial

•Plot root locus figure of transfer function G>>rlocus(G)

Page 36: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Design of Proportional Controllers• So far, we analyzed properties of a P

controller based on a specific value of Kp (like Kp=2) or found all values of Kp that make system stable.

• Instead, design the controller, choosing Kp, so that the resulting system has desirable properties. (SASO)

• Pole Placement Design:– Select controller parameters to get desired closed-loop

poles.

Page 37: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Pole Placement Design• Step 1. Determine the required SASO

properties of the closed-loop system. • Step 2. Construct the closed-loop transfer

function as a function of the proportional gain KP.

• Step 3. Solve for the closed-loop poles in terms of KP.

• Step 4. Derive KP from the equation that modeled poles are equal to the desired poles. (Take intersection of solutions)

• Step 5. Check Robustness

Page 38: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Example for Pole Placement Design

• For Proportional Control of the IBM Locus Domino Server

• Step 1. Decide Design Goals

• Stability

• ess<0.1

• ks<10

• MP<0.1

43.0

47.0

)(

)()(

zzU

zYZG

Note: May not be satisfied! (new control needed or relax requirements)

Recall: obtainedby system ID

Page 39: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Pole Placement• Step 2. Closed loop transfer function.

P

PR Kz

K

zR

zYzF

47.043.0

47.0

)(

)()(

This is first order so one pole.

Page 40: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Pole Placement

• Step 3. Consider 4 goals separately.

147.043.01 PKp

1.047.043.01

47.01)1(1

P

PRss K

KFe

1047.043.0log

4

P

s Kk

1.047.043.0 PP KM

Must be in unit circle

Page 41: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Pole Placement

• Step 4. Solve for the conditions on Kp – one at a time

• Stability: -1.21 < KP < 3.0

147.043.01 PKp

Page 42: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Step 4 continued

• Steady State error: ess< 0.1: KP > 10.9

• Recall – this is derived from the final value theorem and only valid if system is stable AND KP must be less than 3.0 to be stable BUT greater than 10.9 for this error

• Hence, this e(ss) cannot be satisfied

1.047.043.01

47.01)1(1

P

PRss K

KFe

Page 43: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Step 4 continued

• Setting time requirement ks< 10• Depends on magnitude of largest closed

loop pole• With absolute value we get two

inequalities

-0.51 < KP < 2.3

1047.043.0log

4

P

s Kk

Page 44: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Step 4 continued

• Overshoot requirement MP < 0.1: KP < 1.1

1.047.043.0 PP KM

Page 45: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Step 4 continued

•Overall Solution:

– Intersection of equations from 1 to 4

– Bound on steady state error is not possible

– But if -0.51 < KP < 1.1 (meets other requirements)

Page 46: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Step 5: Robustness of P-Control System

• A controller is robust if its behavior does not change much if there are errors in estimating parameters of the target system.

• For stability,

1 bKa P

Page 47: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

• Robustness of P-Control to errors in estimating the open-loop pole and gain of a first-order target system with a=0.43, b=0.47.

Step 5: Robustness

Page 48: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Summary

•Basics of P Control•How to analyze properties of a P

controller (for a given Kp)•How to use pole placement design to

select the right parameter for the P controller to meet requirements

•Introduction to Root Locus

Page 49: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Extra Slides

•These following slides were not presented in class

Page 50: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Design of Proportional Controllers• Another example

• IBM Lotus Domino Server with a Moving-Average Filter

• The stochastic nature of resource consumption in computing systems typically results in substantial variability, especially for performance metrics such as response times, queue lengths, and utilizations.

• So a MOVING-AVERAGE FILTER is used to mitigate the effect of the stochastics.

Page 51: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Moving-Average Filter• The input of the moving-average filter is the

“raw” signal and its output is a smoothed signal. • Y(k) is the unfiltered signal and w(k) is the

filtered signal.• w(k+1) = cw(k) + (1-c)y(k)• The filter has a transfer function

cz

c

zY

zWZH

1

)(

)()(

Page 52: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Moving-Average Filter•w(k+1) = cw(k) + (1-c)y(k)

•C is a constant, 0 <= c < 1•If c = 0, the output has the same

time-domain characteristics as the input signal, although it is delayed by one time step.

•Value of c greater than 0 specifies the degree of smoothing.

Page 53: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Moving Average Filter• Effect of a moving average filter on a sine wave

for different values of the filter parameter c.

Page 54: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Design of Proportional Controllers

KpR(z) E(z) Y(z)+

-

U(z)

Moving Average Filter used in IBM Lotus Domino Server

az

b

Controller Lotus Server

W(z) cz

c

1

Page 55: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Design of Proportional Controllers

•Two parameters Kp and c need to be set

•We plot the relations between Kp/c and desirable properties of controllers.

P

PR Kcczz

cK

zR

zYZF

)1(47.0))(43.0(

)1(47.0

)(

)()(

Page 56: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Design of Proportional Controllers• Effect of a moving average filter constant c and

the proportional gain Kp

Page 57: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Design of Proportional Controllers• From the plots

• c does not affect steady-state error,• A large kp decreases ess

• When c is small, ks increases when kp increases; when c is large, ks decreases as kp increases.

• When c is small, Mp increases when kp increases; when c is large, Mp decreases as kp increases.

• Finally, c = 0.95 and Kp = 2 is good!

Page 58: University of Virginia Proportional Control Spring 2015 Jack Stankovic University of Virginia.

University of Virginia

Limit Cycle

•How can CPU utilization be unbounded?– It must vary somewhere between zero and one (so

not unbounded)– Implies – can’t be unstable???

– For these types of physical systems where the “physics” of the system do not permit BIBO stability issues

» Instability is manifested as a limit cycle CPU utilization bounces between zero and

one