A method and system for detecting respiratory impedance
By combining piecewise Fourier transform and denoising with K-means clustering, the problem of large detection error in respiratory impedance in existing technologies is solved, achieving higher detection accuracy and precision.
Patent Information
- Application Number
- CN202110917498.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-11
- Publication Date
- 2026-01-13
- Estimated Expiration
- 2041-08-11
AI Technical Summary
Existing respiratory impedance detection methods have large errors and low accuracy. Current technologies typically use mean fitting methods, which cannot accurately reflect the respiratory status of the subject.
By generating oscillating airflow, respiratory pressure and flow data are collected, and piecewise Fourier transform and noise reduction are performed. Combined with K-means clustering calculation, accurate values of respiratory resistance and respiratory reactance are obtained.
It improves the accuracy of respiratory impedance detection, reduces detection errors, and provides a more accurate assessment of respiratory status.
Smart Images

Figure CN115702786B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of medical testing technology, specifically to a respiratory impedance detection method and system. Background Technology
[0002] Pulmonary function testing is one of the essential examination methods for respiratory diseases. It is mainly used to detect the patency of the airway and the size of the lungs. It has important clinical value in the early detection of lung and airway lesions, the assessment of the severity and prognosis of the disease, and the assessment of tolerance to surgery or labor intensity.
[0003] Respiratory impedance, including respiratory resistance and respiratory reactance, reflects airway resistance and the resistance generated by the lung tissue, providing a true picture of a subject's respiratory status. Respiratory impedance testing is a routine and important method in pulmonary function testing; by calculating a subject's respiratory impedance, the health status of their lungs can be understood. Current techniques typically employ the occlusion method, esophageal manometry, body contouring, or forced oscillation method to test respiratory impedance. However, the occlusion method uses oral pressure after occlusion to replace alveolar pressure before occlusion, making it only suitable for measuring airway resistance; esophageal manometry can also be used to measure lung resistance, but usually requires other methods to measure airway resistance; body contouring requires first occluding the respiratory pathway and having the subject continue breathing, calculating thoracic volume by measuring changes in oral pressure and pressure within the contouring chamber—this method is complex and has a narrow scope of application; the forced oscillation method uses an external signal source, with an oscillator generating an applied pressure signal, measuring the change in flow rate in the subject's respiratory system under this pressure to obtain respiratory impedance data. Current techniques typically use mean-fitting to calculate respiratory resistance and respiratory reactance, but this method yields respiratory impedance values with significant errors and low accuracy. Summary of the Invention
[0004] Based on this, the present invention provides a respiratory impedance detection method and a respiratory impedance detection system, which generates an oscillation wave by pulse oscillation, and then separates the respiratory wave from the superposition of the oscillation wave and the respiratory wave, thereby improving the accuracy of respiratory impedance detection.
[0005] One object of the present invention is to provide a method for detecting respiratory impedance, comprising the following steps:
[0006] S1. An oscillating airflow is generated at a fixed frequency f, and respiratory pressure and respiratory flow data of the subject are collected under the oscillating airflow to obtain a respiratory pressure sampling map and a respiratory flow sampling map. The sampling duration is 20 to 90 seconds and the sampling frequency is 128 to 1000 Hz.
[0007] S2. In the respiratory pressure sampling map and the respiratory flow sampling map, the data length of the respiratory pressure and respiratory flow is segmented according to the repetition rate, wherein the repetition rate is 30% to 80%;
[0008] S3. Perform Fourier transform on the respiratory pressure and respiratory flow of each segment after segmentation, calculate the respiratory resistance and respiratory reactance of each segment at different frequency values, and obtain the initial respiratory resistance-frequency diagram and the initial respiratory reactance-frequency diagram respectively.
[0009] S4. Denoise multiple respiratory resistances and respiratory reactances at each frequency value to obtain denoised respiratory resistance-frequency diagrams and denoised respiratory reactance-frequency diagrams.
[0010] S5. Perform K-means clustering calculations on the denoised breathing resistance-frequency plot and the denoised breathing reactance-frequency plot respectively to obtain the breathing resistance-frequency curve and the breathing reactance-frequency curve.
[0011] Furthermore, in S1, the fixed frequency f of the oscillating airflow is between 1 and 3 Hz.
[0012] Further, in S2, the data length of both the respiratory pressure data and respiratory flow data sampling is divided into N segments, where N = data length / ((1 - repetition rate) × Fourier window length); wherein the data length is the product of the sampling duration and sampling frequency during the sampling process of the respiratory pressure data and respiratory flow data; and the Fourier window length is 2. n , 10≤n≤13.
[0013] Furthermore, S3 is:
[0014] S31. Set multiple frequency values F1, F2...F1 that completely cover the 5 to 35 Hz frequency band. m The F1=k1f, F2=k2f……F m =k m f, where f is the fixed frequency of the oscillating airflow, k1, k2...k m A series of consecutive odd numbers;
[0015] S32. Perform Fourier transform on the N segments of respiratory pressure data and respiratory flow data, and then calculate the respiratory resistance and respiratory reactance of the multiple frequency values for the N segments respectively to obtain the initial respiratory resistance-frequency diagram and the initial respiratory reactance-frequency diagram.
[0016] Furthermore, k1f ≤ 5Hz < k2f; K m-1 f < 35Hz ≤ k m f.
[0017] Furthermore, the noise reduction method in S4 includes:
[0018] S41. Calculate the datasets of N respiratory resistance and respiratory reactance values at the same frequency. X The mean M and standard deviation S, , Values outside the range [MS, M+S] are identified as abnormal respiratory resistance and abnormal respiratory reactance.
[0019] S42. Determine the segment positions of the abnormal respiratory resistance and abnormal respiratory reactance in the respiratory pressure and respiratory flow sampling diagram, remove the respiratory resistance and respiratory reactance values of all frequencies at that segment position, and obtain the denoised respiratory resistance-frequency diagram and the denoised respiratory reactance-frequency diagram.
[0020] Furthermore, before S41, there is also S40: moving symmetrically from the middle of the 5-35Hz frequency band to both sides, selecting 1 to 4 frequency values in sequence, and determining abnormal respiratory resistance and abnormal respiratory reactance from the respiratory impedance values under these 1 to 4 frequency values.
[0021] Furthermore, in S5, the number of cluster points in the k-means clustering calculation is k = S × 100 / M × G, where G is the error interval of the cluster and G is between 10 and 30.
[0022] A second objective of this invention is to provide a respiratory impedance detection system for detecting the respiratory impedance of a subject, the respiratory impedance including respiratory resistance and respiratory reactance, comprising an oscillator, a pressure sensor, a flow sensor, a processor, and a storage medium. The oscillator is used to generate an oscillating airflow with a fixed frequency f to the subject's airway, where f is 1 to 3 Hz. The pressure sensor is used to detect the respiratory pressure in the subject's airway. The flow sensor is used to detect the respiratory flow in the subject's airway. The processor is connected to the pressure sensor and the flow sensor and receives the respiratory pressure and respiratory flow signals. The storage unit stores multiple instructions, which, when executed by the processor, cause the processor to perform any of the above-described respiratory impedance detection methods.
[0023] Furthermore, the oscillator is a loudspeaker.
[0024] This invention segments the subject's respiratory pressure and respiratory flow, and then performs correlation and noise reduction on the segmented data, thereby improving the accuracy of respiratory impedance detection. Attached Figure Description
[0025] Figure 1 This is a schematic diagram of the respiratory impedance detection system in the first embodiment.
[0026] Figure 2 This is a schematic diagram of segmentation of the respiratory pressure sampling map / respiratory flow sampling map in the first embodiment.
[0027] Figure 3 This is the initial respiratory resistance-frequency diagram under segmented conditions in the first embodiment.
[0028] Figure 4 This is the initial respiratory reactance-frequency diagram under segmented conditions in the first embodiment.
[0029] Figure 5 This is a comparison chart of the breathing resistance-frequency curve with the standard curve and the mean curve in the first embodiment.
[0030] Figure 6 This is a comparison chart of the respiratory reactance-frequency curve with the standard curve and the mean curve in the first embodiment. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. The accompanying drawings show preferred embodiments of the invention. However, the invention can be implemented in many different forms and is not limited to the embodiments described herein. Rather, these embodiments are provided to provide a thorough and complete understanding of the disclosure of this invention.
[0032] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention.
[0033] refer to Figure 1 This invention provides a respiratory impedance detection system for detecting the respiratory impedance of a subject, including respiratory resistance R and respiratory reactance X. The respiratory impedance detection system includes an oscillator, a pressure sensor, a flow sensor, a processor, and a storage medium. The oscillator generates an oscillating airflow with a fixed frequency f to the subject's airway, where the fixed frequency f is 1 to 3 Hz. The pressure sensor detects the respiratory pressure in the subject's airway when subjected to the oscillating airflow. The flow sensor detects the respiratory flow rate in the subject's airway when subjected to the oscillating airflow. The processor is connected to the pressure sensor and the flow sensor and receives the respiratory pressure data and respiratory flow data collected by the pressure sensor and the flow sensor. The storage unit stores multiple instructions, which, when executed by the processor, cause the processor to obtain the respiratory impedance based on the collected respiratory pressure signal and respiratory flow signal.
[0034] In the first embodiment of the present invention, the oscillator is a loudspeaker, and the fixed frequency f of the loudspeaker is set to 2.5Hz.
[0035] The specific method for obtaining respiratory impedance based on the collected respiratory pressure and respiratory flow signals includes the following steps:
[0036] (1) The processor receives respiratory pressure data and respiratory flow data, and obtains a respiratory pressure sampling map and a respiratory flow sampling map; (Refer to...) Figure 2 In the respiratory pressure sampling graph and respiratory flow sampling graph, the data length of the respiratory pressure and respiratory flow samples is segmented according to the repetition rate, and the number of segments is N; N = data length / ((1 - repetition rate) × Fourier window length), where the data length is the product of the sampling duration and sampling frequency during the sampling process of respiratory pressure and respiratory flow, the sampling duration is 20 to 90 seconds, and the sampling frequency is 128 to 1000 Hz; the Fourier window length is 2 n , where 10≤n≤13.
[0037] In this invention, the repetition rate can be set in the range of 30% to 80%.
[0038] In the first embodiment of the present invention, the repetition rate is 50%, the sampling time is 41 seconds, the sampling frequency is 500Hz, and n is 11, thereby determining the number of segments N=20.
[0039] (2) Set multiple frequency values F1, F2...F that completely cover the 5 to 35 Hz frequency band. m The F1=k1f, F2=k2f……F m =k m f, where f is the fixed frequency of the oscillating airflow, k1, k2...k m It is a series of consecutive odd numbers.
[0040] Preferably, k1f ≤ 5Hz < k2f; K m-1 f < 35Hz ≤ k m f.
[0041] In the first embodiment of the present invention, for an oscillating airflow with a fixed frequency f of 2.5 Hz, F1, F2...F m The frequencies were set to 2.5Hz, 7.5Hz, 12.5Hz, 17.5Hz, 22.5Hz, 27.5Hz, 32.5Hz, and 37.5Hz, respectively.
[0042] (3) Perform Fourier transform on each segment of respiratory pressure and respiratory flow, calculate respiratory resistance and respiratory reactance at each frequency value, and obtain the initial respiratory resistance-frequency diagram and the initial respiratory reactance-frequency diagram respectively. Since the respiratory pressure and respiratory flow are segmented, there are N data points at each frequency value in the obtained initial respiratory resistance-frequency diagram and initial respiratory reactance-frequency diagram.
[0043] The specific calculation method is as follows: respiratory pressure is subjected to Fourier transform to obtain the real part Ap and the imaginary part Bp; respiratory flow is subjected to Fourier transform to obtain the real part Av and the imaginary part Bv; the self-spectrum and cross-spectrum of respiratory pressure and respiratory flow at the above frequency values are calculated, where the self-spectrum... mutual spectrum Impedance Z( f )= / Impedance angle θ = tan -1 (AvBp-ApBv) / (AvAp+BvBp); thus, we obtain the respiratory resistance R= Zcos(θ); respiratory reactance X = Zsin(θ).
[0044] In the first embodiment of the present invention, there are 20 points at each frequency value (i.e., the number of segments), and its initial respiratory resistance-frequency diagram is as follows. Figure 3 As shown, the initial respiratory reactance-frequency plot is as follows: Figure 4 As shown.
[0045] (4) In the respiratory resistance-frequency diagram and respiratory reactance-frequency diagram, the respiratory resistance and respiratory reactance values at each frequency value are denoised to obtain the denoised respiratory resistance-frequency diagram and respiratory reactance-frequency diagram.
[0046] Regarding denoising methods, this invention employs correlation-based denoising. Specifically, taking respiratory resistance as an example, it calculates 20 respiratory resistance datasets at the same frequency value. X The mean M and standard deviation S, where, , The respiratory resistance values outside the range [MS, M+S] are identified as abnormal respiratory resistance values. The segment positions of the abnormal respiratory resistance values in the aforementioned respiratory pressure sampling map are determined, and the respiratory resistance values of all frequencies under that segment position are identified as abnormal respiratory resistance values and removed to obtain a denoised respiratory resistance-frequency map.
[0047] Furthermore, in order to simplify the data processing steps while ensuring the accuracy of the data detection results, this embodiment selects 1 to 4 frequency values from the frequency band of 3-35Hz and determines the abnormal respiratory impedance value.
[0048] Specifically, the frequency values are selected by moving symmetrically from the middle of the 3-35Hz frequency band to both sides, and 1-4 frequency values are selected in turn.
[0049] In the first embodiment of the present invention, a total of 3 frequency values are selected. First, starting from the middle position of 16.5Hz in the 3-35Hz frequency band, the frequency values are moved to both sides in sequence. The first frequency value is 17.5Hz. Then, the frequency values 12.5Hz and 22.5Hz are selected in sequence.
[0050] (5) Perform K-means clustering calculations on the noise-reduced breathing resistance-frequency diagram and breathing reactance-frequency diagram respectively to obtain the breathing resistance-frequency curve and breathing reactance-frequency curve respectively; and then obtain the corresponding breathing impedance.
[0051] Furthermore, in the k-means clustering calculation, the number of cluster points k = S × 100 / M × G, where G is the error interval of the cluster, and G is between 10 and 30.
[0052] In this embodiment, G is selected as 20, k is calculated to be 3, and the fitting result is as follows: Figure 5 and Figure 6 The respiratory resistance-frequency curve and respiratory reactance-frequency curve are shown in the figure.
[0053] Table 1 calculates and compares the errors of the standard respiratory resistance-frequency curve, the respiratory resistance-frequency curve obtained using the method of this application, and the mean respiratory resistance-frequency curve fitted by conventional means in the prior art; it also compares the errors of the standard respiratory reactance-frequency curve, the respiratory reactance-frequency curve obtained using the method of this application, and the mean respiratory reactance-frequency curve fitted by conventional means in the prior art. It is evident that the method in this application yields smaller errors in respiratory resistance and respiratory reactance compared to the standard curves, resulting in more accurate detection results.
[0054] Table 1 Figure 5 Figure 6 Comparison of errors of various curves
[0055]
[0056] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method of detecting respiratory impedance, characterized by, The method comprises the following steps: S1, generating an oscillating airflow at a fixed frequency f, collecting the respiratory pressure and respiratory flow data of the subject under the oscillating airflow respectively, obtaining a respiratory pressure sampling graph and a respiratory flow sampling graph, the sampling time is 20-90 seconds, and the sampling frequency is 128-1000 Hz; S2, in the respiratory pressure sampling graph and the respiratory flow sampling graph, the data length of the respiratory pressure and respiratory flow is segmented according to the repetition rate, and the repetition rate is 30%-80%; S3, Fourier transform is performed on each segment of the segmented respiratory pressure and respiratory flow, the respiratory resistance and respiratory reactance of each segment of data at different frequency values are calculated, and an initial respiratory resistance-frequency graph and an initial respiratory reactance-frequency graph are obtained respectively; S4, denoising is performed on the multiple respiratory resistances and respiratory reactances at each frequency value respectively, and a denoised respiratory resistance-frequency graph and a denoised respiratory reactance-frequency graph are obtained; The mean and standard deviation of the respiratory resistance of each frequency are determined, and the mean and standard deviation of the respiratory reactance of each frequency are determined; S5, K-means clustering calculation is performed on the denoised respiratory resistance-frequency graph according to the mean and standard deviation of the respiratory resistance result, and K-means clustering calculation is performed on the denoised respiratory reactance-frequency graph according to the mean and standard deviation of the respiratory reactance, and a respiratory resistance-frequency curve and a respiratory reactance-frequency curve are obtained.
2. The method of claim 1, wherein In S1, the fixed frequency f of the oscillating airflow is between 1 and 3 Hz.
3. The method of claim 1, wherein The data length of the respiratory pressure data and the respiratory flow data sampling in the S2 is divided into N segments, N = data length / ((1-repetition rate) x Fourier window length); wherein the data length is the product of the sampling time length and the sampling frequency in the respiratory pressure data and the respiratory flow data sampling process; the Fourier window length is 2 n , 10 ≤ n ≤ 13.
4. The respiratory impedance measurement method according to claim 3, characterized in that, S32, Fourier transform is performed on N segments of respiratory pressure data and respiratory flow data, and then the respiratory resistance and respiratory reactance at multiple frequency values are calculated by Fourier transform on N segments, and an initial respiratory resistance-frequency graph and an initial respiratory reactance-frequency graph are obtained. S31, setting a plurality of span frequency values F1, F2,... F that completely cover the 5 to 35 Hz frequency band m , said F1=k1f, F2=k2f,... F m =k m f, where f is a fixed frequency of the oscillating air flow, k1, k2,... k m are a continuous plurality of odd numbers; The denoising method in S4 comprises:
5. A method of measuring respiratory impedance according to claim 4, wherein k1f < 5 Hz < k2f; K m-1 f < 35 Hz < k m f.
6. A respiratory impedance measurement method according to claim 4 or 5, characterised in that, S42, the segment position of the abnormal respiratory resistance and the abnormal respiratory reactance in the respiratory pressure and respiratory flow sampling graph is determined, the respiratory resistance and respiratory reactance values at all frequency values at the segment position are removed, and a denoised respiratory resistance-frequency graph and a denoised respiratory reactance-frequency graph are obtained. S41, respectively calculate the mean M and the standard deviation S of the N respiratory resistance and respiratory reactance value data sets at the same frequency value, X , determine values outside the range [M-S, M+S] as abnormal respiratory resistance and abnormal respiratory reactance; Before S41, S40 is further included: 1-4 frequency values are sequentially selected by moving symmetrically to both sides from the middle of the frequency band 5-35 Hz range, and the abnormal respiratory resistance and the abnormal respiratory reactance are determined by the respiratory impedance values at the 1-4 frequency values.
7. A method of measuring respiratory impedance according to claim 6, wherein In S5, the number of cluster points k in k-means clustering calculation is Sx100 / MxG, G is the error interval of the cluster, and G is between 10 and 30.
8. The method of claim 1, wherein, It comprises:
9. A respiratory impedance detection system for detecting respiratory impedance of a subject, the respiratory impedance comprising respiratory resistance and respiratory reactance, characterized by, an oscillator for generating an oscillating airflow with a fixed frequency f to the airway of a subject, wherein the f is 1-3 Hz; a pressure sensor for detecting the respiratory pressure of the airway of the subject; a flow sensor for detecting the respiratory flow of the airway of the subject; a processor connected to the pressure sensor and the flow sensor and receiving the respiratory pressure and respiratory flow signals; a storage unit having a plurality of instructions stored therein, wherein the instructions are executed by the processor to make the processor execute the respiratory impedance detection method according to any one of claims 1-8. The oscillator is a loudspeaker.
10. A respiratory impedance detection system according to claim 9, wherein,
Citation Information
Patent Citations
Method of assessment of airway variability in airway hyperresponsiveness
CN1972631A