Closed Loop Servo System: Position, Velocity and Current Loops

By editor 7 min read
Block diagram of cascaded servo position, velocity and current loops

A closed loop servo system measures what the motor actually does, with an encoder, resolver or current sensor, and continuously corrects the difference from the command. Industrial servo drives nest three loops: a fast PI current (torque) loop inside a PI velocity loop, inside a proportional position loop. Each inner loop should be 5–10 times faster than the loop around it. Tune from the inside out, and add feed-forward when following error must be small.

3
nested loops
5–10×
inner vs outer bandwidth
P / PI / PI
position / velocity / current
v ÷ Kp
following error

Open Loop vs Closed Loop Servo Control

A closed-loop controller feeds measured output back to the controller; an open-loop controller runs in a pre-arranged way without that feedback. Wikipedia lists the closed-loop advantages: disturbance rejection, performance despite model errors, the ability to stabilize unstable processes, lower sensitivity to parameter changes and better reference tracking. A servomechanism is by definition closed-loop. Wikipedia notes a power window is not a servo, because no automatic feedback controls position, but cruise control is.

Open loopClosed loop servo
FeedbackNone; assumes the motor followed the commandEncoder, resolver, tachometer or potentiometer
DisturbancesNot detected or correctedCorrected automatically
TuningLittle or noneGains must be tuned for stability and response
Typical useSimple positioning, fixed-speed drivesCNC axes, robots, packaging, high-dynamic motion
Comparison based on Wikipedia (Closed-loop controller; Servomechanism).

The Three Servo Control Loops

Cascaded position, velocity and current loops in a servo driveBlock diagram of a servo system: position command enters the proportional position loop, whose output is a velocity command to the PI velocity loop, whose output is a torque or current command to the PI current loop and power stage driving the motor. Encoder position, derived velocity and current sensor signals feed back to each summing junction. Each inner loop runs five to ten times faster than the loop outside it.Cascaded servo control: position → velocity → currentPositioncommand−Position loopP (Kp)−Velocity loopPI (Kvp, Kvi)−Current loopPI (drive)Power stagePWM inverterMotorENCposition feedback (encoder counts)velocity feedback (differentiated encoder signal)current sensorslowest loop5–10× faster5–10× faster againvelocitycommandtorquecommandIndustrialBasicsindustrialbasics.com
Figure 1: Loop structure, controller types and the 5–10× bandwidth rule from Motion Control Tips.

Current (torque) loop

The innermost loop controls motor current, and therefore torque, which drives speed and position. It is typically PI, and its gains are often set by the drive manufacturer so users rarely tune it (Motion Control Tips).

Velocity loop

The most common servo loop. It compares commanded and actual speed from a tachometer or encoder and is usually PI, with proportional gain Kvp and integral gain Kvi. The integral term pushes the motor to zero error at the end of a move. The velocity loop also resists high-frequency load disturbances, but alone it cannot hold a position over long periods.

Position loop

Wrapped around the velocity loop, the position loop calculates following error and issues a velocity command to remove it. In a cascaded system it is usually proportional only (Kp). A position loop used without a velocity loop is normally a full PID controller, but velocity feedback adds stiffness and counters high-frequency disturbances. For PID terms and general tuning methods, see PID tuning.

Loop Bandwidth and the 5–10× Rule

Bandwidth is the frequency at which the closed-loop response falls by 3 dB, to 70.7% of the input amplitude (ADVANCED Motion Controls). In a cascade, each inner loop must respond faster than its outer loop or it has little effect: velocity 5–10× the position loop, current 5–10× the velocity loop. Raising position bandwidth raises the velocity bandwidth needed, and so on inward. Pushing an outer loop beyond what the inner loop can support gains nothing (Motion Control Tips).

ADVANCED Motion Controls notes that inertia, friction and gear ratio all limit bandwidth, and phase and gain margin set the stable maximum. It cites standard servo systems below 15 Hz, large systems around 1–2 Hz and direct-drive systems up to 50 Hz.

Servo Loop Calculator

Servo Loop Planner: Following Error and Loop Bandwidths
IndustrialBasics calculator. A proportional position loop turns following error into a velocity command (velocity = Kp × error), so at constant speed without feed-forward, error = speed ÷ Kp. The position bandwidth estimate Kp/2π assumes an ideal, much faster velocity loop. Inner-loop targets use the 5–10× rule (Motion Control Tips). Units follow your speed input.

How to Tune a Closed Loop Servo

  1. Confirm the current loop: most drives set it automatically from the motor data; change it only if the manufacturer says so.
  2. Set the drive to velocity mode. Use a medium target speed with a fairly high acceleration to make the response visible.
  3. Raise Kvp until just before overshoot (or to overshoot, then back off).
  4. Raise Kvi until a small overshoot of about 5–15% appears.
  5. Switch to position mode. Start with a low Kp and raise it slowly to just before overshoot.
  6. Repeat moves at higher speeds and adjust so the gains work across the full speed range.
  7. If following error is still too high, add velocity (and acceleration) feed-forward, lowering Kp as needed.

Steps from Motion Control Tips. Velocity feed-forward calculates the speed the profile needs and feeds it directly to the velocity loop, so the axis no longer waits for error to build. The cost is that Kp must usually be reduced, lowering stiffness.

Tuning tip: Use the drive’s built-in frequency-response or Bode tool where available. It shows resonances and the actual −3 dB bandwidth, which is more reliable than tuning by eye on a step response.
Safety note: Tuning moves the axis unpredictably. Keep guards on, limit travel and torque, and keep the E-stop within reach. On a vertical axis, confirm the brake and load holding before enabling the drive.

For speed conversion from drive frequency, see Hz and RPM. For analog speed references on simpler drives, see potentiometer speed control.

Most of these loops close through an encoder: see our guide to the incremental encoder for quadrature, PPR and wiring.

Frequently Asked Questions

What is a closed loop servo system?

A motor, drive and controller that measure the actual position, speed or torque with a feedback device and continuously correct the error from the command. The drive compares feedback with the command and adjusts voltage, frequency or pulse width to remove the difference (Motion Control Tips; Wikipedia).

What is the difference between open loop and closed loop control?

Open-loop control runs a pre-arranged command without measuring the result. Closed-loop control measures the output and feeds it back, which rejects disturbances, tolerates model errors, can stabilize unstable processes and improves tracking (Wikipedia).

What are the three servo control loops?

The current (torque) loop innermost, the velocity loop in the middle and the position loop outermost. Each loop’s output is the command for the loop inside it.

Which servo loop uses PID?

In a cascaded system the position loop is usually proportional only, while the velocity and current loops are PI. A position loop used alone, without a velocity loop, is usually a full PID controller.

How much faster should the inner loop be?

The general rule is 5 to 10 times the bandwidth of the loop outside it: velocity loop 5–10× the position loop, current loop 5–10× the velocity loop.

In what order should servo loops be tuned?

Fastest first. The current loop is usually set by the manufacturer; tune the velocity loop next, then the position loop.

How do you tune a servo velocity loop?

Raise Kvp to just before overshoot, then raise Kvi until about 5–15% overshoot appears, using a medium speed and a fairly high acceleration to make the response visible (Motion Control Tips).

What is following error?

The difference between commanded and actual position while moving. With a proportional position loop and no feed-forward, it is about speed ÷ Kp.

What does velocity feed-forward do?

It sends the velocity the move needs straight to the velocity loop instead of waiting for position error, sharply cutting following error. The trade-off is that Kp usually has to be lowered, reducing stiffness.

What limits servo bandwidth?

Inertia, friction, gear ratio, mechanical resonance and stability margins. Bandwidth is usually defined at the −3 dB point, where output falls to 70.7% of the input amplitude (ADVANCED Motion Controls).

Sources and Further Reading

About the author

editor

Leave a Comment