Implementation of an electromagnetic system for controlling resistance and speed in indoor cycling

Advances in knowledge and technology in various fields of human life and, particularly, in sports have resulted in innovative systems for professional sportsmen training. Here, we designed an electromagnetic system for practicing indoor cycling; this system can precisely simulate on the track the ascents and descents that allow the users to feel like they are training outdoors. Furthermore, this system connects to a web application that allows access from any mobile device to predefine the training routines and thus improve the user experience


I. IntroductIon
A bicycle is a vehicle for personal transport, and in several countries is the main means of transportation because it is healthy, ecological, sustainable, and economic.In the sports world, new ingenious and creative technologies devote to conceive safer materials that contribute to sports excellence.Cycling is no exception, since electronic mechanisms have been implemented to improve the athletes' performance, making this sport safer and more efficient.
The current market lacks training mechanisms that consider enough physical and physiological variables to conduct a detailed analysis for improving the capacity of the sport.For instance, some training systems fail to include important physiological variables for people with health issues such as diabetes or hypertension.
Nowadays, the bicycle is becoming an intelligent means of transportation, since automotive companies have focused on projects to automate them.For example, the Audi electric bicycle, e-bike, can connect to a smartphone, which allows unlocking the anti-theft insurance and sharing activities on social networks [1].The Baidu smart bike prototype, DuBike, represents another new technology, which is full of smart sensors that allow recording information on pedaling rhythm, heart rate, and pressure exerted on the pedals, among others; this information is transmitted via Bluetooth to a smartphone, where the daily records of such parameters are stored [2].The Ford bicycle, MoDe:Me, uses sensors to collect data on speed, acceleration, temperature, and altitude; through a smartphone, it converts these data into a source of information in a cloud platform [3].Moreover, some scientific studies report the inclusion of sensors and other technologies to monitor cyclists' physiological variables [4][5][6][7][8]11].
Taking these developments as references, the Software Research Group (Grupo de Investigación en Software -GIS-) of the Universidad Pedagógica y Tecnológica de Colombia (UPTC) aims at developing the macro project "Platform to capture, control, and monitor the physical and physiological variables of indoor and outdoor cycling".This project aims at implementing a system to support the cycling practice, which includes putting sensors on both the bicycle and the athlete's body; these sensors sample the physical and physiological variables that allow interpreting the captured signals.From the data obtained, and depending on the user's abilities, the system assigns a corresponding routine based on a previous professional assessment.Afterwards, the system can determine if the user performed the assigned routines appropriately, and based on the collected data, it changes the routine to either stop the training or activate any alarm if the user is at risk of injury.Within the framework of the macro project, an electromechanical system that includes a series of sensors and mechanisms is installed to control and simulate the speed and resistance perceived in outdoor cycling in a controlled indoor cycling practice.Sensors in the bicycle and the athlete's body capture data that allows interpreting the signals sent to a smartphone and, thus, monitoring the cyclist activity either on road or indoors.This article presents the materials and methods used for implementing the project, followed by the description of the electromagnetic device and the sensors platform, the results, and the conclusions.

II. mEthodology
To develop the macro project, different types of sensors were used: speed, resistance, and effort meters, electrocardiographs, oximetry sensors, accelerometer, impact sensors, as well as a simulation system of electromagnetic resistance that slows down the movement causing a feeling of effort through the generation of electromagnetic currents.
Figure 1 shows the distribution of the components in the macro project for the IOCycling platform.This figure depicts the components for both indoor and outdoor cycling (vertical lanes) and identifies the electronic and electromagnetic equipment that interact via Bluetooth with Android devices and their respective applications.Here, we describe the implementation process of an electromagnetic device that simulates slopes, ascents, and descents, allowing the user to experience the sensation of an actual route.Besides simulating conditions on track, the device can also simulate other routes such as steep terrain causing vibrations in the legs as if it were in an open field (Component No. 9 in Figure 1).The implemented device is composed of a system of integrated sensors that control several variables, both in the static and route modules, to simulate in real time physical wear and body resistance, and subsequently analyze the data medically.

ElEctromagnEtIc dEVIcE
Below, we describe the acquisition and construction of the electronic and electromagnetic devices for establishing communication with the platform, as well as the communication process.
The cycling trainer Kinetic Rock and Roll II [10] uses the effort simulation system, which allows the bicycle to move like a road running; this trainer can be adapted to any bike with only minimum adjustments in the framework.To implement the electromagnetic system, a brake car compressor was adapted, which generates high friction on the trainer's disc due to its shape and strength, simulating the actual resistance when starting a climb (Fig. 2).

FIg. 2. Electromagnetic device.
The system works by voltage variation, that is, a minimum potential difference changes the magnetic properties, causing a resistance reaction in the kinetic system disk.Therefore, the higher the voltage, the greater the resistance, which allows simulating the slope inclination, contrarily, lower or zero (0) voltage frees the disk simulating a flat or downhill terrain.The pulse width modulation (PWM) algorithm controls the voltage variation; the mobile device is responsible for sending the signal to the sensor platform, including parameters such as altitude and slope, which configure the necessary conditions so the kinetic system can simulate the ascents and descents of a cycling route.A driver device designed by the GIS research group captures the pulse; this device has a 24v input source, and at the output source, the voltage variation is obtained based on the pulse sent by the mobile application, which centralizes the information of the sensors (Fig. 3).This process ensures that users who test the kinetic system have the accurate sensations of ascents and descents so the losses in the physical transference are imperceptible in the trainings.

IV. sEnsors platForm
The sensors platform allows acquiring the data associated with the physical variables related to outdoor and indoor cycling, in addition to acquiring the athlete's physiological signals, which are transferred to the main platform of the IoCycling Macro project [13].
Figure 4 illustrates the placement of the sensors (accelerometer, electrocardiograph, impact, and speed) that will connect to a cell phone or any other mobile device via Bluetooth.In this case, the sensors connect to a Raspberry Pi 3 controller card (Fig. 4), as shown in the block diagram (Fig. 5).The Raspberry Pi 3 controller card offers high data transmission and processing speed for further analysis, due to its similarity to computers.

V. rEsults and dIscussIon
To verify the functionality of the electromagnetic device and have quantifiable data, the results were tabulated in real life and graphically visualized; this allowed us to analyze the devices behavior accurately, in particular the electromagnetic, which have available data in the outdoor cycling web platform (Fig. 1, item 3).The data was sent in a string of characters, and then transformed into a numerical value of eight decimal bits, in a range from 0 to 255.The data was sent via Bluetooth to the Raspberry platform, which controls and creates the bidirectional communication by sending similar data from the sensors in the system to the web and mobile application.Figure 6 shows the electromechanical device in kinetic with the respective driver control system (on the left), all the sensors to measure the defined variables (center), and the potential configuration of the ECG transducer using an AD8232 heart rate monitor (on the right).The design of the chosen heart rate monitor allows extracting and amplifying small bio-potential signals in the presence of noisy signals, therefore, it can measure the heart electrical activity, plot it as an ECG, and display an analog output reading.In the performed tests, it was evident that this device helps getting a clear signal of the PR and QT intervals, which facilitates analyzing heart rates between 60 and 100 beats per minute.Furthermore, it analyzes a constant and uniform heart rate, as well as variations of potassium or calcium, among other electrolytes in the blood (Fig. 7).

FIg. 7.
Behavior of the ECG signal in the platform tests.
Both physiological and physical data help athletes to improve their physical condition while cycling.Moreover, this data can be used in rehabilitation to treat people with chronic diseases, through home programs that eliminates the permanent need for a coach or health professional, and thus improve the patients' quality of life.

VI. conclusIon
We developed an electronic system with devices on the bicycle capable of capturing and processing signals such as speed, altitude, torque, as well as physiological variables such as temperature, oxygen, and heart rate, among others.This system is useful for training according to the users' physical state.
Using easy-to-acquire elements such as sensors and controller cards, and connecting to mobile devices and personal computers via Bluetooth offer high speed of data transmission and processing, useful for information analysis and decision-making in different fields, and in this case, for improving the cyclist performance.
The implementation of the electromagnetic system allowed simulating the effort of biking on a real physical route with various degrees of inclination; moreover, it allowed athletes training indoors to experience cycling in such an optimal way that they can maintain or improve their performance, while monitoring physiological signals to encourage an adequate and controlled practice.
Besides helping to improve the athletes' performance, this system can be widely applied in different health areas, such as rehabilitation of injured people and treatment of cardiovascular diseases and diabetes, among others.

FIg. 6 .
FIg. 6. Sensor platform and configuration of the ECG position.