Hacker News new | ask | show | jobs
by RealityVoid 2223 days ago
It kind of bugs me that I understand PID quite well and I've coded quite a few for of them. But trying to dive deeper into control systems, I always hit a wall caused by my weak mastery or mathematics.

I've heard someone say that PID is the deepest you can get without in control systems without advanced mathematics and I think hey might be right.

5 comments

Depends on what you define to be advanced and deep.

If you know linear algebra, that opens up a variety of state space techniques. If you know a little optimization, that opens up optimal control, including the incredibly common LQR strategy. This stuff is typically accessible for an advanced undergrad with a few of the right prereqs.

But control theory is a deep field. You can find papers that use differential geometry, topology, information theory, etc. for designing control systems.

Control systems overlap with other AI topics in that there's usually an option of a "brute force" method that reframes the problem as a constraint optimization, and then applies a mix of lookahead, filtering and backtracking - classical CS ideas - to rank the possible answers to control at any moment in time, pruning incorrect answers. All you need to start is a ranking function that expresses the amount of error, and a way to generate the tree of "all answers over time" - since with a problem like acceleration and overshoot, an answer that looks wrong when looking one step ahead will become correct one hundred steps later.

And this in turn overlaps with machine learning techniques since a problem generalized in this way can subsequently be adapted into a trained system that approximates the same result as the brute force answer.

Ideally, you can use an analytic solution, of course, and that's what you really want to use to get a result that is both fast and precise, but to do that, the "advanced mathematics" are necessary to define the problem appropriately.

I took a linear control systems class in college, probably at the peak of my mathematical abilities. I hadn’t yet forgotten the fundamentals of Laplace, Fourier, and solving differential equations. Not to say I was some math wizard, but at least the prerequisites were fresh on my mind.

It was fascinating, but I just couldn’t grok it. Whatever weaknesses I had in the relevant maths, that class just seemed to amplify it x10. I still wish I could have absorbed more of the knowledge

I think a practical lab component is necessary to really grok controls. The theory can be extremely abstract - to internalize it requires some hands-on experience too (in my opinion).
> I've heard someone say that PID is the deepest you can get without in control systems without advanced mathematics and I think hey might be right.

It's true that there is a lot of surprisingly deep math in control theory, but even learning just a little bit of the theory can be greatly illuminating.

The trouble with PID is that it is typically treated as a black box with three magic knobs that you twiddle until your system works. This can be very frustrating.

By contrast, by applying a little bit of theory, you will be able to calculate the PID gains and have your controller work the first time.

Are Laplace transforms advanced mathematics? I say no, because they make the differential equations of linear control easy to solve. Once you learn them you can create optimal solutions for PID-type problems without having to spend days tuning the thing.