###### Abstract  
Since the COVID-19 pandemic, the demand for respiratory rehabilitation has significantly increased. This makes developing home (remote) rehabilitation methods using modern technology essential. New techniques and tools, including wireless sensors and motion capture systems, have been developed to implement remote respiratory rehabilitation. Significant attention during respiratory rehabilitation is paid to the type of human breathing. Remote rehabilitation requires the development of automated methods of breath analysis. Most currently developed methods for analyzing breathing do not work with different types of breathing. These methods are either designed for one type (for example, diaphragmatic) or simply analyze the lungs' condition. Developing methods of determining the types of human breathing is necessary for conducting remote respiratory rehabilitation efficiently. We propose a method of determining the type of breathing using wireless sensors with the motion capture system. To develop that method, spectral analysis and machine learning methods were used to detect the prevailing spectrum, the marker coordinates, and the prevailing frequency for different types of breathing. An algorithm for determining the type of human breathing is described. It is based on approximating the shape of graphs of distances between markers using sinusoidal waves. Based on the features of the resulting waves, we trained machine learning models to determine the types of breathing. After the first stage of training, we found that the maximum accuracy of machine learning models was below 0.63, which was too low to be reliably used in respiratory rehabilitation. Based on the analysis of the obtained accuracy, the training and running time of the models, and the error function, we choose the strategy of achieving higher accuracy by increasing the training and running time of the model and using a two-stage method, composed of two machine learning models, trained separately. The first model determines whether the breath is of the mixed type; if it does not predict the mixed type of breathing, the second model determines whether breathing is thoracic or abdominal. The highest accuracy achieved by the composite model was 0.81, which surpasses single models and is high enough for use in respiratory rehabilitation. Therefore, using three wireless sensors placed on the patient's body and a two-stage algorithm using machine learning models, it was possible to determine the type of human breathing with high enough precision to conduct remote respiratory rehabilitation. The developed algorithm can be used in building rehabilitation applications. spectral analysis; machine learning; type of breathing +
Footnote †: journal: _articles in medicine tion after COVID-19 is respiratory rehabilitation. It helps to develop the intercostal muscles and diaphragm to increase respiratory potential. This increase in respiratory potential occurs when the patient has a mixed type of breathing, which can be obtained by repeating a set of special exercises during the rehabilitation process. If the patient has the wrong type of breathing, they can be given instructions to correct it, so determining the exact type of breathing is a relevant problem in modern rehabilitology. According to the interviewed rehabilitologists, as part of the training, it is necessary to correctly determine at least 3/4 respiratory cycles. The rehabilitation process is very labor-intensive, but it can be automatized using gaming practices, for example, by introducing score points, which makes it more accessible and attractive. This will help to lower the workload of doctors and rehabilitologists [1; 2]. The importance of breathing and its impact on the state of the human body is widely recognized by modern doctors and scientists [3; 4], so the target user group for respiratory rehabilitation is not limited to post-COVID-19 patients.