Go to Post Enjoy doing what you do. If you enjoy your life, what you're doing in it, and how you're living it, then what other people say or think doesn't matter. - Beth Sweet [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 29-07-2004, 11:55
phrontist's Avatar
phrontist phrontist is offline
Proto-Engineer
AKA: Bjorn Westergard
FRC #1418 (Vae Victus)
Team Role: College Student
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Falls Church, VA
Posts: 828
phrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond repute
Send a message via AIM to phrontist
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?
__________________

University of Kentucky - Radio Free Lexington

"I would rather have a really big success or a really spectacular crash and failure then live out the warm eventual death of mediocrity" - Dean Kamen
  #2   Spotlight this post!  
Unread 29-07-2004, 12:20
Adam Y.'s Avatar
Adam Y. Adam Y. is offline
Adam Y.
no team (?????)
 
Join Date: Mar 2002
Location: Long Island
Posts: 1,979
Adam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to behold
Send a message via AIM to Adam Y.
Smile Re: Automatic Shifting Algorithm

*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.
__________________
If either a public officer or any one else saw a person attempting to cross a bridge which had been ascertained to be unsafe, and there were no time to warn him of his danger, they might seize him and turn him back without any real infringement of his liberty; for liberty consists in doing what one desires, and he does not desire to fall into the river. -Mill

Last edited by Adam Y. : 29-07-2004 at 12:47.
  #3   Spotlight this post!  
Unread 29-07-2004, 12:55
phrontist's Avatar
phrontist phrontist is offline
Proto-Engineer
AKA: Bjorn Westergard
FRC #1418 (Vae Victus)
Team Role: College Student
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Falls Church, VA
Posts: 828
phrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond reputephrontist has a reputation beyond repute
Send a message via AIM to phrontist
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...
__________________

University of Kentucky - Radio Free Lexington

"I would rather have a really big success or a really spectacular crash and failure then live out the warm eventual death of mediocrity" - Dean Kamen
  #4   Spotlight this post!  
Unread 29-07-2004, 13:02
Adam Y.'s Avatar
Adam Y. Adam Y. is offline
Adam Y.
no team (?????)
 
Join Date: Mar 2002
Location: Long Island
Posts: 1,979
Adam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to behold
Send a message via AIM to Adam Y.
Re: Automatic Shifting Algorithm

Quote:
The system you described is what I was thinking, sorry if my explanation indicated otherwise.
No problem.
Quote:
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.
Good idea. I was thinking that the banner sensors wouldn't be reliable enough to use in an automatic transmission. Now you would have redundancy built into the system.
__________________
If either a public officer or any one else saw a person attempting to cross a bridge which had been ascertained to be unsafe, and there were no time to warn him of his danger, they might seize him and turn him back without any real infringement of his liberty; for liberty consists in doing what one desires, and he does not desire to fall into the river. -Mill

Last edited by Adam Y. : 29-07-2004 at 13:04.
  #5   Spotlight this post!  
Unread 29-07-2004, 13:44
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
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
[edit]This is all asuming the code can shift well and measure rpms acurately enough[/edit]
  #6   Spotlight this post!  
Unread 29-07-2004, 13:49
Chris Hibner's Avatar Unsung FIRST Hero
Chris Hibner Chris Hibner is offline
Eschewing Obfuscation Since 1990
AKA: Lars Kamen's Roadie
FRC #0051 (Wings of Fire)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1997
Location: Canton, MI
Posts: 1,488
Chris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond reputeChris Hibner has a reputation beyond repute
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);
__________________
-
An ounce of perception is worth a pound of obscure.
  #7   Spotlight this post!  
Unread 29-07-2004, 13:52
Paul H's Avatar
Paul H Paul H is offline
Renegade of Funk
AKA: Paul Huston
FRC #0033 (Killer Bees)
Team Role: Alumni
 
Join Date: Jul 2003
Rookie Year: 2003
Location: Royal Oak, MI
Posts: 364
Paul H has a brilliant futurePaul H has a brilliant futurePaul H has a brilliant futurePaul H has a brilliant futurePaul H has a brilliant futurePaul H has a brilliant futurePaul H has a brilliant futurePaul H has a brilliant futurePaul H has a brilliant futurePaul H has a brilliant futurePaul H has a brilliant future
Send a message via AIM to Paul H
Re: Automatic Shifting Algorithm

Quote:
Originally Posted by phrontist
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?

Yes, but if you get into a pushing match, wouldn't you slow down anyways, causing it to shift down?
__________________
-Paul

Last edited by Paul H : 29-07-2004 at 13:54. Reason: Added quote
  #8   Spotlight this post!  
Unread 29-07-2004, 13:59
Adam Y.'s Avatar
Adam Y. Adam Y. is offline
Adam Y.
no team (?????)
 
Join Date: Mar 2002
Location: Long Island
Posts: 1,979
Adam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to beholdAdam Y. is a splendid one to behold
Send a message via AIM to Adam Y.
Re: Automatic Shifting Algorithm

Quote:
Why not measure the RPMs of the motor and up/downshift as necessary?
I suggested that in the second post. The only problem is that you would need a fairly reliable sensor to accomplish this. Hmm... I have an idea. A really cool idea that might just work. Ill be on later.
__________________
If either a public officer or any one else saw a person attempting to cross a bridge which had been ascertained to be unsafe, and there were no time to warn him of his danger, they might seize him and turn him back without any real infringement of his liberty; for liberty consists in doing what one desires, and he does not desire to fall into the river. -Mill
  #9   Spotlight this post!  
Unread 29-07-2004, 14:37
FizMan's Avatar
FizMan FizMan is offline
aboot, eh?
AKA: Chris Sinclair
#0783 (Mobotics)
Team Role: Alumni
 
Join Date: Feb 2004
Location: Toronto, Canada
Posts: 102
FizMan will become famous soon enough
Send a message via AIM to FizMan Send a message via MSN to FizMan
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.
__________________
Joules per second! Watt? Joules per second! Watt? Jouls per second! Watt?
  #10   Spotlight this post!  
Unread 29-07-2004, 17:50
Paul H's Avatar
Paul H Paul H is offline
Renegade of Funk
AKA: Paul Huston
FRC #0033 (Killer Bees)
Team Role: Alumni
 
Join Date: Jul 2003
Rookie Year: 2003
Location: Royal Oak, MI
Posts: 364
Paul H has a brilliant futurePaul H has a brilliant futurePaul H has a brilliant futurePaul H has a brilliant futurePaul H has a brilliant futurePaul H has a brilliant futurePaul H has a brilliant futurePaul H has a brilliant futurePaul H has a brilliant futurePaul H has a brilliant futurePaul H has a brilliant future
Send a message via AIM to Paul H
Re: Automatic Shifting Algorithm

Quote:
Originally Posted by Adam Y.
I suggested that in the second post. The only problem is that you would need a fairly reliable sensor to accomplish this. Hmm... I have an idea. A really cool idea that might just work. Ill be on later.
We used banner sensors for ours and they worked fine. We used four, two per tone wheel, one tone wheel per side. They doubled as encoders for autonomous and gave us the ability to make our robot go anywhere on the field within about an inch. Our design for next year actually uses a shaft encoder right in the gearbox. It'll be in the whitepaper, I posted a picture of the CAD drawing somewhere.

So....just use a shaft encoder.
__________________
-Paul
  #11   Spotlight this post!  
Unread 29-07-2004, 22:47
Greg Ross's Avatar
Greg Ross Greg Ross is offline
Grammar Curmudgeon
AKA: gwross
FRC #0330 (Beach 'Bots)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Hermosa Beach, CA
Posts: 2,245
Greg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond reputeGreg Ross has a reputation beyond repute
Send a message via AIM to Greg Ross Send a message via Yahoo to Greg Ross
Re: Automatic Shifting Algorithm

Quote:
Originally Posted by FizMan
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.
This "buffer" is called hysteresis. Before shifting up, you should wait until the RPMs/speed is "a little" above your threshold, and before shifting down, you should wait until it is "a little" below.
__________________
Greg Ross (The Grammar Curmudgeon formerly known as gwross)
S/W Engineer, Team 330, the Beach 'Bots
<--The Grammar Curmudgeon loves this cartoon.
“Life should not be a journey to the grave with the intention of arriving safely in a pretty and well preserved body, but rather to skid in broadside in a cloud of smoke, thoroughly used up, totally worn out, and loudly proclaiming "Wow! What a Ride!" Hunter S. Thompson
"Playing a practical joke means doing something mean and calling it funny." Me
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT -5. The time now is 02:53.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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