Servo Following Error & Position Loop Gain Calculator
Estimate servo tracking error for constant-velocity or acceleration-ramp motion, size the minimum ideal position-loop gain, and screen velocity feedforward and loop-bandwidth separation.
Enter the known values and review the calculated result
Input parameters
Use consistent values and select the intended engineering units.
Analysis objective
Commanded motion phase
Position controller
Engineering requirement
Optional tuning screening
Results
Calculation tools Save, export and manage your results
Save your calculation, export available results, or store a finalized engineering artifact in your account.
Method, application and limitations
Review the calculation method, intended application and engineering assumptions before using the result in a design decision.
Formula and calculation method
Servo following-error model
This calculator uses a simplified cascaded position/velocity-loop model with an ideal inner velocity loop:
vactual = Kp · e + gFF · vcommand
where e = xcommand − xactual is following error, Kp is the position-loop proportional gain in s−1, and gFF is the velocity-feedforward fraction from 0 to 1.
Constant-velocity following error
For steady constant-velocity motion, the modeled tracking error is:
e = (1 − gFF) · v / Kp
Without velocity feedforward, gFF = 0 and the relation reduces to e = v / Kp.
Acceleration ramp from rest
For a constant-acceleration ramp from rest to the entered command speed:
tr = v / a
The calculator evaluates the following error at the end of the ramp:
e(tr) = (1 − gFF) · a / Kp2 · [Kptr − 1 + exp(−Kptr)]
This result applies to the modeled acceleration phase only; it does not include the later constant-speed portion of the move.
Minimum ideal position-loop gain
For constant velocity, the minimum ideal gain required to meet the allowed error emax is:
Kp,req = (1 − gFF) · v / emax
For an acceleration ramp, Kp,req is solved numerically from the ramp-end equation at e(tr) = emax. If the ramp-end tolerance alone imposes no positive minimum gain, the calculator can return Kp,req = 0; this is not permission to operate without position feedback.
Error utilization and margin
In tracking-check mode:
error utilization = e / emax
tracking error margin [%] = (1 − e / emax) · 100
An error utilization above 1 means the modeled following error exceeds the specified tolerance.
Position/velocity-loop bandwidth screening
The assessed position-loop gain is converted to an equivalent position-loop bandwidth:
fp ≈ Kp / (2π)
The preliminary inner velocity-loop guide is:
fv,guide ≈ 4 · fp
If velocity-loop bandwidth is supplied, the calculator also reports fv / fp. A ratio below 4 triggers a tuning warning. Meeting the 4:1 guide is a screening result only and does not prove closed-loop stability or adequate phase margin.
When to use this calculator
When to use this servo following-error calculator
Use this calculator for preliminary motion-control screening when you need to relate commanded motion, position-loop gain, following-error tolerance, velocity feedforward, and optional velocity-loop bandwidth.
Available analysis objectives
- Check following error: enter the position-loop gain and estimate the modeled tracking error, error utilization, margin, and minimum ideal gain required by the tolerance.
- Size position-loop gain: calculate the minimum ideal Kp required by the selected motion profile and allowed following error. In this mode, the calculator does not calculate an actual tracking error for a real axis.
Supported motion profiles
- Constant velocity: evaluates steady speed-proportional following error.
- Acceleration ramp from rest: evaluates the modeled error at the end of a constant-acceleration ramp to the entered command speed.
Control options
- Position control: no velocity feedforward, so gFF = 0.
- Velocity feedforward: applies a feedforward fraction from 0 to 1 to the simplified model.
Typical engineering uses
- Check whether a proposed position-loop gain is consistent with a specified following-error tolerance.
- Estimate the ideal position-loop gain required for constant-speed tracking or an acceleration ramp.
- Evaluate how velocity feedforward changes the modeled position error.
- Screen whether a supplied inner velocity-loop bandwidth has at least 4:1 separation from the equivalent position-loop bandwidth.
- Compare candidate servo-control settings before detailed drive commissioning and measured tuning.
Do not use this calculator as a complete servo tuning, motor sizing, stability, resonance, or machine-dynamics verification. It does not calculate torque/current capability, phase margin, mechanical resonance, backlash, structural compliance, or disturbance rejection.
How to interpret the result
How to interpret the results
Predicted following error, e
In Check following error mode, this is the modeled position tracking deviation for the selected motion phase. For constant velocity it is the steady modeled error. For an acceleration ramp it is the error at the end of the ramp from rest. In Size position-loop gain mode, no actual tracking error is calculated.
Minimum ideal position gain, Kp,req
This is the minimum gain required by the specified error tolerance within the simplified model. It is not automatically a recommended real drive setting. For some acceleration-ramp cases, the tolerance can produce Kp,req = 0; this means only that the ramp-end tolerance does not impose a positive minimum in the model.
Error utilization, e / emax
- Below or equal to 1: the modeled following error is within the specified limit.
- Above 1: the modeled following error exceeds the specified limit.
The reported tracking error margin is positive when the modeled error is below the limit, zero at the limit, and negative when the limit is exceeded.
Velocity feedforward fraction
The reported gFF is the feedforward fraction actually used by the model. With position control and no feedforward it is zero. A value of 1 represents ideal 100% velocity feedforward and can produce zero modeled error, but the calculator explicitly treats this as an ideal cancellation rather than proof of real-world zero following error.
Equivalent position-loop bandwidth
The calculator reports fp ≈ Kp/(2π) for the assessed gain. In tracking-check mode this uses the entered Kp; in gain-sizing mode it uses Kp,req.
Velocity/position loop screening
If fv is entered, compare the reported fv/fp ratio with the 4:1 guide. A result below 4 indicates that the inner velocity loop may be too slow relative to the assessed position loop and should be investigated. A result at or above 4 only passes this preliminary separation check; it does not establish stability.
A design decision should consider both the modeled tracking-error requirement and the actual servo-system dynamics. Passing one check does not compensate for failing another.
Calculation example
Worked example — acceleration ramp with velocity feedforward
Consider a servo axis that must accelerate from rest to 0.50 m/s at a constant 1.00 m/s2. The position loop uses Kp = 40 s−1, velocity feedforward is set to gFF = 0.80, and the maximum allowed following error is 1.00 mm. The measured or specified inner velocity-loop bandwidth is 30 Hz.
1. Ramp duration
tr = v / a = 0.50 / 1.00 = 0.50 s
2. Residual feedback fraction
1 − gFF = 1 − 0.80 = 0.20
3. Predicted following error at the end of the ramp
e(tr) = 0.20 · 1.00 / 402 · [40 · 0.50 − 1 + exp(−40 · 0.50)]
e(tr) ≈ 0.002375 m = 2.375 mm
4. Error utilization and margin
e / emax = 2.375 / 1.00 = 2.375
tracking error margin = (1 − 2.375) · 100 = −137.5%
The modeled ramp-end error exceeds the 1.00 mm requirement.
5. Minimum ideal position-loop gain
Solving the same ramp-end equation numerically for e(tr) = 1.00 mm gives:
Kp,req ≈ 97.96 s−1
6. Optional bandwidth screening
For the entered Kp = 40 s−1:
fp ≈ 40 / (2π) = 6.366 Hz
fv,guide ≈ 4 · 6.366 = 25.465 Hz
fv / fp = 30 / 6.366 ≈ 4.71
The velocity/position-loop separation meets the calculator's 4:1 screening guide, but the following-error requirement still fails. The two checks answer different questions, and neither proves full servo stability or motor capability.
Assumptions and limitations
Assumptions and limitations
- The inner velocity loop is treated as ideal and is represented only through the optional bandwidth-separation screening.
- The position controller is represented by a proportional position-loop gain Kp in s−1.
- The supported motion phases are steady constant velocity and a constant-acceleration ramp from rest.
- For the acceleration-ramp mode, the reported following error is evaluated at the end of the ramp; subsequent cruising is not included in that result.
- Velocity feedforward is modeled as a dimensionless fraction from 0 to 1. Acceleration, torque, friction, and other feedforward terms are not calculated.
- The calculation uses positive command-speed and acceleration magnitudes; direction reversals and signed trajectory behavior are not modeled.
- The model does not calculate motor torque, current, inertia capability, thermal duty, drive saturation, or available acceleration.
- Backlash, friction nonlinearities, structural compliance, mechanical resonance, encoder effects, sampling delay, filters, disturbance rejection, and multi-axis coupling are excluded.
- The 4:1 velocity/position-loop relationship is a preliminary screening rule in the calculator, not a stability criterion. Phase margin and gain margin are not calculated.
- At 100% ideal velocity feedforward the model can predict perfect cancellation. Real axes must still be validated from measured following error and drive-response data.
Use the result as a preliminary servo-control engineering check. Final tuning and acceptance should be based on the actual drive, mechanics, motion profile, load, commissioning measurements, and the manufacturer's applicable control-loop guidance.
