Home Forums Garage Blogs 201 Tips To Save Gas News Reviews Coupons FAQ UserCP Articles
  Mark All Forums Read -  Glossary -  Search The Forums -  View Recent Posts Log Out 

Go Back   GasSavers HomePage > Forums > Fuel Economy > General Fuel Economy Discussion

General Fuel Economy Discussion Ask the gas gurus about increasing fuel economy. Post ideas and ask for advice. For testing help, use the "Experiments" forum.

Reply
 
Thread Tools Display Modes
Old 04-04-2009, 03:52 PM   #1
maximilian
summer 44.3 winter 36.7
 
Join Date: Mar 2009
Location: NEK VT
Posts: 1,487
MPG Cruise Control Algorithm

After analyzing how I'd try and optimize fuel economy if I were limited to only the information available from the OBDII port, I came up with the following. I can think of a few ways to make it more involved, but it may not be necessary so I figured I'd run it by the more experienced hypermilers out there. A simple system couldn't take advantage of anticipation (speeding up before going uphill or coasting to stop signs), but one with GPS could in theory, so as a separate issue, I would love to see any thoughts you have for that algorithm as well. I hope my pseudo-code is clear. I didn't want to create a flowchart.

Repeat {
if( speed <= MIN_SPEED ) {
// very steep uphill, economy is not the concern
adjust throttle as needed to maintain MIN_SPEED;
} else if( throttle <= MAX_EFFICIENT_THROTTLE ) {
// level travel, downhill, and shallow uphill
adjust throttle to be as low as possible to maintain at least LEVEL_CRUISE_SPEED;
} else {
// moderately steep uphill
keep throttle at MAX_EFFICIENT_THROTTLE, allowing speed to diminish;
}
}
__________________


Main Entry: co de pen dence - see codependency
co de pen den cy
Pronunciation: \kō-di-ˈpen-dən(t)-sē\
Function: noun
Date: 1979

: a psychological condition or a relationship in which a person is controlled or manipulated by another who is affected with a pathological condition (as an addiction to alcohol or heroin) ; broadly : dependence on the needs of or control by another

Last edited by maximilian : 04-04-2009 at 04:03 PM.
maximilian is offline   Reply With Quote
Old 04-04-2009, 04:43 PM   #2
maximilian
summer 44.3 winter 36.7
 
Join Date: Mar 2009
Location: NEK VT
Posts: 1,487
I realize I didn't observe that because this would be used like a traditional cruise control it wouldn't be expected to deal with starting or stopping. Functionality to efficiently accelerate from rest could be special cased, I guess. Might be useful.
__________________


Main Entry: co de pen dence - see codependency
co de pen den cy
Pronunciation: \kō-di-ˈpen-dən(t)-sē\
Function: noun
Date: 1979

: a psychological condition or a relationship in which a person is controlled or manipulated by another who is affected with a pathological condition (as an addiction to alcohol or heroin) ; broadly : dependence on the needs of or control by another

Last edited by maximilian : 04-04-2009 at 04:46 PM.
maximilian is offline   Reply With Quote
Old 04-04-2009, 04:56 PM   #3
Dalez0r
Member
Only problem is, it's more efficient to pulse-and-glide up and down hills...
Dalez0r is offline   Reply With Quote
Old 04-04-2009, 05:24 PM   #4
maximilian
summer 44.3 winter 36.7
 
Join Date: Mar 2009
Location: NEK VT
Posts: 1,487
Well, that'd be the GPS version. Automated pulse and glide would be very convenient!

I wonder if a modified form of pulse and glide could be done just within the context of OBDII info? It'd be interrupted by hills, but the pulse would just be used to climb it. Maybe I could think up something, but I'll have to research pulse and glide more first since my experience with it is pretty limited. Since pulse and glide is more difficult to do with other cars around a non pulse and glide algorithm would still have value, not to mention being a simpler test case.
__________________


Main Entry: co de pen dence - see codependency
co de pen den cy
Pronunciation: \kō-di-ˈpen-dən(t)-sē\
Function: noun
Date: 1979

: a psychological condition or a relationship in which a person is controlled or manipulated by another who is affected with a pathological condition (as an addiction to alcohol or heroin) ; broadly : dependence on the needs of or control by another

Last edited by maximilian : 04-04-2009 at 05:37 PM.
maximilian is offline   Reply With Quote
Old 04-08-2009, 05:56 AM   #5
maximilian
summer 44.3 winter 36.7
 
Join Date: Mar 2009
Location: NEK VT
Posts: 1,487
Tried driving according to my algorithm and I quickly noticed an area of ambiguity: coasting down shallow hills. As long as the hill is steep enough to keep the speed above the level cruising speed (between 50-55 mph) then it's fine, but what if speed drops below that? Right now the algorithm would add the small amount of power needed to maintain the level cruising speed down the hill. Is the best course of action to coast down all the way to the minimum allowable speed and then go back into powered mode? That approach seems to fit in with pulse and glide methodology better and it's what I'm doing right now when I drive manually: milk the decline for all it's worth. Hill detection would be easy just by examining the speed vs throttle position history data.

Also, thought over a simplified form of pulse and glide that doesn't require GPS to automate. Seems like you'd just carry out a normal pulse and glide routine, interrupting pulses if you encountered an uphill stretch. Does that make sense to those of you familiar with it? If so, I can boil that down to another pseudo code description. Thanks a lot.
__________________


Main Entry: co de pen dence - see codependency
co de pen den cy
Pronunciation: \kō-di-ˈpen-dən(t)-sē\
Function: noun
Date: 1979

: a psychological condition or a relationship in which a person is controlled or manipulated by another who is affected with a pathological condition (as an addiction to alcohol or heroin) ; broadly : dependence on the needs of or control by another

Last edited by maximilian : 04-08-2009 at 06:01 AM.
maximilian is offline   Reply With Quote
Old 04-08-2009, 06:38 AM   #6
theholycow
Forum Moderator
 
theholycow's Avatar
 
Join Date: Apr 2008
Location: Glocester, RI
Posts: 4,509
It's not Pulse & Glide if it's in gear during the 'glide' portion. I call that Pulse & DFCO, and I've found that it's less efficient than just steady-state driving.

If you're coasting in neutral, then yes it is the best course of action to allow the speed to drop to the minimum on the descent and take the speed up to the maximum on the ascent. Hills amplify P&G's effects by letting you make power most efficiently and then coast the rest of the time.

For your simplified form, if you encountered an uphill stretch, you wouldn't interrupt your pulse, you'd amplify it. The point of P&G is to make use of what we know about BSFC (to produce work in the most efficient way) and reducing throttling losses.
__________________
Computer repair-RI/MA/CT
How to embed videos
Meta-Sig: Hypermiling intro, Miracle FE devices/additives, Aerodynamics, calcs, DIY, weight reduction, K&N/intakes, octane, FAQ, acronyms and glossary.
Exhaust | Hypermile/FE Sleepers | Drafting | DIY fuel rate meter
Tire: Pressure | Width | LRR tires | Size calc
Lugging: not what you think | Gas prices | VX O2 $99
theholycow is offline   Reply With Quote
Old 04-08-2009, 06:53 AM   #7
bobc455
Super Moderator
 
Join Date: Dec 2006
Location: Massachusetts
Posts: 561
I was told a while ago that some motorcycles have a constant-throttle-position cruise control (instead of constant speed), and the reason was that you get your maximum MPG with constant throttle position. So what you propose is a 1/2-way compromise.

The only problem is that if you are on the highway and someone is passing you, then your speed changes and you wind up leapfrogging them a few times, it is poor road manners and can cause the other drivers annoyances.

I don't have cruise control, but when there is a lot of traffic around I will maintain a dead-constant speed. However given an open road, I'll use the speed-up/slow-down routine like your mini-algorithm.

-BC
__________________
Think you are saving gas? Prove it by starting a Gas Log, then conduct a proper experiment.
bobc455 is offline   Reply With Quote
Old 04-08-2009, 07:29 AM   #8
R.I.D.E.
Senior Member
 
Join Date: Apr 2008
Posts: 1,064
In the Insight I find that the highest mileage on the local very small hills is obtained when you allow the vehicle's speed to increase downhill, then use that speed to get as far as you can uphill with minimum throttle.

I do it using the instantaneous FE bar graph and try to stay above 75 MPG on the uphill portion and over 100 on the downhill.

When I follow that procedure my speed will vary between 60 and 40 MPH from the bottom to the top of the hill, which is about 40 feet elevation change.

Not sure if that would work in other vehicles, my CD is very low so the higher speeds don't cost me as much energy.

regards
gary
R.I.D.E. is online now   Reply With Quote
Old 04-08-2009, 07:36 AM   #9
maximilian
summer 44.3 winter 36.7
 
Join Date: Mar 2009
Location: NEK VT
Posts: 1,487
Quote:
Originally Posted by theholycow View Post
It's not Pulse & Glide if it's in gear during the 'glide' portion. I call that Pulse & DFCO, and I've found that it's less efficient than just steady-state driving.
Sorry, I failed to mention that the hypothetical situation I'm designing for assumes an overunning clutch is in the transmission. I could write versions for both, I guess.

Quote:
Originally Posted by theholycow View Post
if you encountered an uphill stretch, you wouldn't interrupt your pulse, you'd amplify it.
Hey, that makes sense! Avoid big engine running at partial power. Duh. It's so reversed from what I do now that it takes a little adjusting. I'll try and cook something up. I've tried pulse and glide and found it was more effort than I was willing to put in, but it still interests me a lot.
__________________


Main Entry: co de pen dence - see codependency
co de pen den cy
Pronunciation: \kō-di-ˈpen-dən(t)-sē\
Function: noun
Date: 1979

: a psychological condition or a relationship in which a person is controlled or manipulated by another who is affected with a pathological condition (as an addiction to alcohol or heroin) ; broadly : dependence on the needs of or control by another

Last edited by maximilian : 04-08-2009 at 07:43 AM.
maximilian is offline   Reply With Quote
Old 04-08-2009, 07:38 AM   #10
maximilian
summer 44.3 winter 36.7
 
Join Date: Mar 2009
Location: NEK VT
Posts: 1,487
Quote:
Originally Posted by bobc455 View Post
I was told a while ago that some motorcycles have a constant-throttle-position cruise control (instead of constant speed), and the reason was that you get your maximum MPG with constant throttle position.
That is extremely interesting to know! The rudeness (and potential safety problems) of this entire idea pretty much relegates it to hypothetical land, I just find it's not only interesting, but that it helps me more systematically explore my hypermiler driving habits.
__________________


Main Entry: co de pen dence - see codependency
co de pen den cy
Pronunciation: \kō-di-ˈpen-dən(t)-sē\
Function: noun
Date: 1979

: a psychological condition or a relationship in which a person is controlled or manipulated by another who is affected with a pathological condition (as an addiction to alcohol or heroin) ; broadly : dependence on the needs of or control by another
maximilian is offline   Reply With Quote
Old 04-08-2009, 07:51 AM   #11
R.I.D.E.
Senior Member
 
Join Date: Apr 2008
Posts: 1,064
Max, the inefficiency of standard cruise control is the main reason I dont really want one. My car is like a rolling FE video game. The wife's Rogue has cruise so it is available when we travel together.

Not trying to criticize your idea, but my observation is the best mileage is using speeds similar to a roller coaster that uses altitude to get it going then inertai to keep it going. The constant speed maintained by a cruise control costs a significant amount of mileage, and the last speeding ticket I got, the week Princess Diana died, was becasue the cruise on the Altima I was driving did not have enough closed throttle speed reduction to keep my speed at 62 MPH downhill. It went 7 over than speed and got me a ticket.

I needed to shut off the overdrive to create enough engine braking in the 97 Altima, which would have killed my FE anyway.

regards
gary
R.I.D.E. is online now   Reply With Quote
Old 04-08-2009, 07:52 AM   #12
theholycow
Forum Moderator
 
theholycow's Avatar
 
Join Date: Apr 2008
Location: Glocester, RI
Posts: 4,509
I don't think overrunning clutches are common. In your car with a manual transmission, obviously you don't have one. In automatics I don't think they're common at road speeds. I have the complete GM 4L60E manual and read it somewhat thoroughly looking for that and a few other things. The 4L60E does have overrunning clutches on 2nd and 3rd (and maybe 1st, I don't remember for sure), but they don't get used in normal driving because it will generally shift to 4th. They also won't get used if the driver manually selects that gear, so with the gear selector in '3' the 3rd gear overrunning clutch won't overrun (and similar for '2').
__________________
Computer repair-RI/MA/CT
How to embed videos
Meta-Sig: Hypermiling intro, Miracle FE devices/additives, Aerodynamics, calcs, DIY, weight reduction, K&N/intakes, octane, FAQ, acronyms and glossary.
Exhaust | Hypermile/FE Sleepers | Drafting | DIY fuel rate meter
Tire: Pressure | Width | LRR tires | Size calc
Lugging: not what you think | Gas prices | VX O2 $99
theholycow is offline   Reply With Quote
Old 04-08-2009, 07:53 AM   #13
theholycow
Forum Moderator
 
theholycow's Avatar
 
Join Date: Apr 2008
Location: Glocester, RI
Posts: 4,509
Quote:
Originally Posted by R.I.D.E. View Post
I needed to shut off the overdrive to create enough engine braking in the 97 Altima, which would have killed my FE anyway.
In that case, since you need to discard the speed anyway, wouldn't DFCO reduce your loss compared to leaving it in overdrive and using the service brakes?
__________________
Computer repair-RI/MA/CT
How to embed videos
Meta-Sig: Hypermiling intro, Miracle FE devices/additives, Aerodynamics, calcs, DIY, weight reduction, K&N/intakes, octane, FAQ, acronyms and glossary.
Exhaust | Hypermile/FE Sleepers | Drafting | DIY fuel rate meter
Tire: Pressure | Width | LRR tires | Size calc
Lugging: not what you think | Gas prices | VX O2 $99
theholycow is offline   Reply With Quote
Old 04-08-2009, 08:02 AM   #14
maximilian
summer 44.3 winter 36.7
 
Join Date: Mar 2009
Location: NEK VT
Posts: 1,487
Quote:
Originally Posted by R.I.D.E. View Post
The constant speed maintained by a cruise control costs a significant amount of mileage
That's actually the reason I'm interested in thinking about smarter, variable speed cruise controls. A lot people aren't going to adopt fuel saving driving habits that require much effort. I never intend to ever build one of these, although some of the info could wind up in a display that advises you on the best speed to drive. I'll never have time for such a thing, but I'll contribute it to the various DIY car computer projects so they can do something with it if they want. Long term of a lot of the answer is better propulsion systems, I'd imagine.

Quote:
Originally Posted by theholycow View Post
I don't think overrunning clutches are common. In your car with a manual transmission, obviously you don't have one.
I guess I wasn't clear again. I have to do better. This is all a "what if" design exercise in which cars could have slightly different components. You'd probably need to beef the brakes up on such a vehicle to handle cases with lots of steep hills. I know some older cars had freewheeling ability, does anyone know if their brakes were larger to compensate? I am interested in formalizing one for DFCO behaviour as well, though. I just find my mind turns to this subject whenever I am out hypermiling. Until I formalize it, it won't leave me alone.

On the more practical side, since I am willing to pop my car in neutral I can simulate freewheeling (at least if I'm not too lazy).
__________________


Main Entry: co de pen dence - see codependency
co de pen den cy
Pronunciation: \kō-di-ˈpen-dən(t)-sē\
Function: noun
Date: 1979

: a psychological condition or a relationship in which a person is controlled or manipulated by another who is affected with a pathological condition (as an addiction to alcohol or heroin) ; broadly : dependence on the needs of or control by another

Last edited by maximilian : 04-08-2009 at 08:08 AM.
maximilian is offline   Reply With Quote
Old 04-08-2009, 08:23 AM   #15
R.I.D.E.
Senior Member
 
Join Date: Apr 2008
Posts: 1,064
Suggestions. limit acceleration to a certain point of low vacuum. Increase the systems propensity to downshift to limit downhill speed to a certain point above the set amount, as well as downshifting to maintain a certain lower than set speed uphill, in order to keep vacuum from dropping completely to zero.

On my Insight I have found that it is possible to very gradually increase speed without a significant decrease in fuel mileage. It is also possible to maintain speed on very slight uphill grades without a significant effect on fuel mileage.

It would probably require some kind of grade percentage detection for the cruise to become more anticipatory instead of reactive as they are now.

regards
gaRY
R.I.D.E. is online now   Reply With Quote
Old 04-08-2009, 08:37 AM   #16
theholycow
Forum Moderator
 
theholycow's Avatar
 
Join Date: Apr 2008
Location: Glocester, RI
Posts: 4,509
There were cars with overrunning clutches, but that was made illegal in many places (IIRC, because of the issue with brakes). Modern brakes are much better. Power disc brakes are much less susceptible to fade and (in my experience towing my camper down mountains) still work ok when excessively hot.

Anyway, with tall gears and slippery torque converters on automatics, we effectively have a situation that is equivalent to an overrunning clutch for braking purposes but wastes gas when looking at it from an FE point of view; so brakes are designed for it and IMO there's no need to avoid overrunning clutches anymore.
__________________
Computer repair-RI/MA/CT
How to embed videos
Meta-Sig: Hypermiling intro, Miracle FE devices/additives, Aerodynamics, calcs, DIY, weight reduction, K&N/intakes, octane, FAQ, acronyms and glossary.
Exhaust | Hypermile/FE Sleepers | Drafting | DIY fuel rate meter
Tire: Pressure | Width | LRR tires | Size calc
Lugging: not what you think | Gas prices | VX O2 $99
theholycow is offline   Reply With Quote
Old 04-08-2009, 08:38 AM   #17
maximilian
summer 44.3 winter 36.7
 
Join Date: Mar 2009
Location: NEK VT
Posts: 1,487
A lot of great tips all around. Gives me plenty to chew over. Thanks! I plan to try a few of these out and see how they impact my mpg. Be a fun way to make the drive more interesting.
__________________


Main Entry: co de pen dence - see codependency
co de pen den cy
Pronunciation: \kō-di-ˈpen-dən(t)-sē\
Function: noun
Date: 1979

: a psychological condition or a relationship in which a person is controlled or manipulated by another who is affected with a pathological condition (as an addiction to alcohol or heroin) ; broadly : dependence on the needs of or control by another

Last edited by maximilian : 04-08-2009 at 08:55 AM.
maximilian is offline   Reply With Quote
Old 04-08-2009, 08:55 AM   #18
R.I.D.E.
Senior Member
 
Join Date: Apr 2008
Posts: 1,064
Technically the Toyota Prius which will coast under certain conditions without driver imput, is illegal in Virginia.

The law was passed in the 30s when Plymouth came out with freewheeling which allowed the car to coast in any gear if you let off the throttle. The problem was in mountains the brakes would fail and you died.

regards
gary
R.I.D.E. is online now   Reply With Quote
Old 04-08-2009, 08:57 AM   #19
maximilian
summer 44.3 winter 36.7
 
Join Date: Mar 2009
Location: NEK VT
Posts: 1,487
So Plymouth didn't super-size the brakes? Wow, that's kinda scary. Is the law enforced with regard to the Prius? I assume they'll amend it eventually.
__________________


Main Entry: co de pen dence - see codependency
co de pen den cy
Pronunciation: \kō-di-ˈpen-dən(t)-sē\
Function: noun
Date: 1979

: a psychological condition or a relationship in which a person is controlled or manipulated by another who is affected with a pathological condition (as an addiction to alcohol or heroin) ; broadly : dependence on the needs of or control by another
maximilian is offline   Reply With Quote
Old 04-08-2009, 09:22 AM   #20
theholycow
Forum Moderator
 
theholycow's Avatar
 
Join Date: Apr 2008
Location: Glocester, RI
Posts: 4,509
Laws about coasting: http://www.gassavers.org/showthread.php?t=9946
__________________
Computer repair-RI/MA/CT
How to embed videos
Meta-Sig: Hypermiling intro, Miracle FE devices/additives, Aerodynamics, calcs, DIY, weight reduction, K&N/intakes, octane, FAQ, acronyms and glossary.
Exhaust | Hypermile/FE Sleepers | Drafting | DIY fuel rate meter
Tire: Pressure | Width | LRR tires | Size calc
Lugging: not what you think | Gas prices | VX O2 $99
theholycow is offline   Reply With Quote
Old 04-08-2009, 09:30 AM   #21
maximilian
summer 44.3 winter 36.7
 
Join Date: Mar 2009
Location: NEK VT
Posts: 1,487
I saw that thread previously but didn't realize it ran into trouble with hybrids. I have a friend in RI that I told about it (he coasts in neutral all the time) and he was less than concerned. He was surprised he'd never heard of it having lived there for 30 years, but compared to us both not knowing until last year that prostitution was unregulated in RI (indoors, anyway), coasting laws are pretty minor!

You ever have any trouble with coasting in RI?
__________________


Main Entry: co de pen dence - see codependency
co de pen den cy
Pronunciation: \kō-di-ˈpen-dən(t)-sē\
Function: noun
Date: 1979

: a psychological condition or a relationship in which a person is controlled or manipulated by another who is affected with a pathological condition (as an addiction to alcohol or heroin) ; broadly : dependence on the needs of or control by another
maximilian is offline   Reply With Quote
Old 04-08-2009, 09:39 AM   #22
theholycow
Forum Moderator
 
theholycow's Avatar
 
Join Date: Apr 2008
Location: Glocester, RI
Posts: 4,509
Most of my commute is in MA. I live two miles from the CT border, pass through CT for ~10 miles, then the remaining ~26 miles are in MA.

Anyway, I've never heard of anyone anywhere ever having any legal trouble with coasting, but it's good to know and obey the laws either way.

RI can be real weird about laws. The populace is strongly left-aligned, and our presidential voting history is almost entirely on that side. OTOH, we elect lots of republican governors. Our laws have the same split; lots of heavy liberal stuff, sprinkled with a few strong conservative or libertarian laws. We've got a strong castle doctrine, for example, though not the wide-open gun rights that you have in VT.
__________________
Computer repair-RI/MA/CT
How to embed videos
Meta-Sig: Hypermiling intro, Miracle FE devices/additives, Aerodynamics, calcs, DIY, weight reduction, K&N/intakes, octane, FAQ, acronyms and glossary.
Exhaust | Hypermile/FE Sleepers | Drafting | DIY fuel rate meter
Tire: Pressure | Width | LRR tires | Size calc
Lugging: not what you think | Gas prices | VX O2 $99
theholycow is offline   Reply With Quote
Old 04-08-2009, 09:56 AM   #23
maximilian
summer 44.3 winter 36.7
 
Join Date: Mar 2009
Location: NEK VT
Posts: 1,487
You are very right about RI's split personality. I jokingly call my friend the conservative liberal: he's economically very liberal, but personally very conservative. I grew up in Rehoboth, MA right near RI (we'd watch Providence weather forecasts) and my mother worked there, so I know it pretty well. Went to college there too. My father also lives there. He told me that the prostitution thing is really more of a loophole nobody's bothered to close than anything else. That the law was written specifically addressing outdoor solicitation.

Here in the Northeast Kingdom (name for the NE part of VT) we have a clash of local conservatism with statewide liberalism. The whole civil union thing caused a big uproar here, but it faded into nothing almost immediately once there were no discernible consequences at all.
__________________


Main Entry: co de pen dence - see codependency
co de pen den cy
Pronunciation: \kō-di-ˈpen-dən(t)-sē\
Function: noun
Date: 1979

: a psychological condition or a relationship in which a person is controlled or manipulated by another who is affected with a pathological condition (as an addiction to alcohol or heroin) ; broadly : dependence on the needs of or control by another
maximilian is offline   Reply With Quote
Old 04-08-2009, 10:35 AM   #24
dkjones96
Thread Killer
 
Join Date: Nov 2007
Location: Albuquerque, NM
Posts: 1,333
Code:
int angle, speed, set_speed, min_speed, max_speed, stall_speed, tpsi, tpso, tpseff, ovrdrv;
// Set sensor inputs and constants. In an actual program these would repeat
from within and calculate based on if it was needed or not to keep the processor
from constantly making calculations instead of executing code and also enables 
you to set your +- numbers in one spot instead of 500.
input angle;
input set_speed;
input speed;
input tpsi;
set min_speed = (set_speed - 5);
set max_speed = (set_speed + 5);
set surge_speed = (set_speed + 10);
set stall_speed = (set_speed - 10);
set tpso = '0';
set ovrdrv = '1';
set tpseff = '75';

Repeat {
// If your vehicle angle is less than or equal to -10 degrees(downward slope) the 
computer will calculate when to get out of overdrive based on surge_speed which 
is a pre-programmed temporary speed increase above the normal maximum speed. 
By the time you have reached the bottom of a hill you should be at surge speed, 
in overdrive again, with no throttle input. That will continue until the car either reaches 
min_speed (level ground) or stall_speed (going up a hill again).
		if (angle <= -10) {
			if (speed < min_speed) { set tpso = tpsi + 1 };
			elseif (speed > surge_speed and tpso != '0') { set tpso = tpsi - 1 };
			elseif (speed > surge_speed and tpso = '0') {
			repeat {
				if (speed > surge_speed and ovrdrv = '1') { set ovrdrv = '0' };
				elseif (speed <= (surge_speed - 3)) { set ovrdrv = '1', return 0 };
				else { set ovrdrv = '0'};
				};
			else { set tpso = tpsi };
		};
//If the vehicle angle is between -10 degrees and 10 degrees vehicle speed is 
maintained like any other cruise control system.
		elseif (angle > -10 and angle < 10) {
			if (speed < min_speed) { set tpso = tpsi + 1 };
			elseif (speed > max_speed and tpso != '0') { set tpso = tpsi - 1 };
			elseif (speed > max_speed and tpso = '0') {
			repeat {
				if (speed > max_speed and ovrdrv = '1') { set ovrdrv = '0' };
				elseif (speed <= (max_speed - 3)) { set ovrdrv = '1', return 0 };
				else { set ovrdrv = '0'};
				}; 
			else { set tpso = tpsi };
		};
// If the angle is greater than 10 degrees and actual speed decreases to less 
than stall_speed the control system automatically increases throttle to a 
pre-determined efficient throttle position, in this case it is 75%. This area needs 
work because the program currently would set to the efficient throttle setting 
and immediately unlock the torque converter because both of them would then be 
true. Then, it would hold that until the surge speed is attained and would exit the 
loop only to end up stuck in the 'else' holding 75% throttle until the angle 
changes.
		elseif (angle >=10) {
			if (speed < stall_speed) { set tpso = tpseff };
			elseif (speed < stall_speed and tpso = tpseff ) {
			repeat {
				if (speed < stall_speed and ovrdrv = '1' ) { set ovrdrv = '0'};
				elseif (speed >= surge speed) { set ovrdrv = '1', return 0 };
				else { set tpso = tpsi };	
			};
			elseif (speed > surge_speed) { set tpso = tpsi - 2 };
			elseif (speed > max_speed and speed < surge_speed) { set tpso = tpsi - 1 };
			else { set tpso = tpsi };
		};
// If there is an angle sensor failure it would default to this, essentially making it 
a constant-throttle cruise control.
		else { set tpso = tpsi };
};
__________________
- Kyle

Last edited by dkjones96 : 04-08-2009 at 04:49 PM.
dkjones96 is offline   Reply With Quote
Old 04-08-2009, 10:42 AM   #25
dkjones96
Thread Killer
 
Join Date: Nov 2007
Location: Albuquerque, NM
Posts: 1,333
looks confusing on the forum. bummer.

Of course, this is only the automatic function of the program. The portions of the program where you actually set the speed and interrupts for canceling the program aren't there. Neither are the parts of the program that have to convert the TPS outputs and overdrive commands to actual external commands. A good day of programming and another half day of tweaking for different situations and you should get it down fairly well.

It's a little more involved than I wanted to get by just writing something I'll probably never use but after testing angles you should be able to eventually get a very smooth, almost predictive, cruise control system. I've got some 8Kb/8-bit MCs from freescale that would be perfect for this kind of work.
__________________
- Kyle

Last edited by dkjones96 : 04-08-2009 at 11:05 AM.
dkjones96 is offline   Reply With Quote
Old 04-08-2009, 10:58 AM   #26
theholycow
Forum Moderator
 
theholycow's Avatar
 
Join Date: Apr 2008
Location: Glocester, RI
Posts: 4,509
You can preserve formatting by using "Code" tags. They're represented by this button:

The result of code tags looks like this:
Code:
blah blah blah {
	if foo then
		bar
		}
Quote my message to see what it looks like in the editor.
__________________
Computer repair-RI/MA/CT
How to embed videos
Meta-Sig: Hypermiling intro, Miracle FE devices/additives, Aerodynamics, calcs, DIY, weight reduction, K&N/intakes, octane, FAQ, acronyms and glossary.
Exhaust | Hypermile/FE Sleepers | Drafting | DIY fuel rate meter
Tire: Pressure | Width | LRR tires | Size calc
Lugging: not what you think | Gas prices | VX O2 $99
theholycow is offline   Reply With Quote
Old 04-08-2009, 11:06 AM   #27
dkjones96
Thread Killer
 
Join Date: Nov 2007
Location: Albuquerque, NM
Posts: 1,333
Sweet!
__________________
- Kyle
dkjones96 is offline   Reply With Quote
Old 04-08-2009, 11:13 AM   #28
maximilian
summer 44.3 winter 36.7
 
Join Date: Mar 2009
Location: NEK VT
Posts: 1,487
Oh fine, wait until I'd almost finished reformatting it! It's OK, xcode did most of the heavy lifting.

That's awesome. I'll walk through it.

What syntax is that anyway? Mine was inspired by C++.
__________________


Main Entry: co de pen dence - see codependency
co de pen den cy
Pronunciation: \kō-di-ˈpen-dən(t)-sē\
Function: noun
Date: 1979

: a psychological condition or a relationship in which a person is controlled or manipulated by another who is affected with a pathological condition (as an addiction to alcohol or heroin) ; broadly : dependence on the needs of or control by another

Last edited by maximilian : 04-08-2009 at 11:26 AM.
maximilian is offline   Reply With Quote
Old 04-08-2009, 03:56 PM   #29
dkjones96
Thread Killer
 
Join Date: Nov 2007
Location: Albuquerque, NM
Posts: 1,333
No real syntax. That is just the way I think. Kinda like code free writing.
__________________
- Kyle
dkjones96 is offline   Reply With Quote
Old 04-08-2009, 07:02 PM   #30
maximilian
summer 44.3 winter 36.7
 
Join Date: Mar 2009
Location: NEK VT
Posts: 1,487
OK...that's weird. I thought I posted this already. Huh. Try again.

Anyhow, I've had time to process pulse and glide with hills and it's much simpler than I thought at first. You just want to run the engine at a higher power level as much as you can. Since high speed stops you from doing this (via air resistance and safety), hills give you the opportunity to pulse longer up them. Of course the downhill would interrupt a pulse if it occurred then, but you get more coast out of it too. Do I have this right?

I'm curious to work out the overall efficiency of a blind pulse and glide hill algorithm on randomly spaced and sized hills versus an optimal one. Without stops or really sharp turns, of course (which clearly benefit the smarter version).
__________________


Main Entry: co de pen dence - see codependency
co de pen den cy
Pronunciation: \kō-di-ˈpen-dən(t)-sē\
Function: noun
Date: 1979

: a psychological condition or a relationship in which a person is controlled or manipulated by another who is affected with a pathological condition (as an addiction to alcohol or heroin) ; broadly : dependence on the needs of or control by another

Last edited by maximilian : 04-08-2009 at 07:19 PM.
maximilian is offline   Reply With Quote
Reply


Thread Tools
Display Modes

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
Spark plug mod zpiloto General Fuel Economy Discussion 56 08-28-2009 10:47 PM
Poll: How much did you pay for your most fuel efficient car? MakDiesel Automotive Tech 61 10-16-2008 03:50 PM
Trick for P&G On an automatic.. Hint, you need Cruise Control imzjustplayin Experiments 58 10-08-2008 07:13 PM
Hacking the Saturn Cruise Control ... cfg83 Automotive Tech 33 08-17-2008 02:23 PM
Driving on the freeway with Cruise Control, the smart way. Compaq888 Articles 4 12-09-2005 03:27 PM

Common topics of discusion include: gas mileage, fuel economy, best gas mileage car, MPG, miles per gallon, acetone, increase gas mileage
Archive Links: General Fuel Economy Dicussion - Experiments - General Tech - Automatic Transmissions - Diesels - Aerodynamic Modifications -
How To/Do It Yourself - Articles - Around the House - Electric/Solar Powered - People Powered - Vegetable Oil/Bio-Diesel - Hotel Price Comparison - VPS Hosting - Content Writing - Managed Hosting

 
Copyright 2005-2008 GasSavers.Org