02-22-2009, 10:06 PM
|
#31 (permalink)
|
EcoModding Apprentice
Join Date: May 2008
Location: N. Saskatchewan, CA
Posts: 1,805
Thanks: 91
Thanked 460 Times in 328 Posts
|
Yes, that's the general principle. Because of valve overlap, manifold resonance, and so on, the efficiency numbers don't plot in smooth curves, but the trend is always there. Most of the time, we have an engine that works best at high speed and load, operating at low speed and load, with various bits fighting each other or causing friction to little purpose.
|
|
|
Today
|
|
|
Other popular topics in this forum...
|
|
|
02-24-2009, 03:53 AM
|
#32 (permalink)
|
EcoModding Lurker
Join Date: Feb 2009
Location: Alabama
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
|
Quick update: Got going with MATLAB today on the project. I'm having some trouble getting a grasp on getting variables from one set of differential equations to another. Its kinda cool seeing the boundary conditions being satisfied and being able to cap the velocity and such. Going up the first grade from a stand still needs between roughly 1400 newtons to 2400 newtons. 1400 to barely make it up to the top and 2400 to hit the speed limit at approach. Obviously 35 mph at the top of the hill which I'm about to go down is a little much so the first is more obvious. I'll have to use the new boundary conditions set forth by each force applied to set up the next set and see what it looks like at the stop sign. Wish me luck tomorrow!
|
|
|
02-24-2009, 11:26 PM
|
#33 (permalink)
|
needs more cowbell
Join Date: Feb 2008
Location: ÿ
Posts: 5,038
Thanks: 158
Thanked 269 Times in 212 Posts
|
Quote:
Originally Posted by Bicycle Bob
That engine output graph is just for maximum output at a given RPM.
|
That is true for the torque curve. The bsfc map however is the fuel needed per power unit for various throttle settings (load settings) at any given rpm. And since you have torque and rpm you can reverse engineer the power output at any point and predict (though coarsely) the fuel consumption at that rpm and load. The target oval would probably be centered on the torque curve if it were not for computer enrichment is my guess.
P.S. post your matlab thingy noe, I want to see if Octave can read it or not.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
|
|
|
02-25-2009, 12:06 AM
|
#34 (permalink)
|
Deadly Efficient
Join Date: Jun 2008
Location: Goshen, Indiana
Posts: 1,234
Thanks: 134
Thanked 176 Times in 91 Posts
|
noeryan, this concept is AWESOME! I really need to visit this section of the forum more often...
I've wondered if something like this was possible. Well, heck, I figured it WAS possible, just had no clue where one would start. It's cool to see someone that has the ability jump in and go for it.
With non-existent computer skills, I won't be any help with the programming, but I'll be cheering you on.
I think your use of topographical maps for inclinations is a good place to start. Maybe a sensitive altimeter (barometer) can be added later to fine tune the concept. Start simple, add the frills later.
Go, noeryan, go!
__________________
-Terry
|
|
|
02-25-2009, 03:09 AM
|
#35 (permalink)
|
EcoModding Lurker
Join Date: Feb 2009
Location: Alabama
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
|
Tango Charlie: Thanks for the encouragement! I'm needing it right now.
Its turning into something crazy... Since the throttle is variable, there are countless possibilities for the throttle position at each section...
On the UP side, I ran the GPS for a while and it actually found the proper altitude!!! It might have just been grumpy the night I was testing it earlier. It did quite well, got within a few feet... Maybe it just needed to get a few good satellites to triangulate? I'm not a GPS wizz. I do know it takes it a few minutes to get its altitude bearings.
I'm thinking to fix the throttle position problem, I'm going to need to fix either throttle on or throttle off for now and get it working.
Here is situation:
Engine Force is getting looped for the first section from 100 through 9000 Newtons in increments of 100 Newtons. The different forces are getting put into the diff eqs and velocities are being calculated at the end of each section which are then being filtered through the following:
Velocity must be greater than 0 and less than Speed Limit (whatever you choose)
Sometimes with the given force it never makes it the distance of the section of route so that number gets thrown out as well. (thrown out means = 0)
So this gives me a window of forces that are usable for that section which I set into a matrix... example:
EF = [0, 0, 0, 400, 500, 600, 0, 0, 0] means that the first 100, 200, and 300 Newtons wouldn't make the trip, also 700, 800, and 900 Newtons made the vehicle travel too fast.
Also saved are the Velocities which would look like V = [0, 0, 0, 2.3, 4, 7, 0, 0, 0] (zeros are again just place holders).
That was the easy part!
Now, working on section 2, we can't use an initial velocity of 0 because we aren't going 0. So we use one of the possible velocities we could be going which are [2.3, 4, or 7]. So we would want to pick 2.3 for the first one and use it to calculate our data for section 2... record this data somewhere and find the possible EF's that keep the V between 0 and Speed Limit so that means for each V from section 1, I have a spread of V's for section two... its a pyramid effect. That is a pain in the butt to code. PLUS, after doing all of those calculations only a few sequences of EF's will be eligible to satisfy the section of the route to be calculated to find the minimum EF for the section.
Is that understandable? I'm sorry I'm not very good at explaining the problem. The MATLAB code is not uploadable! Any ideas?
PLEASE HELP WITH THE LOGIC OF THIS PROCESS!
** MATLAB file extension: .m file **
Last edited by noeryan; 02-25-2009 at 03:15 AM..
|
|
|
02-25-2009, 04:57 AM
|
#36 (permalink)
|
needs more cowbell
Join Date: Feb 2008
Location: ÿ
Posts: 5,038
Thanks: 158
Thanked 269 Times in 212 Posts
|
you might have to zip up the matlab file to attach it.
What do you want the logic of the process to accomplish? Much of the choice of optimum speed is a compromise in local traffic conditions and topogrophy, personal and public tolerance for speed limit deviation, and the slowest speed that still allows top gear usage for the current incline and efficient climbing.
Also worth noting that additional fuel is used when accelerating, the manifold pressure and fuel delivery is increased until the rpm catches up and reduces the manifold pressure to the new pressure, but at a higher consumption rate of course.
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
Last edited by dcb; 02-25-2009 at 05:35 AM..
|
|
|
02-25-2009, 05:34 AM
|
#37 (permalink)
|
EcoModding Lurker
Join Date: Feb 2009
Location: Alabama
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
|
Ok so I decided to feel productive I'd write what it would take to create a simple cruise control for my route first to get more familiar with the challenges of this project. Since it wouldn't upload the matlab file I decided to just copy and paste code here since its fairly short...
%Cruise Control
%Ryan Noe
clear all
clc
% Vehicle Constants
mass = 1157; %kg
Cd = 0.32;
Crr = 0.01;
FA = 2.21; %m^2
engine_efficiency = 0.25;
% Energy in One Gallon of Gasoline
EofG = 120381873; %Joules per Gallon
% Atmospheric Conditions
density = 1.23; %kg/m^3
gravity = 9.81; %m/s^2
% Set a velocity you would like to maintain.
velocity = 30;
% Reads in the Data from an Excel file.
theta = xlsread('H:\Desktop\Honda Fit\route_home_oneway.xls', 'sheet1', 'e2:e46');
dist = xlsread('H:\Desktop\Honda Fit\route_home_oneway.xls', 'sheet1', 'g2:g46');
% Transposes Matrices from Rows to Columns
theta = theta.';
dist = dist.';
% Simple FOR loop to determine Force, Energy, and Power required to
% maintain Velocity.
for q = 1:length(theta)
EF(q) = Crr*gravity*mass*cos(theta(q))+Cd*FA*(.5)*density* (velocity^2)+gravity*mass*sin(theta(q));
EE(q) = EF(q)*dist(q);
EP(q) = EF(q)*velocity;
end
% Gas Mileage running Cruise Control and NOT STOPPING at Stops
ActualEnergyUsed = sum(EE)/engine_efficiency;
AmountofGasUsed = ActualEnergyUsed/EofG;
SumDist = sum(dist);
Miles = SumDist*3.28/5280;
MPG = Miles/AmountofGasUsed;
% Plots
diffcounter = 1:length(theta);
plot(diffcounter-1, EP)
*** The % signs are notes in the code... the rest is VERY straight forward.
For the ones that don't have much coding experience, the XLSREAD just reads in from my excel file.
The FOR loop just loops through each of my sections of the road.
Note that some of the energy applied is negative (rolling down hills), this is 'captured' by the system somehow (not a very nice representation.. I know). But its fun to play with. Try starting up a file and plugging this in and see if it works in Octave (DCB). Also attached is the excel file that I read my info from.
|
|
|
02-25-2009, 05:59 AM
|
#38 (permalink)
|
needs more cowbell
Join Date: Feb 2008
Location: ÿ
Posts: 5,038
Thanks: 158
Thanked 269 Times in 212 Posts
|
"error: `xlsread' undefined near line 23 column 9"
Don't think octave likes xls files.
http://math1.unice.fr/laboratoire/he...octave_89.html
__________________
WINDMILLS DO NOT WORK THAT WAY!!!
Last edited by dcb; 02-25-2009 at 06:14 AM..
|
|
|
02-25-2009, 09:04 AM
|
#39 (permalink)
|
EcoModding Apprentice
Join Date: May 2008
Location: N. Saskatchewan, CA
Posts: 1,805
Thanks: 91
Thanked 460 Times in 328 Posts
|
Thanks, DCB - I couldn't understand what the bsfc lines meant. Perhaps the model could do a first iteration by using 80% throttle when under "speed limit" and the natural rate of deceleration to approach stops until half the velocity has been lost, followed by braking at .25g. Then, on a second iteration, you could try less throttle and brake use, and see how it affects the time to complete the course, and the fuel consumption. On the sections of the course where the gain/loss ratio was better, a next iteration would nudge the variables in the same direction again, until the gas savings seemed not worth the time savings.
|
|
|
02-25-2009, 04:01 PM
|
#40 (permalink)
|
EcoModding Lurker
Join Date: Feb 2009
Location: Alabama
Posts: 62
Thanks: 0
Thanked 0 Times in 0 Posts
|
ok, well you could just build the variables. I did the xlsread so I could change the excel file and it not affect the program.
the way xlsread works is the file name, then which sheet of the file and then the area to take. the variable in front of the = sign is where it is stored. just make the variable...
theta = [(copy and paste e2:e46)] ...:: it should work or get you close to what you need.
Bicycle Bob: When you say iterate, do you have a specific way I should do that? There are so many combinations of throttle position that I couldn't possibly get it to work... its not bad when you are doing maybe the first section and then second section but when you get to the 9th section and you are trying literally thousands of throttle positions... could you come up with some logic that I could kinda push towards coding?
Ex: FOR loops
WHILE Loops
IF statements etc?
|
|
|
|