Physics Lesson – Calculating Torque and Power From Datalogs

,

 

I like to calculate everything in SI units and then convert to English units.  You can see the values I input for tire size, gearing, weight, coefficient of drag, frontal area and air density.  I guesstimated the frontal area by taking the height and width of the car, and then subtracting a few inches from the height to account for the space beneath the car.  As air density is temperature and altitude dependent, you could calculate the actual density based on the air temperature and altitude while testing.  You could also then apply the SAE correction factor like dynos do.  But using an air density of 1.225 kg per meter cubed was close enough for me.

Data oftentimes requires some processing due to signal error, noise, and resolution limits.  This is the plot of the torque and horsepower values using the raw data.  It’s a bit all over the place isn’t it? This is due to the rpm signal not being highly accurate.  Basically, it is sensor error and/or lack of resolution. 
This is after my first attempt at smoothing out the data.  What I did was average out each torque data point with the point before and the point after; so three data points were averaged together.  As you can tell, the data is still pretty rough.

The next step I used was to reduce my data sample rate.  The first plots took data at sample rate of 25hz, or every 0.04 seconds.  I reduced the sample rate to a data point every 0.24 seconds.  Increasing the time between data points helps to smooth out the data by making the signal error a smaller percentage of the calculation.  After plotting the data points, I used the Excel function of a trend line.  I chose a trend line that was a moving average of two data points.

The shape of my calculated dyno plot doesn’t look too bad compared to the real thing.  Notice how my torque curve doesn’t drop as much at the top-end though…

 

 

 

5 comments

    1. You are absolutely correct, thanks for catching that! Should have been: Force = Torque / Radius

  1. Thanks for sharing! I’d love to take some inspiration from you for EV lessons I am making. Do you have any EV dyno data to share? Also, I am having trouble opening your github links, like the one that mentions Brad Barnhill or the one to download Virtual Dyno. Can you repost active links for me, please?

Leave a Reply

Your email address will not be published. Required fields are marked *

*
*