Closed finger563 closed 1 year ago
Looking through some testing - it seems the instability results from the decent amount of time delay the filters add to the input signal; Looking through some other options right now to decrease the time delay.
Look through This DSP article to see if an alternate
The filters were configured for a very low cutoff frequency - the lower the cutoff frequency the longer the time delay added to the input signal.
Describe the bug
As noticed when working on #5 - when enabling velocity filtering (either using
Lowpass
orButterworth
filters, the PID became unstable, however if I removed all filtering (just returning the raw input from the filter function inmain()
), then it stabilized and worked well.This might not actually be a bug in the filters and may have more to do with the control system itself, but definitely warrants more investigation.
To Reproduce
Expected behavior
Filtering should not destroy the stability of the control system?
Screenshots / Images
Hardware / Software Configuration (please complete the following information):
Additional context
Could be related to the delay that the filters add (esp. since it seems to also occur when using a simple moving average filter with an alpha less than 0.5.