weChook Racing: How we use data in the pits

Having covered how Ian uses our measured data whilst out on circuit in the last post (read it here: https://wechook.com/?p=518 ), I’m now going to cover what we can do with it when we’re not racing – be it in the pit lane or once we’re back home.

The first step is getting the information from the car to my laptop. As long as we remember to put it in, the telemetry board will record all measurements to a text file on an SD card, which can then be easily transferred across to a computer. The system also transmits data live wirelessly during a race, but this is of little use when the car goes out of range or behind a tree – pretty much everywhere apart from Merryfield and Dunsfold Park.

For the information to be valuable during the constraints of a race day, all the information has to be pulled together quickly – there’s not a lot of time to make changes in between the end of practice and the start of the race so every second counts. In order to maximise the utility of our data logging, I wrote some code in MATLAB that will read the data files, and generate a report with useful plots and calculations. I’ve uploaded two of these reports, from two different races at Rockingham to the website:

As an aside – I heartily recommend that any aspiring young engineer go out there and get some experience using MATLAB – it is easy to pick up and there is a huge wealth of help and support available online. As a data analysis and visualisation tool it far exceeds Excel, and will make a piece of work look far more professional! I use it extensively at work to perform simulations, automatically generate reports (automating a task that used to take hours keeps my manager very happy) and design control algorithms. From experience, I can also say that if I’d learnt to use it whilst at university, it would have made my dissertation project a whole lot more manageable, due to the Gigabytes of data that I was dealing with from incredibly high resolution measurements of impact data.

Sales pitch over! Once I’ve worked my magic with MATLAB and generated a report we can work out how much current and power we were using at any given point, and how fast we were running the motor. Using this approach with data from a run in practice, we can determine whether we can complete a full race distance at that pace without flattening our batteries (I’ve done plenty of battery testing, so I have a good understanding of how much energy the batteries have available).

Based on the data from the Rockingham heat, we were able to plan our power usage for the Lap Race – we estimated how much shorter it would be than the standard hour and then determined how much more quickly we could discharge the battery. If you look at the two reports linked above, you can see that we drew just under 25Ah from the batteries in both events, but at a higher average rate in the lap race.

Also shown in the reports are traces of throttle position and motor speed. Comparing the throttle trace from the Lap Race to that from the heat earlier in the year, it can be seen that Ian is performing fewer gear changes, and spending less time at part throttle. It can also be seen that motor speed tailed off much more quickly at the end of the Lap Race – we’re putting this down to the fact that we were using our best batteries in the Rockingham heat, but we saved them for the F24+ decider on the International Final weekend.

We’re planning to extend our data collection next year to include wheel RPM (from which we can calculate vehicle speed, and determine which gear we were in) as well as motor temperature, to avoid the risk of cooking another one! With this data we plan to be able to run an improved race strategy in the 2016 season – instead of targeting a constant rate of discharge from the batteries, we will be looking at how we can most effectively convert each unit of energy into speed.

Which brings me nicely onto the subject for my next post: Constant Current vs Constant Speed control!

weChook Racing: How we use data on circuit

Seeing as we’ve been espousing the virtues of data collection of late, I’ve decided I’d best write at least a bit about some of the things we do with our data.

I’m going to split this into two posts – the first covering how the driver uses the information during the race, and the second discussing what we do with the logged data in between sessions and race days, as well as what we’re hoping to achieve in the future.

From the Rockingham heat onwards, our cars were fitted with a screen that showed the driver a live readout of battery voltage, motor current and motor speed. Voltage isn’t much use on a moment to moment basis – it fluctuates with the current that is being drawn, meaning there’s no simple way to estimate the charge left in the battery

Motor RPM is also tricky to use – we know we need to keep the motor in its ‘happy range’ in order to keep power consumption low and stop the temperature from getting too high, but it’s difficult to plan a race using motor speed – without a good model of the motor, we don’t really know whether we need to hit 1750 rpm or 1800 rpm to make it to the end of the race!

That leaves battery current as the most useful resource to the driver. We’ve done plenty of testing, which shows that our best batteries have a capacity of roughly 25 Amp-hours, when discharged at a high current. For comparison, our worst batteries have a capacity of 22Ah, which can make a big difference when trying to reach the end of a race.

With 25Ah at our disposal, and an hours worth of racing to complete, the maths isn’t too hard; we need to hit an average of 25A over the course of the race to make sure we get to the end – simples!

With a single speed, relay controlled car, this is achieved through selecting the right gear ratio – get it wrong and you won’t reach the end of the race, or you will get there but at a slow pace. Choosing that gear ratio can be tricky – for me it came down to experience and voltage measurements. I’ll discuss more on this in the next post though!

Electric 2galoo had the luxury of a wide range of gear ratios, and a speed controller. By shifting up and down the gears and by varying the throttle input, Ian was able to target a constant rate of power consumption. At the International Final, this allowed us to control the rate that the battery went flat very nicely – gaining us a place on the last lap as the competition ran out of juice!

2galoo's current consumption from the international final

2galoo’s current consumption from the international final

We’re currently developing a data logging product that will be available for sale to all greenpower competitors – read more about it here – https://wechook.com/?p=511 . If you’re interested in investing in one, get in touch with us on twitter (@Ramjet_gpt) or on the greenpower forum here: http://www.greenpower.co.uk/forum/discussion/3398/introducing-project-echook-nano