Servo Motor Control: Closed-Loop Position Tracking

2026-05-24

A servo motor isn't really a motor type — it's a control architecture. Take any motor (brushed DC, brushless DC, AC induction), bolt on a position sensor (encoder or resolver), wrap it in a feedback loop, and you have a servo. The defining feature: the controller continuously compares commanded position to actual position and drives current to close the error.

This makes servos fundamentally different from steppers. A stepper is open-loop — you send pulses and hope the motor follows. A servo is closed-loop — if the load stalls the shaft, the controller sees the error grow and pushes harder until it moves or faults. Steppers lose steps silently; servos don't.

The classic PID cascade in industrial servos has three nested loops, each running at different rates:

Each loop's output is the next loop's setpoint. Tuning starts inside-out: get current stable first, then velocity, then position. Tune the position loop first and you'll chase oscillations forever.

Real-world example: a CNC mill's X-axis ball screw, driven by a 750 W brushless servo with a 20-bit absolute encoder (about 1 million counts/rev). The controller commands a move to X = 152.4000 mm. The position loop sees the error, asks for 500 RPM. The velocity loop sees the actual shaft is at 480 RPM, commands more current. The current loop drives 4.2 A through the windings. When the cutter hits harder material, load torque rises — the velocity loop sees the shaft slowing and pushes current to 6.8 A automatically. The operator never knows; the part stays within 5 microns of programmed position.

Rule of thumb — position loop bandwidth: the position loop should run at roughly 1/5 to 1/10 the velocity loop bandwidth, and velocity should be 1/5 to 1/10 of current loop bandwidth. Violate this separation and the loops fight each other, producing oscillation that no PID tuning can fix.

Hobby servos (the RC kind) hide all this behind a PWM pulse-width interface: 1.0 ms = full one way, 1.5 ms = center, 2.0 ms = full the other way. Internally there's still a potentiometer giving position feedback and an analog comparator driving the motor — same architecture, just cheaper sensors and a single proportional loop.

See it in action: Check out Servomotor position control (Demo) by ACE-Lab to see this theory applied.
Key Takeaway: A servo is defined by its closed-loop feedback architecture, not its motor — and tuning the nested current/velocity/position PID loops requires working inside-out, with each outer loop running an order of magnitude slower than the one it commands.

All newsletters