4 ms·
The interesting thing is that if you can reframe the problem correctly, a PID controller will probably be involved in the closed loop solution. And most of the
by Espressosaurus 3y ago
The interesting thing is that if you can reframe the problem correctly, a PID controller will probably be involved in the closed loop solution. And most of the time you don't even need the derivative term.
The last few systems I've worked on professionally have been nested PI controllers with some filters on the front or back of them. Just needed the correct framing for the problem (the hard part) and it becomes straightforward to solve.
- ncallaway 3y agoMaybe I'm misunderstanding something, but wouldn't you still want/need a D term unless you have a system with a nearly instant response? I'd think that even if you stop applying a delta the second you hit the set-point, if you've built up non-trivial inertia, then you'll overshoot the target fairly significantly?
- icegreentea2 3y agoD term is complicated and it really depends on the situation. You can usually get away without a D term and have acceptable overshoot as long as you have the right anti-integral windup setup, and your I vs P ratio isn't too high.
- syntaxing 3y agoIt’s actually a pretty common practice in the industry and academic. You can change your system block diagram to have the measured value as some sort of rate of change rather than the value itself (this is a non trivial exercise). In return, your system is more stable and you can get rid of the D constant since it’s another value you need to tune and sometimes causes instability in a control sense. It’s a pretty popular technique in high safety applications like aerospace.
- Espressosaurus 3y agoIt's all a tradeoff of how system response vs. stability and how much overshoot is tolerable. For the domains I've worked in, with physical components, system response isn't instantaneous, but some level of overshoot is tolerable as long as the system rapidly converges and (this is the important part) cannot end up in a positive feedback scenario. The derivative term tends to amplify noise, which is never what you want. A little anti-windup, some generous limits around your max extents, and perhaps a gear-shift to switch bandwidths when you approach steady-state, and it's surprising how many problems can be solved with a filter and a PI controller for the closed-loop component of the system. Maybe the actuator is walking you up and down a complicated model space, maybe you've got multiple PIs driving multiple models...but there's a good chance a PI will do a decent job somewhere in the solution. Use a PID if you want to make more work for yourself. Specifics will depend on your exact system.
- diracs_stache 3y agoControl theory doesn't come up much in what I do but as a practitioner are Root Locus ever utilized? I've been unpleasantly surprised to see that exact positive feedback instance existing in places you wouldn't want (things wobbling above earth after a control input). Poles and Zeros felt like a lot of magic until a foray into complex analysis ripped that band aid off ;)
- Espressosaurus 3y agoOh yeah, it comes up. It's a way to check for stability and visualize the system. Phase and gain margin have come up more frequently for me, but a lot is going to depend on what you find the most natural way of attacking the problem to be.
- reaperman 3y agoEveryone will say "depends on the system" but generally the D term is not only not needed, but typically considered counter-productive or even against best practices. PI-loops tend to be much more stable than PID-loops and far easier to successfully tune for an acceptable response. You do get overshoot with a decently tuned PI-loop, but it's not enough to cause problems. A bit of overshoot doesn't tend to hurt anything. Of course, a "perfectly" tuned PID loop will be "better" - more efficient, faster to reach setpoint, and minimize overshoot. But the effort/engineering time/operation time involved in tuning it, combined with the risks presented by a subtly poorly tuned loop that goes haywire one day when the system paradigm (characteristic) changes...just isn't worth it. Obviously there are times when you really do need a D term, but I can confidently say that they're not commonly used in HVAC or petrochemical plants. I'm sure there are other domains where the D term is needed, but in my time as a controls engineer I didn't run across them.
- GabeIsko 3y agoEspecially in a video game context, where you can always go in and change how the system works. A really good way to tell is to consider the relationship between your input and output. PID get's thrown around all the time because a lot of the time you are talking about controlling an accerlation (gas pedal, throttle) to effect a position, so you theoretically need a PID to stand in for a 2nd order differential equation since position and acceleration are two derivatives apart with respect to time. But as you pointed out, you usually can generalize your input and not worry about the D term. In the video game I'm making, I don't really worry about derivative control, but PID control is mostly there to give the illusion that someone is driving a vehicle rather than it be controlled perfectly by a computer program. I don't want to model out how "skilled" the driver is - all I have to do to give that impression is just give the vehicle better handling.
- polishdude20 3y agoYep, D terms are needed in systems where there isn't a natural dampening or reversing force that will naturally bring the value away from what your output tries to do. With a heater,once you get to zero error, any overshoot will reduce back the opposite way because heat is always lost.
- Animats 3y agoThe D term is complicated. Where you do you get the derivative? If you have to differentiate the input, and there is noise, the raw derivative will have huge variations. Then you need a low pass filter before the differentiator. This introduces lag. So you now have both D gain and filter frequency to tune. See any classical control theory book for the theory on this.
- reaperman 3y agoEven when tuning PID loops for chemical plants as a controls engineer, myself and my colleagues (across multiple companies) generally just set the D term to zero. If the D term (derivative) was needed, tuning that one loop would often be assigned a whole formal project by itself. When I hear people say "PID loop" I almost always subconsciously translate it to hear "PI loop" in my head unless there's evidence that it's a truly complex system.
- polishdude20 3y agoI've had to use the D term recently in a self guided model rocket project. When the rocket had an angle error it needed to point it's thrust to rotate itself back to 0. There is no built in stopping force that stops the rocket rotating when the thrust is not angled. So a D term was needed in order to take into account how fast the rotation was happening. When it was rotating to 0 degrees of error, it needed that d term to not overshoot. With the d term, the thrust would swing in the opposite direction to prevent it overshooting.