Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Emergency: PID with Wheels Off the Ground (http://www.chiefdelphi.com/forums/showthread.php?t=43440)

Rick TYler 06-02-2006 23:08

Emergency: PID with Wheels Off the Ground
 
Our programmer is convinced that his encoder-enabled PD code isn't working right because the robot is on the cart with the wheels off the ground, and that it would work if it was tried on the floor. Is this your experience?

The biggest problem is speed oscillations in the wheels (speed goes up and down).

Thanks!

Eldarion 06-02-2006 23:16

Re: Emergency: PID with Wheels Off the Ground
 
Quote:

Originally Posted by Rick TYler
Our programmer is convinced that his encoder-enabled PD code isn't working right because the robot is on the cart with the wheels off the ground, and that it would work if it was tried on the floor. Is this your experience?

The biggest problem is speed oscillations in the wheels (speed goes up and down).

Thanks!

I had this problem too, and I can attest to the fact that it will help some to have it on the ground, but those oscillations will still be there. The PID loop relies on the mass of the robot to smooth out some of the oscillations, as well as a nice small timeslice. If the code takes too long between corrections, there will be no way to fix it without sacrificing "snappiness".

Hope this helps, and please correct me if I'm wrong!

Goldeye 06-02-2006 23:17

Re: Emergency: PID with Wheels Off the Ground
 
Tuning this year's PD system (our first as a team) we were able to get it to run ok with wheels in the air (and then for some time before further modifications) by starting with a P gain too low than tuning it up till the oscillations just begin..
Keep in mind that the weight and friction of the robot acts as a serious D controller, which does prevent major oscillation.
I would just tune the P gain until you don't get a lot of major oscillation and then see how it works on the floor.

KenWittlief 06-02-2006 23:20

Re: Emergency: PID with Wheels Off the Ground
 
definately has to be on the floor - tuning it with the wheels in the air will only show that the code is working, you will still need to change the constants for th e dynamics of the bot when its on the floor

make sure you have a disable switch wired to the OI, keep someone on the switch while its being tested, then go for it on the carpet.

PS: your programmer knows his stuff! :^)

Rick TYler 06-02-2006 23:20

Re: Emergency: PID with Wheels Off the Ground
 
Would either of you be willing to share your source with us? You can email it to me at gmail.com. Something is seriously wrong here and we are starting to seriously panic. Thankyouthankyouthankyou.

KenWittlief 06-02-2006 23:22

Re: Emergency: PID with Wheels Off the Ground
 
if a PID loop totally wacks out then usually:

A. you have the polarity of a feedback signal backwards or

2. you have your gain way too high.

Rick TYler 06-02-2006 23:27

Re: Emergency: PID with Wheels Off the Ground
 
Quote:

Originally Posted by Rick TYler
Would either of you be willing to share your source with us? You can email it to me at gmail.com. Something is seriously wrong here and we are starting to seriously panic. Thankyouthankyouthankyou.

That would be rhtyler@gmail.com. (And thank you for your comments, too, Ken.)

Rick TYler 07-02-2006 00:06

Re: Emergency: PID with Wheels Off the Ground
 
Status: it works better on the ground. Tuning is underway. Thanks, everyone.

kaszeta 07-02-2006 08:51

Re: Emergency: PID with Wheels Off the Ground
 
Quote:

Originally Posted by Rick TYler
Our programmer is convinced that his encoder-enabled PD code isn't working right because the robot is on the cart with the wheels off the ground, and that it would work if it was tried on the floor. Is this your experience?

When your robot isn't dragging 130+ lbs around, the PID controller will generally be massively overcontrolling. As the other poster says, the mass of the system is basically a very large D control. So I'd really recommend dialing back the control while it's on the blocks.

Last year, I ended up having the team code in two sets of PID constants: the normal tuned ones, and some majorly scaled back ones for testing the robot up on blocks so that you can tell that autonomous code is doing the right thing.

Since we're talking about it, the other major PID caveats are:

1. Making sure you sanity check your integral control (i.e. put a cap on the integral so that it can't overflow and wrap around, since that causes a major spazz)

2. Make sure you are applying the corrections in the right direction. And check your math to make sure you aren't overflowing variables.

3. The I and D control should be small.

4. Resist the temptation to adjust all the factors at once.

KenWittlief 07-02-2006 11:37

Re: Emergency: PID with Wheels Off the Ground
 
we always had a PID enable switch on our OI, when we used PID for steering or velocity.

Some drivers preferred driving open loop, and it allowed you to test the bot with the wheels up.


All times are GMT -5. The time now is 01:36.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi