# A Framework for Communicating and Building a Digital Twin Model of the Electric Car
## 4 Discussion  
The solution integrates physical components with the virtual environment via the Modbus protocol. Data exchange at the research station is bidirectional. The integration provides a new service reflecting the kinematics from the historic race. As a result, car performance can be simulated indoors. The research stand offers great opportunities to create a digital twin of an electric car. With the research stand, the VIL simulator, the operation of batteries and DC motors can be subjected to simulated real conditions. The results obtained during the simulation even exceed the normal performance of the electric car. Research simulations were performed for one racetrack, but simulation of others is also possible. The program provides all options for this case. As expected, the simulation results differ from historical racing data. There are several reasons for this discrepancy, as follows:  
* Random events and incidents occurring during real races are not taken into account. * Varying the load on the AC motor does not provide a constant output value. * The overall condition of the battery and DC motor may affect the final results. * No additional load is added on the first lap. * Because the setpoints cause subsequent laps to take too long, the motor speed increases and there is no time to reduce it. To obtain more appropriate time laps, the track should be divided into more segments, even if the speed does not change much during the time lap. Analysis of the information collected in Table 1 clearly classified the implemented solution as a digital model. There is no automated form of data exchange between the racing car and digital object. The SWOT analysis, taking into account the strengths, weaknesses, opportunities, and threats of the presented hybrid solution, is presented in Table 9. \begin{table}
\begin{tabular}{c c} \hline \hline \multicolumn{2}{c}{**Description**} \\ \hline \multirow{2}{*}{Strengths} & Data-driven model uses real-world data \\  & Research station consists of the same parts as the racing car \\  & Various scenarios can be simulated \\ \hline \multirow{2}{*}{Weakness} & Depends on data quality \\  & Lack of physical understanding of the data \\  & Manual method for implementing input data \\ \hline \multirow{2}{*}{Opportunities} & The entire system can be expanded \\  & Indoor testing reduces time and costs \\ \hline \multirow{2}{*}{Threats} & Complexity of data integration \\  & Requires appropriate validation \\ \hline \hline \end{tabular}
\end{table} 
Table 9: The SWOT analysis of the system. Figure 6: (a) DC motor’s rotational speed during lap 5 from simulation and race data; (b) dependence of the control quantity and the DC motor rotational speed during the fifth lap. To overcome weaknesses and threats, the digital twin concept involves building models of the car on various tracks, e.g., a track known from the _Top Gear_ program, Dunsfold. Building the DT involves the following activities:  
* Analysis of telemetry data in order to select tested journeys. * Creating a CAD model of the car (Figure 7a). Based on the physical parameters, the car is mapped in terms of structure, arrangement of elements in the vehicle, determination of the masses of individual components, determination of technical parameters of the drive, adjustment of chassis parameters, and determination of aerodynamic resistance based on analyses of air flow through the car body (Figure 7b) [64,65]. The body model is omitted and replaced by the impact of aerodynamic drag forces [66]. The model is tuned by modifying the parameters of the car engine (Figure 7c) and adjusting them in such a way that the engine current and the car speed match the data of the telemetry application (Figure 7d). Figure 7: (**a**) CAD model of the racing car; (**b**) the reproduced car in terms of structure; (**c**) the motor parameters; (**d**) data from the telemetry module on the modeled trip. * Building a CAD model of the track on which the car run.