Log in

View Full Version : Closed PID loop for Speed Control


DavidVang.2012
15-05-2012, 10:41
We are currently trying to create a closed PID loop that will essentially be able to control the speed output of our drive wheels as we give input through our joysticks.

Is there anyone out there who is willing to share their developed [and working] closed PID loop so that I can get a better picture of what I need to include in the program? A simple closed PID loop program will be sufficient.

Thank you very much.

Alan Anderson
15-05-2012, 13:04
LabVIEW includes PID functions already. To find them, open the function palette and search for "PID".

Since you want to control speed instead of position, you have two basic options. Either use the output of the PID function to add to or subtract from your motor power instead of using it as the motor power directly, or get an equivalent effect by running the PID function using the I term as if it were the proportional constant.

Tom Line
15-05-2012, 21:48
Check out the Velocity PID (2012) located here:

http://www.fightingpi.org/Controls.html

It's in labview, and is commented fairly well and should be self explanatory if you know basic PID theory. Thanks to Jared from team 341 for giving the derivation in 2009 that we used to create this PID to control our shooter this year.

blackflame2996
15-05-2012, 23:15
Just out of curiosity, why use PID for a user controlled drive system? This seems unnecessary. PID is nice for things like shooters, but why use it with the drive?

Ether
15-05-2012, 23:20
Just out of curiosity, why use PID for a user controlled drive system? This seems unnecessary. PID is nice for things like shooters, but why use it with the drive?

Autonomous. Computer-assisted bridge balancing. More predictable response to driver commands in the presence of varying battery voltages.

Tom Line
16-05-2012, 00:08
Traction control (2009).

Maintaining a set field position.

We're not even talking about a swerve drive.... ;)

blackflame2996
17-05-2012, 18:11
I see. we'll keep that in mind.