|
Re: PID on a one directional Shooter
We had to implement such a PID system for our shooter. I kind of accidently stumbled upon the solution. I first collected some data points for what motor power corresponded to what shooter RPM. I graphed them in a spreadsheet program and got out a power equation to use in my program. We are using NI LabView. The program sets an rpm for the shooter then runs it through the equation. This puts out a power to send to the motor that is mostly accurate but off by some (due to low battery, friction, etc). The output of this equation is then multiplied by one 1 + the output of our PID block. The PID has a range of -.5 to .5 and uses the difference between desired and actual speed as the process variable. The setpoint is a constant representing zero error. Based on this, its able to increase/decrease the power of the base equation by up to 50% by generating this coefficient. I then just played around while running the vi on my computer till I couldn't hear the sound of the wheel adjusting for the set speed. This system keeps the average error at about 2% and no greater than 10%. As for our PID values, we are not using the D term at all, an extremely low proportional value, and .028 for our integral value (of course, these are things you'll need to adjust for your own shooter). I hope this bit of info helped, and good luck!
-Don Ebben
__________________
Team 548:
Attending National Championship, Genesee District, Detroit District 2, West Michigan District, Michigan Championship?
|