PowerBroker2 / ArduPID

PID library for Arduinos with greater accuracy than the legacy Arduino PID library
MIT License
85 stars 23 forks source link

No I or D terms #2

Closed raymadigan closed 2 years ago

raymadigan commented 2 years ago

I have tried to run this algorithm on many, many different scenarios and I can't get the result to have any I or D terms. I looked at the code and in compute you multiply the delta t by 1000, i'm thinking you do that to convert to seconds instead if milli seconds. If that,s the case you need to divide by 1000 or multiply by .001. When I change to code to this, I get what I expect from the I and D terms.

PowerBroker2 commented 2 years ago

I'll need to look at this closer later when I have time, but I believe you are correct. Thank you!

raymadigan commented 2 years ago

Remember back to first year physics. You need to keep the units correct and for the derivative you want dT/dt T is temperature and t is time, t must be in seconds.

PowerBroker2 commented 2 years ago

Ok asshole, I'm not a retard. We all make mistakes - even you

PowerBroker2 commented 2 years ago

Fixed in 0.1.4