You are previewing Feedback Control for Computer Systems.
O'Reilly logo
Feedback Control for Computer Systems

Book Description

How can you take advantage of feedback control for enterprise programming? With this book, author Philipp K. Janert demonstrates how the same principles that govern cruise control in your car also apply to data center management and other enterprise systems. Through case studies and hands-on simulations, you’ll learn methods to solve several control issues, including mechanisms to spin up more servers automatically when web traffic spikes.

Table of Contents

  1. Preface
    1. What Is Feedback?
    2. Why This Book?
    3. How to Read This Book
    4. Conventions Used in This Book
    5. Using Code Examples
    6. Safari® Books Online
    7. How to Contact Us
    8. Acknowledgments
  2. I. Foundations
    1. 1. Why Feedback? An Invitation
      1. A Hands-On Example
      2. Hoping for the Best
      3. Establishing Control
      4. Adding It Up
      5. Summary
      6. Code to Play With
    2. 2. Feedback Systems
      1. Systems and Signals
      2. Tracking Error and Corrective Action
      3. Stability, Performance, Accuracy
        1. The Setpoint
      4. Uncertainty and Change
        1. Feedback and Feedforward
      5. Feedback and Enterprise Systems
      6. Code to Play With
    3. 3. System Dynamics
      1. Lags and Delays
        1. Forced Response and Free Response
        2. Transient Response and Steady-State Response
      2. Dynamics in the Physical World and in the Virtual World
        1. Dynamics and Memory
      3. The Importance of Lags and Delays for Feedback Loops
        1. Avoiding Delays
      4. Theory and Practice
      5. Code to Play With
    4. 4. Controllers
      1. Block Diagrams
      2. On/Off Control
      3. Proportional Control
        1. Why Proportional Control Is Not Enough
      4. Integral Control
        1. Integral Control Changes the Dynamics
        2. Integral Control Can Generate a Constant Offset
      5. Derivative Control
        1. Problems with Derivative Control
      6. The Three-Term or PID Controller
      7. Code to Play With
    5. 5. Identifying Input and Output Signals
      1. Control Input and Output
        1. Directionality of the Input/Output Relation
      2. Examples
        1. Thermal Control 1: Heating
          1. Situation
          2. Input
          3. Output
          4. Commentary
        2. Item Cache
          1. Situation
          2. Input
          3. Output
          4. Commentary
        3. Server Scaling
          1. Situation
          2. Input
          3. Output
          4. Commentary
        4. Controlling Supply and Demand by Dynamic Pricing
          1. Situation
          2. Input
          3. Output
          4. Commentary
        5. Thermal Control 2: Cooling
          1. Situation
          2. Input
          3. Output
          4. Commentary
      3. Criteria for Selecting Control Signals
        1. For Control Inputs
        2. For Control Outputs
      4. A Note on Multidimensional Systems
    6. 6. Review and Outlook
      1. The Feedback Idea
      2. Iteration
      3. Process Knowledge
      4. Avoiding Instability
      5. The Setpoint
      6. Control, Not Optimization
  3. II. Practice
    1. 7. Theory Preview
      1. Frequency Representation
      2. The Transfer Function
      3. Block-Diagram Algebra
      4. PID Controllers
      5. Poles of the Transfer Function
      6. Process Models
    2. 8. Measuring the Transfer Function
      1. Static Input/Output Relation: The Process Characteristic
        1. Practical Considerations
      2. Dynamic Response to a Step Input: The Process Reaction Curve
        1. Practical Aspects
      3. Process Models
        1. Self-Regulating Process
        2. Accumulating Process
        3. Self-Regulating Process with Oscillation
        4. Non-Minimum Phase System
      4. Other Methods of System Identification
    3. 9. PID Tuning
      1. Tuning Objectives
      2. General Effect of Changes to Controller Parameters
      3. Ziegler–Nichols Tuning
      4. Semi-Analytical Tuning Methods
        1. Practical Aspects
      5. A Closer Look at Controller Tuning Formulas
    4. 10. Implementation Issues
      1. Actuator Saturation and Integrator Windup
        1. Preventing Integrator Windup
        2. Setpoint Changes and Integrator Preloading
      2. Smoothing the Derivative Term
      3. Choosing a Sampling Interval
      4. Variants of the PID Controller
        1. Incremental Form
        2. Error Feedback Versus Output Feedback
        3. The General Linear Digital Controller
      5. Nonlinear Controllers
        1. Error-Square and Gap Controllers
        2. Simulating Floating-Point Output
        3. Categorical Output
    5. 11. Common Feedback Architectures
      1. Changing Operating Conditions: Gain Scheduling
        1. Gain Scheduling for Mildly Nonlinear Systems
      2. Large Disturbances: Feedforward
      3. Fast and Slow Dynamics: Nested or “Cascade” Control
      4. Systems Involving Delays: The Smith Predictor
  4. III. Case Studies
    1. 12. Exploring Control Systems Through Simulation
      1. The Case Studies
      2. Modeling Time
        1. Control Time
        2. Simulation Time
      3. The Simulation Framework
        1. Components
        2. Plants and Systems
        3. Controllers
        4. Actuators and Filters
        5. Convenience Functions for Standard Loops
        6. Generating Graphical Output
    2. 13. Case Study: Cache Hit Rate
      1. Defining Components
        1. Cache Misses as Manufacturing Defects
      2. Measuring System Characteristics
      3. Controller Tuning
      4. Simulation Code
    3. 14. Case Study: Ad Delivery
      1. The Situation
      2. Measuring System Characteristics
      3. Establishing Control
      4. Improving Performance
      5. Variations
        1. Cumulative Goal
        2. Gain Scheduling
        3. Integrator Preloading
        4. Weekend Effects
      6. Simulation Code
    4. 15. Case Study: Scaling Server Instances
      1. The Situation
      2. Measuring and Tuning
      3. Reaching 100 Percent With a Nonstandard Controller
      4. Dealing with Latency
      5. Simulation Code
    5. 16. Case Study: Waiting-Queue Control
      1. On the Nature of Queues and Buffers
      2. The Architecture
      3. Setup and Tuning
      4. Derivative Control to the Rescue
      5. Controller Alternatives
      6. Simulation Code
    6. 17. Case Study: Cooling Fan Speed
      1. The Situation
      2. The Model
      3. Tuning and Commissioning
      4. Closed-Loop Performance
      5. Simulation Code
    7. 18. Case Study: Controlling Memory Consumption in a Game Engine
      1. The Situation
      2. Problem Analysis
      3. Architecture Alternatives
        1. A Nontraditional Loop Arrangement
        2. A Traditional Loop with Logarithms
      4. Results
      5. Simulation Code
    8. 19. Case Study Wrap-Up
      1. Simple Controllers, Simple Loops
      2. Measuring and Tuning
      3. Staying in Control
      4. Dealing with Noise
  5. IV. Theory
    1. 20. The Transfer Function
      1. Differential Equations
      2. Laplace Transforms
        1. Properties of the Laplace Transform
      3. Using the Laplace Transform to Solve Differential Equations
        1. A Worked Example
      4. The Transfer Function
        1. Worked Example: Step Response
        2. Worked Example: Ramp Input
        3. The Harmonic Oscillator
      5. What If the Differential Equation Is Not Known?
    2. 21. Block-Diagram Algebra and the Feedback Equation
      1. Composite Systems
      2. The Feedback Equation
        1. An Alternative Derivation of the Feedback Equation
      3. Block-Diagram Algebra
      4. Limitations and Importance of Transfer Function Methods
    3. 22. PID Controllers
      1. The Transfer Function of the PID Controller
      2. The Canonical Form of the PID Controller
      3. The General Controller
      4. Proportional Droop Revisited
        1. A Worked Example
    4. 23. Poles and Zeros
      1. Structure of a Transfer Function
      2. Effect of Poles and Zeros
        1. Special Cases and Additional Details
          1. Complex conjugate poles
          2. Multiple poles
          3. Poles on the imaginary axis
          4. Pole/zero cancellations
      3. Pole Positions and Response Patterns
        1. Dominant Poles
        2. Pole Placement
      4. What to Do About Delays
    5. 24. Root Locus Techniques
      1. Construction of Root Locus Diagrams
      2. Root Locus or “Evans” Rules
      3. Angle and Magnitude Criteria
      4. Practical Issues
      5. Examples
        1. Simple Lag with a P Controller
        2. Simple Lag with a PI Controller
    6. 25. Frequency Response and the Bode Plot
      1. Frequency Response
        1. Frequency Response in the Physical World
        2. Frequency Response for Transfer Functions
        3. A Worked Example
      2. The Bode Plot
      3. A Criterion for Marginal Stability
      4. Other Graphical Techniques
    7. 26. Topics Beyond This Book
      1. Discrete-Time Modeling and the <span xmlns="http://www.w3.org/1999/xhtml" xmlns:epub="http://www.idpf.org/2007/ops" xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns:pls="http://www.w3.org/2005/01/pronunciation-lexicon" xmlns:ssml="http://www.w3.org/2001/10/synthesis" xmlns:svg="http://www.w3.org/2000/svg" class="emphasis"><em>z</em></span>-Transform-Transform
      2. State-Space Methods
      3. Robust Control
      4. Optimal Control
      5. Mathematical Control Theory
  6. V. Appendices
    1. A. Glossary
    2. B. Creating Graphs with Gnuplot
      1. Basic Plotting
      2. Plot Ranges
      3. Inline Transformations
      4. Plotting Simulation Results
      5. Summary
    3. C. Complex Numbers
      1. Basic Operations
      2. Polar Coordinates
      3. The Complex Exponential
    4. D. Further Reading
      1. Recommended Reading
      2. Additional References
      3. Mathematical Prerequisites
  7. Index
  8. Colophon
  9. Copyright