CNC Precision Double: How High-Frequency Filtering Keeps Two Number Sets Honest
A servo drive on a machining center carries two versions of the same commanded position: the coarse one the controller sends and the fine one the encoder returns. When high-frequency noise rides on the encoder line, those two versions disagree and the axis dithers. This page explains where the noise comes from, what filtering does to it, and when filtering stops helping.

In this article
- 1
- 2
- 3
- 4
- 5
- 6
Where the second number set comes from
Every closed-loop axis runs two data paths. The controller issues a position command, usually as a 32-bit value with a fixed resolution. The encoder returns an actual position, and on modern drives that feedback is processed at higher internal resolution, often 64-bit floating point before it is scaled back to counts. So the same physical position exists twice in the system, at different numeric resolutions. The gap between them is what the drive tries to close.
High-frequency filter settings sit inside that loop. They attenuate encoder signal content above a set corner frequency, typically a few kilohertz on a mill axis. The intent is narrow: strip electrical noise that the drive would otherwise read as real motion. The filter does not improve mechanical accuracy. It prevents the loop from reacting to something that is not mechanically there.
This distinction matters when you talk about CNC precision double. People sometimes assume a higher-resolution number set automatically produces a better part. It does not. It produces a more sensitive loop. Sensitivity only pays off if the signal feeding it is clean and the mechanics can actually resolve the commanded increments.
- 1Command pathFixed-point resolution, set by the controller parameter.
- 2Feedback pathEncoder counts scaled up, filtered, then compared.
- 3Error termThe difference the drive amplifies into motor current.
What high-frequency noise actually looks like at the axis
Encoder noise is rarely a clean sine wave. On a real machine it shows up as short bursts that coincide with something else switching. A spindle drive accelerating, a coolant pump starting, a servo brake releasing, a welding cell on the same plant feed. The bursts last microseconds but repeat at kilohertz rates, which is why they land right in the band the filter is designed to cut.
The mechanical symptom is easy to misread. Operators describe it as a rough finish on one quadrant of a bore, or a faint ripple on a face milled at high feed. It looks like a spindle problem. It is more often a feedback problem, because the drive is injecting small current corrections that never correspond to a real tool movement.
Grounding and shielding cause more of these faults than filter settings do. A shield grounded at both ends creates a loop that picks up plant noise. A shield grounded at one end only, usually the drive end, behaves better. Cable routing matters too: encoder cable run parallel to a spindle power cable for 2 m will couple noise regardless of filter tuning.
- 1Switching eventsSpindle, pump and brake contactors in the same cabinet.
- 2Ground loopsShield bonded at both ends couples plant noise.
- 3Cable routingParallel runs with power cable over long distances.
- 4Worn encoderContaminated disc or failing bearing adds real signal errors.
What the filter does to the error term, and what it costs
A low-pass filter on the feedback path trades bandwidth for stability. Set the corner frequency high and the drive follows fast commands but also follows noise. Set it low and the axis runs quiet but lags on quick reversals, which shows up as rounded corners on a pocket and overshoot on a fast approach. Most builders land somewhere between 1 kHz and 4 kHz for milling axes and adjust from there.
There is a second-order effect worth knowing. Filtering the feedback delays the error signal, and a delayed error signal in a high-gain loop pushes the system toward oscillation. So adding filtering can, in some setups, make a marginal axis worse. That is why you tune gain and filter together, not one after the other.
Notch filters handle a different case. When one specific frequency is the problem, usually a spindle harmonic or a structural resonance, a narrow notch removes it with far less phase penalty than a broad low-pass. The catch is that the notch must track the disturbance. A fixed notch tuned to 420 Hz does nothing once the spindle speed changes and the harmonic moves.
When filtering is the wrong answer
Filtering cannot fix a mechanical fault. If a ball screw has 15 μm of backlash, or a thrust bearing is failing, the axis will show position error no matter how the drive is tuned. The filter only changes how the loop responds to the signal. It does not change what the mechanics can hold.
Filtering also cannot recover resolution that was never there. If the encoder provides 1 μm counts on a 40 mm pitch screw, the loop cannot resolve 0.005 mm regardless of how the numbers are processed downstream. High-resolution feedback is a hardware question. Software scaling just moves where the rounding happens.
The last boundary is thermal. A drive tuned tight with light filtering runs the motor harder, and on a long roughing cycle that shows up as axis drift. The mismatch between commanded and actual position grows as the screw warms. Parts that measure fine at 08:00 may drift by mid-afternoon. That is a thermal compensation problem, not a filter problem, and adding filtering only masks the drift while it hides the noise.
- 1BacklashMechanical lost motion; filtering cannot remove it.
- 2Encoder resolutionA hardware limit, not a tuning parameter.
- 3Thermal growthNeeds compensation, not attenuation.
How to verify a filter change did something real
The only honest test is a cut, measured. Pick a part feature that is sensitive to axis behavior, a bored bore, a circular interpolated pocket, a face milled at high feed. Cut it before and after the change. Measure roundness on a CMM or with a spindle-mounted indicator if the tolerance allows. A change in surface finish without a change in measured geometry is not proof of anything.
For the servo side, most drives log following error. Capture that trace during a representative move, ideally a rapid reversal followed by a slow feed. A clean loop shows a smooth error curve that returns to near zero. A noisy loop shows a jagged error with high-frequency content. Compare the traces, not just the peak value.
At GreatLight, this is part of how we qualify a process before a run. With 127 high-precision CNC machines across three plants, including 16 simultaneous 5-axis machining centers and 16 mill-turn centers, a tuning change made on one machine has to be proven on that machine. We hold ±0.005 mm and inspect 100% of parts before shipment, so a filter change that helps one axis and hurts another would show up in the inspection data.
- 1Cut and measureRoundness, flatness, or surface finish on a real feature.
- 2Log following errorCompare traces before and after, not peak values.
- 3Run a warm cycleRe-check after two hours of cutting to catch drift.
Matching the filter approach to the symptom
Use this when the symptom is clear but the fix is not.
| Symptom | Likely source | Filter approach | When it will not help |
|---|---|---|---|
| Rough finish on one arc quadrant | Encoder noise from a nearby contactor | Low-pass at 1–2 kHz plus cable re-route | If backlash exceeds 10 μm |
| Hunting at standstill | Loop gain too high for the mechanics | Reduce gain first, then light filtering | If the guideways are worn |
| Repeatable ripple at one speed | Spindle or structural harmonic | Narrow notch tuned to that frequency | Once spindle speed changes |
| Position drifts over the shift | Thermal growth in the screw | No filter fix; use compensation | Filtering only hides the drift |
| Overshoot on fast reversals | Filter corner set too low | Raise the corner frequency | If the axis is mechanically loose |
| Random single-axis faults | Failing encoder or cable | Replace hardware, keep settings | Filtering masks the fault and delays repair |
The trade-off in one line
If the error trace shows high-frequency content and the mechanics are tight, filter the feedback. If the error trace is smooth but the part is still out, stop tuning and measure the machine.
Questions engineers ask next
Does higher-resolution feedback always improve part accuracy?
No. It improves the resolution of the error term, which makes the loop more sensitive. If the mechanics and the thermal environment are not stable enough to hold those increments, the extra resolution just produces more visible dithering.
The useful question is whether the machine can resolve the increment, not whether the drive can compute it. On a screw with 15 μm backlash, going from 1 μm to 0.1 μm feedback changes nothing measurable on the part.
How do I know if the noise is electrical or mechanical?
Log the following error at standstill with the spindle off. If the trace is quiet, the noise is likely coupled from something that switches on during the cut. If the trace is already jagged with everything off, the problem is in the encoder, the cable, or the drive itself.
A second check is to move the axis slowly by hand with the drive disabled and watch the encoder counts. Counts that jump without motion point to an electrical or encoder issue.
Can filtering cause a machine to lose accuracy?
Yes, indirectly. A low corner frequency adds phase lag to the feedback path. In a high-gain loop that reduces stability margin and can cause overshoot on fast reversals, which shows up as rounded corners or a witness mark at direction changes.
The effect is usually visible before it becomes a scrap problem. If reversal marks appear right after a tuning change, raise the corner frequency or reduce gain before running production.
What corner frequency should a milling axis start at?
For most vertical and horizontal milling axes, 1 kHz to 4 kHz is a reasonable starting band. Heavier axes with large moving mass tend to sit at the lower end because they cannot follow fast commands anyway.
Set it, cut a test feature, and measure. The number that matters is the one that produces a clean error trace and a round bore, not the one that looks best in the drive manual.
Does this apply to 5-axis machines differently?
The rotary axes are usually the harder case. A trunnion or rotary table carries more inertia and its feedback cable runs through a moving cable chain, which is a better antenna than a fixed run. Noise picked up in the chain often lands on the rotary axis only.
Simultaneous 5-axis work also couples the linear and rotary errors, so a small ripple on the rotary axis can show up as a surface defect on a contoured surface. Tune the rotary axes first when a 5-axis part shows finish problems.
How much does this matter for parts held at ±0.005 mm?
It matters at the margin. At ±0.005 mm, the loop has to be quiet enough that it is not spending motor current chasing noise, because that current becomes heat and heat becomes drift. A clean loop holds tolerance through a full shift more reliably than a fast loop that is fighting its own feedback.
That is why we inspect 100% of parts before shipment rather than sampling. Drift does not announce itself; it shows up in the measurements.
Send us the drawing and the tolerance
We quote and return a free DFM analysis within 12 hours, and production can start within 24 hours of approval. Uploads stay confidential, and an NDA is available on request.
12-hour quote and DFM±0.005 mm tolerance100% inspection before shipment