Towards Petascale Computing

Download Report

Transcript Towards Petascale Computing

Feedback Control of Computing Systems
M6: Control Design
Joseph L. Hellerstein
IBM Thomas J Watson Research Center, NY
[email protected]
September 23, 2004
Feedback Control of Computing Systems
© 2004 Hellerstein
Motivating Example
u(k) = u(k-1)+(KP+KI)e(k)+KPe(k-1) w(k + 1)  (0.43)w(k ) + (0.47)u(k )
r (k )
+
-
e(k )
Controller
u (k )
Notes
Server
y(k + 1)  0.8 y(k ) + 0.72w(k ) - 0.66w(k -1)
w(k )
Notes
Sensor
y (k )
e(k )  r (k ) - y(k )
The problem
Design a control system that is stable, accurate, settles quickly, and has small
overshoot.
Determine the values of control gains that achieve the design objectives.
2
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein
M6:
Lecture
3
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein
Outline



Control design methodology
Simple application
In-class lab: Designing a load balancing system
Reference: “Feedback Control of Computer Systems”, Chapters 8,9.
4
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein
Key Results for LTI Systems
U(z)
G(z)
Y(z)
Adding signals:
If {a(k)} and {b(k)} are signals, then
{c(k)=a(k)+b(k)} has Z-Transform
A(z)+B(z).
0.5
2
A(z)
+
0.4
C(z)
1.5
y(k)
+
u(k)
0.3
1
B(z)
0.2
0.5
Transfer functions in series
0.1
U(z)
0
0 10 20 30
k
G(z)
0
0 10 20 30
k
W(z)
H(z)
Y(z)
is equivalent to
Stable if |a|<1, where a is the largest pole of G(z)
kS 
-4
, where| a | is thelargest poleof G(z)
log | a |
y ( )
 G (1)
ssg of G(z) is
u ( )
5
U(z)
FR ( z ) 
G(z)H(z)
Y(z)
T ( z)
K ( z )G( z )

R( z ) 1 + H ( z ) K ( z )G( z )
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein
Control Design

Purpose


Steps
1.
2.
3.
4.
6
Determine the value of the control gains
Specify the control objectives, such as settling time, maximum overshoot.
Determine the desired poles from the objectives
Find the modelled transfer function of the system for which the controller is being
designed
 The denominator is expressed in terms of the control gains
Solve for the control gains by equating terms in the denominator of step 3 with the
expanded polynomial from step 2.
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein
Example of Applying the Design Methodology: Step 1
y(k) = 0.43y(k-1)+0.47u(k-1)
u(k) = u(k-1)+(KP+KI)e(k)+KPe(k-1)
r (k )
+
-
e(k )
Controller
u (k )
Notes
Server
y (k )
Specify the control objectives
Settling times should be no more than 3 time units.
7
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein
Example of Applying the Design Methodology: Step 2
y(k) = 0.43y(k-1)+0.47u(k-1)
u(k) = u(k-1)+(KP+KI)e(k)+KPe(k-1)
r (k )
+
e(k )
-
Controller
u (k )
Notes
Server
y (k )
FR ( z ) 
T ( z)
K ( z )G( z )

R( z ) 1 + H ( z ) K ( z )G( z )
Determine the desired poles from the objectives
Must specify two poles since the closed loop system is second order.
kS 
ae
8
-4
, where| a | is thelargest poleof G(z)
log | a |
-4
kS
e
-4
3
 0.26
Use 0.1 as the second pole.
Settling time is determined by the largest pole.
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein
Example of Applying the Design Methodology:Step 3
y(k) = 0.43y(k-1)+0.47u(k-1)
u(k) = u(k-1)+(KP+KI)e(k)+KPe(k-1)
r (k )
+
-
e(k )
Controller
u (k )
y (k )
Notes
Server
Find the modelled transfer function in terms of the control gains
U ( z) (K P + K I ) z - K P

E( z)
z -1
0.47
G( z) 
z - 0.43
H ( z)  1
( K P + K I ) z - K P 0.47
FR ( z ) 
( z - 1)(z - 0.43) + ( K P + K I ) z - K P 0.47
K ( z) 

9
FR ( z ) 
Y ( z)
K ( z )G( z )

R( z ) 1 + H ( z ) K ( z )G( z )
( K P + K I ) z - K P 0.47
z 2 + (0.47K P + 0.47K I - 1.43) z + 0.43 - 0.47K P
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein
Example of Applying the Design Methodology: Step 4
y(k) = 0.43y(k-1)+0.47u(k-1)
u(k) = u(k-1)+(KP+KI)e(k)+KPe(k-1)
r (k )
+
-
e(k )
Controller
u (k )
Notes
Server
y (k )
Solve for the control gains
Desired denominator of transferfunction: ( z - 0.26)(z - 0.1)  z 2 - 0.36z + 0.026
Denominator of themodelled transferfunction: z 2 + (0.47K P + 0.47K I - 1.43) z + 0.43 - 0.47K P
Equate coefficients by degree of z
0.47K P + 0.47K I - 1.43  -0.36
0.43 - 0.47K P  0.026
K P  0.86, K I  1.42
10
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein
M6:
Group Lab
11
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein
Methodology for Building Control Systems
1.
2.
3.
4.
5.
6.
7.
12
Draw and describe the system (e.g., components, interactions)
Determine the control objectives (regulation? disturbance rejection?)
Draw a control block diagram of the system
Do a simple simulation of the control system (comparing with the real system if
possible)
Find the transfer functions and validate with the simulation
Do a control design
Check the design with the simulation and the real system
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein
Designing a Load Balancing System for 2 Servers
queue depth
requests
Balancer 1
Requests
Work
Queue
Completions
Server 1
Queue Depths
Completions
requests
Balancer 2
Server 2
queue depth
Operation
1. Incoming requests are placed in work queue.
2. Balancers take requests at a rate so as to balance queue depths between the
servers.
3. Controllers know the queue depth of the other server (although information
may be delayed).
4. Servers may have additional work that adds to their queue depths. But
servers do not drop requests (at least in the load range studied).
13
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein
Designing a Load Balancing System for 2 Servers
queue depth
requests
Balancer 1
Requests
Work
Queue
Completions
Server 1
Queue Depths
Completions
requests
Balancer 2
Server 2
queue depth
Questions
1. How should the balancers be designed so that loads are balanced and steady
state is achieved quickly?
2. How does additional work in one server affect the other server?
3. What is the impact of delays in exchanging queue depth information?
4. What happens if one system is faster than the other system?
14
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein
Step 2: Determining the Control Objectives
queue depth
Balancer 1
Requests
Work
Queue
requests
Server 1
Completions
Queue Depths
Balancer 2
requests
Server 2
Completions
queue depth
What is the control objective?
1. Regulation?
2. Disturbance rejection?
3. Optimization?
15
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein
Step 3: Construct the Control Block Diagram
queue depth
Balancer 1
Requests
Work
Queue
requests
Server 1
Completions
Queue Depths
Balancer 2
requests
Server 2
Completions
queue depth
Target system? Controller? Reference input? Measured output? Control input?
What do we know about the transfer functions for the servers?
16
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein
A Possible Control Diagram
D1(z)
R1(z)
+
E1(z)
-
+ Y(z)
Balancer 1
K1(z)
V1(z)
+ U1(z)
+
Server 1
G1(z)
Y1(z)
G2(z)
Y2(z)
0.5
+
R2(z)
+
K2(z)
E2(z)
Balancer 2
V2(z)
+
+
U2(z)
Server 2
D2(z)
17
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein
Step 4: Construct a Simple Simulation

See ShortClass-M6


18
Assume first order system for servers
Consider P and I control
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein
Step 5a: Identify the transfer functions to study
D1(z)
+
+
E1(z)
-
Balancer 1
K1(z)
+
Server 1
G1(z)
+
Y1(z)
0.5
-
+
+
K2(z)
E2(z) Balancer 2
+
+
G2(z)
Y2(z)
Server 2
D2(z)
What are the input signals? What are the output signals?
19
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein
Step 5a (continued): Identify the Transfer Functions
D1(z)
+
+
E1(z)
-
Balancer 1
K1(z)
+
Server 1
G1(z)
+
Y1(z)
0.5
-
+
+
K2(z)
E2(z) Balancer 2
+
+
G2(z)
Y2(z)
Server 2
D2(z)
From Di(z) to Ei(z): Effect of disturbance on the system on which the disturbance occurred
From Di(z) to Ej(z): Effect of disturbance on the other system.
Fij ( z ) 
Ei ( z ) 
20
E j ( z)
Di ( z )
,
Y j ( z ) - Yi ( z )
2
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein
Step 5b: Construct the Transfer Functions
D1(z)
+
+
E1(z)
-
Balancer 1
K1(z)
+
Server 1
G1(z)
+
Y1(z)
0.5
-
+
+
K2(z)
E2(z) Balancer 2
+
+
G2(z)
Y2(z)
Server 2
D2(z)
Express Yi(z) interms of Yj(z) and the transfer functions and then do a lot of algebra.
Yi ( z ) 
Y j ( z ) - Yi ( z )
2
K i ( z )Gi ( z ) + Di ( z )Gi ( z )
Ei(z)
21
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein
Step 5b: Construct the Transfer Functions
D1(z)
+
+
E1(z)
-
Balancer 1
K1(z)
+
Server 1
G1(z)
+
Y1(z)
0.5
-
+
+
K2(z)
E2(z) Balancer 2
+
+
G2(z)
Server 2
Y2(z)
Questions
1. What is the control error if
the servers, balancers, and
distrubances are identical?
2. What controller will ensure a
zero control error even if the
systems and disturbances
are different? Why?
D2(z)
Fii ( z )  F ji ( z ) 
0.5Gi ( z )
1 + 0.5K i ( z )Gi ( z ) + 0.5K j ( z )G j ( z )
0.5G j ( z )
Observe thatFii ( z)  -Fij ( z)
1 + 0.5K i ( z )Gi ( z ) + 0.5K j ( z )G j ( z )
Recall that
Ei ( z )  Di ( z ) Fii ( z ) + D j ( z ) F ji ( z )
22
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein
Step 5b: Why I-Control Ensures Balanced Systems
D1(z)
+
+
E1(z)
-
Balancer 1
K1(z)
+
Server 1
G1(z)
+
Y1(z)
K i ( z )  K I ,i
0.5
-
+
+
K2(z)
E2(z) Balancer 2
+
+
G2(z)
z
z -1
Y2(z)
Server 2
D2(z)
0.5Gi ( z )
Fii ( z )  1 + 0.5K i ( z )Gi ( z ) + 0.5K j ( z )G j ( z )

See how theory compares with
simulation.
0.5G j ( z )(z - 1)
z - 1 + 0.5K I ,i Gi ( z ) z + 0.5K I , j G j ( z ) z
Whatis Fii (1)?
23
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein
Assignment: 2 Weeks
1 - ai
z
Suppose thatGi ( z ) 
and K ( z )  K I ,i
.
z - ai
z -1
1.
2.
3.
4.
24
Find the poles of the load balancing system for identical servers
that have poles at 0.5.
Now change the controller and do a PI design.
Expand to more systems
Study the effect of delays, especially if delays are not the same
between systems
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein
Summary

Approach to control design



Load balancing case study


25
Limited to systems that are second order in closed loop
(More general approaches typically recall MIMO models.)
Optimization instead of regulation
 But still uses linear time invariant models
Systematic methodology makes use of simulation, analysis, and (hopefully) real
systems
Feedback Control of Computing Systems: M6 – Control Design
© 2004 Hellerstein