3.5.38 · D1Guidance, Navigation & Control (GNC)

Foundations — PID control — proportional, integral, derivative terms

2,403 words11 min readBack to topic

Before you can read a single line of the PID law, you need to be fluent in a small pile of symbols and pictures. This page builds every one of them from nothing, in the order they depend on each other. If the parent note wrote a symbol without explaining it, this page is where it gets explained.


1. Time — the stage everything happens on

When we write something like or , the little "" just means "this thing has a different value at each moment" — it is a function of time, not a fixed number.

Figure — PID control — proportional, integral, derivative terms

Look at the figure: the same physical machine gives you a whole curve of values, one dot per instant. That curve is the raw material a controller feeds on.


2. The three signals: setpoint, process variable, error

Figure — PID control — proportional, integral, derivative terms

Notice in the figure: the error can be positive or negative, and it crosses through zero. A controller must behave correctly in all three of these cases, which is exactly why the sign of is tracked so carefully.

Read more about how these three signals wire together in Feedback control loops.


3. Control signal — the command you send out

The whole job of a PID controller is to compute the rule that turns into . We write this as a function : "the command is some recipe applied to the error."

For where actually goes on a spacecraft, see Reaction wheels & attitude control.


4. Gains — the tuning knobs


5. The integral — adding up the past

Now a real piece of calculus enters. Do not panic — we build it from a picture.

Figure — PID control — proportional, integral, derivative terms

In the figure the shaded region is the integral: chop time into thin rectangles of width , each of height , and add all their areas. A persistent small error slowly fills a big area — that is the "memory" that eventually kills steady-state offset.

The digital version replaces this area with a running sum of rectangles — the reason the flight code says .


6. The derivative — reading the trend

Figure — PID control — proportional, integral, derivative terms

The figure shows two points on an error curve and the tangent lines at each. A steep downward tangent (cyan) means "diving toward target fast" — the derivative term reads this and eases off early.


7. Equilibrium & steady state — the "resting" idea


8. Two more words the parent leans on


9. How the foundations feed the topic

time t

setpoint r of t

process variable y of t

error e = r minus y

P term uses e now

integral of e over past

derivative de dt trend

I term uses accumulated past

D term uses future trend

gain Kp

gain Ki

gain Kd

control signal u = command

actuator moves system

disturbance d

saturation ceiling

steady state e settles

Read the diagram top-to-bottom: time gives you the signals, the signals give you the error, the error is read three ways, each reading times a gain becomes part of the command, and the command (fighting the disturbance) moves the system — whose sensor closes the loop back to . That loop is the parent topic, PID control — proportional, integral, derivative terms.


Equipment checklist

Test yourself — you're ready for the parent page only if you can answer each without peeking.

What does the "" in tell you?
That is a function of time — a different value at each instant, i.e. a whole curve, not one number.
Define the error in words and symbols.
How wrong you are: setpoint minus measured value, .
What does vs mean physically?
: below target, push up. : above target, push down. : on target.
What is and where does it go?
The control command; it leaves the controller and drives the actuator (thruster/wheel/valve).
What is a gain ?
A fixed multiplier setting how strongly a term reacts — a volume knob.
What does the integral measure, as a picture?
The signed area under the error curve from time 0 to now — the accumulated ("remembered") past error.
Why use the dummy variable instead of inside the integral?
is the fixed upper limit (right edge); sweeps across every past instant — two different roles need two names.
What does (or ) measure?
The slope/rate of change of the error right now — whether it's growing, shrinking, or steady.
What is and why does the computer need it?
The time between two samples; it converts the calculus integral/derivative into a running sum and a finite difference the processor can compute.
What is "steady state" and the key fact used about it?
When everything stops changing (constant values); the key fact is that a rate of change is then zero.
What is a disturbance ?
An unwanted outside push (gravity, drag, torque) the controller must cancel even at zero commanded error.
What is actuator saturation?
When the actuator hits its physical maximum and cannot push any harder.