by dosshell · 8y ago · 0 comments
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?
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.