## 3 Methodology and Simulation Conditions
### Developed MATLAB/Simulink  
After obtaining a velocity time series from the LapTime algorithm, the developed MATLAB and Simulink software (Matlab R2022a version) calculated all the remaining values utilized in this work. The obtained velocity over time was derived to obtain the acceleration values with which it was possible to calculate the traction force (\(F_{traction}\)) exerted by the motorcycle on the tarmac. This force is the vector sum of the four main forces acting on any moving body that are seen in Figure 8: resultant force (\(F_{res}\)), aerodynamic force (\(F_{are}\)), gravity force (\(F_{g}\)) and the rolling resistance force (\(F_{rr}\)). The calculations for each of the previous forces relative to the \(x\) axis are illustrated in Equation (5), where \(m=220\) kg is the mass of the motorcycle and rider (altogether), \(a\) is the acceleration of the moving system, \(\rho=1.225\) kg/m\({}^{3}\) is the density of the air, \(A_{f}=0.51\) m\({}^{2}\) is the frontal area of the system (rider and motorcycle together, this value is fixed throughout the laps as a simplification) that causes aerodynamic drag, \(C_{d}=0.14\) is the drag coefficient, \(v\) is the velocity, \(g=9.81\) m/s\({}^{2}\) is the gravity acceleration, \(\theta=0^{\circ}\) is the slope of the terrain, and \(C_{rr}=0.018\) is the coefficient of rolling resistance. All forces, except the rolling resistance, act on the bodies center of mass (CM), which is equal to the center of pressure (CP). Figure 8: Visual representation of the forces acting on a moving body. The energy regeneration system was created using the Simulink model seen in Figure 9. This model receives the velocity of the motorcycle as an input and calculates the traction force in Equation (5) as well as the traction power by multiplying velocity and traction force. Traction power is divided by the efficiency of the system, referenced in Table 5, thus creating the power that needs to be exerted for the motorcycle to achieve the input velocity. By integrating the aforementioned power, one obtains the consumed energy over time. The consumed energy is subtracted from the initial available energy value of 90% state of charge (SOC = 7650 Wh), which will create the available energy over time until 10% SOC (=850 Wh) is reached, with no regeneration. Traction power is also multiplied by the efficiency of the system and the percentage of rear braking, thus obtaining the energy that is recovered to the battery pack over time. This recovered energy is multiplied by the efficiency of the system once again, simulating its path back to the wheels. To the initial available energy value of 90% SOC (=7650 Wh), the system now subtracts the consumed energy. However, it also adds the values of recovered energy times the efficiency of the vehicle, thus obtaining the available energy over time until 10% SOC (=850 Wh) is reached, with regeneration. The biggest \"loss\" factor in this work is related to how much braking is, in fact, regenerative. Different riders use different approaches on-track. Hence, there is a variability in the percentage of usage of the rear brake, when compared to the front caliper. This is called the _brake bias_. MotoGP riders use the rear brake for about 70% of their laps to balance the vehicle and take on a less aggressive approach than when only using the front braking system. However, the rear braking mechanism is responsible for only about 30% of the braking power, a 70/30 braking bias. In Section 5, a careful analysis of several values of rear braking is applied, and the results are compared. \begin{table}
\begin{tabular}{c c c} \hline \hline \multicolumn{1}{c}{**Characteristics**} & \multicolumn{1}{c}{**Data**} \\ \hline  & Batteries & 98\% \\ \cline{2-3}  & Motor & 92\% \\ \cline{2-3} Efficiency & Transmission & 95\% \\ \cline{2-3}  & Controller & 95\% \\ \cline{2-3}  & Cables & 100\% \\ \hline Total & & 81.37\% \\ \hline \hline \end{tabular}
\end{table} 
Table 5: TLM03e efficiency of main components used in this work.