Professional Documents
Culture Documents
C(s)
ample
Utilization control in a video server
Periodic task T
i
corresponding to each video stream i
c|i]: processing time, p|i]: period
Stream i's requested CPU utilization: u|i]=c|i]/p|i]
Total CPU utilization: U(t)=%
<k}
u|k], <k} is the set of
active streams
Completion rate: R
c
(t)= (%
<kc}
u|m])/t, where <m} is
the set of terminated video streams during |t, t+t]
Unknown
dmission rate: R
a
(t)= (%
<ka}
u|j])/t, where <j} is the
set of admitted streams during |t, t+t]
Problem: design an admission controller to guarantee
U(t)=U
s
regardless of R
c
(t)
Model
ifferential equation
&(t)
R
a
(t)
C?
&
s
CPU
R
c
(t)
- odel (differential equation):
t
c a
d R R t U
0
)) ( ) ( ( ) (
:
: : :
- Error: E(t)=U
s
U(t)
- Controller C? E(t) R
a
(t)
Three ways of system modeling
iverge to Math
8ystem representations
u(t)
g(t) y(t)
t
d u t g t u t g t y
0
) ( ) ( ) ( * ) ( ) ( : : :
- Time domain: convolution, differential equations.
U(s) C(s) Y(s)
) ( ) ( ) ( s U s G s Y
- s (frequency) domain: multiplication
s-domain is a simple & powerIul 'language Ior control analysis
- Block diagram: pictorial
Laplace transform of a signal f(t)
iverge to Math
Laplace transform
0
) ( )| ( | ) ( dt e t f t f L s F
st
where s=9+i is a complex variable.
- Laplace transform is a translation from timedomain to
sdomain
- Differential equation Polynomial function
) ( ) ( ) ( ) ( ) (
0 1 0 1 2
t u b t u b t y a t y a t y a
O O O O
) ( ) (
0 1
2
2
0 1
s U
a s a s a
b s b
s Y O
Basic translations
mpulse function f(t)=0(t) F(s)=1
Step signal f(t)=a-1(t) F(s)=1/s
Ramp signal f(t)=a-t F(s)=a/s
2
Exp signal f(t)=e
at
F(s)=1/(sa)
Sinusoid signal f(t)=sin(at) F(s)=a/(s
2
+a
2
)
Composition rules
Linearity L|af(t)+bg(t)] = aL|f(t)]+bL|g(t)]
Differentiation L|df(t)/dt] = sF(s) - f(0
)
ntegration L|
t
f(:)d:] = F(s)/s
iverge to Math
Laplace transform
iverge to Math
Transfer function
odeling a linear timeinvariant (LT)
system
C(s) = Y(s)/U(s) Y(s) = C(s)U(s)
U(s) C(s) Y(s)
2
2
1
1
0 1
2
2
0 1
) (
p s
c
p s
c
a s a s a
b s b
s G
"
"
t p
3
3
3
3
3
3
2
2
2
2
e C t f
p s
C
p s
C
p s
C
p s
: s
K
a s a s a
b s b s b
s F
1
2
2
1
1
1
1
0
1
1
0
1
1
) (
...
) (
) (
...
...
) (
<p
i
} are poles of the function and decide the system behavior
iverge to Math
Time response vs. pole location
-f'(t) = e
pt
, p = a+bj
Unstable Stable
iverge to Math
Block diagram
pictorial tool to represent a system based on transfer
functions and signal flows
Represent a feedback control system
C(s)
R(s)
Y(s)
C
o
(s)
R(s) Y(s) C
c
(s)
) ( ) ( ) (
) ( ) ( 1
) ( ) (
s R s G s Y
s G s C
s G s C
G
c
o
o
c
Back to
ur utilization control eample
&(t)
R
a
(t)
C?
&
s
CPU
R
c
(t)
- odel (differential equation):
t
c a
d R R t U
0
)) ( ) ( ( ) (
:
: : :
- Error: E(t)=U
s
U(t)
- Controller C? E(t) R
a
(t)
Model
Transfer func. & block diag.
nputs: reference U
s
(s) = U
s
/s, completion rate R
c
(s)
Closeloop system transfer functions
U
s
(s) as input: C
1
(s) = C(s)C
o
(s)/(1+C(s)C
o
(s))
R
c
(s) as input: C
2
(s) = C
o
(s)/(1+C(s)C
o
(s))
Output: U(s)=C
1
(s)U
s
/s+C
2
(s)R
c
(s)
s
s G
s
s R s R
s U d R R t U
o
a a
t
c a
1
) (
) ( ) (
) ( )) ( ) ( ( ) (
0
:
: : :
- CPU is modeled as an integrator
R
c
(s)
C
o
U
s
/s
R
a
(s)
U(s)
C(s)
Control design methodology
ontroller
Design
Root-Locus PI
ontrol
Requirement
Analysis
Modeling
analytical
system IDs
Dynamic model ontrol algorithm
Performance Specifications
Satisfy
esign Goals
Performance 8pecifications
Stability
Transient response
Steadystate error
Robustness
Disturbance rejection
Sensitivity
Performance 8pecs
8tability
BBO stability: bounded input results in bounded output.
LT system is BBO stable if all poles of its transfer function
are in the LHP (p
i
, Re|p
i
]<0).
0 | Re| :
) (
...
) (
) (
) ( ) ( ) (
1
2
2
1
1
1
1
C P P F P
"
"
C F
t
t p
t p
3
3
p f e C Note
e C t y
p s
C
p s
C
p s
C
p s
: s
K s U s G s Y
Performance 8pecs
8tability
Unstable Stable
Performance specifications
Settling time
Overshoot
ontrolled
variable
Time
Reference
I1
Steady State Transient State
Steady state error
ample: Control & Response
in an mail 8erver {BM_
Control
(axUsers)
Response
(queue length)
Cood
Slow
Bad
Useless
Performance 8pecs
8teady-state error
Steady state (tracking) error of a stable system
)) ( ) ( ( lim ) ( lim t y t r t e e
t t
ss
C F C F
r(t) is the reference input, y(t) is the system output.
- How accurately can a system achieve the desired state?
- Final value theorem: if all poles of sF(s) are in the open lefthalf
of the splane, then
) ( lim ) ( lim
0
s sF t f
s t F C F
C
o
(s)
E(s) X(s)
s KK s C t e KK t x
d d
O
) ( ) ( ) (
K s C t Ke t x ) ( ) ( ) (
s
KK
s C d e KK t x
t
) ( ) ( ) (
0
: :
- Proportional Control
- ntegral control
- Derivative control
- Classical controllers with wellstudied properties and tuning rules
Controller esign
CPU Utilization Control
nputs: setpoint U
s
(s) = U
s
/s, task completion R
c
(s)
Closeloop system transfer functions
U
s
(s) as input: C
1
(s) = C(s)C
o
(s)/(1+C(s)C
o
(s))
R
c
(s) as input: C
2
(s) = C
o
(s)/(1+C(s)C
o
(s))
C(s)=? to achieve zero steadystate error: U(t) F U
s
s
s G
s
s R s R
s U d R R t U
o
a a
t
c a
1
) (
) ( ) (
) ( )) ( ) ( ( ) (
0
:
: : :
- CPU is modeled as an integrator
R
c
(s)
C
o
U
s
/s
R
a
(s)
U(s)
C(s)
Proportional Control
8tability
Proportional Controller
r
a
(t)=Ke(t), C(s) = K
Transfer functions
U
s
/s as input: C
1
(s) = K/(s+K)
R
c
(s) as input: C
2
(s) = 1/(s+K)
Stability
Pole p
0
= K<0 System is BBO stable iff K>0
Note: System may shoot to 100 if K<0!
R
c
(s)
C
o
U
s
/s
R
a
(s)
U(s)
C(s)
Proportional Control
8teady-state error
ssume completion rate R
c
(t) keeps constant for a time
period longer than the settling time: R
c
(s)=R
c
/s
System response is
) (
) ( ) (
) (
2 1
K s s
R KU
s
s G R
s
s G U
s U
c s c s
- Compute steadystate err using final value theorem,
0 lim ) ( lim ) ( lim
0 0
F F C F
K
R
e
K
R
U
K s
R KU
s sU t U
c
ss
c
s
c s
s s t
- Pcontrol cannot achieve the desired CPU utilization U
s
, instead
it will end up lower by R
c
/K Oops!
- The larger the proportional gain K is, the closer will CPU
utilization approach to U
s
CPU Utilization
Proportional Control
U(t)
e
ss
=20
U
s
Proportional-ntegral Control
8tability
Proportional Controller
r
a
(t)=K(e(t)+K
i
-
t
e(:)d:) C(s) = K(1+K
i
/s)
Transfer functions
U
s
/s as input: C
1
(s) = (Ks+KK
i
)/(s
2
+Ks+KK
i
)
R
c
(s) as input: C
2
(s) = s/(s
2
+Ks+KK
i
)
Stability
Poles Re|p
0
]<0, Re|p
0
]<0
System is BBO stable iff K>0 S K
i
>0
R
c
(s)
C
o
U
s
/s
R
a
(s)
U(s)
C(s)
Proportional Control
8teady-state error
ssume completion rate R
c
(t) keeps constant for a time
period longer than the settling time: R
c
(s)=R
c
/s
System response is
- Compute steadystate err using final value theorem,
- P control can accurately achieve the desired CPU utilization U
s
b
- Control analysis gives design guidance
) (
) ( ) ( ) (
) (
2
2 1
s c s c s
KK Ks s s
U KK s R KU
s
s G R
s
s G U
s U
0
) (
lim ) ( lim ) ( lim
2
0 0
F F C F
ss s
s c s
s s t
e U
KK Ks s
U KK s R KU
s sU t U
CPU Utilization
Proportional-ntegral Control
U(t)
e
ss
=0
t
s
t
r
t
p
p
=
0 U
s
Controller esign
8ummary & pointers
PD control: simple, works well in many systems
P control: may have nonzero steadystate error
control: improves steadystate tracking
D control: may improve stability S transient response
Linear continuous time control
Rootlocus design
Frequencyresponse design
Statespace design
C. F. Franklin et. al., Feedback control of dynamic systems
iscrete Control
ore useful for computer systems
Time is discrete, sampled system
denoted k instead of t
ain tool is ztransform
f(k) FF(:) , where : is complex
nalogous to Laplace transform for sdomain
0
) ( ) ( )| ( |
k
k
: k f : F k f
iscrete Modeling
Difference equation
v(m) = a
1
v(m1) + a
2
v(m2) + b
1
U(m1) + b
2
U(m2)
z domain: v(z) = a
1
z
1
v(z) + a
2
z
2
v(z) + b
1
z
1
U(z) + b
2
z
2
U(z)
Transfer function C(z) = (b
1
z + b
2
)/(z
2
a
1
z a
2
)
v(m): output in m
th
sampling window
U(m): input in m
th
sampling window
Order n: #samplingperiods in history affects current
performance
SP = 30 sec, and n = 2 Current system performance
depends on previous 60 sec
Root Locus analysis of
iscrete 8ystems
Stability boundary: :1 (Unit circle)
Settling time = distance from Origin
Speed = location relative to m axis
Right half = slower
Left half = faster
ffect of discrete poles
:1
Longer settling time
Re(s)
I2(s)
Unstable
Stable
Higherfrequency
response
Ts
e : : ntuition
Feedback control works in C8
U.ass: network flow controllers (TCP/P - RED)
B: Lotus Notes admission control
UUC: Distributed visual tracking
Uv
Web Caching QoS
pache Web Server QoS differentiation
ctive queue management in networks
Processor thermal control
Online data migration in network storage (with HP)
Realtime embedded networking
Control middleware
Feedback control realtime scheduling
dvanced Control Topics
Robust Control
Can the system tolerate noise?
daptive Control
Controller changes over time (adapts)
O Control
ultiple inputs and/or outputs
Stochastic Control
Controller minimizes variance
Optimal Control
Controller minimizes a cost function of error and control energy
Nonlinear systems
Neurofuzzy control
Challenging to derive analytic results
ssues for Computer
8cience
ost systems are nonlinear
But linear approximations may do
eg, fluid approximations
Firstprinciples modeling is difficult
Use empirical techniques
apping control objectives to feedback control
loops
ControlWare paper
Deeply embedded networking
assively decentralized control problem
odelling
Node failures
cknowledgements
Uv
ack Stankovic
Tarek F. bdelzaher
Sang H. Son
Cang Tao
HP Labs
Cuillermo lvarez
B T Watson
oseph Hellerstein
Sujay Parekh