## 3 Multi-Physics Electric Vehicle Modelling and Validation
### Vehicle Model Development
#### 3.2.2 Description of Operating Logics  
Having introduced the fundamental concepts necessary to understand the operation of types employed in the vehicle simulation model, the main controls and management logics that regulate their operation are now presented. The vehicle is set up to operate in \"full-electric\" mode, namely without using an internal combustion engine. Therefore, the central element through which the electric energy flow (therefore power) necessary to move the vehicle is regulated is the \"e-motor\", or electric motor. This regulation is performed as a function of the load required by the vehicle, which depends on the driving conditions that are imparted by the \"Cockpit\" type (the functional type category), namely the one designed to reproduce accelerator and brake pedal behaviour. The Driver block plays a central role in managing the interaction between the driving profile and the vehicle response. It acts as a closed-loop controller, continuously comparing the current vehicle speed with the reference speed provided by the Drive Profile block. Based on this comparison, the Driver adjusts the accelerator and brake pedal positions to reduce the error between the actual and desired speed. This dynamic adjustment translates into appropriate signals toward the Cockpit type: a positive load signal for acceleration or a braking request when deceleration is needed. The model is designed to emulate a realistic driver behaviour, by modulating the reaction intensity and time constants, and ensuring a smooth transition between the acceleration and braking phases. The Driver block implements a PI controller to determine the required pedal input based on the difference between the desired and actual speed and acceleration. The driver's behavior is emulated using the following equation:  
\[\dot{a}=\left(I\;dv+P\;da\right)\;(1-D) \tag{3}\]  
Figure 3: Overall system and logical architecture of the e-vehicle model. where \(dv\) is the difference between the actual velocity and the target velocity, \(da\) is the difference between the actual acceleration and the target one, and \(D\) is the logical flag (1 if the vehicle is in acceleration condition and 0 if is braking). The two elements \(I\) and \(P\) are the two tuning parameters for the type employed to simulate the driver. This logic allows the simulation to reproduce realistic driving dynamics based on externally imposed speed profiles. **Traction:** If conditions derived from the driving profile involve accelerator pedal activation, this establishes a load request signal \"load signal\" (Is--with positive sign) (in the functional types category), which acts on the control function that regulates the \"e-motor\" type behaviour, activating its motor mode (Equation (2b) according to the equation reported in the following flowchart (Figure 3):  
\[T\cdot\omega+P_{loss}=V\cdot I \tag{4}\]  
where Ploss represents the internal loss, V is the voltage of the battery, and I is the resulting current. This current is drawn from the battery if it does not exceed the battery's discharge current limit Ibut,limit. The control logic continuously compares the estimated current Iestimated with the battery constrains Iestimated \(\leq\) Ibut,limit. This means that, as a function of the required load, the motor develops a torque (\(T\)), which translates into a current (\(I\)) to be requested from the battery type. The control system is set up to evaluate whether the current requested from the battery respects the discharge limits dictated by its operating conditions. **Regenerative braking:** If conditions derived from the driving profile involve brake pedal activation, the operating logic first provides for evaluating the braking torque equivalent to that required by the driver, calculated as a function of brake pedal pressure.