HNHacker News
TopNewBestAskShowJobs

pidtuner

87 karma · joined September 26, 2018

submissionscomments
pidtuner··on Differentiable Control Problems
Polynomials are just an example, the easiest one. The point is that there are many more universal approximators (as some other user commented here), many of them much more suitable for control applications than NNs.
pidtuner··on Differentiable Control Problems
In practice one computes (X^T * X)^-1 * (X^T) in one go using Singular Value Decomposition, for which very efficient algorithms exists. But if there is really a lot of data, then recursive linear least squares can be used, to partition the larger least squares into smaller pieces. But then again, you just make one pass on the data, not multiple passes, like with gradient descent.
pidtuner··on Differentiable Control Problems
wavelets, sum of exponentials, fourier, ... I just mentioned polynomials because they are easiest. But people just jump into the NN bandwagon to get attention. Truth is that is just another tool, and a good engineer has to choose the best tool form the toolbox and not just pick the hammer everytime.
pidtuner··on Differentiable Control Problems
For polynomial regression of the type y = p0 + p1x + p2x^2 + ... + pnx^n, the "training" algorithm is linear least squares (no need of gradient descent). Assuming you have data (y, x), the explicit least squares solution is P = pinv(X) Y, see:

y = [1, x, x^2, ... x^n][p0, p1, p2, ..., pn]^T = XP

XP = y

(X^T X)P = (X^T) y

P = (X^T * X)^-1 * (X^T) * y

(X^T * X)^-1 * (X^T) is called the pseudo-inverse of X (which contains all your data). No need of iterations. A similar solution is found for multi-variable polynomials i.e. y = f(x1, x2, ..., xm) where f is a polynomial containing combinations of the independent variables xm and their powers.

pidtuner··on Differentiable Control Problems
The computational cost of "training" a polynomial would be the same as just one iteration of the training algorithm used by typical NNs. When it comes to trig functions, the story is the same as with the exp function e(). When you call the sin() or the cos() functions in your favorite language, in the end it uses taylor series (polynomials) to compute it (plus some hacks to add precision on certain ranges of the function and to overcome some floating point precision limitations).

The degree at which a polynomial model would fit the real world system has to be validated against data, just the same as with NNs. What does one do when an NN fit is not good enough or too good (overfitting)? One adds or removes layers. Same with polynomials, one increases or decreases degrees.

Sorry for the rant, I am not saying NNs are useless, because I do believe they are super useful for certain problems, specially for categorization. But it seems to me that now a days there is this trend of using NNs as a hammer, and not all problems are nails. Specially when it comes to control, and lives or big economic losses are at stake, it is the responsibility of the engineer to resist the fuzz and craze and use the right tool for the problem.

pidtuner··on Differentiable Control Problems
"The real promise of these methods is to use the universal approximator power of NNs...", still if one is to use a grey-box non-linear model dx/dt = F(x, u, t), why use NNs to characterize F? I would be more comfortable using a polynomial to characterize non-linearity than a "deep" black-box.

Polynomials are much easier to "train" because it is just one linear regression with no iteration. It has also been hinted that NN are in essence polynomial regressions [0]. Furthermore, most activation functions are base on e^x where the actual implementation of e^x in a computer is again a polynomial!

[0] https://arxiv.org/abs/1806.06850

pidtuner··on Differentiable Control Problems
I think you are right, in the case of the trebuchet, it just computes a black box approximation of the inverse of the system. The difference being that an analytic inversion would solve the problem for all wind and target conditions, while the NN solution will only work for for value ranges used to obtain the data that trained the NN.

In the case of the inverted pendulum, again the disadvantage of using NN is the black-bock nature of the control algorithm. As a control engineer this gives me the chills, because using black-box algorithms tell you nothing about the robustness of the closed loop system. With model-based control, at least we have strong mathematical tools to guarantee that the closed loop will be robust enough to handle variations outside the data that we used for training (our model). With black-box algorithms like NN you have no guarantees. I would not get into a plane controlled by a NN for sure, look what happened with the 737MAX when software engineers thought they could solve dynamical system problems.

pidtuner··on Ask HN: What Feature to Add Next
Do you mean having individual sliders for each gain? Right now there is just one slider that scales all gains in such a way that unformily increases/decreases the closed loop bandwidth.

You can try the tool with a simulator like https://janismac.github.io/ControlChallenges/

See this tutorial https://www.youtube.com/watch?v=nK_Rl9Yfxeg

pidtuner··on Control theory for fun and profit
During my control studies, when talking about history, professors always use the centrifugal governor as a control application that triggered modern formal studies about control (basically discovering how useful it can be)

https://en.wikipedia.org/wiki/Centrifugal_governor

pidtuner··on Control theory for fun and profit
You can use https://pidtuner.com to obtain the gains based on an easy experiment
pidtuner··on Control theory for fun and profit
As a control engineer and main developer of https://pidtuner.com, I never expected control theory to be widely used outside the industrial world (specially for solving certain CS problems)
pidtuner··on PID Without a PhD (2016) [pdf]
It is very easy to tune PID now a days with free tools like https://pidtuner.com
pidtuner··on Using Visual Studio Code for Qt Applications
You can use this Dockerfile to build Qt apps inside a container, which then can easily be integrated in any CI system: https://github.com/juangburgos/JenkinsCentOs7Docker/tree/mas...
pidtuner··on Can I buy your side project?
Mine is pidtuner.com, currently have 1000 engineers visiting each month. Not much, but quite specialized.
← PreviousPage 2 of 2