Feedback Control Theory a Computer System - PowerPoint PPT Presentation

1 / 50
About This Presentation
Title:

Feedback Control Theory a Computer System

Description:

Feedback Control Theory a Computer System s Perspective Introduction What is feedback control? Why do computer systems need feedback control? Control design methodology – PowerPoint PPT presentation

Number of Views:211
Avg rating:3.0/5.0
Slides: 51
Provided by: ComputerSc271
Category:

less

Transcript and Presenter's Notes

Title: Feedback Control Theory a Computer System


1
Feedback Control Theory a Computer Systems
Perspective
  • Introduction
  • What is feedback control?
  • Why do computer systems need feedback control?
  • Control design methodology
  • System modeling
  • Performance specs/metrics
  • Controller design
  • Summary

2
Control
  • Applying input to cause system variables to
    conform to desired values called the reference.
  • Cruise-control car f_engine(t)? ? speed60 mph
  • E-commerce server Resource allocation? ?
    T_response5 sec
  • Embedded networks Flow rate? ? Delay 1 sec
  • Computer systems QoS guarantees

3
Open-loop control
  • Compute control input without continuous variable
    measurement
  • Simple
  • Need to know EVERYTHING ACCURATELY to work right
  • Cruise-control car friction(t), ramp_angle(t)
  • E-commerce server Workload (request arrival
    rate? resource consumption?) system (service
    time? failures?)
  • Open-loop control fails when
  • We dont know everything
  • We make errors in estimation/modeling
  • Things change

4
Feedback (close-loop) Control
Controlled System
Controller
control function
control input
manipulated variable
Actuator
error
sample
controlled variable
Monitor

-
reference
5
Feedback (close-loop) Control
  • Measure variables and use it to compute control
    input
  • More complicated (so we need control theory)
  • Continuously measure correct
  • Cruise-control car measure speed change engine
    force
  • Ecommerce server measure response time
    admission control
  • Embedded network measure collision change
    backoff window
  • Feedback control theory makes it possible to
    control well even if
  • We dont know everything
  • We make errors in estimation/modeling
  • Things change

6
Why feedback control?Open, unpredictable
environments
  • Deeply embedded networks interaction with
    physical environments
  • Number of working nodes
  • Number of interesting events
  • Number of hops
  • Connectivity
  • Available bandwidth
  • Congested area
  • Internet E-business, on-line stock broker
  • Unpredictable off-the-shelf hardware

7
Why feedback control?We want QoS guarantees
  • Deeply embedded networks
  • Update intruder position every 30 sec
  • Report fire lt 1 min
  • E-business server
  • Purchase completion time lt 5 sec
  • Throughput gt 1000 transaction/sec
  • The problem provide QoS guarantees in open,
    unpredictable environments

8
Advantage of feedback control theory
  • Adaptive resource management heuristics
  • Laborious design/tuning/testing iterations
  • Not enough confidence in face of untested
    workload
  • Queuing theory
  • Doesnt handle feedbacks
  • Not good at characterizing transient behavior in
    overload
  • Feedback control theory
  • Systematic theoretical approach for analysis and
    design
  • Predict system response and stability to input

9
Outline
  • Introduction
  • What is feedback control?
  • Why do todays computer systems need feedback
    control?
  • Control design methodology
  • System modeling
  • Performance specs/metrics
  • Controller design
  • Summary

10
Control design methodology
Controller Design Root-Locus PI Control
Modeling analytical system IDs
Dynamic model
Control algorithm
Satisfy
Requirement Analysis
Performance Specifications
11
System Models
  • Linear vs. non-linear (differential eqns)
  • Deterministic vs. Stochastic
  • Time-invariant vs. Time-varying
  • Are coefficients functions of time?
  • Continuous-time vs. Discrete-time
  • System ID vs. First Principle

12
Dynamic Model
  • Computer systems are dynamic
  • Current output depends on history
  • Characterize relationships among system variables
  • Differential equations (time domain)
  • The dot(s) above a variable denote
    differentiation w.r.t time (number of times!)
  • Transfer functions (frequency domain)
  • Y(s) G(s)U(s)
  • Block diagram (pictorial)

13
Example Utilization control in a video server
  • Periodic task Ti corresponding to each video
    stream i
  • ci processing time, pi period
  • Stream is requested CPU utilization
    uici/pi
  • Total CPU utilization U(t)?kuk, k is the
    set of active streams
  • Completion rate Rc(t) (?kcum)/?t, where m
    is the set of terminated video streams during t,
    t?t
  • Unknown
  • Admission rate Ra(t) (?kauj)/?t, where j
    is the set of admitted streams during t, t?t
  • Problem design an admission controller to
    guarantee U(t)Us regardless of Rc(t)

14
Model Differential equation
  • Error E(t)Us-U(t)
  • Model (differential equation)
  • Controller C? E(t) ? Ra(t)

Ra(t)
Us
-
C?
U(t)
CPU
Rc(t)
15
A Diversion to MathSystem representations
  • Three ways of system modeling
  • Time domain convolution differential
    equations.
  • s (frequency) domain multiplication
  • Block diagram pictorial

s-domain is a simple powerful language for
control analysis
16
A Diversion to MathLaplace transform
  • Laplace transform of a signal f(t)
  • Not so different from fourier transform (see DSP
    course)
  • where s?i? is a complex variable.
  • Laplace transform is a translation from
    time-domain to
  • s-domain
  • Differential equation ? Polynomial function

17
A Diversion to MathLaplace transform some
examples/recipes
  • Basic translations
  • Impulse function f(t)?(t) ? F(s)1
  • Step signal f(t)a1(t) ? F(s)1/s
  • Ramp signal f(t)at ? F(s)a/s2
  • Exp signal f(t)eat ? F(s)1/(s-a)
  • Sinusoid signal f(t)sin(at) ? F(s)a/(s2a2)
  • Composition rules
  • Linearity Laf(t)bg(t) aLf(t)bLg(t)
  • Differentiation Ldf(t)/dt sF(s) f(0-)
  • Integration L?tf(?)d? F(s)/s

18
A Diversion to MathTransfer function
  • Modeling a linear time-invariant (LTI) system
  • G(s) Y(s)/U(s) ? Y(s) G(s)U(s)

E.g., a second order system with poles p1 and
p2
19
A Diversion to MathPoles and Zeros
  • The response of a linear time-invariant (LTI)
    system

pi are poles of the function and decide the
system behavior
20
A Diversion to MathTime response vs. pole
location
Unstable
Stable
  • f(t) ept, p abj

21
A Diversion to MathBlock diagram
  • A pictorial tool to represent a system based on
    transfer functions and signal flows
  • Represent a feedback control system

22
Back to Our utilization control example
  • Error E(t)Us-U(t)
  • Model (differential equation)
  • Controller C? E(t) ? Ra(t)

Ra(t)
Us
-
C?
U(t)
CPU
Rc(t)
23
ModelTransfer func. block diag.
  • CPU is modeled as an integrator
  • Inputs reference Us(s) Us/s completion rate
    Rc(s)
  • Close-loop system transfer functions
  • Us(s) as input G1(s) C(s)Go(s)/(1C(s)Go(s))
  • Rc(s) as input G2(s) Go(s)/(1C(s)Go(s))
  • Output U(s)G1(s)Us/sG2(s)Rc(s)

G1
G2
24
Control design methodology
Controller Design Root-Locus PI Control
Modeling analytical system IDs
Dynamic model
Control algorithm
Satisfy
Requirement Analysis
Performance Specifications
25
Design GoalsPerformance Specifications
  • Stability
  • Transient response
  • Steady-state error
  • Robustness
  • Disturbance rejection
  • Sensitivity

26
Performance Specs bounded input,bounded output
stability
  • BIBO stability bounded input results in bounded
    output.
  • A LTI system is BIBO stable if all poles of its
    transfer function are in the LHP (?pi, Repilt0).

27
Performance SpecsStability
Unstable
Stable
28
Performance specifications
Controlled variable
Overshoot
Steady state error
??
Reference
Steady State
Transient State
Time
Settling time
29
Example Control Response in Email Server (IBM)
Response (queue length)
Good
Bad
Control (MaxUsers)
Slow
Useless
30
Performance SpecsSteady-state error
  • Steady state (tracking) error of a stable system
  • 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 left-half of the s-plane, then

31
Performance SpecsSteady-state error
Steady state error of a CPU-utilization control
system
U(t)
Us
ess-20
32
Performance SpecsRobustness
  • Disturbance rejection steady-state error caused
    by external disturbances
  • Can a system track the reference input despite of
    external disturbances?
  • Denial-of-service attacks
  • Sensitivity relative change in steady-state
    output divided by the relative change of a system
    parameter
  • Can a system track the reference input despite of
    variations in the system?
  • Increased task execution times
  • Device failures

33
Performance SpecsGoal of Feedback Control
  • Guarantee stability
  • Improve transient response
  • Short settling time
  • Small overshoot
  • Small steady state error
  • Improve robustness wrt uncertainties
  • Disturbance rejection
  • Low sensitivity

34
Control design methodology
Controller Design Root-Locus PID Control
Modeling analytical system IDs
Dynamic model
Control algorithm
Satisfy
Requirement Analysis
Performance Specifications
35
Controller DesignPID control
  • Proportional-Integral-Derivative (PID) Control
  • Proportional Control
  • Integral control
  • Derivative control
  • Classical controllers with well-studied
    properties and tuning rules

36
Controller DesignCPU Utilization Control
  • CPU is modeled as an integrator
  • Inputs set-point Us(s) Us/s task completion
    Rc(s)
  • Close-loop system transfer functions
  • Us(s) as input G1(s) C(s)Go(s)/(1C(s)Go(s))
  • Rc(s) as input G2(s) Go(s)/(1C(s)Go(s))
  • C(s)? to achieve zero steady-state error U(t) ?
    Us

37
Proportional ControlStability
  • Proportional Controller
  • ra(t)Ke(t) C(s) K
  • Transfer functions
  • Us/s as input G1(s) K/(sK)
  • Rc(s) as input G2(s) 1/(sK)
  • Stability
  • Pole p0 -Klt0 ? System is BIBO stable iff Kgt0
  • Note System may shoot to 100 if Klt0!

38
Proportional ControlSteady-state error
  • Assume completion rate Rc(t) keeps constant for a
    time period longer than the settling time
    Rc(s)Rc/s
  • System response is
  • Compute steady-state err using final value
    theorem,
  • P-control cannot achieve the desired CPU
    utilization Us instead it will end up lower by
    Rc/K Oops!
  • The larger the proportional gain K is, the
    closer will CPU utilization approach to Us

39
CPU UtilizationProportional Control
U(t)
Us
ess-20
40
Proportional-Integral Control - Stability
  • Proportional Integral Controller
  • ra(t)K(e(t)Ki?te(?)d?) C(s) K(1Ki/s)
  • Transfer functions
  • Us/s as input G1(s) (KsKKi)/(s2KsKKi)
  • Rc(s) as input G2(s) s/(s2KsKKi)
  • Stability
  • Poles Rep0lt0, Rep0lt0
  • ? System is BIBO stable iff Kgt0 Kigt0

41
Proportional ControlSteady-state error
  • Assume completion rate Rc(t) keeps constant for a
    time period longer than the settling time
    Rc(s)Rc/s
  • System response is
  • Compute steady-state err using final value
    theorem,
  • PI control can accurately achieve the desired
    CPU utilization Us ?
  • Control analysis gives design guidance

42
CPU UtilizationProportional-Integral Control
U(t)
Mp0
Us
ess0
ts tr tp
43
Controller DesignSummary pointers
  • PID control simple, works well in many systems
  • P control may have non-zero steady-state error
  • I control improves steady-state tracking
  • D control may improve stability transient
    response
  • Linear continuous time control
  • Root-locus design
  • Frequency-response design
  • State-space design
  • G. F. Franklin et. al., Feedback control of
    dynamic systems

44
Discrete Control
  • More useful for computer systems
  • Time is discrete sampled system
  • denoted k instead of t
  • Main tool is z-transform
  • f(k) F(z) , where z is complex
  • Analogous to Laplace transform for s-domain

45
Discrete Modeling
  • Difference equation
  • V(m) a1V(m-1) a2V(m-2) b1U(m-1) b2U(m-2)
  • z domain V(z) a1z-1V(z) a2z-2V(z)
    b1z-1U(z) b2z-2U(z)
  • Transfer function G(z) (b1z b2)/(z2-a1z - a2)
  • V(m) output in mth sampling window
  • U(m) input in mth sampling window
  • Order n sampling-periods in history affects
    current performance
  • SP 30 sec, and n 2 ? Current system
    performance depends on previous 60 sec

46
Root Locus analysis of Discrete Systems
  • Stability boundary z1 (Unit circle)
  • Settling time distance from Origin
  • Speed location relative to Im axis
  • Right half slower
  • Left half faster

47
Effect of discrete poles
Im(s)
Higher-frequency response
Longer settling time
Re(s)
Stable
z1
Unstable
48
Feedback control works in CS
  • U.Mass network flow controllers (TCP/IP RED)
  • IBM Lotus Notes admission control
  • UIUC Distributed visual tracking
  • UVA
  • Web Caching QoS
  • Apache Web Server QoS differentiation
  • Active queue management in networks
  • Processor thermal control
  • Online data migration in network storage (with
    HP)
  • Real-time embedded networking
  • Control middleware
  • Feedback control real-time scheduling

49
Advanced Control Topics
  • Robust Control
  • Can the system tolerate noise?
  • Adaptive Control
  • Controller changes over time (adapts)
  • MIMO Control
  • Multiple inputs and/or outputs
  • Stochastic Control
  • Controller minimizes variance
  • Optimal Control
  • Controller minimizes a cost function of error and
    control energy
  • Nonlinear systems
  • Neuro-fuzzy control
  • Challenging to derive analytic results

50
Issues for Computer Science
  • Most systems are non-linear
  • But linear approximations may do
  • eg, fluid approximations
  • First-principles modeling is difficult
  • Use empirical techniques
  • Mapping control objectives to feedback control
    loops
  • ControlWare paper
  • Deeply embedded networking
  • Massively decentralized control problem
  • Modelling
  • Node failures
Write a Comment
User Comments (0)
About PowerShow.com