CN116186462A - Respiratory frequency detection method based on air flow sensor and application thereof - Google Patents
Respiratory frequency detection method based on air flow sensor and application thereof Download PDFInfo
- Publication number
- CN116186462A CN116186462A CN202310202077.6A CN202310202077A CN116186462A CN 116186462 A CN116186462 A CN 116186462A CN 202310202077 A CN202310202077 A CN 202310202077A CN 116186462 A CN116186462 A CN 116186462A
- Authority
- CN
- China
- Prior art keywords
- point
- respiratory
- scanning
- time
- array
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- A—HUMAN NECESSITIES
- A61—MEDICAL OR VETERINARY SCIENCE; HYGIENE
- A61B—DIAGNOSIS; SURGERY; IDENTIFICATION
- A61B5/00—Measuring for diagnostic purposes; Identification of persons
- A61B5/08—Detecting, measuring or recording devices for evaluating the respiratory organs
- A61B5/0816—Measuring devices for examining respiratory frequency
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A90/00—Technologies having an indirect contribution to adaptation to climate change
- Y02A90/10—Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation
Landscapes
- Health & Medical Sciences (AREA)
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Life Sciences & Earth Sciences (AREA)
- Pulmonology (AREA)
- Theoretical Computer Science (AREA)
- Mathematical Physics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- General Health & Medical Sciences (AREA)
- Pathology (AREA)
- Molecular Biology (AREA)
- Surgery (AREA)
- Animal Behavior & Ethology (AREA)
- Heart & Thoracic Surgery (AREA)
- Public Health (AREA)
- Veterinary Medicine (AREA)
- Algebra (AREA)
- Computational Mathematics (AREA)
- Biomedical Technology (AREA)
- Medical Informatics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Biophysics (AREA)
- Pure & Applied Mathematics (AREA)
- Databases & Information Systems (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Physiology (AREA)
- Measurement Of The Respiration, Hearing Ability, Form, And Blood Characteristics Of Living Organisms (AREA)
Abstract
The invention discloses a respiratory rate detection method based on an air flow sensor and application thereof, and belongs to the technical field of sensing detection. The implementation method of the invention comprises the following steps: (1) performing fixed integration on the curve of the respiratory wave; (2) starting from a starting scanning point, scanning sampling points in sequence, and finding a point closest to the starting point as a scanning end point, wherein the point is preferentially satisfied at or close to a zero point of respiratory waves; (3) according to the amplitude condition of noise near the t axis in the coordinate axis, adding filtering conditions: using the upper threshold and the lower threshold so that signals falling within the threshold range are treated as 0; (4) after dividing the breathing cycle, the average breathing frequency of a certain period of time can be calculated based on the number of the breathing cycles in the certain period of time. The invention realizes the detection of respiratory frequency based on the air flow sensor, and can further realize the period division and frequency extraction of respiratory wave. The invention has the advantages of high detection accuracy and low time complexity.
Description
Technical Field
The invention belongs to the technical field of sensing, and particularly relates to a respiratory rate detection method based on an air flow sensor and application thereof.
Background
The respiration monitoring instrument is an important device for monitoring the respiration health state of the human body. According to statistics of national health department, nearly 3 hundred million people in China infect respiratory diseases each year, and a few people delay treatment of illness state and even lose life because chronic respiratory diseases or sudden respiratory diseases which are serious for a long time are not monitored in time.
Along with the acceleration of the aging trend of the society in China, the health service demands are continuously increased, the demands for health monitoring are also increased, and in the ' healthy China 2030 ' planning outline ', the medical and health are promoted to the national strategy level, wherein the development of intelligent medical treatment based on innovative technology is emphasized, and the breakthrough of key technologies such as precise medical treatment, intelligent medical treatment and the like is proposed. The respiration monitoring sensor and the matched signal processing and digital information processing thereof accurately accord with the development trend of intelligent medical treatment and accurate medical treatment, have wide market requirements and important strategic values, and simultaneously can promote the development of medical informatization and intellectualization.
At present, the sensors capable of detecting the respiratory state of a human body are various, so that the physiological characteristic monitoring of the human body respiration is effectively and accurately realized, and the sensor has important significance in the clinical physiological index monitoring of related respiratory diseases and the daily monitoring of respiratory health state. Among these physiological characteristics are instantaneous flow, frequency, tidal volume, minute-average ventilation, etc. of the breath, where respiratory frequency is one physiological parameter of importance, and tidal volume is a physiological parameter describing the ventilation of a complete respiratory cycle, all of which are related to the period, frequency of the breath. For detection of respiratory rate and respiratory frequency, many studies at home and abroad have been proposed for many years, and even very mature methods and techniques are not lacking. Based on the different types of sensors and their operating mechanisms, there are different signal processing methods to detect respiratory rate. For example, there are methods of detecting respiratory rate by a sensor capable of detecting physical movement of the human rib cage; there are also methods for detecting the respiratory rate by detecting the temperature and humidity changes of the respiratory airflow through a temperature or humidity sensor; there are also methods of estimating respiratory rate by means of sensors that detect heart rate or pulse. The methods are based on different sensing mechanisms, have various characteristics, and have various advantages and disadvantages for different application scenes. However, in the field of respiratory monitoring of the air flow sensor, the method for detecting the respiratory rate is not very abundant, and one method commonly used is to divide different breaths by detecting the amplitude of the signal so as to achieve the purpose of detecting the respiratory rate. This approach also has some drawbacks, such as weak resistance to noise and random flow jitter, and accuracy of detection is affected by flow jitter and noise. Therefore, the method is often used together with a filter to achieve the purpose of noise reduction, but at the same time, the time complexity of executing the method is increased. Therefore, the invention explores a new frequency detection method which is suitable for processing the digitized sensor signals, and realizes dividing each respiratory cycle with higher accuracy and efficiency so as to detect the respiratory frequency.
Disclosure of Invention
The invention mainly aims to provide a respiratory rate detection method based on an airflow sensor and application thereof, wherein the respiratory rate detection is realized based on the airflow sensor, and the period division and the frequency extraction of respiratory waves can be further realized. The invention has the advantages of high detection accuracy and low time complexity.
The invention is realized by the following technical scheme:
the invention discloses a respiratory rate detection method based on an air flow sensor, which comprises the following steps of:
(1) performing fixed integration on the curve of the respiratory wave, setting a threshold delta, and if the fixed integration value of a period of time sequence signal over a period of time satisfies the formula (1):
dividing the segment of the signal into a breathing cycle; wherein delta in the above formula is a threshold value, S (t) is a respiratory wave, and is a function of time t, x is a starting point of scanning, and L is an upper limit length of scanning;
(2) scanning sampling points sequentially from a starting scanning point, wherein a point closest to the starting point is to be found as an end point of scanning, and the point is preferentially satisfied at or close to a zero point of respiratory waves;
(3) according to the amplitude condition of noise near the t axis in the coordinate axis, adding filtering conditions: treating signal values falling within a threshold range as 0 by using an upper limit threshold value and a lower limit threshold value; wherein thr h >0,thr l <0;
(4) After dividing the breathing cycle, based on the number of the breathing cycles in a certain period of time, the average breathing frequency in the period of time can be calculated, and the formula is as follows:
wherein R is the respiratory rate, T is a certain period of time, and n is the number of respiratory cycles monitored in the period of time.
Preferably, the timing signal is a discrete digital signal sampled by the ADC, and thus the discrete form of formula (1) is as follows:
where i represents a certain sampling point, S (i) is a discrete function with respect to the sampling point i, and fs is the sampling frequency.
The invention also discloses a respiratory frequency detection method based on the air flow sensor, which specifically comprises the following steps:
s1, reading in a section of discrete time series data to be detected, sampling frequency and upper threshold limit thr for eliminating noise influence h Upper threshold thr l A threshold delta used for limiting an integral upper limit value, and creating and initializing a null array T with the same length as the time sequence to be detected, wherein the T is used as an array to be detected for backup;
s2, preprocessing time sequence data: under the condition that the time sequence data to be detected is not empty, traversing the time sequence data to be detected, if the data value S at a certain sampling point(i)>thr h Assigning the value to the corresponding position of the T array; if S (i)<thr l Assigning the value to the corresponding position of the T array; otherwise, assigning 0 to the corresponding position of the T array;
s3, creating and initializing an array I for storing the segmentation points for segmenting the respiratory cycle; setting the upper limit of the time length of each scanning to be 30s; creating and initializing an array A for storing discrete constant integration values and an array D for describing the variation of the integration values;
s4, if the total length of the data is smaller than 2, ending and returning to 0;
s5, traversing the array T to be detected, and taking the next data point of the first data as initial scanning data;
s6, starting one-time scanning: the upper limit of each time length is 30s, if the time length of the time sequence data to be detected is less than 30s, the maximum time length of the time sequence data is the upper limit of the window length of each scanning;
s7, calculating the discrete fixed integral value of the signal value from the initial sampling point to the current sampling point of the scanning every time when one sampling point is traversed, storing the discrete fixed integral value into an array D, and entering the next step after the step 7 is cycled to the upper limit of the duration of the scanning;
s8, reading and traversing the array A which stores the discrete constant value of the scanning in pairs, calculating the difference value of the array A and the array D which describes the change of the integral value, namely, di=Ai+1-Ai;
s9, recording the first sampling point i of the scanning 0 The signal value of (i) is S (i 0 ) The method comprises the steps of carrying out a first treatment on the surface of the If S (i) 0 ) If not less than 0, traversing the group D, and detecting D [ i+1]]≥D[i]Taking the sampling point which causes the situation as a temporary cut-off point; if S (i) 0 )<0, traversing the array D to detect Di+1]≤D[i]Taking the sampling point which causes the situation as a temporary cut-off point;
s10, acquiring a temporary cut-off point of the previous step, calculating a fixed integral value of a signal from a starting sampling point to the temporary cut-off point of the current scanning, if the fixed integral value is not more than a set threshold delta, judging that the temporary cut-off point is effective and is used as a time division point for dividing the respiratory cycle, storing the time division point into an array I for storing the division point for dividing the respiratory cycle, and taking the next point of the sampling point as a starting point of the next scanning;
s11, obtaining a scanning starting point of the previous step, starting a new scanning, and repeating the steps 6-11;
s12, circularly scanning, and repeating the steps 6-12 until the data to be detected are scanned;
s13, returning an array I for storing the division points for dividing the respiratory cycle, wherein each value in the array I is the time point for dividing the respiratory cycle, the time period of each respiratory cycle is obtained through the division points, and meanwhile, the number of the division points is the respiratory cycle number of the respiratory wave of the section; dividing the total duration of the time sequence data by the number of the respiratory cycles to obtain the average respiratory frequency, namely realizing respiratory frequency detection based on the air flow sensor.
The beneficial effects are that:
1. in the scheme provided by the invention, the upper limit threshold value and the lower limit threshold value are utilized, so that the signal value falling in the threshold value range is treated as 0, and signals of noise and random air flow jitter are eliminated and shielded, and are prevented from being treated as normal signals to influence period division. Therefore, the scheme has stronger resistance to noise and random air flow jitter, and the detection accuracy is less influenced by the air flow jitter and the noise.
2. Because the breathing frequency detection method provided by the invention is based on direct processing of the digitized sensor signals, the breathing frequency detection method can be conveniently realized in a digital circuit or software programming mode, and a complex circuit is not needed, so that the breathing frequency detection method can be rapidly put into practical application.
3. According to the scheme provided by the invention, the period is divided by using a calculation integral mode instead of a conventional zero point searching mode, so that the positive signal value part and the negative signal value part of the divided period are more symmetrical, the period is divided more reliably, and each breathing period can be divided with higher accuracy and efficiency. Meanwhile, the scheme is verified by statistics to have higher detection accuracy and lower time complexity.
4. The scheme disclosed by the invention can be suitable for the period division and frequency calculation of most periodic signals because of the excellent performance of the scheme when the periodic signals are processed and the periodic signals are divided.
Drawings
The invention is further illustrated by the following examples in conjunction with the accompanying drawings:
FIG. 1 is a graph of an example of a curve of respiratory waves referred to in the present invention;
FIG. 2 is a signal diagram of the flow jitter and noise portion of the mentioned respiratory wave of the present invention;
FIG. 3 is a flow chart of the method of the present invention;
FIG. 4 is a graph of the results of a partial respiratory cycle division of a method implementation of the present invention and based on a sample test;
FIG. 5 is a schematic diagram of a respiratory monitoring system according to an embodiment of the present invention;
FIG. 6 is a diagram of an example of a user terminal of a human respiratory monitoring system to which the method of the present invention is applied;
fig. 7 is an error distribution diagram of a method of detecting respiratory rate in an embodiment of the method of the present invention.
In which the signals of the air flow jitter and noise part of the respiratory wave mentioned in fig. 2 are the parts outlined by the dotted line, it can be seen that the amplitudes of the air flow jitter and noise clutter are significantly smaller and the frequencies are higher or lower than other normal signals.
The samples mentioned in fig. 4 are actual human respiratory data actually collected by the respiratory monitoring system implemented by the present invention, and the 4 graphs shown in the figures are the results of performing respiratory cycle division on part of the data in the samples by software programming (programming language, python language) according to the method, and the vertical dashed lines are the respiratory cycle division points t=t i The dashed lines intersecting the t-axis, made at (i=0, 1,2, …), are evident as dividing the individual respiratory cycles. The three straight lines in the transverse direction respectively represent the upper threshold thr from top to bottom h =0.15, t-axis (time axis) and lower threshold thr l =-0.15。
Detailed Description
For a better description of the objects and advantages of the present invention, the following description will be given with reference to the accompanying drawings and examples.
As shown in fig. 1, taking a respiratory wave as an example, in a time-series signal exhibiting a periodic variation, it can be found that a low-frequency wave with a significant amplitude is periodic, and each period of the signal corresponds to one breath in this example. However, it is also found that when breathing is accelerated or slowed down, the frequency of the oscillations of the breathing wave is accelerated or slowed down, with the length of each breathing cycle being different. In practical applications and implementations, the length of the timing signal to be detected is generally relatively long, and may include a number of breathing cycles with relatively large differences in length. If the time series signal of the breathing wave is processed only by fourier transformation or the like, it is not suitable for dividing the breathing cycle and obtaining the breathing frequency in the detection range, and the application scenario is also too suitable, so other implementation modes are considered.
The method has higher detection accuracy and lower time complexity through statistical verification. The method not only can overcome the defects of the prior art, but also has certain technical mobility, not only can process the period division and frequency extraction of the respiratory wave, but also can move to other technical fields needing to extract the period and frequency of the periodic wave signal. Note that since the total amount of gas inhaled and exhaled during each breathing cycle is approximately equal during the oscillation of the breathing wave, the curve of the breathing wave is integrated in a definite amount during one breathing cycle, and the result of the integration is a relatively small number even if not necessarily 0, and a threshold value δ may be set for this purpose, if the definite value of the timing signal over a period of time satisfies the formula (1):
the segment signal may be divided into a breathing cycle. Wherein δ in the above formula is a threshold value, which is one of the highest upper limits describing that the above integrated value satisfies the condition. Delta can be set to a value according to specific signal conditions in practical applications. S (t) is a respiratory wave, which is a function of time t; x is the starting point of the scan, and L is the upper length of the scan. In fact, the method is implemented in a programmed manner, so the timing signal used is not a continuous analog signal, but a discrete digital signal sampled by the ADC, and therefore the discrete form of equation (1) is as follows:
where i represents a certain sampling point, S (i) is a discrete function with respect to the sampling point i, and fs is the sampling frequency. The above two expressions are one of sufficient conditions under which the method can divide different periods of the respiratory wave, and are hereinafter referred to as sufficient condition (1). However, this one sufficient condition is not sufficient, and since the integrated values of a plurality of periods may also satisfy the above equation, other sufficient conditions are required to ensure the correctness of the period division.
Since in this application scenario of the respiratory wave, the signal value of the start point of each respiratory cycle must be close to 0 (otherwise, it is not preferable to calculate a complete respiratory cycle), the construction idea of this feature to construct another sufficient condition, namely, the sufficient condition (2), is to scan the sampling points sequentially from the start scanning point, to find the point closest to the start point satisfying the sufficient condition (1) as the end point of the scanning, and this point is preferentially satisfied at or close to the zero point of the respiratory wave. And in a specific implementation of the method for this condition, the innovation is that, instead of directly seeking to satisfy a point i where the absolute value of S (i) is equal to 0 or less than a value close to 0, it is determined whether there is an increasing or decreasing variation in the integrated value at the point and its front and rear two points.
The above two sufficient conditions basically ensure that the period of each fluctuation is divided. However, in practical applications, taking respiratory wave as an example, a signal with a relatively high frequency and a very low amplitude is found in each place of the signal curve, and these are actually caused by using a relatively sensitive airflow sensor, and the airflow "shakes" when people breathe, and are noise and clutter generated by the airflow. The normal signal has little influence of noise, but if the noise occurs near zero signal value, the noise corresponds to the breathing stopping part in the breathing process, as shown in fig. 3, if the method is constructed by using the two sufficient conditions, the part of the signal which belongs to the noise is divided into separate breathing periods, which obviously does not conform to the practical situation. To solve this contradiction, firstly, a conventional method is to filter out high-frequency noise by using a filter, such as a fourier filter or a Butterworth low-pass filter, which firstly increases the time complexity of the method operation, and secondly, it is not necessarily ensured that the filtering noise is completely removed: because some of the clutter in the respiratory wave only exhibits a low-amplitude characteristic, the frequency of the clutter is not far higher than the respiratory frequency of the human body, and a part of the low-frequency noise may be close to or even lower than the upper limit of the respiratory frequency of the human body, it is obvious that the part of the noise and the clutter cannot be completely filtered out by the filter, and the presence of the noise and the clutter greatly affects the accuracy of respiratory cycle division and respiratory frequency extraction. This is to consider other methods, such as setting filtering conditions to eliminate the effect of noise, starting from the amplitude characteristics of the noise.
According to the amplitude condition of noise near the t axis in the coordinate axis, adding filtering conditions: by means of an upper threshold (thr) h ) And a lower threshold (thr) l ) So that signals falling within the threshold range are treated as 0. Wherein thr h >0,thr l <The value of 0, the upper and lower limits has no specific fixed value, because the amplitude of the noise band may vary in different scenarios, but is statistically determined according to specific analysis or sampling experiments, and the value of the value is required to satisfy that the signal of the noise band basically falls within the upper and lower limits, namely: satisfy thr l <S noise (t)<thr h This condition. With the above conditions, the construction method has good effect and lower time complexity of the theoretical method through implementation verification.
After dividing the breathing period, based on the number of the breathing periods in a certain period of time, the breathing average frequency in the period of time can be calculated, and the formula is as follows:
wherein R is the respiratory rate, T is a certain period of time, n is the number of respiratory cycles monitored in the period of time, and the unit is "respiratory times per minute" (BPM) or "hertz" (Hz). The invention is directed to a high performance airflow sensor for use in a human respiratory monitoring system. In order to realize the monitoring of the respiration of the human body, physiological information of the respiration of the human body needs to be extracted from respiration signals, namely the respiration waves, including instantaneous airflow, frequency, tidal volume, average ventilation of the respiration, and the like, wherein the respiration frequency is an important physiological parameter, and the tidal volume is a physiological parameter describing the ventilation of a complete respiration cycle and is related to the period and the frequency of the respiration, so that the invention solves the problem of obtaining each complete respiration cycle and obtaining the respiration frequency based on the complete respiration cycle.
To implement the method of the present invention, an electronic system for respiratory monitoring based on a high performance airflow sensor needs to be built, the system structure of which is shown in fig. 5. The system uses the high-performance, low-power consumption and tiny-volume airflow sensing chip as a core device to build a functional circuit. The circuit functions comprise signal reading, amplification, conversion from an analog signal to a digital signal and Bluetooth signal transmitting and receiving. The air flow sensor chip generates an electronic signal under the influence of air flow, converts the analog signal into a digital signal through a functional circuit, sends the data to an intelligent terminal (referred to as a computer or an intelligent mobile phone) through a Bluetooth module, and performs data processing and respiratory cycle division and respiratory frequency calculation through software of the terminal, namely, an implementation carrier of the method is software.
The above setting of the respective threshold values, the specific reference value may be set statistically by sampling experiments. For example, the present invention is implemented by collecting respiratory wave data with a total duration of 810s or moreThe total is used for sampling statistics, and the upper and lower limits of the threshold value for eliminating noise influence are determined by taking the statistical average value and the maximum and minimum value of the amplitude of the noise part. The experimental set of the invention is thr after multiple times of experiments h =0.15,thr l -0.15, the unit of data is the unit of signal, i.e. volts (V). Then, regarding δ in the above sufficient condition (1), it is not set to a constant in the present embodiment, but is determined by the product of a scale factor and the integral value of the absolute value of each respiratory cycle (i.e., the curved surface area surrounded by the curve and the time axis), the scale factor is set to 5% in the present embodiment of multiple experiments, so that the division of respiratory cycle of respiratory waves with different intensities by the threshold is more flexible, but it is also possible to set to a constant in practical application through experiments, because the parameter value is set according to practical data in different application scenarios. The present invention is directed to providing the concepts and methods described above.
In combination with setting the threshold in implementation, the implementation method comprises the following implementation steps:
1. reading in a time sequence data array S (i) to be detected, wherein i=0, 1,2, …, L, i is a certain sampling time point, and L is the maximum length of the array; sampling frequency fs and thr h =0.15、thr l -0.15 threshold δ=5%; a backup array T is created and initialized.
2. Data preprocessing: when-0.15.ltoreq.S (i.ltoreq.0.15, T (i) =0; otherwise T (i) =s (i).
3. Creating and initializing an array I for storing segmentation points for segmenting respiratory cycles; setting the upper limit of the time length of each scanning to be 30s; an array a for storing discrete constant-value values and an array D for describing variation of the value are created and initialized.
4. If the total length of data L <2, then end and return to 0.
5. Traversing the array T to be detected, and taking the next point i=1 with the starting point i=0 as the starting point of scanning.
6. Starting one scanning: and if the time duration of the time sequence data to be detected is less than 30s, taking the maximum time duration of the time sequence data as the window length upper limit of each scanning.
7. Calculating the discrete constant integral value of the signal value from the initial sampling point to the current sampling point of the scanning every time when traversing one sampling point, storing the discrete constant integral value into an array D, and entering the next step after cycling the step to the upper limit of the duration of the scanning;
8. the array A storing discrete constant values of the scan is sequentially read and traversed one by one, and the difference value of the arrays A is calculated and assigned to the array D describing the change of the integrated values, namely, D [ i ] =A [ i+1] -A [ i ].
9. The first sampling point i of the scan is recorded 0 The signal value of (i) is S (i 0 ) The method comprises the steps of carrying out a first treatment on the surface of the If S (i) 0 ) If not less than 0, traversing the group D, and detecting D [ i+1]]≥D[i]Taking the sampling point which causes the situation as a temporary cut-off point; if S (i) 0 )<0, traversing the array D to detect Di+1]≤D[i]Taking the sampling point which causes the situation as a temporary cut-off point;
10. obtaining the cut-off point i=k of the previous step, and respectively calculating the discrete constant integral value J of all positive value points in the signal values from the initial sampling point of the current scanning to the temporary cut-off point + And discrete definite integral value J of negative value point - . Since δ=5%, if: i J + |-|J-||<5%||J + And judging that the temporary cutoff point is effective and is used as a dividing point for dividing the respiratory cycle, wherein k of the temporary cutoff point is stored in an array I, and the next point i=k+1 of the sampling point is used as a starting point of the next scanning.
11. Obtaining the scanning starting point of the last step, starting a new scanning, and repeating the steps 6-11.
12. And (3) circularly scanning, namely repeating the steps 6-12 until the data to be detected are scanned.
13. And returning an array I for storing the dividing points for dividing the breathing cycle, wherein each value in the array I is the time point for dividing the breathing cycle, checking the length of the array to obtain the number C of the breathing cycle, and dividing the number C by the total duration to obtain the total breathing frequency RR.
In addition, as shown in fig. 6, the method is applied to the detection effect exhibited by the user side (mobile phone app) of the system. With respect to the performance and effect of the detection, the present invention was tested for practical use. The test flow is as follows: 1. the tester interfaces with the respiratory monitoring system with the upper respiratory mask. 2. The tester starts breathing and counts the number of breaths by himself as the actual number of breaths. 3. When the test is finished, the respiration times detected by the user side (app) by using the method of the invention are checked and recorded.
The test was performed 21 times, each for a period of 10 seconds to several minutes, and the number of breaths (number of cycles) was also different, as shown in table 1.
Table 1 method practical application test
For each test, the respiration rate RR is detected in a method Actual practice is that of Subtracting the actual respiratory rate RR Detection of The difference Δrr is obtained, i.e. Δrr=rr Actual practice is that of –RR Detection of Then use RR Actual practice is that of The error distribution diagram of the detection respiratory rate can be made by taking the horizontal axis and the delta RR as the vertical axis, and is shown in fig. 7.
Based on the statistics of the table 1, the maximum absolute error, namely the maximum absolute value in the delta RR, is-0.013 Hz, and the conversion unit is-0.78 BPM; the average absolute error is calculated by calculating the arithmetic mean value of 0.00118Hz and 0.0708BPM for all the DeltaRR. The embodiment shows that the method has high execution efficiency.
The foregoing description of the preferred embodiment of the present invention is not intended to limit the invention to the particular form disclosed, but on the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the invention. Other structures and principles are the same as in the prior art and will not be described in detail here.
Claims (3)
1. A respiratory rate detection method based on an air flow sensor is characterized in that: comprises the steps of,
(1) performing fixed integration on the curve of the respiratory wave, setting a threshold delta, and if the fixed integration value of a period of time sequence signal over a period of time satisfies the formula (1):
dividing the segment of the signal into a breathing cycle; wherein delta in the above formula is a threshold value, S (t) is a respiratory wave, and is a function of time t, x is a starting point of scanning, and L is an upper limit length of scanning;
(2) scanning sampling points sequentially from a starting scanning point, wherein a point closest to the starting point is to be found as an end point of scanning, and the point is preferentially satisfied at or close to a zero point of respiratory waves;
(3) according to the amplitude condition of noise near the t axis in the coordinate axis, adding filtering conditions: using the upper threshold and the lower threshold so that signals falling within the threshold range are treated as 0; wherein thr h >0,thr l <0;
(4) After dividing the breathing cycle, based on the number of the breathing cycles in a certain period of time, the average breathing frequency in the period of time can be calculated, and the formula is as follows:
wherein R is the respiratory rate, T is a certain period of time, and n is the number of respiratory cycles monitored in the period of time.
2. The method of claim 1, wherein: the timing signal is a discrete digital signal sampled by the ADC, and therefore, the discrete form of equation (1) is as follows:
where i represents a certain sampling point, S (i) is a discrete function with respect to the sampling point i, and fs is the sampling frequency.
3. Use of a respiratory rate detection method based on an air flow sensor, employing an algorithm according to any one of claims 1 or 2, characterized in that: in particular comprising the following steps of the method,
s1, reading in a section of discrete time series data to be detected, sampling frequency and upper threshold limit thr for eliminating noise influence h Upper threshold thr l A threshold delta used for limiting an integral upper limit value, and creating and initializing a null array T with the same length as the time sequence to be detected, wherein the T is used as an array to be detected for backup;
s2, preprocessing time sequence data: traversing the time sequence data to be detected under the condition that the time sequence data to be detected is not empty, if the data value S (i) at a certain sampling point>thr h Assigning the value to the corresponding position of the T array; if S (i)<thr l Assigning the value to the corresponding position of the T array; otherwise, assigning 0 to the corresponding position of the T array;
s3, creating and initializing an array I for storing the segmentation points for segmenting the respiratory cycle; setting the upper limit of the time length of each scanning to be 30s; creating and initializing an array A for storing discrete constant integration values and an array D for describing the variation of the integration values;
s4, if the total length of the data is smaller than 2, ending and returning to 0;
s5, traversing the array T to be detected, and taking the next data point of the first data as initial scanning data;
s6, starting one-time scanning: the upper limit of each time length is 30s, if the time length of the time sequence data to be detected is less than 30s, the maximum time length of the time sequence data is the upper limit of the window length of each scanning;
s7, calculating the discrete fixed integral value of the signal value from the initial sampling point to the current sampling point of the scanning every time when one sampling point is traversed, storing the discrete fixed integral value into an array D, and entering the next step after the step 7 is cycled to the upper limit of the duration of the scanning;
s8, reading and traversing the array A which stores the discrete constant value of the scanning in pairs, calculating the difference value of the array A and the array D which describes the change of the integral value, namely, di=Ai+1-Ai;
s9, recording the first sampling point i of the scanning 0 The signal value of (i) is S (i 0 ) The method comprises the steps of carrying out a first treatment on the surface of the If S (i) 0 ) If not less than 0, traversing the group D, and detecting D [ i+1]]≥D[i]Taking the sampling point which causes the situation as a temporary cut-off point; if S (i) 0 )<0, traversing the array D to detect Di+1]≤D[i]Taking the sampling point which causes the situation as a temporary cut-off point;
s10, acquiring a temporary cut-off point of the previous step, calculating a fixed integral value of a signal from a starting sampling point to the temporary cut-off point of the current scanning, if the fixed integral value is not more than a set threshold delta, judging that the temporary cut-off point is effective and is used as a time division point for dividing the respiratory cycle, storing the time division point into an array I for storing the division point for dividing the respiratory cycle, and taking the next point of the sampling point as a starting point of the next scanning;
s11, obtaining a scanning starting point of the previous step, starting a new scanning, and repeating the steps 6-11;
s12, circularly scanning, and repeating the steps 6-12 until the data to be detected are scanned;
s13, returning an array I for storing the division points for dividing the respiratory cycle, wherein each value in the array I is the time point for dividing the respiratory cycle, the time period of each respiratory cycle is obtained through the division points, and meanwhile, the number of the division points is the respiratory cycle number of the respiratory wave of the section; dividing the total duration of the time sequence data by the number of the respiratory cycles to obtain the average respiratory frequency, namely realizing respiratory frequency detection based on the air flow sensor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310202077.6A CN116186462A (en) | 2023-03-06 | 2023-03-06 | Respiratory frequency detection method based on air flow sensor and application thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310202077.6A CN116186462A (en) | 2023-03-06 | 2023-03-06 | Respiratory frequency detection method based on air flow sensor and application thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116186462A true CN116186462A (en) | 2023-05-30 |
Family
ID=86450457
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310202077.6A Pending CN116186462A (en) | 2023-03-06 | 2023-03-06 | Respiratory frequency detection method based on air flow sensor and application thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116186462A (en) |
-
2023
- 2023-03-06 CN CN202310202077.6A patent/CN116186462A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN101815465B (en) | Electrocardiogram derived apnoea/hypopnea index | |
CN109480783B (en) | Apnea detection method and device and computing equipment | |
US20060178591A1 (en) | Methods and systems for real time breath rate determination with limited processor resources | |
WO2014113599A1 (en) | Detection of sleep apnea using respiratory signals | |
CN109770892A (en) | A kind of sleep stage method based on electrocardiosignal | |
CN101133954B (en) | Respiration frequency detecting method and apparatus | |
CN104144636B (en) | The method that treatment represents the signal of circadian rhythm | |
CN108289636A (en) | Method and apparatus for the respiratory rate for determining object | |
CN109328034A (en) | For determining the determination system and method for the sleep stage of object | |
CN112155560B (en) | Apnea detection method and system based on real-time cardiac shock signal | |
CN112263242A (en) | Respiration detection and mode classification method based on FMCW radar | |
CN110840443B (en) | Electrocardiosignal processing method, electrocardiosignal processing device and electronic equipment | |
CN106308801A (en) | Method for detecting human breathing rate by utilizing smart phone | |
CN110115583A (en) | The method and apparatus of monitoring of respiration | |
CN106108844B (en) | A kind of method and apparatus of determining sleep stage | |
CN106108845B (en) | A kind of method and apparatus of determining sleep stage | |
CN113080891B (en) | Method for extracting respiration rate and heart rate based on human body micro-motion signal | |
Korten et al. | Respiratory waveform pattern recognition using digital techniques | |
CN108283490A (en) | Sleep-respiratory system and method | |
CN106175698B (en) | Sleep cycle detection device in sleep state analysis | |
CN116186462A (en) | Respiratory frequency detection method based on air flow sensor and application thereof | |
CN112971766B (en) | Sleep respiratory event detection method | |
CN107280650B (en) | Method and device for acquiring characteristic parameters of living body | |
CN114847926A (en) | Lung function respiration detection method based on self-adaptive threshold | |
CN106175755B (en) | Sleep state detector for sleep state analysis |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |