|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
2012: Tuning the Jaguar's Speed Control PID Loop
There is a lot of background information here:
http://www.chiefdelphi.com/forums/sh...ad.php?t=90508 I am continuing this discussion in a new thread for the 2012 season, and would like to limit it to the specific methodologies you've used to tune your JAGUAR'S Speed Control PID Loop, and its pros/cons. Method 1: Use P-Only control, and tune the P constant until you achieve a stable loop at 50% of your setpoint. Leave I and D as ZERO. Do not touch them, do not pass go, do not collect $200. Now set your setpoints at TWICE the magnitude you actually desire. Profit. Pros: Simple to tune, and gives you a stable response. Cons: Far from ideal response. You will likely have offset and/or oscillations around your 50% target. You cannot take advantage of I or D because they depend on P being able to take to your setpoint. |
|
#2
|
||||
|
||||
|
Re: 2012: Tuning the Jaguar's Speed Control PID Loop
Method2: Use a PI control, and tune the I gain the way you would "normally" tune the P gain. Then tune the "P" gain the way you would "normally" tune the D gain.
Why? Because the drivetrain plant does not contain an integrator when the input to the plant is voltage and the output (that you are trying to control) is speed. |
|
#3
|
||||
|
||||
|
Re: 2012: Tuning the Jaguar's Speed Control PID Loop
We did a fair amount of work with Method 2 today as proposed by Ether.
We obtained fairly stable results, and would argue that they are overall better than Method 1. There appears to be a major weakness with Method 2 however. The I-term appears to be capped. Theoretically, even a small I-term should cause the speed control loop to reach its setpoint eventually. It might take a long time, but it should reach the setpoint, given enough time. It does not. What we're seeing is the maximum speed we can achieve is directly proportional to the I constant. This is unfortunate, because we have been able to find some I-constants which appear to work beautifully, however since the I-term is capped, we can never quite achieve our top speed. Capping the I-term is usually a great way to ensure our PIDs don't wind up too much, however in this case, it's inhibiting us from ever getting to our top speed. |
|
#4
|
||||
|
||||
|
Re: 2012: Tuning the Jaguar's Speed Control PID Loop
After another day of working on this...
I'm back to my opinion from 2011: The Jaguars desperately need a Feed-Forward implementation in its speed control PID loop. Everything else we've tried has seemed like a messy workaround which just won't give us as tight control as we want for either our drivetrain or shooter. Are there any active Jaguar firmware developers from TI who are on ChiefDelphi who we can reach out to? Right now, this feature is a) what is stopping me from recommending the Jags to our area's mid to upper tier teams, and b) a pretty standard speed control feature, which should be included in any speed PID controller worth its weight. |
|
#5
|
|||
|
|||
|
Re: 2012: Tuning the Jaguar's Speed Control PID Loop
Hello all, I am the Control System Engineering for Team 2168 the Aluminum Falcons.
Its going to be very hard to lock down a method of tuning the PID gains without fully understanding the implementation of the Controller in the Jag. No two PID implementations are equal, and depending on weather the PID controller is an Ideal, Series, or Parallel implementation greatly affects how to go about tuning them. For example, in the ideal case changing P has an effect on both I and D, where as in a parallel implementation, each term can be independently tuned. Does anyone know if this implementation has been made available? Last time I looked the documentation was no where to be found. I am going to spend more time this season reverse engineering the Jags and understanding the implementation, as my team does use CAN and I would likes to move my control loops off the CRIO... I will post my results. However in the mean time, I have been working on a complete video walk through to show a simple way to tune the gains of a PID controller using Matlab and Simulink. All the videos are not up yet, but the most important one is, the video which shows how to tune the gains. The video, m-files and .mdl files, and complete labview project are also available from our team website at: http://team2168.org/index.php/resour...ntrol-tutorial The custom PID controller I use is also provided to be used by any team who so desires, all I ask is that you give credit to us, if you do use it. Even though the files are provided in labview, I will soon also provide a Java implementation. The example in the video covers tuning position control gains but it is easy to extend the method for speed control on your own. In the next few days I will be posting an official walk through for tuning speed control gains as well. Please check it out, and post any feedback you may have. -Kevin |
|
#6
|
||||||
|
||||||
|
Re: 2012: Tuning the Jaguar's Speed Control PID Loop
The jaguar source code is available, but not the easiest thing to find. http://www.ti.com/tool/rdk-bdc24-cd
|
|
#7
|
|||
|
|||
|
Re: 2012: Tuning the Jaguar's Speed Control PID Loop
Quote:
|
|
#8
|
||||||
|
||||||
|
Re: 2012: Tuning the Jaguar's Speed Control PID Loop
Quote:
Install RDK-BDC24-CD-683\Software\StellarisWare\SW-RDK-BDC24-8264.exe. The code will then be in C:\StellarisWare\boards\rdk-bdc24\qs-bdc24 |
|
#9
|
|||
|
|||
|
Re: 2012: Tuning the Jaguar's Speed Control PID Loop
That would explain why the source files didn't show up on my Mac.
|
|
#10
|
|||
|
|||
|
Re: 2012: Tuning the Jaguar's Speed Control PID Loop
Quote:
-David |
|
#11
|
|||
|
|||
|
Re: 2012: Tuning the Jaguar's Speed Control PID Loop
Thanks for the info. It turns out that you have to run the Windows installer program, which builds the source code tree as part of the install process. Typical Windowsness. I carried the file to my Windows box in the workshop and had much more luck.
My day job involves work on telescopes run by Linux computers, so I have gotten used to finding source code without executing an app first. Last edited by nixiebunny : 18-01-2012 at 13:32. |
|
#12
|
|||
|
|||
|
Re: 2012: Tuning the Jaguar's Speed Control PID Loop
Quote:
I took a different path to a closed form solution. I am using Team 1640 - Sab-BOT-age Drivetrain Model to predict the step responce for various drive trains, using Astrom's (less overshoot than Ziegler-Nichols) equations to calculate P-I-D then as Either said - loading the calculated D into Jag P, calculated P into Jag I and 0 into Jag D. We are getting reasonable performance on the testbot. We intend to poll the Jaguars for step response data using voltage and PID control and compare results but things always take longer than you expect. This was all done with Excel spreadsheets - which i can share if you like. |
|
#13
|
|||
|
|||
|
Re: 2012: Tuning the Jaguar's Speed Control PID Loop
Quote:
I was going to do another tutorial for users with older versions of simulink/matlab but I thought it would be fruitless because First teams can get free licenses for new mathwork software by contacting mathworks from this link: http://www.mathworks.com/academia/st...irst-robotics/ I'd really recommend getting a new license so you can use the method I demonstrate but If youd like to use 2008, there is another tool you can use, but it is not as simple and not as easy to understand. In matlab 2008 type sisotool in the command line. A gui will show up if you have the control system tool box installed... you can use this gui to tune your controller, provided that you set it up correctly. Check the Mathwork help files on this tool.. it will be a great start. -Kevin |
|
#14
|
|||
|
|||
|
Re: 2012: Tuning the Jaguar's Speed Control PID Loop
Quote:
Hopefully, I can get everything up on our website within the next couple of days so that teams can make the max use of them. -Kevin |
|
#15
|
|||||
|
|||||
|
Re: 2012: Tuning the Jaguar's Speed Control PID Loop
This is a repost from a different thread (http://www.chiefdelphi.com/forums/sh....php?p=1111803) but I thought the info might be useful here
Reading through the data sheet I got this; Quote:
I hope this helps! |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|