MyBB Community Forums

Full Version: PID Algorithm and anti-windup
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
(2010-10-01, 07:50 PM)pavemen Wrote: [ -> ]I understand the concept you are trying to implement and it makes sense to me. i am just commenting on the php code you posted where there is nothing to reset or re-evaluate the integral variable once it is out of bounds.

Ah well the anti-windup is this:

if(($this->integral >= $this->min) && ($this->integral <= $this->max))

It only integrates as long as the integral is within bounds.

(2010-10-01, 07:50 PM)pavemen Wrote: [ -> ]I can not read the LabView image, its too small

Sorry, let me try and take a bigger picture

(2010-10-01, 07:50 PM)pavemen Wrote: [ -> ]is the algorithm you are building getting reset upon RTC of the throttle or change in its output, or is it s simply being polled every so often? from my POV, the code you posted runs once and does not have a way to re-evaluate the integral value once/when it is out of bounds.

Ah well you would call the PID algorithm in a loop. Here, this should help:

[attachment=20042]
all that helps, thanks for taking the time to post up for clarity. i get the anti-windup, just in the original context you presented it, it stalled out. now that its in a loop i understand the use.

its still a bit beyond my knowledge area, but conceptually its a good plan
If it's just software and there's no risk of breaking something or losing money, have you considered just trying it? I find that if I'm too lazy (not saying you are) and impatient to wait for "expert" opinion, just trying it gives a pretty good indication as to how well something works. I can then see what needs improvement, refine it, and tell everyone the results so they can suggest their own improvements.
(2010-10-01, 09:17 PM)Firestryke31 Wrote: [ -> ]If it's just software and there's no risk of breaking something or losing money, have you considered just trying it? I find that if I'm too lazy (not saying you are) and impatient to wait for "expert" opinion, just trying it gives a pretty good indication as to how well something works. I can then see what needs improvement, refine it, and tell everyone the results so they can suggest their own improvements.

If this was last year then yes, I could try it out but since then the robot I did this stuff on has since been decommissioned :p I plan to create another wireless drive train at some point but it's expensive to design and make or purchase all the parts and the time to program it and wire it up, so for now I'm just asking about it.
Pages: 1 2