Purdue Electric Racing Simulation Work

Lap Simulation in Matlab

 

    Using experience from past summer internships and the knowledge I have gained from being involved in multiple parts of the car, I have taken a large stake in helping produce a lap simulation of our car which will allow us to make component decisions and weigh trade offs on our vehicle. A lap simulation not only helps us compare how different individual parts change our car's performance, but also allows us to compare completely different vehicle architectures which are much harder to compare on paper. Given our decision to investigate hub motor technology for use on our 2022 car, it was important to have a tool not only to make decisions for that car such as motor power requirements and weight tradeoffs, but also validate that such a large change in design was worth it. Taking what I'd learned from creating similar simulations on a smaller scale, I took charge of the electrical systems on the car and derived a system of equations for the battery, cables, motor, and DCDC loads that would accurately represent the real life vehicle performance. This simulation can help estimate system efficiency and can help make decisions on motor and cable selection. It also informs us on our energy use over a typical endurance run that helps determine our pack configuration. Another large part of the simulation was the collection of parametric data from parts we use already and also parts we want to use for the future. It was important to set the precedent for what data is needed to model the battery, motor, etc... I hope that our lapsim will continue to improve in accuracy and be improved upon by future members of the team.

Motor efficiency map for lapsim ingestion

MATLAB code snippet from battery class

Update 9/18/2022:

 

    While the team ultimately did not continue to rely on this lap simulator due to poor vehicle dynamics simulation. I was able to rescue the electrical system portion and turn it into a tool we were able to use to size our battery for the 2021/2022 season and beyond. As a result of my tool we were able to predict pack energy usage over a simulated endurance event with tracking of pack voltage as well as peak available power. We were able to see from this that if we shrink the pack down too far, while there will be enough energy to complete the event, the max power output for the final laps will be low enough that it severely affects our pace. Noticing this in the simulation allowed us to slightly increase the pack size to allow higher power draws towards the end of our race and still cut down on pack size by around 30%. Below is a series of graphs showing simulated data output for a mock endurance event.

Pack voltage during simulated endurance run for 80s/6p configuration

Pack peak available power during simulated endurance run for 80s/6p configuration

Pack peak available power during simulated endurance run for 80s/5p configuration

Notice at the end of endurance peak power is about 10kW lower than 6p config