Better HN
topnewbestaskshowjobs
Log inSign up

pidtuner

87 karma · joined Sep 26, 2018 (8y ago) · 60 submissions

Submissions

1.

PID Tuner: A Practical Guide(slideshare.net ↗)

2 points · by pidtuner · 5y ago · 1 comment

comment 5y ago · link · parent

https://pidtuner.com Tune Your PID Controller

3.

PID Tuning: A Practical Guide(slideshare.net ↗)

2 points · by pidtuner · 5y ago · discuss

comment 5y ago · link · parent

https://pidtuner.com can help with that

comment 5y ago · link · parent

Not to control, but to compensate. This is what the I action in the PID does, compensate for un-modeled disturbances

comment 5y ago · link · parent

We can move this discussion here : https://github.com/pidtuner/pidtuner.github.io/issues/11

comment 5y ago · link · parent

The trick is that, even though the augmented state is uncontrollable, you still use it in the predictions, so the MPC algorithm can still compensate for it. Take a look at the before-last graph in the paper, see how that technique improves predictions after learning the real-time disturbances.

comment 5y ago · link · parent

The code is C++ code, It could be ported to an MCU if there is a fairly recent C* compiler (C11+). But the algorithms are quite expensive, there are multiple matrix inversions, the size of the matrices been as large as the data you put in into the tool. typically between 500 and 10000 data points.

comment 5y ago · link · parent

That's literally what you can do with the tool. Did you clicked the "Get Started" button?

comment 5y ago · link · parent

You are right, but the problem of a possible analogous "Machine Learning Theory" is that machine learning problems are highly nonlinear, and control theory has only been "solved" for linear problems. It we could solve nonlinear control that could immediately be applied to machine learning.

“Linear systems are important because we can solve them.” — Richard Feynman

comment 5y ago · link · parent

I suggest to take a look to the canonical PID implementation of the Arduino library. It includes a simple but effective anti-windup mechanism:

http://brettbeauregard.com/blog/2011/04/improving-the-beginn...

comment 5y ago · link · parent

The problem with many adaptive control techniques is that is very difficult to prove the closed loop stability and performance margins, because such systems are highly nonlinear and we do not have yet the mathematics to provide simple guarantees (for example, I would not get into an aircraft where the control systems have not been rigorously, mathematically, designed)

The integral problem of LQR and MPC is indeed not the first topic discussed on textbooks, but there has been a solution for that for year, called "disturbance model". You you can have an "adaptive MPC" following some design procedures. Check out this reference:

https://folk.ntnu.no/skoge/prost/proceedings/ifac2014/media/...

comment 5y ago · link · parent

The tuning rules from Skoge provide very decent robustness margins. (https://folk.ntnu.no/skoge/publications/2001/tuningpaper_ren...)

comment 5y ago · link · parent

True to that, but this tool hopes to provide an educated initial guess.

comment 5y ago · link · parent

Maybe the youtube videos help with this? https://www.youtube.com/channel/UCkRD7FztiFOdX50BUsOkcSQ

comment 5y ago · link · parent

Thanks. It is C++ code using Armadillo for linear algebra and BLAS/LAPACK subroutines. Source code is a bit messy, but will try to clean it up and put it on a different repo when I find the time.

The most complex part is the identification algorithm, which uses this algorithm: https://math.stackexchange.com/questions/1428566/fit-sum-of-...

comment 5y ago · link · parent

That is true, that is why there is a slider in the tool that allows you to trade-off performance for robustness. The bode plot is also an indication on how the closed loop performs in frequency domain, so you would normally choose different tunings according to specific use cases (e.g. some frequency response for tracking and a different one for just regulating)

comment 5y ago · link · parent

The tuning algo is the easiest part, the tool uses this one: https://folk.ntnu.no/skoge/publications/2001/tuningpaper_ren...

The difficult part is the identification algorithm, that is the challenging part, to accept all sorts of user data for all sorts of processes.

There is no monetization, users can be patreons, by a mug, a shirt or simply help by sharing the site. I miantain it on my free time.

comment 5y ago · link · parent

I did, 3 or 4 times, but was ignored until somebody else did. I don't know how the HN algorithms work.

comment 5y ago · link · parent

For anybody interested in a simple introduction of PID control, I recommend watching Brian Douglas' videos https://www.youtube.com/playlist?list=PLUMWjy5jgHK20UW0yM22H...

comment 5y ago · link · parent

Developer here, you are right. I have also considered such systems, but my free time is limited, so for the moment I just implemented the most basic case.

Simulating limits will be included in the next release.

Hysteresis is something more difficult, so will not handle any time soon.

Asymmetric systems can be handled by gain-scheduling the PID (make a model for each region and schedule the gains), this is approachable in the middle term.

12