Documentation explaining the different software bits of the full vehicle simulation and how to run it.
This folder contains the entirety of the full vehicle simulation for Formula Slug. It is run from main.py where you provide the necessary parameters to begin the simulation. There are a few main folders: Powertrain (Powertrain/Battery System), Mech (Mechanical System), SimulationInputs and TireModel (Tire Model Training). Powertrain and Mech are model bits used while running the simulation. SimulationInputs contains various simulation starting points: Initial parameters like timeStep, and control inputs for the duration of a simulation.
If you want more information on the basis of some of these simulation parts, you can find them in GeneralModelingNotes.md
This is a json input file with a bunch of inputs for the simulation. Unfortunately JSON doesn't support comments so the unit explanations have to go here. The file is params.json. Tweak this for all the indepth constants and higher level stuff like step size and simulation duration.
Simulation controls is a .csv or .parquet file that contains time (sec), throttle (-1 to 1), brake(Pressure), and steering angle inputs. Time is in seconds, throttle is -1 to 1 (includes regen), brakes is in PSI, and steering angle is in radians. The full vehicle simulation will do interpolation automatically to align the input/simulation time steps as needed. You can select from CS for cubic spline for continuous data from a run or LI for linear interpolation for a simpler input.
The simulation is divided into subsystems. The Powertrain contains the entire powertrain model, namely the tractive battery electrical/thermal systems. The mechanical system includes/will include suspension modeling, steering modeling, aero modeling, brake modeling, and tire modeling.