Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Step response of the lowpass filter has an overshoot #93

Closed
Rayman opened this issue Feb 23, 2022 · 4 comments
Closed

Step response of the lowpass filter has an overshoot #93

Rayman opened this issue Feb 23, 2022 · 4 comments

Comments

@Rayman
Copy link
Contributor

Rayman commented Feb 23, 2022

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.

0.292893
0.87868
1.12132
1.02082
0.979185
0.996429
1.00357
1.00061
0.999387
0.999895
1.00011
1.00002
0.999982
0.999997
1
1
0.999999
1
1
1
@cesar-lopez-mar
Copy link

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?

@Rayman
Copy link
Contributor Author

Rayman commented Feb 23, 2022

When I calculate the step response of the critically damped second order lowpass I get this (1000Hz sampling, 50Hz cutoff):
image

When I put the cutoff at 1/4 of the sampling frequency as the comment in the filter suggest, I still get this:
image

@cesar-lopez-mar
Copy link

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.

@Rayman
Copy link
Contributor Author

Rayman commented Apr 12, 2022

Fixed by #119

@Rayman Rayman closed this as completed Apr 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants