of sport training, where all these phases are covered using computational intelligence (CI) algorithms [8,9].  
Although sports watches allow most functionalities necessary for monitoring the implementation of the sport training sessions, and are small and simple for wearing during the implementation, the huge development of the Internet of Things (IoT) devices demands a universal mobile device capable of connecting the huge range of sensors simply and reliably [10, 11, 12, 13]. One such kind of device is most certainly the Raspberry Pi, i.e., a low-cost mobile computer with solid hardware as well as software equipment [14].  
A digital twin is a virtual model to mimic a physical object [15]. It is connected to the same input stream as the corresponding physical object, and it is capable of predicting the decisions based on this input more reliably and accurately that the controlled object [16]. The idea behind using the digital twin in sport is to advise athletes (i.e., physical objects) during the implementation of sport training sessions how to overcome different situations during the implementation, in order to achieve the performance as demanded in the proposed training plan.  
In our study, interval cycling sessions are taken into consideration, where the heart rate is imposed as a measure of intensity. Obviously, the digital twin is put onto the Raspberry Pi mobile device capable of controlling different IoT sensors and a global positioning system (GPS) receiver, and, finally, installed on the cycle. Indeed, the digital twin is not simply a simulation that controls one particular process, but it is a study of a virtual environment capable of running more simulations of multiple processes simultaneously [17]. Here, the virtual environment is perceived by the heart rate (HR) monitor and GPS receiver, while a planned interval cycling session presents the framework of the digital twin model. The interval cycling session can be created either by the real sports trainer manually, or by the AST automatically. Then, it is transmitted to the mobile device in the form of domain-specific language (DSL) that is simple to use and ensures enough expressive power [18] to describe the sport training domain efficiently.  
Two scenarios were tested using the proposed solution, in which amateur and professional cyclists implemented the same training plan. The performances of both athletes were recorded carefully by the digital twin, while the differences were identified and analyzed in detail. The results of the experimental work were promising and showed that the proposed digital twin can be applied successfully in practice.  
The main contributions of the paper are as follows:  
* introducing the concept of the digital twin in sport;
* design and implementation of the digital twin for controlling the implementation of the interval training in cycling;
* proposing the mobile device platform for running the digital twin on Raspberry Pi;
* design and implementation of the DSL EasyTrain for transmitting the training plans to the digital twin;
* testing and evaluating the digital twin on two case studies, i.e., by controlling the implementation of the interval training for professional and amateur cyclist training.