![]() |
paper: PID Control Theory for FRC Programming
Thread created automatically to discuss a document in CD-Media.
PID Control Theory for FRC Programming by |
Re: paper: PID Control Theory for FRC Programming
Great job, helped me out a bunch.
|
Re: paper: PID Control Theory for FRC Programming
Just a note:
The equations given in text state the following: POUT = KP * KERR But your code shows the proper integer based math method of performing this expression. POUT = KERR * KP It's quite clear why the variables need to assume this order, but I did not find it documented that there IS a difference between the "text book" equation and your example.. (it is more accurate to "round" later in the equation, after your numbers have built up.) Either way, great paper! I plan to include this in my "required reading" for new programmers on my team. :) |
Re: paper: PID Control Theory for FRC Programming
Quote:
Good luck! |
Re: paper: PID Control Theory for FRC Programming
Well written and very clear!
You may want to consider adding some comments to the code examples, such as why you limit to +-127 in case any completely new FRC programmers read this. |
Re: paper: PID Control Theory for FRC Programming
I used this paper today as a reference when writing 237's PID control code.
Bumping it up to bring to the attention of other teams. |
Re: paper: PID Control Theory for FRC Programming
Thank you very much for this paper. This really helped me undferstand the concept of a PID, and will definetly be used when we write our PID code.
-Guy |
Re: paper: PID Control Theory for FRC Programming
Very helpful. You might want to move the P code example showing the #define KP 5 / 10 to between the P and I sections though, as it doesn't show I control.
I finally learned what this PID stuff is about, thanks. You might want to also mention that since motor velocity control is a speed you're comparing encoder ticks per time rather than a target value that has a defined range, and therefore also give us a simple method for determining the range, such as maybe start at this many ticks per time period as the min/max, then scale it down when the motor is full and gives less than that number, then printf that max to initialize it to for future code so that it starts out at the right range. I know this really goes beyond the basic PID concept, but it is relevant to speed control. |
Re: paper: PID Control Theory for FRC Programming
Maybe even add some visual aids, graphs... ?
|
Excellent paper!
Matt, this is an AWESOME paper! I wish I had read it earlier when I was learning PID control this year. I read this one instead and had the programming team read it, but your paper is an improvement. Wonderful explanations, good example code, and excellant usage scenarios! I will be sure to include a link to your paper in our own programming team's handbook.
|
Re: Excellent paper!
...
[dotdotdot] i'm a new programmer, and well, i don't understand how this works....i sort of understand the concept...you get feedback somehow from the robot....ya...that's about all i understand.... |
Re: Excellent paper!
Quote:
If you are going to IRI, just come by the field and you'll see the 1024 pit area. Ask anyone on the team for "Q" and they'll point you in the right direction. Good luck! -q |
Re: Excellent paper!
thanks so much....although i wont be going to IRI...lol....but thanks
|
Re: Excellent paper!
ahhhhh...after looking at a lot of other things....
so i guess PID is basically having software control the robot rather than just the PWM outputs are the same as the joystick values...so there's a layer of software that processes all the input and output data. |
Re: Excellent paper!
Quote:
But don't let that steer you away from a smarter robot. The pros greatly outweigh the cons. For example, auton becomes easy. Good luck, Jbot |
| All times are GMT -5. The time now is 21:00. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi