Dlloydev / QuickPID

A fast PID controller with multiple options. Various Integral anti-windup, Proportional, Derivative and timer control modes.
MIT License
195 stars 50 forks source link

Where's AutoTune? #36

Closed Dlloydev closed 2 years ago

Dlloydev commented 2 years ago

I've Removed AutoTune in preparation for a new AutoTune library (sTune) compatible with QuickPID, PID_v1 and others. Should have this ready in the next few weeks ... more details to follow.

Closing the previous AutoTune issues as these will be successfully addressed by the new library.

Dlloydev commented 2 years ago

An update on the upcoming new autotune library ... sTune

sTune

Open loop PID autotuner using a novel s-curve inflection point test method. Tuning parameters are typically determined in about ½Tau on a first-order system with time delay.

I'm developing this using the TCLab (Temperature Control Lab) hardware. This has a time constant of about 2.9 minutes (as per their benchmark), so about 15 minutes to get full response. Overall, the hardware results in poor resolution (3.1 mv / step on the input, 8-bit PWM output) ... this is ideal for testing and development.

Progress

I'm getting good tuning results in typically about 1.5 to 2 minutes throughout the full output-step range (1-255).

This plot was done automatically using QuickPID and sTune which used the Ziegler_Nichols_PID tuning rule. StepOutput was set to 50 and the setpoint was set to 50 deg C. Running the code ... sTune derives the tuning constants and updates QuickPID ... this is the resulting plot:

QuickPID Time scale = 10 min / 100

Still need to implement reverse mode, more testing and create the documentation.

Dlloydev commented 2 years ago

sTune

arduino-library-badge PlatformIO Registry

This is an open loop PID autotuner using a novel s-curve inflection point test method. Tuning parameters are typically determined in about ½Tau on a first-order system with time delay. Full 5Tau testing and multiple serial output options are provided.

Reaction Curve