4 ms·
I am a little suprised that the author does not use a low-pass filter for the D part, for example 1/(1+s Tf) and instead tells you to modify the hardware. Sure
by dosshell 9y ago
I am a little suprised that the author does not use a low-pass filter for the D part, for example 1/(1+s Tf) and instead tells you to modify the hardware.
Sure, you need cut off the noise with hardware in respect to your Nyquist frequence but you can still have a lot of high frequency noise.
And it is not always possible to use hardware filters to get rid of the noise, for example if your are tracking an object with a camera and the x,y is your input to the pid. Ofcourse you can skip the D part.
What am I missing here?
I also find it more easy to use a reset based integrator anti-windup, where you specify your limits on your control signal instead of limiting the integrator.
Here is an diagram of what I usally do:
+--------+ +------+
-y | 1 | | |
-------->+ ------ +---------->+ Kd*s +----+
| 1+s*Tf | | | |
| | +------+ v
+--------+ +----+ +-+-+ +-------+
e=r-y | | | | | __ | u
--------+------------>+ Kp +----------->+ ∑ +---+-->+ __/ +---+--->
| | | | | | | | |
| +----+ +-+-+ | +-------+ |
| ^ | |
| +----+ +---+ +-----+ | | +---+ |
| | | | | | 1 | | | - | | + |
+-->+ Ki +-->+ ∑ +--->+ - +-----+ +---->+ ∑ +<----+
| | | | | s | | |
+----+ +-+-+ +-----+ +-+-+
^ |
| |
| +----+ |
| | | |
+------+ kt +<-------------------+
| |
+----+
The kt gain will reduce the integrator when we have saturated output.
Does some one knows the pros and coins with the different anti-windup solutions?
- balda 9y agoyeah
- jgable 9y agoI always do integrator wind-up similar to how you do it -- apply limits to the overall controller output (which are typically necessary for the system anyway), and use that to limit the integrator. Just putting limits on the integrator is too crude, and it's not like it's any easier to program. Maybe the author introduced that because it's easier for a beginner to understand. However, I typically do not change the state of the integrator the way you are doing here. I just hold the integrator state (i.e. don't update it) if the controller is limited. That way, noise on the P or D signals doesn't cause my integrator state to hop around. I may do it your way if the controller limits are changing over time for some reason. I also always low-pass filter the D term, as you mentioned. Otherwise, the D term is just too noisy. I often find that my P and D terms are limited by how much sensor noise I'm willing to let thru to my controller output.