AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

Troubleshooting

Servo Speed Control That Misses the Cut Position

Servo and stepper motion Published 10 min read By AutomateDirectUSA engineering team

Short answer

Registration error on a rotary cutter is a phase problem, not a speed-accuracy problem: a PID that holds RPM steady cannot correct it because nothing in that loop sees X1 minus X2. Keep the speed loop as the inner loop, capture X2 at the actual cut event, compute X1 - X2 as a wrapped phase error, and close a slow outer loop that trims the speed reference, updated once per cut.

On this page
  1. Why does a servo hold RPM exactly and still miss the cut position?
  2. Is the miss a feedback problem or a control-structure problem?
  3. Where must the controller capture the actual cut position?
  4. How do you compute X1 minus X2 without the encoder wrap lying?
  5. How much speed trim does a measured phase error need?
  6. Should the second loop get its own cyclic interrupt or share the existing one?
  7. Is the vendor motion-control route better than a hand-built cascade?
  8. Questions asked

A servo that holds its RPM to a fraction of a percent and still misses the cut is not badly tuned — it is the wrong loop for the job. Cut registration is a phase error, X1 minus X2 evaluated at the cut event, and no speed loop sees that signal. On a machine of this kind — analog 0-10 V reference, PID in a cyclic interrupt such as OB30 — the decision is to keep the speed PID as the inner loop and add a slow outer registration loop that trims the reference from the wrapped phase error, updated once per cut. On the worked machine below, a 750-count miss on 10,000 counts per revolution needs a 9 rpm trim held for the 500 ms between cuts: small in volts, tight in timing. The sections below give the capture, the wrap-safe error math, the trim arithmetic, and where each loop runs.

Why does a servo hold RPM exactly and still miss the cut position? #

Because the PID you have regulates speed, and cut registration is a position phase problem: at 120 rpm the speed loop can hold its setpoint to a fraction of a percent while the cut lands about 19 mm late, because nothing in that loop ever sees X1 minus X2.

Velocity control and registration coincide only while line speed and cutter speed hold a constant ratio. Every line-speed variation — tension pull, upstream feedback, a splice in the web — moves the phase between mark and knife, and a velocity controller has no error input that contains phase. X1 and X2 are exactly that phase: X1 is the encoder count where the cut should land, X2 the count where it did, and X1 - X2 = 0 is the only setpoint the customer sees. Tightening the speed tolerance makes the wrong number more accurate.

This is also why raising the speed loop gain usually backfires: the loop is not too slow for what it measures, it is measuring the wrong quantity. Once phase exists as a computed signal, correcting it takes little extra speed — the worked example below lands at 7.5% of base speed for a 750-count miss — but it must be applied at the right time, which is an outer loop whole job.

Is the miss a feedback problem or a control-structure problem? #

Assume structure only after four cheap checks pass: capture at the real cut event, unwrapped phase across the encoder zero, one direction convention for X1 and X2, and a trend showing the analog output actually moving during the correction.

Work the checks in order; each one is cheaper than the wrong guess it prevents.

  1. The error jumps by nearly a full revolution between consecutive cuts. Likely cause: raw X1 - X2 crossed the encoder zero and the subtraction wrapped. Confirming check: apply the wrap formula from the section below — if the jump collapses to a small signed value, the coordinate was the only fault.
  2. X2 changes when the program reads it, not when the knife fires. Likely cause: the position is sampled in normal scan flow, so its delay varies with program length. Confirming check: latch the count in the routine that catches the cut sensor and compare it against a hardware-captured value over ten cycles.
  3. The requested RPM moves but the analog output changes slowly. Likely cause: controller execution rate or output update limiting the correction, not the drive. Confirming check: trend the PID output and the raw analog output register on one time base.
  4. The output moves promptly but cutter RPM settles over more than one cut interval. Likely cause: drive ramping, reference filtering, torque limit or inertia dominating the transient. Confirming check: apply a 10% reference step and time the measured speed response.
  5. Speed regulation is excellent yet the miss grows steadily cut after cut. Likely cause: a ratio mismatch between line speed and cutter speed rather than a transient fault — the steady-state case the cascade integral action exists for.

If step four makes you suspect the encoder or its wiring before the structure, fixing non-circular servo cuts by isolating servo lag from encoder wiring shows the same separation done with measurements rather than guesses.

Where must the controller capture the actual cut position? #

Capture X2 at the cut event itself — the sensor edge that says the knife has fired — with a hardware latch or the fastest deterministic task you have, then subtract one measured constant for the mechanical delay between sensor and knife edge.

A commanded position is never a measurement. If the program samples the encoder in ordinary scan flow, X2 carries scan-time delay and its jitter straight into the error, and no gain setting removes a delay that changes cycle to cycle. Latch the count at the sensor edge in a fixed, fast task: a hardware capture input where the platform offers one, otherwise the shortest, most deterministic interrupt on the machine. The sensor-to-latch delay then becomes a constant you measure once instead of a moving error.

The second constant is mechanical. The sensor sits at an angular distance from the knife edge, so the captured count is early by a fixed offset that belongs in the error calculation, not in the tuning. Measure it once on a bare run with the guards closed or the drive locked out, per the machine risk assessment. Short sensor pulses at a scan-polled input can also vanish entirely, which shows up as a registration error that appears and disappears; why a PLC misses short input pulses and how to catch them covers the latch choices for exactly that failure.

How do you compute X1 minus X2 without the encoder wrap lying? #

Compute the error on the wrap circle, err = ((X1 - X2 + N/2) mod N) - N/2 with N the counts per cutter revolution; on N = 10,000 a raw -9,800 collapses to a true +200 counts instead of an apparent near-full-revolution miss.

A modulo coordinate repeats once per revolution, so near the wrap the raw subtraction reports nearly a full cycle of error while the real misalignment is a few counts. The wrap formula folds any raw difference into the range -N/2 to +N/2, which makes the error continuous across the zero boundary. Two things to verify in your own program before trusting it: remainder and modulo instructions differ between platforms on negative operands, so push the -9,800 case through yours and confirm it returns +200, not -9,800; and both values must share one direction convention, positive meaning the cut landed late, fixed in capture and formula alike.

The alternative that avoids modulo entirely is an unwrapped counter: keep a continuous position total that never resets each revolution, and take X1 and X2 from that total, where plain subtraction is always honest. Whichever you use, X1 and X2 must live in one coordinate system — encoder counts at the cutter shaft against one mechanical reference — before their difference means anything, and the correction direction must honor the machine permitted motion rather than the mathematically shortest path.

How much speed trim does a measured phase error need? #

On the worked machine below — cutter at 120 rpm, one cut every 500 ms, 10,000 counts per revolution — a measured error of 750 counts calls for a 9 rpm trim, 7.5% above base speed, held for the one interval before the next cut.

Worked example, illustrative inputs, calculated result — not a measured one. Inputs: line speed 30 m/min = 0.5 m/s; bag length 250 mm with one cut per cutter revolution, so the cutter runs 0.5 m/s ÷ 0.25 m = 2 rev/s = 120 rpm and the interval is T = 1 ÷ 2 = 0.5 s; encoder resolution N = 10,000 counts per revolution; measured X1 - X2 = +750 counts, positive meaning the cut landed late.

  • Phase error: 750 counts ÷ 10,000 counts/rev = 0.075 rev = 27°.
  • Material error: 0.075 rev × 250 mm/rev = 18.75 mm late.
  • Trim speed for one interval: 0.075 rev ÷ 0.5 s = 0.15 rev/s, × 60 s/min = 9 rpm, which is 9 ÷ 120 = 7.5% above base speed.
  • Check: 9 rpm ÷ 60 s/min = 0.15 rev/s × 0.5 s = 0.075 rev, × 10,000 counts/rev = 750 counts — the trim removes exactly the measured error in one interval.

Hold the same total correction over several intervals by dividing: a trim of 9 rpm ÷ k held for k intervals displaces the same counts with a smaller speed bump. The one-shot trim maximizes sawtooth in bag length; the spread trim trades settling time for smoothness. These are calculated examples for these inputs — take counts per revolution, pulley ratio and line speed from your machine and the encoder datasheet.

Should the second loop get its own cyclic interrupt or share the existing one? #

Share the existing cyclic interrupt: both loops in one OB execute in a fixed order every cycle, which is what a cascade needs, and a separate interrupt only adds phase jitter between the loops — provided the total execution time still fits the cycle with headroom.

The cascade needs order, not a second interrupt. Run the outer registration computation first, produce the trim, then let the speed PID execute with the fresh trim folded into its setpoint. The outer loop does not need to run every cycle: gate it inside the same OB on the captured cut flag, which is the 2 Hz of the worked machine, while the speed PID runs every cycle. What the cascade cannot tolerate is a varying phase relationship between the two loops, because a trim sampled at a wandering offset against the inner loop reads to it as noise — which is what two interrupts with independent schedules produce.

Order the bandwidths by the cascade rule of thumb — the inner speed loop roughly three to ten times faster than the outer registration loop — but the practical test is simpler: the speed loop must settle the 9 rpm step well inside the 500 ms between cuts. Measure the step response once. If measured speed crawls toward the reference no matter the gain, the ceiling is downstream in ramp, reference filter or torque, which is the situation why a servo axis never reaches its commanded speed dissects.

Decision: one cyclic interrupt, outer loop gated per cut, inner loop every cycle; give the outer loop its own interrupt only when the combined execution will not fit the cycle time with headroom.

Is the vendor motion-control route better than a hand-built cascade? #

Yes when you can give the drive a position-capable command interface: a modulo, or endless, axis with registration or cam correction handles the wrap and the per-cut trim in supported platform functions; keep the hand-built cascade while the 0-10 V velocity reference is fixed hardware.

A modulo axis takes over the parts of this problem that are pure plumbing. The coordinate wraps at one cutter revolution by construction, so the wrap fault above cannot occur, and the registration trim becomes a supported correction layered on a gearing or cam relationship instead of arithmetic bolted onto an analog reference. Your job keeps the same hard parts either way: capture at the true cut event, the measured knife offset, one direction convention.

The trade is the command interface. While the drive takes a 0-10 V velocity reference there is no position command for a motion-control technology object to close on, and the hand-built cascade is the correct architecture — structurally the same proportional-position-over-PI-velocity cascade used inside commercial servo drives. When the drive can be reconfigured to accept a position-capable command, the modulo-axis route is the sturdier long-term structure, and setting up servo electronic gearing with registration correction walks through that gearing-plus-trim arrangement on a real axis.

Decision: with the analog velocity hardware in place, build the cascade; when the drive can be reconfigured to a position or axis interface, move registration into the modulo axis.

Questions asked

What fraction of the error should the registration loop correct each cut?

Start at one third. For the worked 750-count error that is a 3 rpm trim held over three intervals instead of 9 rpm for one, which keeps the bag-length sawtooth small while the error still decays within three cuts. Raise the fraction only if the error between cuts outruns that decay, and add slow integral action only when a constant offset survives several cuts unchanged.

Does analog output resolution limit how small a trim you can make?

Convert the trim to volts and compare with the output step size. With 0-10 V scaled so 1,500 rpm equals 10 V, one rpm costs 10 V ÷ 1,500 = 6.7 mV, so the 9 rpm trim is about 60 mV. A 12-bit output steps 10 V ÷ 4,096 = 2.4 mV, leaving roughly 25 steps of headroom. If the needed trim rounds to a single step or to zero, rescale the analog range or reduce the counts per revolution used in the phase calculation.

How do you measure the knife offset constant once?

Run without material and with the knife guarded, latch the encoder count at the sensor edge, then latch again as the knife edge passes a fixed pointer, recording the counts between the two edges for at least ten revolutions. The average is the offset constant; the spread tells you whether the sensor bracket and its mounting are repeatable enough to trust before any tuning starts.

Why does measured speed keep settling slowly even with higher gain?

Because the lag lives downstream of the controller. Step the reference by 10% and time the measured speed to 63% of its change: a time constant of 150 ms puts the inner loop bandwidth near 1 ÷ (2π × 0.15 s) ≈ 1 Hz and needs about three time constants, 450 ms, to settle — inside a 500 ms interval with almost no margin. Shorten the drive reference filter or your own speed-feedback filtering; gain cannot remove downstream lag.

Keep reading

  • How-to

    Setting Up Servo Electronic Gearing With Registration Correction

    Gear the folder servo to the web encoder with one fixed electronic gear ratio and apply registration error as a bounded phase trim ramped across the 100 to 200 ms between corrections. At 150 m/min a 0.1 mm tolerance is 40 microseconds of web travel — about eight 0.0127 mm increments — so doubling or halving a pulse train for six pulses trips following error, while a ramped trim changes speed by 0.04 percent.

    Servo and stepper motion

  • Troubleshooting

    Fix Servo Travel Error After Swapping Resolver and Encoder

    Travel that does not match the position display after a resolver-to-encoder swap is a scaling fault: the drive or the technology axis is still converting counts with the other feedback's increments per revolution. Measure one commanded move and divide actual by displayed travel; a constant ratio equal to the resolution ratio names the encoder data. Fix both layers, re-home, then re-tune.

    Servo and stepper motion

  • Explainer

    Mounting a Motor Encoder Behind a Belt Reduction

    No, not for commutation: field-oriented control switches phase current against the rotor's electrical angle, which only a sensor on the motor shaft reports directly. Behind a 10:1 belt, a 4096-count encoder gives about 410 counts per motor revolution — enough counts per pole to turn a 6-pole motor, but belt lash and multiplied noise put a load-dependent error inside the current loop. Use the belt-side sensor for velocity only; commutate from the motor shaft and add an output encoder if you need load position.

    Servo and stepper motion