Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   OCCRA Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=181)
-   -   [OCCRA]: OCCRA 2008 Drive Straight Program w/PI Control (http://www.chiefdelphi.com/forums/showthread.php?t=70711)

marccenter 18-12-2008 16:24

[OCCRA]: OCCRA 2008 Drive Straight Program w/PI Control
 
Dear Teams,

Quote:

Originally Posted by marccenter (Post 785303)
Dear Teams,
This is an example of a driving straight full function system with PI (proportional-integral control) based on encoder feedback to drive straight. The system uses encoders directly attached to Motor1 and Motor 2. The difference between the two encoders is used to create both a proportional and integral correction term. The proportional correction term is basically one-fourth of the encoder difference, limited to 25. The integral correction term increases or decreases by one every time through the main loop. The integral correction term is limited to plus 10 and zero. There is a base speed term used to creep forward. Motor 1 goes in the direction from 127 to zero to increase in speed. So, the final correction becomes Motor1_speed = Motor1_FwdCreep - Motor1_PropAdapt (0 to 25) - Motor1_IntegralAdapt(zero to 10). Motor2_speed is similar but goes from 127 to 254 to increase speed. The final correction becomes Motor2_speed = Motor2_Fwd_ reep + Motor2_PropAdapt (0 to 25) + Motor2_IntegralAdapt(zero to 10).

I tested the VEX robot at home on a hardwood floor with a ball transfer on the front of the robot (inverted, steel mouse ball) instead of VEX omni-wheels to enhance mechanical movement capaiblities. It drove reasonably straight on the floor for about 8 feet.

Intelitek Easy_C V2.8.0.5 licensed version was utilized.


marccenter 01-05-2009 16:11

Re: [OCCRA]: OCCRA 2008 Drive Straight Program w/PI Control
 
Here's a PI control powerpoint presentation that I delivered at the FIRST Robotics Conference in Atlanta,GA on April 16, 2009 that shows the principles behind the PI control software above.

marccenter 01-05-2009 16:14

Re: [OCCRA]: OCCRA 2008 Drive Straight Program w/PI Control
 
1 Attachment(s)
Here's the latest program using EasyC Pro


All times are GMT -5. The time now is 03:37.

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