POSSIBILITIES OF DIAGNOSING BREATHING DISORDERS DURING SLEEP IN HOME CONDITIONS

Disorders of breathing during sleep not only adversely affect the condition of the body during the daytime, but, above all, can be dangerous to health and life. Clinical methods of diagnosing these disorders are highly developed and, as a result, allow to effectively eliminate the problem, but still the problem is early diagnosis at home, which will be the basis for reporting to the doctor for extended examinations. This paper presents a proposed algorithm for inferring sleep-disordered breathing supported by conclusions from work on investigating the associations of discriminants with selected fragments of acoustic signals. The effectiveness of the developed algorithm was verified on a test sample of acoustic signals from selected patients treated by the MML clinic. The results of the study are the basis for the development of a numerical application for preclinical diagnosis of sleep apnea and sleep-disordered breathing. The verification of the algorithm carried out on real examples confirms the correctness of the assumptions made, demonstrates its effectiveness and suitability for use in a mobile application.


OVERVIEW OF THE PROBLEM
According to a survey conducted by TNS Poland (research agency that conducts public opinion polls) on behalf of MML Medical Center, one in three Poles does not know that snoring can be treated, and one in five considers it an ailment that cannot be fully cured. These findings are all the more alarming in light of the estimated number of snorers. As many as 13 million Poles suffer from snoring (CBOS -Centre for Public Opinion Research, 2016). About 1.5 million people, mostly men, suffer from sleep apnea. It is comforting to know that the awareness of Poles in this matter is increasing every year. In 2010, only 27% of respondents said that snoring bothers them in everyday life, in 2016 it was already 43% of respondents (TNS Poland). However, it is still relatively low and snoring is mainly seen as an "aesthetic" problem. And in many cases, this is indeed the case, as snoring itself is not a disease but only a nuisance. It only becomes dangerous when it is pathological and accompanied by so called Obstructive Sleep Apnea, characterized by lack of airflow through the upper airways. OSA (Obstructive Sleep Apnea) negatively affects all body systems [1][2][3]. It is particularly dangerous for DIAGNOSTYKA, Vol. 22, No. 4 (2021) Górnicka D, Kuryjański R, Michalik M.: Possibilities of diagnosing breathing disorders during sleep in … 116 the cardiovascular system (high risk of developing hypertension, ischemic disease, atrial fibrillation) [4]. Rapid changes in the heart cycle increase the risk of stroke. This is due to the fact that people with sleep apnea do not reach the deep sleep phase. However, the lack of deep sleep phase is not only a negative impact on the organs causing potential serious diseases. Lack of rest during sleep and insufficient oxygenation of the body significantly worsens the quality of life. It causes increased daytime sleepiness, excessive irritability, difficulty concentrating or remembering. Thus, it may strongly affect safety in daily and professional life.
If snoring is such a big potential problem, why is there still insufficient awareness, despite its undoubted increase? And the problem is still underestimated by a sizable group of the population? This state of affairs may be influenced by the difficulty in diagnosing pathological snoring. And we are not talking about the problems of diagnosis in laboratory conditions, but about the difficulties at the stage of preliminary diagnosis helping to decide whether it is time to see a specialist. Of course, there are many methods and apps to "diagnose" snoring [5][6][7]. However, most of them only provide immediate help and do not point to a specific direction of seeking a solution. Their effect is limited to indicating that a breathing problem exists, and possibly to briefly interrupting sleep, thus snoring. Few of the available applications indicate a specific problem and potential directions for treating the disorder. The inference algorithm proposed in this paper is ultimately intended not only to inform the user of the fact that the snoring phenomenon occurs, but above all to make a preliminary diagnosis with possibly accurate indication of the source.

RESEARCH EXPERIMENT
The vibroacoustic signal is a good carrier of information not only for technical but also for biological objects [8][9][10][11]. It is hypothesized that information about individual breathing disorders can be extracted from sound pressure [11][12][13][14]. The development of a diagnostic tool requires the acquisition of representative samples of snoring associated with patients airway conditions. For this purpose, an experiment was planned and conducted to build a database of signals representative of different stages of the disease. A group of over one hundred subjects was included in the study. Acoustic signals were recorded in the operating room with a measurement microphone suspended directly above the sleeping patient (during pharmacological sleep) - Figure 1 [15]. Patients were previously subjected to a comprehensive diagnosis (three-dimensional computed tomography, acoustic rheometry, polysomno-graphic examination, fiberoendoscopic examina-tion), as a result of which they were diagnosed and, if necessary, referred for surgical treatment.
The signals were recorded with Bruel & Kjaer measuring and analysis equipment consisting of a 3050-B-6/0 Lan XI analyser and Pulse Recorder software. The free field microphones Bruel & Kjaer 4189-A-021 with a nominal sensitivity of 50 mV/Pa were used for the measurements.
All measurement channels were calibrated with acoustic standard Bruel & Kjaer 4231 complying with class 1 standards of IEC60942 (2003) and class LS and ANSI S 1.40-1984.

Fig. 1. Test stand with measuring apparatus
For the purpose of preliminary inference, the recorded signals were analysed using B&K Pulse Labshop & Reflex software. The recording of signals in the operating room environment requires the elimination of disturbances associated with the operation of medical devices monitoring patients. Such disturbances, despite relatively low sensitivity of the method to noise, could significantly hamper the correctness of inference. Therefore, before starting a proper analysis, undesired components from the point of view of inference of signal structure changes should be removed. The procedure for eliminating unwanted information from noise is presented in the following section. Detailed comparison of sound pressure changes and timefrequency spectra allowed to select fragments of time courses representing sound pressure changes caused by the occurrence of disease disturbances. The spectral image of the exemplary registration is shown in Figure 2 [16]. Defining features characteristic for specific acoustic effects allows us to separate fragments irrelevant for the diagnosis of respiratory disorders and thus analyse signal elements representative for the pathological disorder. Additionally, it was necessary to meet the basic assumption of the future application, possible to use on universal mobile devicesminimization of the mathematical apparatus burdening the device's memory, thus impeding the operation of the implemented algorithm.

MAIN ASSUMPTIONS OF THE INFERENCE ALGORITHM
All the premises mentioned in the previous chapters became the basis for developing an application for preclinical diagnosis of breathing disorders during sleep. A preliminary schematic of the application is shown in Figure 3. The proposed inference algorithm is divided into four main steps: 1) Work in "standby" mode including preparation of the signal for further processing by filtering out background noise and tracking the measure which is ultimately the basis for the beginning of registration; 2) Registration of data after the condition ensuring unambiguous "localization" of snoring; 3) Data analysis assuming simultaneous consideration of time domain and frequency domain information; 4) Inference of the nature of the breathing disorder on the basis of a database of measures, ending with the presentation of a probable diagnosis and indication of the direction of clinical treatment.

Preparing the signal for further analysis
The basis for the diagnostic inference was the acoustic signals of the respiratory distress sufferers recorded just before the operation to eliminate the respiratory distress problems. A definite advantage of the information so collected was the fact that it is the result of a fully performed laboratory diagnosis. However, as mentioned in the introduction, this fact can complicate correct and unambiguous conclusions. Thus, it was necessary to carefully separate the informationally useful signal coming from respiratory distress from the noise coming from the medical apparatus operating during surgery.
For example, Figure 4 shows the waveform of the recorded acoustic signal together with information from medical devices and Figure 5 shows the signal after filtering, thus a clean signal from respiratory disturbances only. Filtering the signals generated by the medical apparatus may on the face of it seem pointless, especially since ultimately the inference will be based on signals recorded at home, so interference from the medical apparatus will not be present. Comparison of recordings and spectral structures of recordings obtained in clinical and home conditions did not show any essential differences of interferences appearing in the operating room and those in home conditions. The development of a filtering procedure to determine the band in which the information from respiratory disturbances is contained allows to separate the information from other sources and thus minimize the impact of external disturbances on the accuracy of diagnostic inference.

Analysis of signal features to activate registration of diagnosis-relevant fragments
As mentioned in the previous part of the article, it was assumed that the application is to work in continuous mode, with the registration being triggered only when a condition is met that allows us to consider that we are dealing with information characteristic for snoring with high probability. For this purpose, the features of the recorded acoustic signals were analysed to activate the registration of fragments relevant to the diagnosis.
The filtered and normalized acoustic signal recorded during pharmacological sleep was divided into one-second time segments and for each segment simple diagnostic measures were calculated in the form of slack, peak, shape, impulsivity and kurtosis, skewness, mean and rms coefficients. The measure values for an example sound pressure waveform (Fig. 5) are shown in Figure 6.
The greatest sensitivity to the analysed conditions is shown by the rms value counted in short time intervals. However, the problem of appropriate selection of the time interval in which the measure will be counted is opened. Figure 7 shows the waveforms of the rms counted for four different time intervals: 2 seconds, 1 second, ½ second, and ¼ second.
It seems that the use of 1-second intervals would be sufficient to unambiguously select the "maxima" associated with respiratory disturbances, but such a measure does not provide detailed information about the nature of the disturbance. Therefore, after a detailed analysis, it was assumed that in further considerations a decision measure in the form of the rms value calculated in time intervals of ¼ second would be used.

Registration activation mode
Given the relatively long sleep time, continuous recording of the acoustic signal under home conditions (on a universal mobile device) would be at least difficult, if possible at all. It was necessary to precisely select useful information while limiting the use of the device's memory to a necessary minimum. The beginnings and ends of successive recordings comprising the entire recording had to be appropriately determined, with only information about sleep-disordered breathing. The proposed system "watches" the acoustic signal in the stand-by mode until it registers overrun of the decision measure level (rms value calculated for short time segments). After exceeding it, system starts recording with simultaneous observation of further changes. If no consecutive exceedances are detected, the system will stop recording and return to the standby mode. If the system observes consecutive exceedances of the decision measure, the registration continues for 60 seconds, after which the system returns to the tracking mode and readiness for subsequent data registrations (Fig. 8).
Application of the presented procedure of elimination of data redundant from the point of view of diagnostic inference allowed to significantly reduce the necessary memory of the device and data processing for further analysis.

RMS value
Start recording and observe further changes of the rms value Fig. 8. Procedure for selecting diagnostically useful information

Spectral analysis of the recorded signal
From the recorded sound pressure signals of the diagnosed patients of the laryngological clinic, 60second time segments containing information about the emerging respiratory disorders were selected. After applying a bandpass filtering procedure and normalizing the signals, they were further processed. Information about the patients condition was sought in the frequency response. Due to the fact that in the process of inference we are interested not only in the change of frequency structure itself, but also in the course of these changes in time, we performed time-frequency analysis of selected sections of registration. An example time-frequency spectrum is shown in Figure 9.
Time-frequency spectra of acoustic signals from patients with different medical diagnoses show distinct and time-dependent differences in frequency structure. Similarities in structures were also observed for patients diagnosed with similar breathing problems. On this basis, it can be argued that it is possible to build a baseline of measures to not only determine if a person requires medical intervention, but also to preliminarily delineate a medical condition.

Proposed diagnostic measure
The assumption of reduction to the necessary minimum was also maintained at the stage of creating a database of measures defining potential breathing disorders during sleep. The use of the proposed algorithm in mobile applications without transferring data to external computing servers requires minimizing the mathematical apparatus that loads the memory of the mobile device. For diagnostic purposes, 60-second acoustic signals are recorded (after three consecutive rms exceedances are detected by the algorithm). The acoustic signals recorded in this way are the basis for further spectral analysis. Detailed analysis of the frequency structure of the test signals (recorded during the operation) showed that the most informative frequency band is the band up to 2 kH. An additional advantage of narrowing the frequency band to a sufficient minimum is to reduce the amount of data processed by the application, thus relieving the memory of the device. The frequency band thus defined was divided into four bands of 500 Hz each. In each of these bands a measure was counted in the form of rms value for successive instantaneous spectra. By confronting the information from the recorded signals with the obtained medical findings, four simple measures were proposed to differentiate the disease states: − M1 measure (0÷500 Hz band)the dominant exceedance of the measure value in the band indicating probable pathological changes in the nasal area, − M2 measure (band 500÷1000 Hz)dominant exceedance of the measure in the band indicating probable pathological changes in the pharynx, − M3 measure (band 1000÷1500 Hz)dominant exceedance of the measure in the band indicating probable pathological problems with breathing ("prolonged" breathing), − M4 measure (band 1500÷2000 Hz)dominant exceedance of the measure in the band indicating momentary shortness of breath (sleep apnea). Figure 10 shows the waveforms of measures of the previously information-selected registration, counted according to the proposed scheme. The dominance of three diagnostic measures was observed in the analysed run: M1 measure, M3 measure, and M4 measure (Figure 11). Such a result indicates that the patient has nasal lesions, respiratory problems, and sleep apnea.
The patient analysed was diagnosed with nasal septal curvature, inferior nasal auricle hypertrophy, hypertrophy of the soft palate, uvula and palatine tonsils, and sleep apnea as a result of several clinical examinations.

SUMMARY
Using relatively simple methods of signal analysis and using the methods normally used in machine diagnostics, it seems possible to create an application for preclinical diagnosis of breathing disorders during sleep. The application not only indicates the presence of a problem, but also allows to identify a potential medical problem. And thus, indicating the direction of further treatment.
The results achieved during the realization of the current work allow to proceed to the development of an application for preclinical evaluation of breathing disorders during sleep based on acoustic signals. Implementation of the application on mobile devices will allow patients to obtain a preliminary diagnosis of potential health risks and guidance on the advisability of further clinical diagnostics. The final stage of the project will include the development of the application, its testing and installation on a server. The experience gained so far gives reasons to believe that the developed methodology can be further developed as part of further work, pointing to the directions of development of tools supporting laryngologist in the process of diagnosing breathing disorders during sleep, and even the selection of an adequate, possibly most effective, method of therapy.