This issue tracks work to fix encoder calibration false-triggers, improve measurement quality under rotor slip, and lay groundwork for encoder nonlinearity (INL) compensation.
Fixes already on branch feature/encoder-distortion-compensation
- BreakawayFinder zero-mod phantom-motion guard — rejects encoder movement reported while modulation is near zero, so floating/disconnected sin/cos inputs can no longer false-trigger breakaway at
mod=0.000.
cal --no-save flag — lets users run calibration routines without writing results to FRAM/RTE KV store.
- FRAM failure messaging —
AutoCalibrationCoordinator::finish() now reports exactly which persistence path failed instead of printing a success message after an FRAM error.
- Locked-region encoder cycles/rev —
EncoderOffsetCalibrator now measures cycles/rev only over the verified-locked portion of the rotation, eliminating the corrupted 0.789 value seen when the rotor slips during the initial segment.
- Slip detection / longer lock timeout — warmup and offset-rotate logs include lock ratio; calibration waits up to 450° of field rotation for the rotor to lock before failing.
Next: encoder nonlinearity / distortion compensation
The learned encoder bounds show a ~5,100-count DC offset mismatch between sin and cos channels, indicating a 1st-harmonic angle error in the current decode. The next step is to build a per-rev correction layer:
- Ellipse-fit / harmonic correction for amplitude imbalance, DC offset, and quadrature error.
- Optional LUT or Fourier-based per-angle compensation.
- Validate against
enc_trace and FOC torque ripple.
Branch: https://github.com/OpenVVVF/RTE/tree/feature/encoder-distortion-compensation
This issue tracks work to fix encoder calibration false-triggers, improve measurement quality under rotor slip, and lay groundwork for encoder nonlinearity (INL) compensation.
Fixes already on branch
feature/encoder-distortion-compensationmod=0.000.cal --no-saveflag — lets users run calibration routines without writing results to FRAM/RTE KV store.AutoCalibrationCoordinator::finish()now reports exactly which persistence path failed instead of printing a success message after an FRAM error.EncoderOffsetCalibratornow measures cycles/rev only over the verified-locked portion of the rotation, eliminating the corrupted 0.789 value seen when the rotor slips during the initial segment.Next: encoder nonlinearity / distortion compensation
The learned encoder bounds show a ~5,100-count DC offset mismatch between sin and cos channels, indicating a 1st-harmonic angle error in the current decode. The next step is to build a per-rev correction layer:
enc_traceand FOC torque ripple.Branch: https://github.com/OpenVVVF/RTE/tree/feature/encoder-distortion-compensation