Troubleshooting
Why a Servo Axis Hunts at Standstill After Tuning
Short answer
A symmetric few-count wander at standstill with no commanded motion is the servo loop dithering on its own encoder count, not machine backlash. Disable the filters, retune in order — proportional gain to about 3 percent overshoot, then derivative to square the response, then integral as high as it stays stable — and validate on the smallest step the machine commands.

On this page
- Why does a tuned servo axis hunt at standstill with no command?
- How do I prove the hunt is the loop and not the machine?
- Why does adding damping make the hunting worse?
- What order should KP, KD and KI be tuned in?
- Why did the pole filter not stop the singing on short moves?
- Does the amplifier's torque or velocity mode change the tuning?
- Why did a big test step hide the hunt?
- Which cause do I check first?
- Questions asked
A servo axis that wanders a few counts at standstill with no commanded motion has not been tuned into ordinary instability — it has been tuned so the loop's own reaction to encoder quantization drives the motor. The wander sits symmetrically about the command, it shows up at rest or on short moves, and every attempt to damp it makes the axis sing on short moves. That combination points at derivative gain amplifying the encoder's smallest step, usually with a pole filter stacked on top to hide the result. The fix is to strip the filters, retune proportional, derivative and integral in that order, use feedforward instead of more derivative, and validate the tune on the smallest step the machine actually commands.
Why does a tuned servo axis hunt at standstill with no command? #
A symmetric wander of a few counts at zero command is the control loop dithering on its own encoder resolution: with the drive enabled and nothing commanded, the only error the loop sees is the position flicking between adjacent counts, and the gains amplify that flicker into real motion.
Worked example, on a retrofit mill axis: a 1000-line encoder decoded in quadrature gives 4000 counts per revolution, and a 3 rev/in ballscrew turns that into 12,000 counts per inch — one count is about 83 microinch. A ±5-count wander is ±0.0004 inch of real slide motion, a calculated example for those inputs and not a measured figure; derive your own scale from encoder line count, quadrature and screw lead. The scale does not change the diagnosis: with the drive enabled and zero command, nothing outside the loop applies a force, so a symmetric oscillation about the commanded position is closed-loop behavior — the loop generates it from its own reaction to the encoder's least significant count.
How do I prove the hunt is the loop and not the machine? #
Put a dial indicator on the slide and reverse direction by the smallest jog you can command: lost motion reads as a one-sided dead band you can measure, while loop hunting reads as a symmetric oscillation about the commanded position, with the needle swinging both ways.
Lock the drive out and block the slide before an indicator goes near a driven axis. If the dead band traces to the joint between the motor shaft and the screw, replace the worn flexible shaft coupling instead of tuning around it — no gain compensates for lost motion. A symmetric oscillation with no reversal at all cannot be backlash: it appears with the command held at zero, so it must come from inside the loop.
Why does adding damping make the hunting worse? #
Derivative gain acts on the change in error between samples, so at standstill it amplifies the encoder flipping between adjacent counts — with KP at 275 and KD at 2000, a one-count flip commands 7.3 times the torque that a full count of real position error commands through KP.
That 7.3 figure is derivative gain divided by proportional gain, 2000/275, calculated for those gains on a controller whose derivative term multiplies the per-sample change in counts; scale the ratio from your own drive's gain definitions, but the mechanism is identical. At rest, derivative's only input is the encoder toggling its least significant count, and the amplifier obeys every flip. The practical ceiling on derivative gain is the point where squaring off the step response stops improving — past it, extra derivative only raises the gain on the encoder's smallest step and pushes bandwidth toward the screw-and-slide resonance, which is exactly the singing on short moves.
What order should KP, KD and KI be tuned in? #
Retune in this order: proportional up to about 3 percent overshoot on a step, derivative up until the response squares off, integral as high as it stays stable, with acceleration feedforward before any more derivative.
Strip every filter first, then work the sequence on a step response. Integral is the only term with authority over steady-state error against static friction: with it at zero, a heavy slide parks wherever breakaway friction leaves it, which reads as a fixed offset rather than a wander. Feedforward carries the accelerating torque so proportional gain can stay modest without derivative compensating for it. How far proportional gain can go before overshoot depends on the inertia ratio the motor sees; the 6:1 case is worked through in Tuning a Servo Axis With a 6:1 Ballscrew Inertia Ratio.
Why did the pole filter not stop the singing on short moves? #
A pole filter silences the singing by eating phase margin, which narrows the range of gains the loop tolerates and leaves the imbalance underneath untouched — filters are the last tool, for a resonance you have identified on a plot, not the first answer to an unstable gain set.
Every filter inserted ahead of a settled tune shrinks the window that made the original gains look workable. Filters belong at the end, and only for a resonance you can point to on a measured step-response plot as a ring period. Strip them, retune, and if singing survives a clean tune, add back the one filter that plot calls for.
Does the amplifier's torque or velocity mode change the tuning? #
Yes: in torque mode the amplifier delivers current and the controller's PID supplies all the damping, while in velocity mode the amplifier closes its own loop and hands the controller an already-damped plant, so torque-mode gain sets and auto-tune routines do not transfer.
In torque mode the plant from torque to position is an undamped double integrator: proportional gain supplies stiffness and derivative supplies the damping the plant has none of — that is the plant the retune order above and most auto-tune routines assume. In velocity mode the amplifier closes its own speed loop, and a torque-mode gain set applied there lands either soft or straight into instability; months of tuning produce nothing because the method and the hardware disagree. Confirm the mode from the amplifier's manual and its mode settings before touching a gain — and tune a velocity-mode amplifier by hand.
Why did a big test step hide the hunt? #
A 1000-count step is 0.083 inch of travel on that 12,000-counts-per-inch scale, and over that distance the slide breaks free and the loop runs in its linear region — the finishing moves the machine actually makes are a tenth of that, where breakaway friction dominates.
On the large step, friction is a small fraction of commanded torque, so a 15-count following error reads as a clean hold. Cut the test to 100 counts, 0.0083 inch: the whole move happens inside breakaway and compliance, the screw winds up before the nut moves, and position resolves in 83-microinch steps. A tune validated only at large amplitude was tuned on a different plant than the machine runs in finishing passes and small segments. Finish the tune on the smallest step the machine commands, then confirm the large step still behaves.
Which cause do I check first? #
Check the cheap things first: confirm the amplifier mode, sweep the feedback cabling and shielding, look at the torque command with the machine parked, and only then open the gains — each check takes minutes and rules out a cause that no amount of retuning will fix.
- No gain set is ever stable — check the amplifier mode against its manual first: a torque-mode tune applied to a velocity-mode amplifier is the classic dead end.
- Counts flip with the machine parked and drive enabled — check the encoder cable shield and grounding before the gains: a broken shield flickers counts just like quantization does.
- Wide band of reversing command at zero velocity — read the controller's torque output with the axis parked; that confirms the loop is dithering on its own resolution, and the retune order above is the fix.
- One-sided dead band on reversal — lost motion, not loop behavior: indicator the motor-to-screw joint and the nut preload, and repair or replace the worn part.
- Singing only while filters are installed — removing the filters and retuning tells you whether it was ever a resonance; read the ring period on the step-response plot if one remains.
- Grainy motion at low feed after a clean tune — stick-slip, read on the velocity trace of a slow jog; gain changes will not polish it, as laid out in Why Gain Changes Cannot Smooth a Rough Servo Axis.
- A following-error fault during motion rather than wander at rest — a different diagnosis, covered in Troubleshooting a Servo Axis That Faults Mid Move.
The decision, case by case: a symmetric few-count wander with clean feedback is a tuning-order fault — strip the filters, retune in the order above, feedforward before more derivative, and validate on the smallest step the machine commands. A one-sided dead band is mechanical — measure it and repair the joint before tuning anything. An axis that sings only under filters was over-filtered, not resonant.
Questions asked
Is a one-count flicker at standstill a fault?
No. A quiet one-count shimmer is the loop sitting on the edge of its encoder resolution and is unavoidable. The fault signature is a symmetric wander spanning several counts that moves the machine and repeats indefinitely; once the band widens like that, the gains are amplifying quantization and the retune sequence in this article is the fix.
What does the hunt cost if it is left alone?
A hunting axis cycles reversing current through the motor windings and the amplifier output stage while parked, which is continuous heating with no work done, and the ballscrew nut and thrust bearings take a small reversing load many times a second. Clear it before leaving an axis enabled overnight or running the machine unattended.
Should I add a notch filter at the hunting frequency?
No. A notch is for a resonance at a fixed frequency confirmed on a measured plot, typically a screw or belt mode. This hunt is generated inside the loop by quantization, so its behavior follows the gains and the sample rate rather than any mechanical mode. Retune first, then add only the filter a measured resonance calls for.
Does a filtered or modified derivative term solve this?
It can raise the ceiling on derivative gain. Some drives implement derivative so that frequencies well above the term's time constant are amplified by a small fixed factor instead of the full differencing gain, which means less dither per encoder flip. It eases the symptom only; the tuning order still has to be right, so retune in sequence before reaching for it.
