m-lundberg / simple-pid

A simple and easy to use PID controller in Python
MIT License
792 stars 216 forks source link

Higher order discretizations [Enhancement] #24

Open bpfel opened 4 years ago

bpfel commented 4 years ago

Dear @m-lundberg,

I am currently working on PID control and wondered whether you considered higher order discretizations like a backward Euler or the Tustin/Trapezoidal method. I am not entirely certain how much we might benefit from such an adaptation, but I think your framework is really powerful and neat. Embedding a higher order controller in it would allow an easy comparison of different discretizations.

For an overview of the above mentioned methods consider this webpage.

Please respond if you are interested / still accepting contributions.

Best,

Gianni

m-lundberg commented 4 years ago

Hello,

Thanks for your input. I am accepting contributions, but since I don't have a lot of time to put on this project I can be pretty slow to respond (as you may have noticed).

I'm not familiar with the techniques you mention but it would certainly be interesting to learn more about them. My only concern would be that adding them to this library might increase the complexity too much, it was always intended as a simple PID implementation (hence the name). I am definitely open to looking into it more though. If it could be implemented in a way that doesn't make the library harder to use or understand it could be an interesting addition.