How much power ?

Post Reply
pat
Syvecs Staff - Cleaner
Posts: 356
Joined: Fri May 23, 2008 10:23 am
Location: Out there... somewhere
Contact:

How much power ?

Post by pat »

I was recently asked if there is a way of "measuring" power output on Solaris, in specific if there was a feature that was comparable to the "Road Dyno" feature in ECUTEK's DeltaDash logging software. The simple answer is no, there is no directly comparable feature. The complex answer is yes, there is sufficient flexibility in the Solaris software suit to be able to perform the necessary calculations given a sufficiently detailed datalog.

Theory

Cars have mass and can be modeled using Newtonian mechanics. If we have a sufficiently detailed record of vehicle speed (or engine speed and a set of gear ratios) and we know the vehicle's mass we can work out the power that must have been present at the wheels in order to cause the car to accelerate at the rate it did.

SCfg setup

Before we can start work we need the right data. For maximum flexibility it would be sensible to log both "rpm" and "vehicleSpeed" at a minimum of 50Hz. It would also be useful to log the "gear" parameter, and possibly "driveRatio". Just how they get used will be dependant on the car.

SView setup

SView has the ability to perform mathematical and logical operations on the data to create pseudo-data-channels. This feature will be used to yield intermediate data which will eventually result in the power output. The example will use a vehicle with a manual transmission and a slow / relatively inaccurate vehicle speed signal :

Example - Manual transmission using rpm

The first task is to get get a useful vehicle speed signal, which will be done from the rpm and gear parameters. Note that gear is an enumerated type and SView math functions do not understand the enums so we need to use integers. Because REVERSE and NEUTRAL are valid gears, we need to add 2 to the gear to get the right gear, ie FIRST is actually 3 not 1. We can emit a valid gear ratio using the following math function :

Code: Select all

gearRatio = (gear==3?3.18:1) * (gear==4?1.87:1) * (gear==5?1.32:1) * (gear==6?0.95:1) * (gear==7?0.738:1)
So what's going on there ? Well, we're using the IF THEN ELSE logic operator ?: . Translated into English it says...

gearRatio = (if gear=FIRST then use 3.18 else use 1) * (gear=SECOND then use 1.87 else use 1) * (if gear=THIRD then use 1.32 else use 1) * (if gear=FORTH then use 0.95 else use 1) * (if gear=FIFTH then use 0.738 else use 1)

Since gear can only be one value at a time, only one of the equality tests will ever be true, so the emitted value will be the gear ratio for that gear multiplied by 1 four times. Ie if gear was THIRD then it'de end up as :

gearRatio = 1 * 1 * 1.32 * 1 * 1 = 1.32

Of course the gear ratios would need to be adjusted for the particular vehicle being worked on, that list of ratios is for a Subaru 5MT / PPG gear set.

Next we need to get a road speed, which can be computed from the gear ratio, tyre circumference and engine rpm :

Code: Select all

rpmSpeed = (((rpm / gearRatio) / <final_drive_ratio>) * <tyre_circumference> / 60)
So what's going on here ? Well, we're dividing the engine speed which is the same as the gearbox input shaft speed by the gear ratio to get the gearbox output shaft speed. We're also dividing by the final drive ratio to get the drive shaft speed, then multiplying by the tyre circumference (NB: in metres) to work out how far it would go in one minute, then dividing by 60 to get the result from metres per minute into SI units, metres per second. For the above Subaru 5MT transmission the values for final_drive_ratio and tyre_circumference were 3.9 and 1.98m, respectively.

Next we can work out the acceleration by differentiating the calculated speed :

Code: Select all

accel = filter(derivative(rpmSpeed),0.9)
So what's going on here ? Well, first we're differtiating the rpmSpeed signal with respect to time, to give a rate of change of speed, or acceleration, in SI units of metres per second per second. Next, we're removing some quantisation noise from the differentiated signal with a filter function. The 0.9 filter coefficient gave an acceptably smooth output on the Subaru datalog, but may need tweaking for the car in question, higher values give greater filtering, up to a maximum of 1.0.

Now that we have an acceleration signal we can finally work out the power, however an accurate measurement of the vehicle mass will be required (a weighbridge should give a useable reading) :

Code: Select all

power = (accel * <vehicle_mass> * rpmSpeed) / 1000
So what's going on here ? Well, first we multiply the acceleration by the mass, this gives us the force necessary to achieve the given rate of acceleration for the given mass. Next we multiply by the speed, which is a shortcut. Multiplying a force by a distance gives the amount of energy that was needed to allow the given force to move something the given distance. If we divide this by how long it took, we get the rate at which the energy is being consumed, which is power; speed contains both the distance and time dimensions so there's no need to divide by the time quantum. The result will be the power in Watts, so the final stage is to divide by 1000 to get kilowatts.

Now we have wheel power, it looks like we're losing power in the higher gears. This is due to the drag so we need to work that out :

Code: Select all

drag = (0.5 * 1.225 * pow(rpmSpeed, 2) * 0.34 * 2.01) * rpmSpeed / 1000
So what's going on here ? Well, the drag equation starts with a half so that's the first thing we do. Next we multiply by the mass density of the fluid we're driving through (air), in this case the value is for air at 15 degrees C (1.225 kg/m^3). Next we multiply by the square of the vehicle speed (which is conveniently already in SI units). We multiply by the drag coefficient of the vehicle which is 0.34 for the Subaru but there are lists online for other vehicles. We then multiply by the cross sectional area of the vehicle, in this case 2.01 square metres, to get the drag force that will be experienced at that speed. Next we need to convert from the force to power so we multiply by distance and divide by time, which gets us power in Watts, so once again we divide by 1000 to get kilowatts.

Finally, with both the wheel power and the drag worked out we can get a total power reading :

Code: Select all

totalPower = (power + drag)
It's pretty obvious what's going on there so doesn't really need any further explanation. It is in kilowatts but if a result in horse power is required then multiply by 1.341 for horsepower or 1.359 for DIN horsepower (PS).

Hopefully this might prove useful for people trying to tune on the road rather than on a dyno. It does require that the log be taken on a FLAT piece of road to remove the
effects of gravity (driving up or down a hill will reduce or increase the apparent power). It also requires accurate readings for the tyres, the mass of the car (with fuel, driver, any passengers that may be present during testing etc)... get any of those wrong and the results SView generates may be rather wrong too!

Regards,

Pat.
Jolly Green Monster
Posts: 25
Joined: Mon Jul 28, 2008 9:06 pm

Re: How much power ?

Post by Jolly Green Monster »

like that a lot.. :)

Simon
Wez
Santa's Little Helper
Posts: 267
Joined: Thu May 22, 2008 3:19 pm
Location: London

Re: How much power ?

Post by Wez »

Nice writeup Pat 8-)
96 MKIV Supra, S6GP, 591bhp & 523ft/lbs
Ryan.g
Syvecs Staff - Caretaker
Posts: 498
Joined: Fri May 30, 2008 4:05 pm

Re: How much power ?

Post by Ryan.g »

Still think my Arse Dyno would be more accurate ! :mrgreen:
Post Reply