https://pidtuner.com Tune Your PID Controller
HN user
pidtuner
https://pidtuner.com can help with that
Not to control, but to compensate. This is what the I action in the PID does, compensate for un-modeled disturbances
We can move this discussion here : https://github.com/pidtuner/pidtuner.github.io/issues/11
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.
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.
That's literally what you can do with the tool. Did you clicked the "Get Started" button?
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
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...
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/...
The tuning rules from Skoge provide very decent robustness margins. (https://folk.ntnu.no/skoge/publications/2001/tuningpaper_ren...)
True to that, but this tool hopes to provide an educated initial guess.
Maybe the youtube videos help with this? https://www.youtube.com/channel/UCkRD7FztiFOdX50BUsOkcSQ
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-...
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)
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.
I did, 3 or 4 times, but was ignored until somebody else did. I don't know how the HN algorithms work.
For anybody interested in a simple introduction of PID control, I recommend watching Brian Douglas' videos https://www.youtube.com/playlist?list=PLUMWjy5jgHK20UW0yM22H...
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.
Developer here, ask me anything (wondered why the traffic exploded today until I opened HN).
Developer here, open a detailed issue on Github and will give it a look
I've ever understood these kind of questions. IMHO never learn a programming language just to learn it. Actually, I would go further and say don't even study for a CS degree. Programming has become more popular now a days, with designers, marketers, financial people and others learning to program in their domain languages. The barrier to programming is even getting thinner with the advent of low-code platforms.
Than being said, my advise is to study for a domain that interest you, for example I am a Control Engineer. Then learn the programming language of your domain.
In my domain the design language is Matlab/Simulink, then when I got into the job market I realized that my career would benefit by learning 61131 (PLC languages), C and C++. So I learnt that. Now I am very good with the Qt framework, for example, which allowed me to enter a broader market of industrial application development.
So stop looking for an language to learn and better look for a domain that will ensure that you will have a job in the future. Then learn the language of that domain.
For predictions, the Kalman Filter has it's drawbacks. They are clearly visible when you try to use it in conjunction with other algorithms based on state prediction such as Model Predictive Control. The main problem is that the KF does not have integral action.
One quick fix is to add a disturbance model to the KF, for example an integating disturbance. But then you have one more tuning parameter (the disturbance model). Which along the other KF tuning parameters increase complexity and becomes more difficult to implement and understand.
Personally, I have had more success with other types of filters, which have a similar structure as the KF, but include mechanisms for improved predictions, for example this one:
https://folk.ntnu.no/skoge/prost/proceedings/ifac2014/media/...
I just use QDeferred for threaded applications https://github.com/juangburgos/QDeferred
Linux is cool until you need to set an icon for a desktop shortcut. https://stackoverflow.com/questions/3452746/how-can-i-specif...
https://pidtuner.com Challenge! =)
PID Tuner online app https://pidtuner.com because as an automation engineer, I have 99 problems apart from PID tuning, and the tuning process can be automated. Made it free to help other engineers.
A tool I made to use myself, but also colleagues that were asking me all the time to help them with the task of tuning their PID algorithms. https://pidtuner.com
Fitting to sum of N exponentials is also a linear problem with no iterations https://math.stackexchange.com/questions/1428566/fit-sum-of-...
Yes! Thank you Sir! I can see you know what you are talking about. This is my point, NNs are very useful for some problems, for others they are not worth the complexity and black-box nature.