Challenges going faster than certain rpm

In the PM conversation @Candas1 mentioned in post #17, we were thinking of leveraging SmoothingSensor for this. Add a new variable to apply a fixed offset to the timestamp before calculating the predicted angle. To get good results, you’d have to measure the average time between the sensor update and PWM duty update on your specific hardware.

But if using hardware current sense, you’d ideally want to make two separate angle predictions, or perhaps use the previous frame’s angle for the current transformation. Otherwise you’ll be transforming the start-of-the-frame current readings by the end-of-the-frame angle, and cancel out your improvement. But I’m not sure how to cleanly integrate that into the library code.

1 Like