Mobile Simulator Control System for Isolating Breathing Apparatus of Software-Hardware Platform

The current problem in the process of training miners is to ensure the mobility and the ability to perform exercises not only on simulators, but also in real conditions of the mine. Therefore, the software and hardware platform of the training complex should include not only imitators of isolating breathing apparatus for developing proper breathing skills in self-rescuers, but also mobile control systems. This will allow carrying out the learning process in conditions similar to real, will increase usability by eliminating wired data transfer interfaces. In addition, the mobile control system of the simulator monitors the trainee's state indicators in real time in an understandable form for him on a wristband or watch. For the implementation of software and hardware of such system, appropriate structural and functional models were developed, including patterns of interaction between components, data transfer and processing processes. On their basis, a software and hardware implementation of a mobile simulator control system is carried out. The results can be applied in the development of mobile controls in various software and hardware platforms. Keywords—Mobile control systems, training complexes, breathing apparatus simulator, Android.


Introduction
At present, training complexes are actively used for training personnel for professional-use ergatic systems: miners of the mining industry [1], employees of industrial enterprises [2], medical personnel [3], military personnel [4], etc. We note that in a number of areas of human activity, it is not realistic enough to model virtual reality and interaction with it. In order to achieve high-quality learning results in such cases, it is necessary to introduce specialized equipment into the training complex -physical exercise simulators, breathing apparatus [5] [6] [7].
The application of such simulators only in prepared premises for personnel's training does not always allow developing the correct set of competencies, visual and physical sensations. In addition, the use of wired simulators, permanently connected to a computer or a control station, significantly limits the freedom of movement of the student. It should also be noted that the transition of virtual reality equipment to a wireless data interface leads to the need to completely abandon the wired connection for all components of the simulator [8] [9]. Thus, the actual task is the transition to mobile simulators and, consequently, mobile control systems [10]. The solution of this problem will allow training not only in specially prepared premises, but also at test sites, in mines, without restricting the user to wired interfaces.
Within this article, a block diagram of a mobile control system for a simulator of isolated breathing apparatus (IBA), its algorithmic support and software, and its integration into a software and hardware platform of a training complex are considered. Thus, for the first time, a mobile control system based on a wristband or smart watch was developed for this kind of simulators, which opens up new possibilities for wireless and portable control of equipment of training complexes.

Analysis of Design Features for Mobile Platforms
At the first stage of the implementation of the mobile control system of IBA simulator, an analysis of existing approaches to its software and hardware implementation was accomplished. The first prototype of the system was implemented on the basis of a controller for the realization ESP32 mobile control devices with built-in Wi-Fi and Bluetooth 4.2 modules, as well as a Nextion touchscreen [11] [12]. This design made it possible to solve the main problems of IBA simulator control; however, it had a number of significant drawbacks: large dimensions and weight, the need to manufacture a complex-shaped body, short operating time and its instability. Therefore, in the course of research, it was decided to switch to a ready-made software and hardware solution based on a popular operating system to reduce the total cost of development and the possibility of using it on a wide range of devices [13] [14].
The use of consumer fitness trackers of physical activity was considered as a possible solution [15]. However, proprietary operating systems installed on such devices greatly complicate the process of developing and integrating such platforms into training complexes.
The following operating system options were considered: Android, Wear OS, iOS, Tizen. For each option, there are a sufficient number of wristwatch versions with the necessary autonomy, computing power, compact size [16] [17] [18] [19].
The conducted analysis of the features of development for these mobile platforms showed that for iOS operating system there are a number of limitations during developing and installing applications, accessing sensors of the device, and the need to interact with iOS-based smartphone [20]. Also, the total cost of the hardware platform compared to the other options remains quite high.
Devices based on Tizen have open access to sensors [21] [22], are quite common, have a lower cost, however, the development for this operating system does not allow you to quickly transfer the resulted solution to other platforms. The restriction is also orientation to the round format of the interface. However, the use of Tizen is generally justified for this kind of control systems and may be considered in the future.
Wear OS platform (formerly Android Wear) also provides the necessary software package of libraries for working with sensors and transmitting data via wireless inter-faces [23]. The resulted software solution can be quickly ported to a full version of Android. The cost of solutions based on this platform is also relatively low.
The research also considered the option of a smart watch based on Android [24] [25]. Compared with the previous version, these devices have slightly worse autonomy; however, they work on a full-fledged operating system without any restrictions. The applications developed for this platform are automatically operable on any Android devices. Testing and installing applications do not require any additional funds, except the environment development. The cost of solutions based on this operating system is also one of the lowest.
Therefore, in the course of the analysis, it was decided to use the devices on the full-fledged Android operating system as a software and hardware platform for the mobile control system of IBA simulator. In the future we plan to port software to Wear OS and Tizen, which will significantly expand the range of possible devices.

Structural Diagram of Mobile Control System for IBA Simulator
Having determined the platform on the basis of which the mobile control system of IBA simulator will function, we proceed to the development of a general structural scheme. The main hardware component of IBA simulation system is a self-rescuer simulator, the structure and interaction of which components are presented in Figure  1.
The simulator is similar in appearance to the self-rescuer, all actuators are located in the shell of the cartridge. The control unit, installed inside the simulator, receives control signals from the mobile system and transmits data about the current temperature of the heating unit, the level of regulation of the resistance to breathing [11]. Thus, despite the isolation and independence of the self-rescuer simulator, an external control system is required for its full-fledged work.
The main components of the mobile control system for IBA simulator are considered: 1. Mobile platform: Hardware and software system in the form of a wristband or watch based on Android operating system with the ability to store data and play text, graphic or audio information. 2. Software control system: It includes all the necessary business logic of IBA simulator control system, used to get data from sensors to an output device (display). 3. Pulse sensor: Integrated into the mobile platform heart rate sensor with the ability to obtain data from it using the program code libraries. 4. Wi-Fi module: The component of the mobile platform used to obtain information from the control unit of the self-rescue simulator about the current breathing resistance, temperature of GBM, and other parameters. It is also used to transmit control signals to IBA simulator. 5. Power supply: Built-in battery of the mobile platform, ensuring its functioning for the required period of time. Thus, the obtained structure of the mobile control system of IBA simulator will allow organizing the collection, processing, storage and display of data from IBA simulator, as well as ensure its integration into training complexes of various types.

Algorithm of Functioning of Mobile Control System of IBA Simulator
It is necessary to implement the corresponding algorithms formalized in the form of a functional diagram in IDEF0 notation (Figure 2) for the correct functioning of the software of the mobile control system of IBA simulator. We carry out the decomposition of the main stages of functioning of a mobile control system of IBA simulator.
At the first stage (A1), the instructor turns on the simulator in accordance with the technical conditions of its operation. Conditions include the ambient temperature and humidity, the absence of a powerful electromagnetic field, the charge level of the power sources of IBA simulator and the control system. If, after switching on, the simulation system provides information about its readiness for further work, the instructor can proceed to the next stage.
After successful switching on, the diagnostics of the mobile IBA imitation system begins to verify the correctness of its operation (stage A2). Diagnostics includes checking both the hardware and software of the mobile control system of IBA simulator. In case of successful completion of the built-in diagnostic routine, the simulator should contact all external components: the simulator control system, the software of the training complex. After the connection is established, the system performs a test run and sets the initial value of the flap opening and the temperature. These values should be sent to all devices connected to the simulator -to the wristband and personal computer of the instructor. In case the errors are detected during the diagnostics, the system is restarted. If the failure is not fixed in this way, diagnostics is carried out with the involvement of a group of software and hardware developers. If no errors are detected during the diagnostics, the instructor proceeds to the next step.
At the third stage (A3), the instructor downloads a training protocol into the mobile control system of IBA simulator, which includes all the necessary information to manage the training process and the simulator. After successful loading of the protocol, parallel execution of stages A4-A6 begins.
Stage A4 includes the implementation of the learning protocol itself. This process means the timely, predetermined control of the position of the valve and the temperature of the heater, at which the trainee will experience the breathing resistance required at the moment of the training scenario, as well as inhale GBM of a given temperature.
Stage A5 is responsible for tracking the learning process itself. The system records in the database all the errors made by the student, the frequency of their occurrence, so that later on during the training it was possible to correct the exercise in order to test the students' weaknesses [26].
Stage A6 is related to tracing student performance. These include the physical characteristics of a person -spirogram, pneumotachogram and pulsogram. These indicators are also displayed graphically on the simulator and on the wristband. The definition of physical indicators is carried out in separate software modules based on the specified mathematical relationships. The output data of stages A4-A6 are logged during stage A7. According to the obtained data, some parameters of the student are calculated, for example, the time of the protective action of the self-rescuer simulator. The data, collected from various sources, are standardized, processed, and then saved as files.
In addition to the files, the learning result is also stored in the database at stage A8. In the future this will allow us to provide more convenient processing and searching for information, to import the collected data into other information systems.
Stage A9 summarizes the learning process. The collected data is analyzed, the effectiveness of training, its impact on the person's performance are evaluated. If the training did not have a sufficient effect or a large error was detected during the course of the training, an additional briefing is conducted with the trainee, and the training scenario is adjusted to develop the required skills (the adjustments are applied at step A4). If after the training, the student repeatedly shows a discrepancy to the standards of training, a conclusion is made about the professional unsuitability of the employee.
The algorithmic support presented within the framework of the developed functional model will make it possible to correctly organize the control of IBA simulator on the basis of a mobile platform, to collect and analyze data on the physical state of the student.

Practical Implementation of Mobile Control System for IBA Simulator
The stated structural and functional models of the mobile control system of IBA simulator were used for its software implementation based on a wristwatch on Android operating system. The software fully implements the algorithms presented in the functional model.
Launched on smart watches, the software of the mobile control system of IBA simulator is presented in Figure 3. The developed software is designed to control the basic parameters of a selfrescuer simulator: heater temperature and the flap opening value to create the required breathing resistance, as well as collecting basic information about the simulator operation. Using a ready-made software and hardware platform in the form of a smart watch allows you to measure the user's current pulse on the built-in sensor.
Data is received from the simulator control unit through the UDP protocol. Data comes in the form of a set of bytes. The following program code is used to convert them into a user-friendly form: The variables pressure and inner_temp determine the amount of the flap opening and the internal temperature in the simulator. The formulas for their calculation are obtained by empirical method and confirmed by repeated tests and comparisons with the values obtained on the installation of artificial lungs.
The developed software installed on wristwatches was successfully integrated into the training complex for training miners in the mining industry and allows them to be trained not only in specialized premises, but also directly in mines, at testing sites without restriction on the user's movement.

Conclusion
Modern training complexes are developing in the direction of increasing their compactness, mobility, and the transition from wired to wireless data transmission interfaces. In some subject areas, for example, in the mining industry, in addition to the realization of interaction with virtual reality, the integration of physical stress and respiratory imitation systems is required.
This article discusses the problem of wireless interaction organization with IBA simulator using a mobile control system. The application of the proposed system will solve a number of urgent problems: to implement training not only in unprepared premises, but also in landfills or mines, increase the student's mobility, organize wireless data collection and processing about the process of interaction with the simulator without computers, monitor the learner's performance in real time on wristband or watch.
In order to solve the set problems, an analysis of the specifics of design for mobile devices was carried out, which allowed determining priority platforms for implementation of a mobile control system. At this stage of research, Android was selected as the main platform for development of a mobile system, and in the future the list of operating systems is planned to be expanded.
Structural and functional models used for the software implementation of a mobile control system for IBA simulator are developed. The presented models were used in the formation of the structure and business logic of software, the organization of interaction between modules and the integration of a mobile system into the learning process. A software code is presented for collecting and processing data, obtained from a self-rescuer simulator. The stated scientific and practical results can be used to solve equipment control problems in training complexes from mobile devices.