sahil-kale / basilisk-actuator-control-lib

Hardware-agnostic library enabling field oriented control of of PMSM and BLDC Motors
https://sahil-kale.github.io/basilisk-actuator-control-lib/
1 stars 0 forks source link

Deal with low-velocity hall interpolation better #16

Closed sahil-kale closed 1 year ago

sahil-kale commented 1 year ago

A problem that hall (and QEP sensors will face if implemented) sensors see when the velocity changes sign is the velocity estimate jumping up like crazy on a sector change back, even if the actual rotor velocity is small. Because the 'sector' signal is in-band, the velocity estimator currently shoots up on a sign change, with the problem ironically getting worse the less the rotor is changing and the closer it is to a sector.

Proposed resolutions 1) If we see the velocity sign change, stop interpolation until we exceed the num_hall_to_update and reset the estimation 2) Refactor the is_estimation_valid signal to be different from the is_ready_to_interpolate.