Skip to content

Conversation

paynterf
Copy link

I modified SetSampleTime() to set the internal SampleTime variable to zero for an input argument of zero, without modifying ki or kd. This forces Compute() to generate a new output value each time it is called, and allows the PID engine to be synchronized with an external timing source.

This modification does not change the normal behavior in any way, but allows a knowledgeable user to synchronize the PID engine to an external timing source.

…ero for an input argument of zero, without modifying ki or kd. This forces Compute() to generate a new output value each time it is called, and allows the PID engine to be synchronized with an external timing source
@paynterf
Copy link
Author

For some additional details in support of this modification, see my blog post https://www.fpaynter.com/2021/05/turn-rate-pid-tuning-part-ii/

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

Successfully merging this pull request may close these issues.

1 participant