![]() |
PID Questions
Hello, So i'm trying to understand PID in the off-season before 2017. For the most part things have been normal and fully working but i do have some questions on certain things. Any assistance would be greatly appreciated
1. How would you handle an output to multiple motors? i know for 2 motors most teams would use a "y" cable, but what would you do if you had to control 3 motors (such as a 6 cim drive-train)? is there any example code on how to do so? 2. I've studied up on the methods of tuning (Ziegler-Nichols) and i'm aware of how to properly tune the loop, but what are your starting value for the constants? like people say "increase P Gain until it oscillates", but what is a good starting point for the P Gain, I Gain, and D Gain? Thank you for your time |
Re: PID Questions
Quote:
Quote:
|
Re: PID Questions
1. Just as you can define a single motor, you can define several motors. You do this for left and right already, right? So define many motors for a side, and when you send the value to one motor, repeat that same line of code to send it to motor 2, motor 3, and so on. That sends the same drive value to multiple motors.
Note that there may be more efficient ways, depending on the programming language, but brute force will get it done. 2. Asphurley67 stated, do a little math for P by following your code on paper, and see what multiplier will give you something reasonably in range. When trying something new, it never hurts to step through each line of code by hand, on paper, to see what will happen. Lots of bugs are found this way... |
| All times are GMT -5. The time now is 21:40. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi