PID Controllers

Graduate Depth 134 in the knowledge graph I know this Set as goal
Unlocks 23 downstream topics
pid proportional integral derivative tuning ziegler-nichols

Core Idea

A PID controller computes control output as u(t) = Kp·e(t) + Ki·∫e(t)dt + Kd·de/dt, where e(t) is the error between setpoint and measured output. Proportional action provides immediate response proportional to current error; integral action eliminates steady-state error by accumulating past errors (adding a pole at the origin, making the system Type 1); derivative action provides damping by reacting to the rate of error change. PID controllers are the dominant control structure in industrial practice, governing temperature regulators, robotic joints, and process control loops. Tuning methods include Ziegler-Nichols ultimate gain method, Cohen-Coon, and model-based IMC tuning.

How It's Best Learned

Implement a PID controller in simulation on a second-order plant and manually tune Kp, Ki, Kd while observing step responses. Use Ziegler-Nichols as a starting point and refine iteratively, observing how each term affects the response independently before combining them.

Common Misconceptions

Explainer

You've studied steady-state error analysis, which tells you how much a feedback system misses its target in the long run, and second-order step response, which characterizes overshoot, damping, and settling. PID control is the standard tool for shaping both simultaneously. The acronym stands for Proportional-Integral-Derivative, and each term addresses a distinct aspect of control performance.

The proportional term K_p·e(t) is the most intuitive: apply control effort in direct proportion to the current error. If the output is far from the setpoint, apply a large corrective signal; if it's close, apply a small one. P control drives the system toward the target but almost always leaves a steady-state error — a persistent offset. This is because at steady state, error is constant (not growing), so the P term produces a fixed control output, which must balance the plant's steady-state input requirement. If the required control output is nonzero, error must be nonzero too. Increasing K_p reduces the error but increases the tendency toward oscillation and instability: the system becomes "jumpy" and eventually goes unstable at high enough gain.

The integral term K_i·∫e(t)dt accumulates past errors over time. As long as any error persists, the integral grows, increasing control effort until the error is driven to zero. This is why integral action eliminates steady-state error unconditionally — it is mathematically equivalent to adding a pole at the origin in the open-loop transfer function, making the closed-loop system Type 1. The cost of this guaranteed zero error is dynamic: the accumulated integral can overshoot the setpoint, causing ringing, and if the actuator saturates (reaches its physical limit), the integral keeps growing even though it can't do any work — integrator windup. Anti-windup schemes conditionally stop integrating when saturation is detected. The integral term is the essential addition when pure P control leaves unacceptable offset.

The derivative term K_d·de/dt reacts to the *rate of change* of error rather than its current value. If the error is decreasing rapidly (the system is heading toward the setpoint quickly), the derivative term applies a braking force to prevent overshoot. If error is increasing rapidly (the system is diverging), the derivative term adds a large corrective kick. Think of it as prediction: by looking at the slope of the error, the derivative term anticipates where the system is heading and acts ahead of time. The practical problem is that real sensor signals contain noise, and differentiation amplifies high-frequency noise dramatically. Pure derivative action is almost never implemented; instead, a filtered derivative is used — a derivative in series with a first-order low-pass filter — which gives the benefit of rate feedback while rejecting noise above a chosen frequency. Tuning methods like Ziegler-Nichols provide empirical starting points by measuring the plant's ultimate gain (the K_p at which sustained oscillation occurs) and the oscillation period, then computing K_p, K_i, K_d from those measurements. These starting points are rarely optimal but reduce the search space for manual refinement.

Practice Questions 5 questions

Prerequisite Chain

Counting to 10Counting to 20Understanding ZeroThe Number ZeroCounting to FiveOne-to-One CorrespondenceCombining Small Groups Within 5Addition Within 10Addition Within 20Two-Digit Addition Without RegroupingTwo-Digit Addition with RegroupingAddition Within 100Repeated Addition as MultiplicationMultiplication Facts Within 100Division as Equal SharingDivision as Grouping (Measurement Division)Division: Grouping (Repeated Subtraction) ModelDivision: Fair Sharing ModelDivision as Equal SharingDivision as GroupingBasic Division FactsDivision Facts Within 100Two-Digit by One-Digit DivisionDivision with RemaindersRemainders and Quotients in DivisionDivision Word ProblemsIntroduction to Long DivisionFactors and MultiplesPrime and Composite NumbersEquivalent FractionsRelating Fractions and DecimalsDecimal Place ValueReading and Writing DecimalsComparing and Ordering DecimalsAdding and Subtracting DecimalsMultiplying DecimalsDividing DecimalsDividing FractionsMixed Number ArithmeticOrder of OperationsInteger Order of OperationsVariable ExpressionsCombining Like TermsOne-Step EquationsTwo-Step EquationsSolving Multi-Step EquationsEquations with Variables on Both SidesAngle Pairs: Complementary, Supplementary, and VerticalParallel Lines and TransversalsCorresponding AnglesAlternate Interior AnglesTriangle Angle Sum TheoremExterior Angle TheoremTriangle Inequality TheoremSimilar Triangles: AA SimilaritySimilar Triangles: SSS and SAS SimilarityProportions in Similar TrianglesRight Triangle Trigonometry IntroductionTrigonometric Ratios ReviewRadian MeasureConverting Between Degrees and RadiansThe Unit CircleGraphing Sine and CosineGraphing Tangent and Reciprocal Trigonometric FunctionsDerivatives of Trigonometric FunctionsAntiderivativesIterated Integrals and Fubini's TheoremDouble Integrals in Cartesian CoordinatesDouble Integrals over Rectangular RegionsDouble Integrals in Polar CoordinatesDouble Integrals: Definition and SetupIterated Integrals and Fubini's TheoremDouble Integrals over Rectangular RegionsDouble Integrals over General RegionsApplications of Double Integrals: Area, Mass, and MomentsTriple Integrals in Cartesian CoordinatesTriple Integrals in Cylindrical and Spherical CoordinatesChange of Variables and the Jacobian DeterminantApplications of Triple Integrals: Volume and MassVector Fields and Their RepresentationsLine Integrals of Vector FieldsGreen's TheoremSurface Integrals and Flux of Vector FieldsSurface Integrals and Flux of Vector FieldsDivergence Theorem: Flux and OutflowDivergence TheoremElectric FluxGauss's LawConductors in Electrostatic EquilibriumCapacitance and CapacitorsDielectricsDielectric Constant and Relative PermittivityElectric Field Inside Dielectric MaterialsDielectric Materials and PolarizationDielectric Susceptibility and PermittivityEnergy Density in Electric FieldsElectric Current and Current DensityElectrical Resistance and ResistivityOhm's Law and Circuit ElementsElectromotive Force (EMF) and BatteriesKirchhoff's Circuit Laws: Voltage and CurrentDC Circuit Network Analysis MethodsTransient Response in RC CircuitsRC CircuitsLC and RLC CircuitsAC Circuits: FundamentalsImpedance and ReactanceAC Power and ResonanceElectromagnetic WavesFrequency-Dependent Permittivity and DispersionElectromagnetic Waves in Anisotropic MediaBirefringence and DichroismWave Plates: Quarter-Wave and Half-Wave PlatesCircular and Elliptical Polarization ProductionPolarization States: Linear, Circular, and EllipticalLinear Superposition of WavesSuperposition Principle in ElectrostaticsElectric Field Lines and VisualizationElectric Potential and Potential EnergyElectric Potential and VoltageIdeal Voltage and Current SourcesSeries, Parallel, and Combined Resistor NetworksVoltage Divider Principle and ApplicationsKirchhoff's Voltage and Current LawsNodal Analysis MethodLinearity, Superposition, and ScalingAC Steady-State Circuit AnalysisAC Circuit Analysis Using PhasorsAC Power AnalysisResonance in RLC CircuitsFrequency Response and Bode PlotsBode Plot Stability AnalysisNyquist Stability CriterionGain and Phase MarginsPID Controllers

Longest path: 135 steps · 807 total prerequisite topics

Prerequisites (3)

Leads To (6)