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)
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)
Next we can work out the acceleration by differentiating the calculated speed :
Code: Select all
accel = filter(derivative(rpmSpeed),0.9)
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
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
Finally, with both the wheel power and the drag worked out we can get a total power reading :
Code: Select all
totalPower = (power + drag)
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.