|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||||
|
|||||
|
Automatic Shifting Algorithm
For the purposes of this thread we are assuming that the robot has a four speed transmission.
In 2005 I'd like to have a fully automatic transmission, but I've been struggling with how I'd actually implement this (from an algorithm standpoint). This is the best I've come up with: Find max speed robot is capable of in highest gear with full motor power. Call this x. Using banner sensors, the speed of the wheels will be used in the algorithm as a percentage of x. The percentage of joystick input would the correlate directly to the speed of the wheels. The algorithm would increase motor power until reaching the desired wheel speed unless it hits 255 first at which point it would shift up and decrease motor by some given amount calculated ahead of time. I really have very little idea what I'm doing ![]() How would you do it? |
|
#2
|
||||
|
||||
|
*Warning this is coming from a person who also has a vague idea what he is doing* I would try and forgo providing any imput from the joysticks. The whole purpose of an automatic transmission is that you can jam the pedal all the way down without having to worry about destroying the motor. I would focus on the wheel speed only. At 0-X1 the gearbox would be set to to the lowest gear. At x1-x2 the gearbox would shift up. At x2-x3 the gearbox would then again shift up. At x3-max speed the gearbox would be at it's final speed. The x's represent the maximum speeds that the gear transmision would obtain. So in my eyes it would be a simple inequality.
If speed is greather than 0 but less than X1 shift into lowest gear ratio. If speed is greater than X1 but less than X2 shift up into second gear. If speed is greather than X2 but less than X3 shift up into third gear. If speed is greater than X3 or equal to max speed shift into forth. Last edited by Adam Y. : 29-07-2004 at 12:47. |
|
#3
|
|||||
|
|||||
|
Re: Automatic Shifting Algorithm
The system you described is what I was thinking, sorry if my explanation indicated otherwise.
Ah, but the problem with this is that it almost defeats the purpose of a tranny! What if you go up a ramp or get into a shoving match? It seems more logical to have a system like the one described but also have it check the current draw on the motors. If the current draw is more then y (and y would have to be found through tinkering) don't shift up to go faster, shift down. I think that would work... |
|
#4
|
||||
|
||||
|
Re: Automatic Shifting Algorithm
Quote:
Quote:
Last edited by Adam Y. : 29-07-2004 at 13:04. |
|
#5
|
|||||
|
|||||
|
Re: Automatic Shifting Algorithm
Why not measure the RPMs of the motor and up/downshift as necessary?
IE: Code:
// Globals long RPM; #define MINRPM 10 #define MAXRPM 100 unsigned char Gear = 1; #define MAXGEAR 4 #define MINGEAR 1 //... // in some sub... if (RPM < MINRPM) Gear--; if (RPM > MAXRPM) Gear++; if (Gear < MINGEAR) Gear = MINGEAR; if (Gear > MAXGEAR) Gear = MAXGEAR; // change gears, if necesary |
|
#6
|
||||||
|
||||||
|
Re: Automatic Shifting Algorithm
I would suggest shifting based upon the torque, not the speed. The problem is that torque is more difficult to measure than speed, but you can do a decent job using current sensors.
The algorithm would look something like: Code:
if (torque > DownShiftThresh)
Gear--;
else if (torque < UpShiftThresh)
Gear++;
if (Gear > 4)
Gear = 4;
if (Gear < 1)
Gear = 1;
Shift(Gear);
|
|
#7
|
|||||
|
|||||
|
Re: Automatic Shifting Algorithm
Quote:
Yes, but if you get into a pushing match, wouldn't you slow down anyways, causing it to shift down? Last edited by Paul H : 29-07-2004 at 13:54. Reason: Added quote |
|
#8
|
||||
|
||||
|
Re: Automatic Shifting Algorithm
Quote:
|
|
#9
|
|||||
|
|||||
|
Re: Automatic Shifting Algorithm
You might also want to include a sort of "buffer"... if for some reason your robot is fluctuating speeds from just above and below "x2", then it'll be constantly engaging the shift back and forth... probably not the healthiest thing.
|
|
#10
|
|||||
|
|||||
|
Re: Automatic Shifting Algorithm
Quote:
|
|
#11
|
|||||
|
|||||
|
Re: Automatic Shifting Algorithm
Quote:
So....just use a shaft encoder. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Shifting Gears | MBosompra | Technical Discussion | 71 | 23-07-2004 02:49 |
| Slotted Nuts and Shifting | sanddrag | Technical Discussion | 6 | 07-03-2004 13:04 |
| 3 shifting transmission... | Arefin Bari | Technical Discussion | 19 | 04-03-2004 01:24 |
| gear shifting | Stephen Kowski | Motors | 19 | 30-03-2003 21:33 |
| Arcsin Calculation Algorithm | Leo M | Technical Discussion | 11 | 05-11-2001 08:31 |