Overview of feedback control
Feedback control uses the result to decide the next action. It runs in a loop:
- Measure the output with a sensor (temperature, speed, level).
- Compare it with the set point (the target). The difference is the error: error = set point − measured value.
- The controller turns the error into a command.
- The actuator (heater, motor, valve) changes the output. Go back to step 1.
An open-loop system skips the measuring, so it cannot notice a disturbance (like the oven door opening). A closed-loop system sees the change in the output and corrects it.
Negative feedback means the correction works against the error (too hot, so heat less). That keeps the system stable. Positive feedback would push the error even bigger.
More on the basic idea of open and closed loops is in Control systems.
Control characteristics
We judge a controller by how its output responds after a change in set point or a disturbance.
- Rise time: how fast the output first gets near the set point.
- Overshoot: how far it goes past the target before settling. Too much overshoot can spoil a product.
- Settling time: how long until it stays close (say within 2%).
- Steady-state error (offset): the gap that is left after everything settles.
- Hunting: a steady swing up and down around the target.
Control modes:
- ON-OFF: full power or none. Simple, cheap, but hunts. A small hysteresis (a gap, say ±1.5°C) stops it switching too often.
- P (proportional): power = Kp × error. A bigger Kp is faster and has a smaller offset, but too big a Kp makes it shaky.
- I (integral): adds up the error over time, so the offset goes to zero. Too much I causes overshoot.
- D (derivative): reacts to how fast the error changes, so it calms overshoot. P + I + D together is a PID controller, the most used in industry.
Applying feedback control
Feedback control is everywhere in electronics and machines.
- Temperature: ovens, geysers, incubators (sensor: thermistor or thermocouple; actuator: heater).
- Motor speed: a tachometer or encoder measures the speed; the controller changes the voltage (lifts, conveyors, fans).
- Level and flow: a float or pressure sensor and a valve keep a tank or pipe steady.
- Voltage: a power supply keeps its output voltage fixed when the load changes.
- Position: robot arms and camera gimbals.
Tuning steps: start with P only and raise Kp until the response is quick but not shaky; add a little I to remove the offset; add D only if overshoot is a problem.
Practical points: choose a sensor that is fast and accurate enough; the actuator must be strong enough (a heater that is too small can never reach the set point); noisy sensor signals need filtering.
Try it: be the controller
At home: hold a tap so a bucket stays half full while a friend pulls water out of it. You are the sensor (eyes), the controller (brain) and the actuator (hand). When the friend pulls more, how do you respond? Did you act on the size of the error (P) or on how long it stayed (I)? In the 3D, set PI mode, open the door and see how the heater power rises on its own.
Key formulas and definitions
- Error = set point − measured value
- ON-OFF: heater ON if measured < set point − h, OFF if > set point + h
- P control: output = Kp × error
- PI control: output = Kp × error + Ki × (sum of error over time)
- Overshoot % = (peak − set point) / set point × 100
Worked examples
1. Set point 60°C, measured 52°C. What is the error?
Error = 60 − 52 = 8°C (positive, so the heater must give more).
2. A P controller has Kp = 2% power per °C. The error is 15°C. What is the heater power?
Power = 2 × 15 = 30%.
3. An ON-OFF thermostat has set point 25°C and hysteresis ±1°C. At what temperatures does it switch ON and OFF?
ON below 24°C, OFF above 26°C.
4. A water heater is set to 50°C. The peak reached is 56°C before settling. Find the overshoot.
Overshoot = (56 − 50)/50 × 100 = 12%.
5. With P control only, the final temperature is 56°C when the set point is 60°C. What is the steady-state error and which action removes it?
60 − 56 = 4°C. Adding an I (integral) action removes it.
6. Motor set to 1500 rpm; it reads 1380 rpm on a hill. Kp = 0.01 V per rpm. By how much does the controller raise the voltage?
Error = 1500 − 1380 = 120 rpm. Voltage change = 0.01 × 120 = 1.2 V.
Common mistakes
- Mixing the sign of the error. It is set point − measured, so it is positive when the output is too low.
- Thinking a bigger Kp is always better. Too much gain makes the output shake.
- Believing P control reaches the set point exactly. It leaves an offset unless I is added.
- Calling any system with a timer "feedback". Feedback needs a sensor that measures the output.