Feedback control

Also known as: control loop · closed-loop control

On this page 7

Feedback control, also called closed-loop control, is a control strategy in which a system measures its actual output, compares it with the desired value and uses the difference to adjust its input continuously. In robotics control systems, it is the principle that keeps joints at commanded angles, wheels at commanded speeds and drones level in gusty wind, despite load changes, friction and modeling errors.

The central quantity is the error: the setpoint minus the measured value. A feedback controller acts on that error so that it shrinks over time, which gives the system a property that open-loop commands lack, namely the ability to reject disturbances it was never explicitly told about.

How a feedback loop works

Every feedback loop contains the same functional elements, whether it regulates a motor current at 20 kHz or the heading of a mobile robot at 10 Hz. The loop runs continuously, and its speed and accuracy depend on every element, not only on the controller.

ElementRoleRobotics example
Setpoint (reference)Desired value of the outputTarget joint angle of 45 degrees
SensorMeasures the actual outputRotary encoder on the joint
ComparatorComputes the errorTarget angle minus measured angle
ControllerConverts error into a commandPID algorithm in the drive
ActuatorApplies the command to the systemServo motor and gearbox
PlantThe physical system being controlledRobot link with its load
Elements of a feedback control loop

Because the controller reacts to the measured result, it compensates for unmodeled friction, payload changes and external pushes. The price is that it can only react after an error appears, and any delay or noise in the measurement enters the loop directly.

Feedback control compared with open-loop and feedforward control

Feedback control is one of three basic control structures, and practical robot controllers usually combine feedback with feedforward. Open-loop control sends commands without measuring the result; feedforward adds a model-based command computed in advance from the desired motion.

StructureUses measurementHandles unknown disturbancesMain risk
Open-loop controlNoNoErrors accumulate unnoticed
Feedforward controlNo, uses a modelOnly those in the modelModel errors pass through uncorrected
Feedback controlYesYesInstability if tuned too aggressively
Feedforward plus feedbackYesYesMore design effort
Basic control structures

In a robot arm, feedforward often supplies the torque needed to accelerate the links and hold them against gravity, while feedback corrects the remaining small errors. This split lets the feedback gains stay moderate, which improves stability and reduces noise sensitivity.

Common feedback controllers in robotics

The term feedback control covers many controller designs. The simplest and by far the most widespread is PID, but robots also use state feedback, model predictive control and adaptive schemes when the dynamics demand it.

  • On-off (bang-bang) control: switches the actuator fully on or off; simple but causes oscillation, used for heaters and grippers.
  • PID control: combines proportional, integral and derivative terms; the default for motor, joint and speed loops.
  • State feedback (LQR): uses a full state vector and a model to compute optimal gains, common in balancing robots.
  • Model predictive control: optimizes future commands over a horizon with constraints, used for legged locomotion and vehicles.
  • Adaptive and robust control: adjusts gains or guarantees stability under uncertain parameters.

Robots typically arrange loops in a cascade: an inner current loop, a middle velocity loop and an outer position loop. Each inner loop should be roughly five to ten times faster than the loop around it, so that the outer controller can treat it as nearly ideal.

Performance measures and stability

A feedback controller is judged by how quickly and how accurately it follows the setpoint without becoming unstable. Engineers usually evaluate a step response and frequency-domain margins.

MeasureMeaningTypical design goal
Rise timeTime to go from 10 to 90 percent of a stepAs short as actuators allow
OvershootPeak beyond the setpointUnder about 5 to 20 percent
Settling timeTime to stay within a band, often 2 percentShort relative to the task
Steady-state errorRemaining error after settlingZero for position loops with integral action
Phase marginDistance from instability in phaseAbout 45 to 60 degrees
Gain marginDistance from instability in gainAbout 6 dB or more
BandwidthFrequency range the loop tracks wellMatched to motion and sensor rates
Key performance measures of a feedback loop

Higher gains improve tracking but reduce stability margins. Delays from sampling, communication and filtering add phase lag, which is why a loop that is stable at 1 kHz can oscillate when the same gains run over a slower network.

Practical implementation and pitfalls

In software frameworks such as ROS 2, feedback loops are often implemented in controller plugins that read sensor states and write actuator commands at a fixed rate. The loop must run with predictable timing, because jitter acts like varying delay and degrades performance.

SymptomLikely causeTypical remedy
Sustained oscillationGain too high or excessive delayLower gain, reduce latency, add damping
Slow drift to targetIntegral gain too lowIncrease integral action carefully
Large overshoot after saturationIntegrator windupClamp or back-calculate the integrator
Jittery actuator commandDerivative of noisy measurementFilter the derivative term
Resonance at one speedFlexible transmission or structureNotch filter or lower bandwidth
Frequent problems in feedback loops

A final caution concerns sensor placement. A motor encoder measures the motor shaft, not the tool, so gearbox backlash and link flexibility remain outside the loop. When tool accuracy matters, an additional load-side measurement or a model-based correction is needed.

Explained without jargon

Feedback control is the habit of checking the result and correcting as you go. When you drive a car, you look at the road, notice that the car drifts slightly to the right and turn the wheel a little to the left. You keep doing this without thinking about it.

A robot does the same with sensors and a controller. It measures where it is, compares that with where it should be and adjusts its motors. Correcting too little makes it slow; correcting too hard makes it wobble. Good feedback control finds the balance.

A typical use case

A warehouse robot carries totes of different weights on a lifting platform. Its lift axis uses a servo motor with a cascaded loop: a current loop at 16 kHz, a velocity loop at 4 kHz and a position loop at 1 kHz, all inside the motor drive.

With an empty platform, the original gains worked well, but with a 30 kg tote the platform overshot its target height and oscillated briefly. Engineers added gravity feedforward based on the measured load and retuned the position loop for a phase margin of about 50 degrees. The platform now reaches its height with negligible overshoot for every load in the range, and the integral term removes the small remaining error within a fraction of a second.