GreatLight CNC Machining Factory logo
CNC Machining
Rapid Prototyping
Materials
Industries
News
About GL

Get Instant Quote

Engineering explainer

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.

±0.005 mm toleranceRa 0.2–0.8 μm finish5-axis and mill-turn100% inspection
CNC precision double filtering on a 5-axis machining center servo drive
Mechanism

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.

  • 1
    Command pathFixed-point resolution, set by the controller parameter.
  • 2
    Feedback pathEncoder counts scaled up, filtered, then compared.
  • 3
    Error termThe difference the drive amplifies into motor current.
Noise sources

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.

  • 1
    Switching eventsSpindle, pump and brake contactors in the same cabinet.
  • 2
    Ground loopsShield bonded at both ends couples plant noise.
  • 3
    Cable routingParallel runs with power cable over long distances.
  • 4
    Worn encoderContaminated disc or failing bearing adds real signal errors.
Filter behavior

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.

Boundaries

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.

  • 1
    BacklashMechanical lost motion; filtering cannot remove it.
  • 2
    Encoder resolutionA hardware limit, not a tuning parameter.
  • 3
    Thermal growthNeeds compensation, not attenuation.
Verification

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.

  • 1
    Cut and measureRoundness, flatness, or surface finish on a real feature.
  • 2
    Log following errorCompare traces before and after, not peak values.
  • 3
    Run a warm cycleRe-check after two hours of cutting to catch drift.
Selection guide

Matching the filter approach to the symptom

Use this when the symptom is clear but the fix is not.

SymptomLikely sourceFilter approachWhen it will not help
Rough finish on one arc quadrantEncoder noise from a nearby contactorLow-pass at 1–2 kHz plus cable re-routeIf backlash exceeds 10 μm
Hunting at standstillLoop gain too high for the mechanicsReduce gain first, then light filteringIf the guideways are worn
Repeatable ripple at one speedSpindle or structural harmonicNarrow notch tuned to that frequencyOnce spindle speed changes
Position drifts over the shiftThermal growth in the screwNo filter fix; use compensationFiltering only hides the drift
Overshoot on fast reversalsFilter corner set too lowRaise the corner frequencyIf the axis is mechanically loose
Random single-axis faultsFailing encoder or cableReplace hardware, keep settingsFiltering 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.

FAQs

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

Follow GreatLight

More shop-floor notes

We publish setup notes, tooling trials and inspection data from the factory floor.

FacebookTikTokYouTubeLinkedInInstagramThreadsPinterest

Trusted by engineers and manufacturers worldwide

Tesla Ford Motor Company BYD Auto Denso Magna International Boeing Airbus Medtronic KUKA FANUC