Engineering · Motors & Drives · Feedback
Encoder Feedback Signals
How do a few square waves tell a drive exactly where the shaft is and how fast it turns?
A rotary encoder on the motor shaft turns rotation into pulses. The drive counts the pulses to know the position, counts them against time to know the speed, and compares the two channels to know the direction. This page works through that chain with things you can move: a live A, B and Z waveform viewer, a position and speed calculator, a check that the pulse rate fits the drive input, and a demonstration of why speed readings get noisy at low speed. For the whole closed-loop picture, see Induction Motor Position Control.
| Type | Output | Knows position at power-up? | Typical use with drives |
|---|
| Parameter | Meaning | Typical |
|---|
Channels A and B are square waves a quarter of a cycle apart. Which one rises first tells the drive the direction: A leading B is forward here. Every edge on either channel is one count, four per cycle, so the drive gets four times the resolution of the pulse count printed on the encoder (counts per revolution = 4 × pulses per revolution). Channel Z gives one pulse per turn, a reference to find the same shaft angle again. Drag the angle, or press Play.
Position (°) = Count ÷ CPR × 360. Speed (rpm) = ΔCount ÷ (CPR × Δt) × 60, where ΔCount is the change in counts during the time Δt in seconds. The drive’s feedback card also has a limit on how fast it can count, so check that the pulse rate at top speed fits: the A-channel frequency is PPR × rpm ÷ 60, and the card counts four times that.
At low speed only a few pulses arrive in each sample, and one count more or less is a big share of the reading. The staircase is the counting method: speed from the counts in each window. The smooth line is the period method: the drive times the gap between pulses and divides. More pulses per revolution, a longer window or timing the pulses all help; so does a better encoder with fewer errors in its pulse spacing. This is why closed-loop vector drives hold torque down to zero speed only with a high-resolution encoder.
| Feedback card type | Signals | Notes |
|---|
For noisy plants and long cables the differential line-driver outputs (A with /A, B with /B, Z with /Z, RS-422 levels) are preferred, because the receiver ignores noise common to both wires. Use shielded twisted-pair cable, keep it away from motor cables, and follow the drive card manual for the shield and the supply voltage. Check the encoder output type matches the card: a 5 V line driver and a 24 V push-pull output are not interchangeable.
| Loop | What it does | Typical bandwidth |
|---|
Each inner loop is made several times faster than the loop around it (a rule of thumb is five to ten times), so the outer loop sees the inner one as an instant torque source. The encoder serves the speed loop and the vector transformation, which needs the rotor position.
| Feature | Open-loop vector (sensorless) | Closed-loop vector (with encoder) |
|---|
Typical ranges only. Encoder resolutions, input-card limits, voltages and loop bandwidths differ between makers: use the encoder datasheet and the drive feedback card manual.