pidtuner / pidtuner.github.io

Free PID Controller gains tuning tool
GNU General Public License v3.0
239 stars 27 forks source link

Where is the math? #10

Open arthurwolf opened 3 years ago

arthurwolf commented 3 years ago

Hey.

Where do I find the actual PID tuning math?

I've gone over the files, and I can't find an obvious place that looks math-intensive.

Is it in pid/v1.0.6/pid_tuner.js ? Is it pre-compiled as wasm ? Is it just not available and accessed through calls to a remote API ??

Thanks a lot in advance. Best regards.

pidtuner commented 3 years ago

Hi, the implemented algorithm is the one from the following paper:

https://folk.ntnu.no/skoge/publications/2001/tuningpaper_reno/tuningpaper_06nov01.pdf

It is indeed pre-compiled for performance purposes, all maths are computed in the browser.

there is a remote API when you call the Save button, but that just saves a JSON into a mongo server containing the project data, you can see the data sent using your browser's dev tools.

arthurwolf commented 3 years ago

Is it your intention to hide the math/code?

If not, it would be very much appreciated if you could publish the un-compiled source code for the actual PID math/tuning along with the compiled version in the same places/folder, it would be helpful to people trying to better understand this, and considering implementing something similar (in my case, maybe embedded in the Smoothieware controller/board/firmware ).

Thanks!

pidtuner commented 3 years ago

The intention is to make it work in a reasonable amount of time, because the math routines are very complicated and linear algebra heavy, and is all implemented in C++ using armadillo with BLAS and LAPACK routines. I don't think I could implement this in javascript directly in feasible time.

The C++ source code is very messy at the moment, I will put in my TODO list to make it publishable, but it will be low in my priority list.

arthurwolf commented 3 years ago

That's very good news, thank you very much for planning to do it, very much appreciated.

On Wed, May 26, 2021 at 5:50 PM PidTuner @.***> wrote:

The intention is to make it work in a reasonable amount of time, because the math routines are very complicated and linear algebra heavy, and is all implemented in C++ using armadillo http://arma.sourceforge.net/ with BLAS and LAPACK routines. I don't think I could implement this in javascript directly in feasible time.

The C++ source code is very messy at the moment, I will put in my TODO list to make it publishable, but it will be low in my priority list.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/pidtuner/pidtuner.github.io/issues/10#issuecomment-848889426, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2SFMOKTJZ4YUL7R57UUTTPUKDFANCNFSM45SGD3XQ .

--

勇気とユーモア

pidtuner commented 3 years ago

Apart from the tuning, the identification algorithm uses this solution. Hopefully this will help you in the meanwhile.

aditya-gumparthi commented 3 years ago

I would love to see the c++ code, in any form. Anything I/we can do to get it out there faster?

pidtuner commented 3 years ago

Hire me full time to maintain this project :slightly_smiling_face: This issue is low priority, the few hours I have on my free time will go to make this useful to the most people. At the moment I will focus on the drone people. Hope you understand.

Meach commented 8 months ago

Hey! I would also be intested to see the c++ code if possible. I have been studying the paper you posted but cannot understand exactly how are the integrator with lag variables calculated. Same with the PID gain values on the following step.

pidtuner commented 8 months ago

With kids and a full time job is impossible for me to give some love to this project, I don't even remember where is the repo with the sources. At this rate you guys are going to have to wait for my retirement. Sorry.