I went into EE wanting to learn how to design CPU’s and thought the analog side would be boring.
However, control theory turned out to be my favorite class. Learning how negative feedback loops are everywhere was an eye opener.
Also learning Laplace transforms was one of my first “holy shit this is freaking clever and cool” moments. Just like how parity bits in data streams can be used to detect AND correct errors.
Control theory was also one of my favorite classes that a low of software people should learn (at least the very basics). So many hand rolled heuristically driven if/else type systems that can simply be replaced more reliably with a PID.
Absolutely the worst control systems of all time have been written by software engineers that don’t understand control theory. The second worst control systems are designed by those who only know the PID heuristic, and can’t be bothered to model a little non-linearity from motor drives saturating.
The biggest problem with PID control is that the integral term performs double duty as both a signal that accumulates small errors to minimize the steady state error, but also as a signal that shows deviation from the target due to unmodeled constraints.
It should be pretty obvious that you cannot overcome constraints by moving even harder in the direction of the constraint, which is what the integral term does.
I've played around with this over the years in my career but have found that tuning PID loops is very tricky, much trickier than creating a soup of if/else clauses and much less auditable to those who don't understand the math.
PID is standard in the industry, but the reality is it is infinitely easier to model in the discrete domain. The z-plane if math, but you don’t really need much math. Just model like a games developer. Simulate with a bit of JS or python. Add the motor saturation! Play with feedback and disturbances.
I just think this gives much better results. The model can be as simple or complex as you need, and we aren’t trapped in the linear response range. PID is good enough for many tasks, but it’s never good.
Yes, but...
If you can model your problem with linear differential equations then control theory replaces the need for tuning. The coefficients you need just pop directly out of the analysis.
Maybe I should add more context. I have specifically tried applying PID style feedback systems to computational problems, not controllers that interface with hardware, circuits, etc. My undergrad was in math and electrical engineering, I "pivoted" to software as a grad student (though I was always very involved in the software side of my department; I was a coder from when I was a kid.) The place I found it to work the best is with designing a homegrown autoscaler years before k8s ever became a viable thing for a company to play with [1]. Most of the problem domains I applied it to do not have linear models that can effectively model the theory. Yes I know that a PID is only proven to be stable when working with linear systems, but this is the reality of the problems I've worked with.
Eventually when if statements stop working I found that decision trees work great and XGBoost continues to be a great iteration of a decision tree.
[1]: I was an early hire at a tech unicorn and we built an autoscaler pretty early into the company's tenure. While it was a great success for a long time once k8s became established in the industry we had a really hard time training new talent to it and I left as we began a massive company-wide effort to move our workloads onto k8s.
I never really "got" control theory until about 10 years after graduation.
I was working as an SW Engr and taking a set of courses towards a Mechatronics certificate (my employer did a lot of motion control work) and I had to basically take updated versions of the same classes. The lab instructor was an about-to-retire engineer from Schunk, and he did an amazing job of explaining what the theory meant in terms of real-world behavior. That's when it all finally sunk in and I could look at the math and "see" how a mechanism would respond.
Agreed on the Laplace transforms. They instantly turn linear differential equations into basic high school algebra problems. But they don't work for nonlinear problems.
I remember when I first learned calculus and holy shit that was cool already. Then it kept getting better and better as I learned differential equations, linear algebra, etc.
To me EE = heavy math and that’s what makes it so fun.
I actually do software now but it’s completely different. There’s like no math in most applications of it. Putting something together with a Rasp Pi or Arduino feels like 98% software and 2% EE.
Same on the laplace transforms. I was kinda mad we had learned any other way. It was a lot easier than whatever we were doing before mathematically!
I wonder, how much control theory is there in CPU?
There's Boolean algebra but no control theory is needed for logic design.
One minor caveat is that most CPUs nowadays contain phase-locked loop (PLL) clock multipliers. Those fall into the domain of control theory but strictly speaking they're not part of the logic.
And in my inexpert experience, they are IP developed by the fab. So if you are doing CPU design work, you may need to understand PLLs well enough to read a datasheet, but you will not need to design a PLL.
I maybe had the most trouble just figuring out which instantiated PLL in the chip belonged to which PLL design, and where someone stuck the documentation in the giant repo. Especially since a hardware designer may think, oh we don’t need to update the docs, “nothing changed,” but the PLLs did change names because of a process change and their parameters may have changed slightly, even if they’re essentially the same. And chasing down small changes and documenting them ends up being a lot of the job in software.
In computer architecture / digital ASIC design there's zero control theory. There's not much mathematics in general.