# A Framework for Communicating and Building a Digital Twin Model of the Electric Car
## 2 Digital Twin Components and Communication  
The research schedule is divided into parts. Firstly, the research station is presented. In the research station, some components are dedicated to VIL simulation, and others are digital twin components. Secondly, the connection mode between the elements is presented  
Figure 1: The block diagram for the system. and communication is tested. Finally, the simulation program is implemented to compare the results obtained for the virtual car on the research station with the racing car on the racing track. In the research case, an inertial dynamometer is used to build the digital twin of the electric car. The research stand consists of the following:  
* PC and router;
* SEW Eurodrive MDX61B drive inverter with a DFE11B extension card;
* Three-phase SEW DRE80M4 AC motor with ES7S incremental encoder;
* DC motor;
* Shaft with the mass wheel and the built-in torque sensor;
* Car wheel;
* Drive system (belts). The research station replicates the electric car as closely as possible. The clutch connecting the engine to the wheel is the same as in the electric car. When the DC motor is running, the car's wheel shaft rotates, like a shaft. That situation describes the car driving on a flat track in a straight line. In order to change the load, the AC motor is used, which is also coupled to the shaft, but from the other side. Changing the torque on the shaft using the AC motor makes it possible to generate conditions similar to those on a real track i.e., turns, weather conditions, or hills. The motor torque is controlled by the drive inverter. All speeds on the research stand are known thanks to the encoder mounted on the AC motor and calculations of the ratio between the parts. The built-in torque sensor is an NCTE2200-75 [50]. The torque sensor range is 75 NM, with an accuracy of less than 1%. This does not apply to the research stand when the rated torque of the DC motor is 1.15 Nm [51]. This is the limitation of the case study. In the research stand, the elements, such as the DC motor, battery, car wheel, and drive systems, constitute the vehicle system, the same as that installed in the racing car. This is the actual installation (hardware). The other group, consisting of the PC, router, inverter, and AC motor, is used to reflect real conditions. The ViL simulation, i.e., a physical system in the virtual state, can be performed on the research stand. Building a virtual environment starts with parametrizing the drive inverter. They can be changed in the program MOVITOOLS MotionStudio provided by SEW. The modified parameters [52] are presented in Table 4.  
Parameters P100 and P101 have the fieldbus value. The drive inverter expects the control word and setpoints to come from this communication interface. Other options for setpoint source are SBus (system bus) and RS485. The drive inverter can also be controlled with binary inputs. For the application's purposes, the fieldbus was chosen, which is a powerful and universal interface. The fieldbus is a group of protocols used in industry. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Name** & **Value** \\ \hline P100 & Setpoint source & Fieldbus \\ P101 & Control signal source & Fieldbus \\ \hline P700 & Operating mode 1 & CFC and torque control \\ \hline P870 & Setpoint description PO1 & Control word 1 \\ \hline P871 & Setpoint description PO2 & Current \\ \hline P872 & Setpoint description PO3 & No function \\ \hline P873 & Actual value description PI1 & Status word 1 \\ \hline P874 & Actual value description PI2 & Speed \\ \hline P875 & Actual value description PI3 & Output current \\ \hline P876 & PO data enable & ON \\ \hline \hline \end{tabular}
\end{table} 
Table 4: The list of modified parameters. Commonly used fieldbus variants include the AS-I Interface, Profibus, Profinet, EtherCAT, Modbus, ControlNet, etc. They work in an industrial network and have an advantage over the serial communication commonly used so far.