Closed Rayman closed 2 years ago
Second order lowpass filters can have an overshoot, depending on the damping factor of the filter. I see the filter settles rather fast (especially compered to the dynamics of a physical robot), and it usually is there to filter noise and its input won't be step-like functions. So in my experience with this step response I would say there should not be issues during nominal operation. Have you noticed an issue on the vehicle behavior?
When I calculate the step response of the critically damped second order lowpass I get this (1000Hz sampling, 50Hz cutoff):
When I put the cutoff at 1/4 of the sampling frequency as the comment in the filter suggest, I still get this:
So it means the implemented LPF should be critically damped? We took that implementation from another code and did not make an exhaustive review. So either, there is a bug in the filter implementation, or it was intended not to be critically damped. In any case we should find the original equations and double check.
I put a step response on the second order lowpass and the output I've printed below. As you can see the filter has an overshoot, which is very strange. I think there is something wrong with it.