For a robotic BLDC motor velocity control application, I moved to using a linear ADRC (Active Disturbance Rejection Control) [0] controller. It is not much more complex to implement that a PID, but at least in my context it handles changing real-world environmental conditions with a correctness which I could not achieve with a PID however much I tried to tune it.
Still uses a PID for BLDC motor coil current control, as this control loop is much more predictable.
Currently using the proportional part only from a PID for position control, but this may change in the future.
The fascination of programmer types with classical control and estimation topics is endlessly interesting as someone who studied control and estimation and hangs out here for interest in the programming. For me it was surprising to see that JEPA is a model predictive control algorithm it an almost literal sense; I guess I’m happy to have studied what I chose when I was 18.
show comments
dvh
I used it in metal detector (direct frequency measurement kind). It works really well. I (and you probably too) half assed pid controllers before you even know what it is. But it makes perfect sense. Proportional part reacts to the acute difference, derivative adjusts it when your controller is already going right direction to limit overshoot, and integral part improves cases when the difference is small but persist for long time. Learn them and use them, they're good tool.
show comments
glitchc
PIDs are great but notoriously hard to tune. They require deep insight into the underlying physical phenomena to get right. They are also rather rigid and cannot adjust well to a changing environment (temperature and humidity can fluctuate dramatically between summer and winter in some climates).
Of course, no one tunes them by hand anymore for these reasons, relying instead on optimization techniques like particle swarm to find the best set of coefficients for a given steady state condition. Eventually, I suspect we will replace most PIDs with a small neural network for almost all industrial applications (a handful of nodes is sufficient). The neural network is also easier to adapt to changing conditions.
show comments
somat
My personal exposure to the PID algorithm was my GPU fan. There is supposed to be some sort of internal fan curve to control it's speed but mine was not working, crashes everywhere. I Could still set the speed by hand. and while I was putting together a sort of hacky user space fan curve I had an epiphany. I Don't actually want a fan curve. I want to set an ideal temperature and have the computer figure out what fan speed is needed to maintain it. So I learned more about control logic than I was really prepared for and my user space fan speed script has a cute little PID controller to do just that. (technically for fan thermals you really only need a PD controller. No anticipatory preload needed. but who's counting)
I do sort of suspect a fan thermal control curve is a PID response curve written out in long hand but don't really have the math to prove it.
show comments
ahartmetz
I did a lab exercise (part of physics curriculum) with a PID controller once. It controlled a small electric motor with a small flywheel (i.e. not much inertia). We hand-tuned the parameters with potentiometers. The effect was quite impressive: the flywheel kept spinning at the same speed when we touched it, even with moderate force. It felt like there was a huge motor driving it because the RPM just wouldn't budge. It was still not hard to stop it completely (small motor after all), but it felt very stiff before that point.
zbentley
Thanks to the advice of a colleague who had studied control theory, I once used PID controllers to manage autoscaling compute resources downstream of a lot of message queues. We used plenty of more typical autoscaling systems too, but for some workloads, PID controllers were ideal—when we had thousands of compute clusters across many queues, they minimized the state that needed to be stored between scaling system polls while effectively smoothing out the scale up/down rate to minimize resource waste and pointless whipsawing.
boguscoder
Honest question: are wiki links to any technical topic post worthy now?
show comments
qsera
Jesus christ. The wretched control system paper we had for B-Tech computer science!
The text book jumped right on to the integrals and derivations without even a whisper on what the thing is supposed to be useful for!
I want to understand this so much now, but the memories of that paper is such a turn off!
For a robotic BLDC motor velocity control application, I moved to using a linear ADRC (Active Disturbance Rejection Control) [0] controller. It is not much more complex to implement that a PID, but at least in my context it handles changing real-world environmental conditions with a correctness which I could not achieve with a PID however much I tried to tune it.
Still uses a PID for BLDC motor coil current control, as this control loop is much more predictable.
Currently using the proportional part only from a PID for position control, but this may change in the future.
[0] https://en.wikipedia.org/wiki/Active_disturbance_rejection_c... (although this isn't a very useful reference if you want the implementation maths!)
The fascination of programmer types with classical control and estimation topics is endlessly interesting as someone who studied control and estimation and hangs out here for interest in the programming. For me it was surprising to see that JEPA is a model predictive control algorithm it an almost literal sense; I guess I’m happy to have studied what I chose when I was 18.
I used it in metal detector (direct frequency measurement kind). It works really well. I (and you probably too) half assed pid controllers before you even know what it is. But it makes perfect sense. Proportional part reacts to the acute difference, derivative adjusts it when your controller is already going right direction to limit overshoot, and integral part improves cases when the difference is small but persist for long time. Learn them and use them, they're good tool.
PIDs are great but notoriously hard to tune. They require deep insight into the underlying physical phenomena to get right. They are also rather rigid and cannot adjust well to a changing environment (temperature and humidity can fluctuate dramatically between summer and winter in some climates).
Of course, no one tunes them by hand anymore for these reasons, relying instead on optimization techniques like particle swarm to find the best set of coefficients for a given steady state condition. Eventually, I suspect we will replace most PIDs with a small neural network for almost all industrial applications (a handful of nodes is sufficient). The neural network is also easier to adapt to changing conditions.
My personal exposure to the PID algorithm was my GPU fan. There is supposed to be some sort of internal fan curve to control it's speed but mine was not working, crashes everywhere. I Could still set the speed by hand. and while I was putting together a sort of hacky user space fan curve I had an epiphany. I Don't actually want a fan curve. I want to set an ideal temperature and have the computer figure out what fan speed is needed to maintain it. So I learned more about control logic than I was really prepared for and my user space fan speed script has a cute little PID controller to do just that. (technically for fan thermals you really only need a PD controller. No anticipatory preload needed. but who's counting)
I do sort of suspect a fan thermal control curve is a PID response curve written out in long hand but don't really have the math to prove it.
I did a lab exercise (part of physics curriculum) with a PID controller once. It controlled a small electric motor with a small flywheel (i.e. not much inertia). We hand-tuned the parameters with potentiometers. The effect was quite impressive: the flywheel kept spinning at the same speed when we touched it, even with moderate force. It felt like there was a huge motor driving it because the RPM just wouldn't budge. It was still not hard to stop it completely (small motor after all), but it felt very stiff before that point.
Thanks to the advice of a colleague who had studied control theory, I once used PID controllers to manage autoscaling compute resources downstream of a lot of message queues. We used plenty of more typical autoscaling systems too, but for some workloads, PID controllers were ideal—when we had thousands of compute clusters across many queues, they minimized the state that needed to be stored between scaling system polls while effectively smoothing out the scale up/down rate to minimize resource waste and pointless whipsawing.
Honest question: are wiki links to any technical topic post worthy now?
Jesus christ. The wretched control system paper we had for B-Tech computer science!
The text book jumped right on to the integrals and derivations without even a whisper on what the thing is supposed to be useful for!
I want to understand this so much now, but the memories of that paper is such a turn off!
Obligatory link to PID without a PhD: https://www.wescottdesign.com/articles/pid/pidWithoutAPhd.pd...
Terry Davis implements a PID controller for a rocket in SimStructure: https://youtu.be/25hLohVZdME?t=207