AutomateDirectUSAMotion LibraryIndustrial monitors & PCs

Troubleshooting

Why a cross-coupled gantry needs two encoders, not one

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

Short answer

A single encoder and hall pair cannot run a cross-coupled gantry: with one position signal the skew error is zero by definition, so the algorithm has nothing to correct, and the second linear motor commutates from a sensor that does not see its own magnet track. Give each forcer its own encoder and phasing reference, or drive both phase-aligned forcers from one amplifier and give up yaw control.

On this page
  1. What the skew term sees with one encoder
  2. What you will observe, cheapest check first
  3. Where the second forcer's commutation angle must come from
  4. Worked example: skew into commutation error on a 32 mm pole pitch forcer
  5. Whether one hall sensor can phase both forcers at power-up
  6. Which topology makes a single encoder legitimate
  7. Fix: per-forcer feedback, then close the coupling
  8. The decision for your build
  9. Questions asked

No — a cross-coupled gantry algorithm on two linear motors needs a position signal and a phasing reference per forcer, and one encoder with one hall sensor provides neither for the second motor. The coupling term corrects the difference between the two sides' measured positions, and a shared encoder makes that difference zero by definition, so the algorithm has nothing to act on however stiff the frame is. The same shared encoder hands the second forcer a commutation angle measured on the first motor's magnet track, which only holds under a measured pole-alignment condition most two-rail builds fail. Run the checks below in order, cheapest first, then apply the fix or the one-amplifier fallback the final section decides.

What the skew term sees with one encoder #

In cross-coupled control, each motor's loop is scored not only against its own command but against the other motor's position and speed errors; the coupling term is built from the difference between the two sides' measured positions and velocities. When both motors take position from the same encoder channel, that difference is zero at every instant, whatever the crossbeam is doing. The algorithm silently degrades into two motors chasing one command, which is the software twin of the slaved step streams a stepper gantry needs when twin motors run from one axis, described in why a twin-motor gantry axis needs slaved step streams. Keeping two separately fed drives moving as one gantry axis is its own architecture problem, covered in how two servo axes sync as one gantry axis over EtherCAT.

Stiffness changes where the error goes, not whether it exists. An off-center payload, different guide friction on the two rails, and force-constant differences between two separately magnetized forcers all produce differential force. A stiff crossbeam converts that force into internal frame stress and extra guide loading instead of measurable motion, and the single encoder by construction cannot show any of it. During commissioning, a dial indicator straddling the two rails, or a second encoder on the far rail, is the only way to quantify the skew.

What you will observe, cheapest check first #

  • The crossbeam visibly yaws under an off-center payload, yet the controller's skew error readout stays at zero. Cause: both motors reference one encoder channel. Confirm by listing the feedback source assigned to each motor in the controller's gantry configuration; if both name the same channel, the coupling term has no input. This check costs nothing.
  • One forcer delivers less force for the same commanded current and runs hotter than the other. Cheapest cause first: its commutation angle is borrowed from the other rail, confirmed in minutes by the low-current test in the hall section; after that, mechanical binding, checked by hand with the drives disabled.
  • Raising the coupling gain changes nothing at all. Cause: the gain multiplies an error signal that is identically zero. Confirm by logging the skew error while you push one end of the crossbeam; if it never leaves zero, the input is missing, not the gain.
  • A power-up phasing move pushes, stalls or reverses one forcer. Cause: the shared hall reading describes the other forcer's phase. Confirm with the power-up test in the hall section.

Where the second forcer's commutation angle must come from #

Commutation needs the electrical angle between each forcer's windings and its own magnet track. Feeding both amplifiers from one encoder assumes a fixed, known relationship between the two magnet tracks and the two forcers, and it holds only if all three of these are measured, not assumed:

  • Both magnet tracks sit at the same pole alignment relative to a common mechanical datum, within a small fraction of the magnetic pitch.
  • Both forcers are mounted at the same offset relative to their own track poles.
  • Yaw travel in operation stays a small fraction of the pole pitch.

Magnet tracks are cut and magnetized as separate parts, so two adjacent tracks rarely share pole alignment unless they were installed from a common jig — measure it. The scale of the risk is stark: an offset of one quarter of the pole pitch shifts commutation by 90 electrical degrees, where force per ampere approaches zero, and past that point the force direction flips. A coupling loop driving a flipped forcer feeds the skew instead of fighting it. A feedback reference that shifts against its physical zero corrupts commutation the same way on a rotary axis, which is why fixing the commutation angle after an encoder shift matters well beyond gantries.

Worked example: skew into commutation error on a 32 mm pole pitch forcer #

Inputs: a linear servo motor with a 32 mm pole pitch, an example value to take from your own motor's datasheet, and a commissioning measurement of 4 mm of worst-case rail-to-rail skew, one end of the crossbeam leading the other, taken with a dial indicator between corresponding points on the two rails.

Rule in words: the electrical angle error in degrees equals 360 multiplied by the mechanical offset divided by the pole pitch, with both lengths in the same unit, and force per ampere scales with the cosine of that angle error under sinusoidal commutation.

Arithmetic: 360 ÷ 32 mm gives 11.25 electrical degrees per millimeter of skew. The measured 4 mm of skew produces 11.25 × 4 = 45 electrical degrees of commutation error. The force factor is cos 45° ≈ 0.71, so the forcer delivers about 71% of its rated force per ampere and turns the missing 29% into heat.

Decision: hold the total electrical-angle error, track pole alignment plus worst-case skew together, under 18 electrical degrees, which costs under 5% of force (cos 18° ≈ 0.95) and keeps the force direction safely positive. For this motor that is a mechanical allowance of 5% of the pole pitch, 1.6 mm in total. The measured 4 mm is two and a half times that allowance: shared commutation is not valid for this build and the second encoder is not optional.

Whether one hall sensor can phase both forcers at power-up #

Hall sensors hand the drive a coarse electrical angle in sectors, enough to start the motor before the drive refines the phase, and they add hysteresis and mounting error on top of the true electrical angle. Tolerating that error is normal for the forcer the sensors sit on. For the second forcer it stacks onto an unmeasured pole offset, and the hall set still describes only the forcer it is mounted on.

Test before you trust it, with everyone clear of the rails and the current limit set low, because a forcer snapping to a pole under full current is the hazard here:

  • Park the gantry at a known, square position.
  • Command a small, current-limited phasing move on each motor in turn.
  • Pass: both forcers move in the commanded direction with comparable force for the same current. If one resists, stalls or drives the wrong way, its angle is wrong, and no position loop should be closed until that is corrected.
  • Cycle power and repeat with the crossbeam deliberately skewed. If the result changes with skew, the shared hall reading is not a valid phasing reference for the second forcer, and no fixed software offset will fix a state that moves.

Which topology makes a single encoder legitimate #

  • Both forcers on one amplifier, phases wired together: the drive applies the same current and the same commutation angle to both by construction, so no second feedback channel exists to add. Conditions: forcers measured phase-aligned from a common datum, the amplifier rated for the combined current and voltage, and the design records that yaw is uncontrolled. Confirm the combined winding resistance, inductance and back-EMF against the amplifier's ratings with the drive vendor's guidance for that motor-amplifier pair.
  • Two amplifiers sharing one encoder and one hall: each amplifier receives the same angle and the currents differ only by gain. Legitimate only when the pole-alignment condition is measured and worst-case yaw stays inside the electrical-angle allowance from the worked example.
  • Two amplifiers with an encoder and a phasing reference per forcer: independent commutation and independent position, so the coupling term finally has a real input. This is the configuration the algorithm assumes and the only one of the three that actively squares the crossbeam.

Fix: per-forcer feedback, then close the coupling #

  1. Mount a second encoder on the second rail at the same resolution and count direction as the first, then jog the gantry and confirm both counts increase together for the same physical motion.
  2. Give the second forcer its own phasing reference, a hall set or the phasing method your drive documents for this motor family.
  3. Phase each motor independently with cross-coupling disabled, confirm each moves cleanly in both directions at low current, and take each commutation offset from that motor's own reading.
  4. Home the two sides independently so the crossbeam squares itself from two real references; the homing faults slaved gantries hit at reference return, and their fixes, are covered in resolving homing faults on slaved gantry axes.
  5. Tune each axis as a standalone servo until following error is stable, then enable cross-coupling at low gain.
  6. Push one end of the crossbeam off-square by hand and confirm the skew error decreases rather than grows, then raise the gain until correction is fast without exciting the frame's resonance.

If the hardware cannot change, do not run the cross-coupled algorithm anyway: wire both forcers to one amplifier, verify their phase alignment with the static current test above, and record in the design documents that yaw is unmeasured and uncontrolled.

The decision for your build #

  • One encoder, two amplifiers: not valid. The skew term is zero by construction and the second forcer commutates on an angle borrowed from another magnet track. Change the feedback, not the gain.
  • One encoder, one amplifier, forcers measured phase-aligned: valid as a rigidly synchronized pair, with the amplifier sized for the combined current and yaw control deliberately given up.
  • Two encoders, two phasing references: the configuration the algorithm assumes. The skew error is real, the coupling term has authority, and the crossbeam holds square under off-center payloads.

Questions asked

Does a shared encoder work if the two motors are rigidly coupled?

Yes, when the coupling is mechanical rather than software. Two rotary motors keyed to one shaft form a single moving member with one position to measure, so there is no second state and no skew to correct. That is the one-amplifier case in mechanical form: the relative angular alignment that stands in for pole alignment is set once at assembly and then fixed. The shared-encoder problem applies to two independently mounted linear forcers whose rails allow yaw.

Steppers on a cross-coupled gantry with one encoder, what changes?

Only half the problem goes away. A stepper needs no commutation feedback, so the borrowed phasing angle and the hall question disappear entirely. The measurement problem remains: one encoder still gives the cross-coupled term nothing to act on, so yaw stays unmeasured and the loop cannot square the crossbeam. Stepper gantries therefore still want one position input per rail when squaring matters.

What resolution should the second encoder have?

Match the first encoder's resolution and count direction, and resolve skew at least an order of magnitude finer than the squareness you intend to hold. As a rule of thumb, a crossbeam held square to 0.05 millimeter end to end wants rail encoders resolving about 0.005 millimeter. The coupling loop cannot correct a difference it cannot see, and a coarse far-side encoder turns real yaw into quantization noise.

Can a drive find commutation without hall sensors?

Some drives establish the electrical angle from an absolute feedback device at power-up or from a documented phasing move, and for motors the drive supports that way the hall set is optional. What stays mandatory is one phasing source per forcer: an absolute encoder on rail one knows nothing about the pole position of a forcer sitting on rail two. Take the method from the drive's own documentation for your motor family.

What must be rechecked after replacing a forcer or magnet track?

The pole alignment between the two tracks and the per-motor commutation offset. A replacement track is cut and magnetized as a separate part, so its pole pattern will not automatically match the old datum, and a replacement forcer brings its own mounting offset. Re-measure the alignment, re-run the low-current phasing test on that side, and never copy the old commutation offset to the new motor.

Keep reading

  • Explainer

    How Two Servo Axes Sync as One Gantry Axis Over EtherCAT

    Yes, two servos can move as one gantry axis over EtherCAT. The controller creates a virtual master axis, feeds both physical servo axes from it through a cross-coupled control function, and supervises the difference between the two actual positions so the bridge cannot rack unnoticed.

    Servo and stepper motion

  • Explainer

    When a rotary encoder can stand in on a linear motor

    A rotary encoder can stand in for a linear scale on a linear motor only when all three conditions hold at once: a slip-free, rigid mechanical conversion, a whole-number result from pole-pair width divided by encoder lines — 30000 µm divided by 2000 lines is exactly 15 µm per line, 2048 lines is not — and a proven pole-position identification before powered motion. Miss one and the drive commutates against the wrong magnets or holds a position the carriage never reached.

    Servo and stepper motion

  • Selection guide

    Why Nine Servo Axes Need More Than One Motion Controller

    Nine independently commanded servo axes do not fit on one board of a controller family capped at eight per board. An 8-axis board plus a 2-axis board gives ten channels with one spare, and the deciding checks are each axis's feedback type, the measured start skew between the two boards, and keeping drive-current and motor thermal sizing as separate decisions.

    Servo and stepper motion