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

Controller state doesn't need to be reset on reconfigure #121

Open
Rayman opened this issue Mar 4, 2022 · 5 comments
Open

Controller state doesn't need to be reset on reconfigure #121

Rayman opened this issue Mar 4, 2022 · 5 comments

Comments

@Rayman
Copy link
Contributor

Rayman commented Mar 4, 2022

The controller can be reconfigured while driving. If the controller is also reset, then the D and I action are reset to 0, and the lowpass starts from scratch. This is unwanted behavior.

controller_state_.error_lat.reset();

@Timple
Copy link
Member

Timple commented Mar 4, 2022

Should the values also be kept if the D, I or cutoff parameters are changed?

@Rayman
Copy link
Contributor Author

Rayman commented Mar 7, 2022

Yes, the integrator filter contains basically the integrated value of the signal. That won't change if you reconfigure the I parameter

@Timple
Copy link
Member

Timple commented Mar 7, 2022

So if I reconfigure the I action to zero. I will keep having the previous value?

@Rayman
Copy link
Contributor Author

Rayman commented Mar 7, 2022

The integrated value stays the same. That value will be multiplied with the I action (which is then 0) so it will add 0 to the PID sum

@Timple
Copy link
Member

Timple commented Mar 7, 2022

Great, sorry for asking instead of checking 🙂
I was wondering if the integrated value was pre- or post-multiplied.

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