Method and system for calculating respiratory rate from PPG signal, oximeter and readable storage medium
Through the method of filtering, peak recognition, abnormal trimming, and curve structure of PPG signals, the complicated and inaccurate calculation of PPG signals in the existing technology has been solved, and more efficient and accurate breathing rate calculations are achieved.
Patent Information
- Application Number
- CN202411421910.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-12
- Publication Date
- 2025-01-28
AI Technical Summary
The existing respiration rate calculation technology based on PPG signals is complex in calculations, with low real-time performance, and there are many uncertainties in the human body's PPG signal, resulting in inaccurate calculations.
By collecting PPG signals, filtering is performed to remove high -frequency noise, obtain discrete respiratory waves, repair abnormal data, identify the constructing point constructing respiratory curve, and finally calculate the current respiratory rate.
Effectively reduce the amount of calculation, improve the stability, accuracy and accuracy of the respiratory rate calculation, and reduce the demand for chip performance.
Smart Images

Figure CN119366901A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of medical technology, and in particular to a method, system, blood oximeter, and readable storage medium for calculating respiratory rate from a PPG signal. Background Art
[0002] The statements in this section merely provide background technical information related to the present application and do not necessarily constitute prior art.
[0003] A blood oximeter is an instrument used to measure the oxygen content in human arterial blood. The PPG signal (Photoplethysmography) detected by the blood oximeter contains the breathing information of the human body. To calculate the breathing rate, it is necessary to extract the breathing rate waveform from the PPG signal.
[0004] Chinese invention patent CN114027822A discloses a method for calculating respiratory rate, which first calculates the PPG interval curve, calculates the respiratory rate through the interval curve, and uses a fuzzy algorithm to process abnormal values, correct the PPG interval curve, and recalculate the respiratory rate. The operation requires a lot of computing power; Chinese invention patent CN112494008A discloses a method for calculating respiratory rate, which first calculates the peak value of the PPG signal, performs cubic spline interpolation on the peak value to obtain the envelope, and calculates the respiratory rate through the envelope. This method also has the problems of large amount of calculation and high resource consumption. Chinese invention patent CN115836856A discloses a method for calculating respiratory rate, which pre-processes the PPG signal, then finds the peaks and troughs to determine the upper and lower envelopes, and adjusts the accuracy of calculating the respiratory rate through a Kalman filter based on the maximum correlation entropy criterion. This method also consumes a lot of resources.
[0005] In view of this, how to solve the problems that most of the existing PPG-based respiratory rate calculation technologies are complex in calculation, have low real-time performance, and have many uncertainties in the human body's PPG signals, resulting in inaccurate calculations, has become a topic to be studied and solved by the present invention. Summary of the invention
[0006] The object of the present invention is to provide a method, system, blood oximeter, and readable storage medium for calculating respiratory rate from a PPG signal.
[0007] To achieve the above object, a first aspect of the present invention provides a method for calculating a respiratory rate from a PPG signal, the method comprising:
[0008] S100, collecting and processing PPG signals, collecting current PPG signals of the human body, and preprocessing the collected PPG signals;
[0009] S200, filtering the PPG signal, performing real-time low-pass filtering on the PPG signal through a set cutoff frequency to obtain a low-pass filtered PPG signal;
[0010] S300, obtaining a discrete respiratory waveform, performing peak-valley identification on the low-pass filtered PPG signal, and using the change in the peak-valley difference as a discrete respiratory waveform;
[0011] S400, performing trimming processing on the discrete points of the abnormal data, detecting the abnormal data of the discrete respiratory waveform and the corresponding abnormal discrete points, and replacing the abnormal discrete point data to obtain a trimmed discrete respiratory waveform;
[0012] S500, identifying and calculating the construction points of the respiratory waveform and constructing a respiratory waveform curve, identifying the period of the trimmed discrete respiratory waveform, and selecting the extreme value points corresponding to the set period as construction points, and constructing a higher-precision continuous respiratory waveform curve with the construction points;
[0013] S600, calculating the current respiratory rate, and calculating the current respiratory rate according to the continuous respiratory waveform curve.
[0014] The second aspect of the present invention provides a system for calculating respiratory rate from a PPG signal, which is used for calculating respiratory rate from a PPG signal in the method according to the first aspect of the present invention. The innovation point is that the system for calculating respiratory rate from a PPG signal includes a signal acquisition module, a processing module, and a display module;
[0015] The signal acquisition module is used to emit red light and infrared light to the human body, and then collect PPG signals of the red light and infrared light;
[0016] The processing module processes the collected PPG signal, performs peak-valley identification on the processed PPG signal, uses the change of the peak-valley difference as a discrete respiratory waveform, detects abnormal data of the discrete respiratory waveform and corresponding abnormal discrete points, replaces the abnormal discrete point data to obtain a trimmed discrete respiratory waveform, and then identifies the cycle of the trimmed discrete respiratory waveform, and selects the extreme point corresponding to the set cycle as a construction point, and constructs a higher-precision continuous respiratory waveform curve with the construction point, and finally calculates the current respiratory rate according to the continuous respiratory waveform curve, and transmits the current respiratory rate data to the display module;
[0017] The display module is used to display the current respiratory rate data.
[0018] A third aspect of the present invention provides a blood oximeter, which includes a housing and a system for calculating respiratory rate from a PPG signal as described in the second aspect of the present invention, which is installed on the housing.
[0019] A fourth aspect of the present invention provides a readable storage medium having a control program stored thereon. When the control program is executed by a processing module, the processing module executes the steps of the method described in the first aspect of the present invention.
[0020] The relevant contents of the present invention are explained as follows:
[0021] 1. Through the implementation of the above technical solutions of the present invention, in order to solve the problems that most of the existing PPG-based respiratory rate calculation technologies are complex in calculation, low in real time, and the human body's PPG signals are mostly uncertain, resulting in inaccurate calculations, etc., innovative designs are made for a method for calculating the respiratory rate from a PPG signal, a system for calculating the respiratory rate from a PPG signal, a blood oximeter with a system for calculating the respiratory rate from a PPG signal, and a readable storage medium storing a control program for executing the method for calculating the respiratory rate from a PPG signal, thereby effectively reducing the amount of calculation and ensuring the stability, precision and accuracy of the respiratory rate calculation.
[0022] In the method of calculating the respiratory rate from the PPG signal, in the step of collecting and processing the PPG signal, the collected PPG signal is pre-processed to reduce the processing amount and the calculation amount. In the step of filtering the PPG signal, the high-frequency noise in the PPG signal is removed to make the subsequently calculated signal data purer and improve the anti-interference ability of the calculation process. In the process of obtaining the discrete respiratory waveform, the peak and valley recognition is performed on the low-pass filtered PPG signal. When the calculation amount of pure data has been reduced, the change of the peak difference of the PPG signal is used as the discrete respiratory waveform, which further and effectively reduces the calculation amount, so that the method requires The computing power is greatly reduced, the performance requirements of the chip are greatly reduced, and the required computing resources are less; the implementation of trimming the discrete points of abnormal data can avoid the breathing calculation errors caused by the influence of limb interference and external interference on the quality of PPG signal. Since the relevant data processed in the previous order is accurate and small in quantity, there is no need for too many computing resources when executing this step; the implementation of identifying the construction points of the breathing waveform and constructing the breathing waveform curve is to restore and construct a higher-precision continuous breathing waveform curve for the discrete breathing waveform with very low resolution, so as to provide data support with higher precision and accuracy for the implementation of calculating the current breathing rate. Through the above method, the PPG signal is processed step by step, the abnormal data is trimmed, and a new breathing waveform curve is constructed. While reducing the amount of calculation, the breathing rate calculation will provide effective, pure, interference-free, smoother, and more accurate data as the basis for calculating the breathing rate. The implementation of each step is closely coordinated and mutually dependent, so as to achieve the purpose of effectively reducing the amount of calculation and ensuring the stability, precision and accuracy of the breathing rate calculation.
[0023] In the system for calculating the respiratory rate from the PPG signal, a signal acquisition module is designed for emitting red light and infrared light to the human body and then collecting the PPG signals of red light and infrared light, a processing module is used to process the collected PPG signal and finally calculate the current respiratory rate, and a display module is used to display the current respiratory rate data, so as to form a complete system that can reliably obtain and display the correct respiratory rate of the human body, thereby effectively reducing the amount of calculation and ensuring the stability, precision and accuracy of the respiratory rate calculation. The blood oximeter with a system for calculating the respiratory rate from the PPG signal also provides users with a fast and accurate measurement device, allowing users to obtain accurate respiratory rate data and provide more reliable parameters. In the readable storage medium, a control program for executing the method of calculating the respiratory rate from the PPG signal is stored, and the control program can be effectively executed by the processing module of the system for calculating the respiratory rate from the PPG signal.
[0024] 2. In the first aspect of the above technical solution, in the step of collecting and processing PPG signals in S100, the current red light and infrared light PPG signals of the human body are collected by the oximeter, and the PPG signals are preprocessed, and the preprocessing includes removing ambient light and median averaging, so as to preliminarily remove the PPG signal offset caused by environmental factors or equipment factors.
[0025] 3. In the first aspect of the above technical solution, in the step of filtering the PPG signal in S200, the collected red light and infrared light PPG signals are respectively subjected to real-time low-pass filtering through a fourth-order Butterworth low-pass filter with a cutoff frequency of 5 Hz, and the high-frequency noise in the PPG signal is removed to obtain the PPG signal after red light infrared low-pass filtering. In this step, the PPG signal is further subjected to low-pass filtering to obtain more accurate and effective data, further improve the accuracy of subsequent calculations, and further reduce computing power resources.
[0026] 4. In the first aspect of the above technical solution, in the step of obtaining a discrete respiratory waveform in S300, the peak and valley points of the PPG signal after real-time filtering are identified, and the valley points of the detected waveform are ppg min , the peak point of the detected waveform is ppg max , the peak-to-valley difference of the current PPG signal is obtained, that is, the amplitude is ppg maxmin =ppg max -ppg min , the amplitude of the PPG signal calculated in real time is stored in an array A of 30 to 60 bytes in length, and the data of array A is combined into a discrete respiratory waveform. In this way, the amount of calculation is further reduced, and an array of reasonable bytes is used to obtain an appropriate discrete respiratory waveform.
[0027] 5. In the first aspect of the above technical solution, in the step of trimming the discrete points of abnormal data in S400, data with a set jitter amplitude in the discrete respiratory waveform is regarded as abnormal data, and the peak or valley corresponding to the jitter amplitude is regarded as an abnormal discrete point. In this way, the trimming process is faster, the trimming result is more accurate, and less computing power is required.
[0028] 6. In the first aspect of the above technical solution, in the step of trimming the discrete points of abnormal data in S400, the data of array A are differentiated pairwise, and if the difference data value exceeds the set jitter amplitude, it is considered that the current data has jitter and is regarded as abnormal data. This method can quickly obtain abnormal data, and the calculation is simple, reasonable and clever.
[0029] 7. In the first aspect of the above technical solution, in the step of trimming the discrete points of abnormal data in S400, according to the scenario that the ratio of the amplitude to the peak value of the PPG signal does not change in a short period of time and the respiratory rate of the human body does not change in a short period of time, the amplitude of the PPG signal in the abnormal state is trimmed by the following formula:
[0030] ppg maxmin =ppg maxminerror *α(ppg max / ppg maxold )+β;
[0031] Among them, ppg maxminerror is the PPG amplitude of abnormal state, ppg max is the peak value of the PPG signal in abnormal state, ppg maxold is the peak value of the PPG signal in the previous normal state, that is, the normal PPG signal before the abnormal PPG signal, and α and β are empirical parameters.
[0032] 8. In the first aspect of the above technical solution, in the step of S500 of identifying and calculating the construction points of the respiratory waveform and constructing the respiratory waveform curve, the period of the trimmed discrete respiratory waveform is first identified, and then the extreme points corresponding to the period with the highest frequency of occurrence are selected as construction points, and the construction points are used to construct a continuous respiratory waveform curve with higher accuracy of quadratic curve fitting.
[0033] 9. In the first aspect of the above technical solution, in the step of calculating the current respiratory rate in S600, the quadratic curve expression of the continuous respiratory waveform curve is calculated based on the extreme point corresponding to the period with the highest occurrence frequency corresponding to the discrete respiratory waveform and the two points around it. According to the quadratic curve formula, the vertex of the quadratic curve can be obtained, and the vertex is the peak point of the respiratory wave with higher accuracy. The peak-to-peak distance d of the respiratory wave can be obtained through the vertices of the two quadratic curves. The current respiratory rate f can be calculated through the formula RR , as follows:
[0034] f RR =60 / (d*(1 / f c ));
[0035] where f c is the sampling frequency. This step is used to calculate the current breathing rate more efficiently, quickly and accurately.
[0036] 10. In the first aspect of the above technical solution, the sampling frequency is 166HZ or 200HZ.
[0037] Due to the application of the above scheme, the present invention has the following advantages and effects compared with the prior art:
[0038] 1. In the method for calculating the respiratory rate from the PPG signal of the present invention, in the step of collecting and processing the PPG signal, the collected PPG signal is pre-processed to reduce the processing amount and the calculation amount, and in the step of filtering the PPG signal, the high-frequency noise in the PPG signal is removed to make the subsequently calculated signal data purer and improve the anti-interference ability of the calculation process; in the process of obtaining the discrete respiratory waveform, the peak and valley recognition is performed on the low-pass filtered PPG signal, and the change of the peak difference of the PPG signal is used as the discrete respiratory waveform when the calculation amount of the pure data has been reduced, so as to further and effectively reduce the calculation amount, so that the method The required computing power is greatly reduced, the performance requirements of the chip are greatly reduced, and the required computing resources are less; the implementation of trimming the discrete points of abnormal data can avoid breathing calculation errors caused by limb interference and external interference that affect the quality of the PPG signal. Since the relevant data processed in the previous order is accurate and small in quantity, no excessive computing resources are required when executing this step; the implementation of identifying and calculating the construction points of the respiratory waveform and constructing the respiratory waveform curve is to restore and construct a higher-precision continuous respiratory waveform curve for the case of discrete respiratory waveforms with very low resolution, thereby providing data support with higher precision and accuracy for the implementation of calculating the current respiratory rate.
[0039] 2. In the system for calculating the respiratory rate from the PPG signal of the present invention, a signal acquisition module is designed for emitting red light and infrared light to the human body and then collecting the PPG signals of red light and infrared light, a processing module is used to process the collected PPG signal and finally calculate the current respiratory rate, and a display module is used to display the current respiratory rate data, so as to form a complete system that can reliably obtain and display the correct respiratory rate of the human body, thereby effectively reducing the amount of calculation and ensuring the stability, precision and accuracy of the respiratory rate calculation. The blood oximeter with a system for calculating the respiratory rate from the PPG signal also provides users with a fast and accurate measurement device, allowing users to obtain accurate respiratory rate data and provide more reliable parameters. In the readable storage medium, a control program for executing the method for calculating the respiratory rate from the PPG signal is stored, and the control program can be effectively executed by the processing module of the system for calculating the respiratory rate from the PPG signal.
[0040] 3. In summary, the present invention innovatively designs a method for calculating respiratory rate from a PPG signal, a system for calculating respiratory rate from a PPG signal, a blood oximeter with a system for calculating respiratory rate from a PPG signal, and a readable storage medium storing a control program for executing the method for calculating respiratory rate from a PPG signal. The PPG signal is processed step by step, abnormal data is trimmed, and a new respiratory waveform curve is constructed. While reducing the amount of calculation step by step, effective, pure, interference-free, smoother, and more accurate data is provided for the respiratory rate calculation as the basis for calculating the respiratory rate. The implementation of each step is closely coordinated and mutually dependent, so as to achieve the purpose of effectively reducing the amount of calculation and ensuring the stability, precision and accuracy of the respiratory rate calculation, and the resolution can reach 1bpm. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 Schematic diagram of a method for calculating respiratory rate from a PPG signal in an embodiment of the present invention;
[0042] Figure 2 A schematic diagram of an algorithm implementation flow of an embodiment of the present invention;
[0043] Figure 3 is a schematic diagram of a discrete breathing waveform in an embodiment of the present invention;
[0044] Figure 4 is a schematic diagram of a trimmed discrete respiratory waveform in an embodiment of the present invention;
[0045] Figure 5 It is a schematic diagram of constructing a quadratic curve to calculate the vertex of the actual breathing curve in an embodiment of the present invention. DETAILED DESCRIPTION
[0046] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are described in detail below in conjunction with the accompanying drawings. In the following description, many specific details are set forth to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar improvements without violating the connotation of the present application, so the present application is not limited by the specific embodiments disclosed below.
[0047] The present invention aims to solve the problems that most of the existing PPG-based respiratory rate calculation technologies are complex in calculation, have low real-time performance, and have many uncertainties in the human body's PPG signals, resulting in inaccurate calculations. The present invention innovatively designs a method for calculating the respiratory rate from a PPG signal, a system for calculating the respiratory rate from a PPG signal, a blood oximeter with a system for calculating the respiratory rate from a PPG signal, and a readable storage medium storing a control program for executing the method for calculating the respiratory rate from a PPG signal, thereby effectively reducing the amount of calculation and ensuring the stability, precision and accuracy of the respiratory rate calculation.
[0048] Embodiment 1, Embodiment 1 of the present invention discloses a method for calculating respiratory rate from PPG signal, such as Figure 1 As shown, the method comprises:
[0049] S100, collecting and processing PPG signals, collecting current PPG signals of the human body, and preprocessing the collected PPG signals;
[0050] S200, filtering the PPG signal, performing real-time low-pass filtering on the PPG signal through a set cutoff frequency to obtain a low-pass filtered PPG signal;
[0051] S300, obtaining a discrete respiratory waveform, performing peak-valley identification on the low-pass filtered PPG signal, and using the change in the peak-valley difference as a discrete respiratory waveform;
[0052] S400, performing trimming processing on the discrete points of the abnormal data, detecting the abnormal data of the discrete respiratory waveform and the corresponding abnormal discrete points, and replacing the abnormal discrete point data to obtain a trimmed discrete respiratory waveform;
[0053] S500, identifying and calculating the construction points of the respiratory waveform and constructing a respiratory waveform curve, identifying the period of the trimmed discrete respiratory waveform, and selecting the extreme value points corresponding to the set period as construction points, and constructing a higher-precision continuous respiratory waveform curve with the construction points;
[0054] S600, calculating the current respiratory rate, and calculating the current respiratory rate according to the continuous respiratory waveform curve.
[0055] Through the implementation of the first embodiment of the present invention, in the method for calculating the respiratory rate from the PPG signal, in the step of collecting and processing the PPG signal, the collected PPG signal is pre-processed to reduce the processing amount and the calculation amount, and in the step of filtering the PPG signal, the high-frequency noise in the PPG signal is removed, so that the signal data calculated subsequently is purer, and the anti-interference ability of the calculation process is improved; in the process of obtaining the discrete respiratory waveform, the peak and valley recognition is performed on the low-pass filtered PPG signal, and the change of the peak difference of the PPG signal is used as the discrete respiratory waveform when the calculation amount of the pure data has been reduced, so as to further and effectively reduce the calculation amount. The required computing power of this method is greatly reduced, the performance requirements of the chip are greatly reduced, and the required computing resources are less; the implementation of trimming the discrete points of abnormal data can avoid the breathing calculation errors caused by the influence of limb interference and external interference on the quality of PPG signal. Since the relevant data processed in the previous order is accurate and small in quantity, there is no need for too much computing resources when executing this step; the implementation of identifying the construction points of the breathing waveform and constructing the breathing waveform curve is to restore and construct a higher-precision continuous breathing waveform curve for the case of discrete breathing waveforms with very low resolution, so as to provide data support with higher precision and accuracy for the implementation of calculating the current breathing rate. Through the above method, the PPG signal is processed step by step, the abnormal data is trimmed, and a new breathing waveform curve is constructed. While reducing the amount of calculation, the breathing rate calculation will provide effective, pure, interference-free, smoother, and more accurate data as the basis for calculating the breathing rate. The implementation of each step is closely coordinated and mutually dependent, so as to achieve the purpose of effectively reducing the amount of calculation and ensuring the stability, precision and accuracy of the breathing rate calculation.
[0056] In one of the ways of the first embodiment of the present invention, in the step of collecting and processing the PPG signal at S100, the current red light and infrared light PPG signals of the human body are collected by a blood oximeter, and the PPG signal is preprocessed, and the preprocessing includes removing ambient light and median averaging.
[0057] In another embodiment of the present invention, in the step of filtering the PPG signal in S200, the collected red light and infrared light PPG signals are respectively subjected to real-time low-pass filtering by a fourth-order Butterworth low-pass filter with a cutoff frequency of 5 Hz to remove high-frequency noise in the PPG signal and obtain the PPG signal after red light and infrared low-pass filtering.
[0058] In another embodiment of the present invention, in the step of obtaining a discrete respiratory waveform in S300, the peak and valley points of the PPG signal after real-time filtering are identified, and the valley points of the detected waveform are ppg min , the peak point of the detected waveform is ppg max, the peak-to-valley difference of the current PPG signal is obtained, that is, the amplitude is ppg maxmin =ppg max -ppg min , the amplitude of the PPG signal calculated in real time is stored in an array A of 30 to 60 bytes in length, and the data of array A is combined into a discrete respiratory waveform.
[0059] In one of the methods of the first embodiment of the present invention, in the step of trimming the discrete points of abnormal data in S400, data with a set jitter amplitude in the discrete respiratory waveform is regarded as abnormal data, and the peak or valley value corresponding to the jitter amplitude is regarded as an abnormal discrete point.
[0060] In another embodiment of the present invention, in step S400 of trimming the discrete points of abnormal data, the data of array A are differentiated pairwise. If the differential data value exceeds the set jitter amplitude, it is considered that the current data has jitter and is regarded as abnormal data.
[0061] In another embodiment of the present invention, in the step of trimming the discrete points of abnormal data in S400, according to the scenario that the ratio of the amplitude to the peak value of the PPG signal does not change in a short period of time and the respiratory rate of the human body does not change in a short period of time, the amplitude of the PPG signal in the abnormal state is trimmed by the following formula:
[0062] ppg maxmin =ppg maxminerror *α(ppg max / ppg maxold )+β;
[0063] Among them, ppg maxminerror is the PPG amplitude of abnormal state, ppg max is the peak value of the PPG signal in abnormal state, ppg maxold is the peak value of the PPG signal in the previous normal state, that is, the normal PPG signal before the abnormal PPG signal, and α and β are empirical parameters.
[0064] In one of the methods of embodiment 1 of the present invention, in the step of S500 identifying and calculating the construction points of the respiratory waveform and constructing the respiratory waveform curve, the period of the trimmed discrete respiratory waveform is first identified, and then the extreme point corresponding to the period with the highest occurrence frequency is selected as the construction point, and the construction point is constructed into a continuous respiratory waveform curve with higher accuracy of quadratic curve fitting.
[0065] In another embodiment of the present invention, in the step of calculating the current respiratory rate in S600, the quadratic curve expression of the continuous respiratory waveform curve is deduced based on the extreme point corresponding to the period with the highest occurrence frequency corresponding to the discrete respiratory waveform and the two points around it. According to the quadratic curve formula, the vertex of the quadratic curve can be obtained, and the vertex is the peak point of the respiratory wave with higher accuracy. The peak-to-peak distance d of the respiratory wave can be obtained through the vertices of the two quadratic curves. The current respiratory rate f can be calculated by the formula RR , as follows:
[0066] f RR =60 / (d*(1 / f c ));
[0067] where f c is the sampling frequency, specifically, the sampling frequency is 166 Hz or 200 Hz.
[0068] Embodiment 2. Embodiment 2 of the present invention provides a system for calculating respiratory rate from PPG signals, which is used for calculating respiratory rate from PPG signals in the method described in Embodiment 1 of the present invention. The system for calculating respiratory rate from PPG signals includes a signal acquisition module, a processing module, and a display module.
[0069] The signal acquisition module is used to emit red light and infrared light to the human body, and then collect PPG signals of the red light and infrared light;
[0070] The processing module processes the collected PPG signal, performs peak-valley identification on the processed PPG signal, uses the change of the peak-valley difference as a discrete respiratory waveform, detects abnormal data of the discrete respiratory waveform and corresponding abnormal discrete points, replaces the abnormal discrete point data to obtain a trimmed discrete respiratory waveform, and then identifies the cycle of the trimmed discrete respiratory waveform, and selects the extreme point corresponding to the set cycle as a construction point, and constructs a higher-precision continuous respiratory waveform curve with the construction point, and finally calculates the current respiratory rate according to the continuous respiratory waveform curve, and transmits the current respiratory rate data to the display module;
[0071] The display module is used to display the current respiratory rate data.
[0072] A third aspect of the present invention provides a blood oximeter, which includes a housing and a system for calculating respiratory rate from a PPG signal as described in the second aspect of the present invention, which is installed on the housing.
[0073] Through the implementation of the second embodiment of the present invention, in the system for calculating the respiratory rate from the PPG signal, a signal acquisition module is designed for emitting red light and infrared light to the human body and then collecting the PPG signals of red light and infrared light, a processing module is used to process the collected PPG signal to finally calculate the current respiratory rate, and a display module is used to display the current respiratory rate data. In this way, a complete system is formed that can reliably obtain and display the correct respiratory rate of the human body, thereby effectively reducing the amount of calculation and ensuring the stability, precision and accuracy of the respiratory rate calculation.
[0074] Embodiment 3. Embodiment 3 of the present invention discloses a blood oximeter, which includes a housing and a system for calculating respiratory rate from a PPG signal as described in Embodiment 2 of the present invention, which is installed on the housing.
[0075] Through the implementation of the third embodiment of the present invention, the blood oximeter with a system for calculating the respiratory rate from the PPG signal also provides users with a fast and accurate measurement device, allowing users to obtain accurate respiratory rate data and provide more reliable parameters.
[0076] Embodiment 4: Embodiment 4 of the present invention further discloses a readable storage medium, on which a control program is stored. When the control program is executed by a processing module, the processing module executes the steps of the method described in Embodiment 1.
[0077] Through the implementation of the fourth embodiment of the present invention, a control program for executing the method of calculating the respiratory rate from the PPG signal is stored in the readable storage medium, and the control program can be effectively executed by the processing module of the system for calculating the respiratory rate from the PPG signal.
[0078] Those skilled in the art can understand that the operation of the oximeter in the above-mentioned embodiment method can be completed by instructing the relevant hardware (blood pressure detection unit) through a program, and the program is stored in a readable storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processing module (processor) to perform the operations performed by the main control unit in each embodiment of the present application. The aforementioned storage medium includes: Read-Only Memory (ROM), Random Access Memory (RAM) and other media that can store program codes.
[0079] The following is an example of the actual application process of the above embodiment of the present invention. Figure 2 As shown, an overview of the use process of the blood oximeter of the present invention is shown. In the blood oximeter, the signal acquisition module is used to emit red light and infrared light to the human body, and then collect PPG signals of the red light and infrared light.
[0080] The use process of the method for calculating the respiratory rate from the PPG signal in the embodiment of the present invention can be referred to as follows:
[0081] S100: collects red light and infrared light PPG signals through the oximeter and pre-processes the PPG signals, including removing ambient light and median averaging;
[0082] S200: Since the frequencies of effective signals of human PPG signals are basically below 5 Hz, the collected red light and infrared light PPG signals are respectively subjected to real-time low-pass filtering through a fourth-order Butterworth low-pass filter with a cut-off frequency of 5 Hz to remove high-frequency noise in the PPG signal and obtain the PPG signal after red light infrared low-pass filtering.
[0083] S300: Perform peak and valley identification on the PPG signal after real-time filtering. The peak and valley values change in real time, and the detection algorithm can refresh the peak and valley values in real time. The valley point of the detected waveform is the PPG min , the peak point is detected as ppg max , so we can get the peak-to-valley difference of the current PPG signal, that is, the amplitude is ppg maxmin =ppg max -ppg min The amplitude of the PPG signal calculated in real time is stored in an array a of 30 to 60 bytes in length. Preferably, the sampling frequency of the system is 166 Hz, the array length is 50 bytes, and the data of array a is the discrete respiratory waveform. The discrete respiratory waveform can be referred to Figure 3 shown.
[0084] S400: During the measurement process, there may be limb interference and external interference that affect the quality of the PPG signal, which may lead to errors in the calculation of the respiratory rate. Figure 3 Abnormal PPG signal part. In this case, by detecting whether there is a large jitter in the data in array a, the jitter detection method is to perform a pairwise difference between the data in array a. If it exceeds the set threshold, it is considered that the current data has jitter. The data with large jitter is replaced. Specifically, because the ratio of the amplitude and peak value of the PPG signal will not change in a short time and the breathing rate of the human body will not change in a short time, based on this point, the formula
[0085] ppg maxmin =ppg maxminerror *α(ppg max / ppg maxold )+β;
[0086] To trim the amplitude of the abnormal PPG signal. maxminerror is the PPG amplitude of abnormal state, ppg maxis the peak value of the PPG signal in abnormal state, ppg maxold is the peak value of the previous normal PPG signal, that is, the normal PPG signal before the abnormal PPG signal. α and β are empirical parameters.
[0087] S500: After abnormal data processing, the data of array a is as follows Figure 4 As shown in the trimmed discrete respiratory waveform. The resolution of the discrete respiratory waveform is very low and cannot be accurate to 1 time / min. In view of this situation, it is necessary to restore a respiratory waveform with higher accuracy for identification. The specific implementation method is, first, to identify the period of the discrete respiratory waveform, specifically, by finding all the maximum values of the data in array a, and the maximum value judgment basis is: assuming that a[2] is a maximum value, then a[2]>a[1] and a[2]>a[3]; record the maximum value points, calculate the distance between the maximum value points, statistically distribute the distances, and select the extreme point corresponding to the distance with the highest frequency as the construction point. Because, assuming that the respiratory waveform with higher accuracy is composed of multiple curves, the points on the discrete respiratory waveform must be on a certain curve. Therefore, by using the extreme points on the discrete respiratory waveform as construction points, a respiratory waveform curve with higher accuracy is constructed to calculate the respiratory rate. S6: Specifically, according to the quadratic curve formula:
[0088] y=ax 2 +bx+C;
[0089] The specific curve expression can be derived by discretizing three points in the respiratory waveform. This curve is the corresponding respiratory waveform with higher accuracy. Figure 5 As shown, the three points corresponding to the discrete respiratory waveform are the extreme point corresponding to the cycle with the highest frequency and the two points around it.
[0090] Specifically, assume that the three points are (x1, y1), (x2, y2), and (x3, y3). According to the quadratic curve formula, a system of three linear equations is constructed, as shown in the following formula:
[0091]
[0092] The unknowns a, b, c can be solved. Through a, b, c, according to the quadratic curve vertex formula, The vertex of the quadratic curve can be obtained, which is the peak point of the respiratory wave with higher accuracy. The peak-to-peak distance d of the respiratory wave can be obtained through the vertices of the two quadratic curves. The current respiratory rate f can be calculated by the formula RR , as follows:
[0093] f RR =60 / (d*(1 / f c ));
[0094] where f cis the sampling frequency.
[0095] S700: Smoothing the calculated respiratory rate and outputting it to the calculation result.
[0096] Through the implementation of the above embodiments, the PPG signal is processed step by step, abnormal data is trimmed, and a new respiratory waveform curve is constructed. While reducing the amount of calculation step by step, effective, pure, interference-free, smoother, and more accurate data will be provided for the respiratory rate calculation as the basis for calculating the respiratory rate. The implementation of each step is closely coordinated and mutually dependent, so as to achieve the purpose of the present invention of effectively reducing the amount of calculation and ensuring the stability, precision and accuracy of the respiratory rate calculation.
[0097] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot be used to limit the protection scope of the present invention. Any equivalent changes or modifications made according to the spirit of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for calculating respiratory rate from a PPG signal, characterized in that The method comprises: S100, collecting and processing PPG signals, collecting current PPG signals of the human body, and preprocessing the collected PPG signals; S200, filtering the PPG signal, performing real-time low-pass filtering on the PPG signal through a set cutoff frequency to obtain a low-pass filtered PPG signal; S300, obtaining a discrete respiratory waveform, performing peak-valley identification on the low-pass filtered PPG signal, and using the change in the peak-valley difference as a discrete respiratory waveform; S400, performing trimming processing on the discrete points of the abnormal data, detecting the abnormal data of the discrete respiratory waveform and the corresponding abnormal discrete points, and replacing the abnormal discrete point data to obtain a trimmed discrete respiratory waveform; S500, identifying and calculating the construction points of the respiratory waveform and constructing a respiratory waveform curve, identifying the period of the trimmed discrete respiratory waveform, and selecting the extreme value points corresponding to the set period as construction points, and constructing a higher-precision continuous respiratory waveform curve with the construction points; S600, calculating the current respiratory rate, and calculating the current respiratory rate according to the continuous respiratory waveform curve.
2. The method for calculating respiratory rate from a PPG signal according to claim 1, characterized in that: In the step of collecting and processing the PPG signal at S100, the current red light and infrared light PPG signals of the human body are collected by the blood oximeter, and the PPG signals are preprocessed, and the preprocessing includes removing ambient light and median averaging.
3. The method for calculating respiratory rate from a PPG signal according to claim 2, characterized in that: In the step S200 of filtering the PPG signal, the collected red light and infrared light PPG signals are respectively subjected to real-time low-pass filtering through a fourth-order Butterworth low-pass filter with a cutoff frequency of 5 Hz to remove high-frequency noise in the PPG signal and obtain a PPG signal after red light and infrared low-pass filtering.
4. The method for calculating respiratory rate from a PPG signal according to claim 1, characterized in that: In the step of obtaining a discrete respiratory waveform in S300, peak and valley identification is performed on the PPG signal after real-time filtering, the valley point of the detected waveform is ppgmin, and the peak point of the detected waveform is ppgmax. The peak-to-valley difference of the current PPG signal, that is, the amplitude, is obtained as ppgmaxmin=ppgmax-ppgmin, and the amplitude of the PPG signal calculated in real time is stored in an array A of a length of 30 to 60 bytes. The data of array A is combined into a discrete respiratory waveform.
5. The method for calculating respiratory rate from a PPG signal according to claim 4, characterized in that: In the step of trimming the discrete points of abnormal data in S400 , data with a set jitter amplitude in the discrete respiratory waveform is regarded as abnormal data, and a peak value or a valley value corresponding to the jitter amplitude is regarded as an abnormal discrete point.
6. The method for calculating respiratory rate from a PPG signal according to claim 5, characterized in that: In the step of trimming the discrete points of abnormal data in S400, the data of array A are differentiated pairwise. If the difference data value exceeds the set jitter amplitude, it is considered that the current data has jitter and is regarded as abnormal data.
7. The method for calculating respiratory rate from a PPG signal according to claim 1, characterized in that: In the step of trimming the discrete points of abnormal data in S400, according to the scenario that the ratio of the amplitude to the peak value of the PPG signal does not change in a short period of time and the breathing rate of the human body does not change in a short period of time, the amplitude of the abnormal PPG signal is trimmed by the following formula: ppgmaxmin=ppgmaxminerror*α(ppgmax / ppgmaxold)+β; Where ppgmaxminerror is the PPG amplitude in the abnormal state, ppgmax is the peak value of the PPG signal in the abnormal state, ppgmaxold is the peak value of the PPG signal in the previous normal state, that is, the normal PPG signal before the abnormal PPG signal, and α and β are empirical parameters.
8. The method for calculating respiratory rate from a PPG signal according to claim 1, characterized in that: In the step of S500 of identifying and calculating the construction points of the respiratory waveform and constructing the respiratory waveform curve, the period of the trimmed discrete respiratory waveform is first identified, and then the extreme point corresponding to the period with the highest frequency of occurrence is selected as the construction point, and the construction point is used to construct a continuous respiratory waveform curve with higher accuracy of quadratic curve fitting.
9. The method for calculating respiratory rate from a PPG signal according to claim 8, characterized in that: In the step of calculating the current respiratory rate in S600, the quadratic curve expression of the continuous respiratory waveform curve is deduced based on the extreme point corresponding to the cycle with the highest frequency of occurrence corresponding to the discrete respiratory waveform and the two points around it. According to the quadratic curve formula, the vertex of the quadratic curve can be obtained. The vertex is the peak point of the respiratory wave with higher accuracy. The peak-to-peak distance d of the respiratory wave can be obtained through the vertices of the two quadratic curves. The current respiratory rate fRR can be calculated through the formula, which is as follows: fRR=60 / (d*(1 / fc)); Where fc is the sampling frequency.
10. The method for calculating respiratory rate from a PPG signal according to claim 9, characterized in that: The sampling frequency is 166HZ or 200HZ.
11. A system for calculating respiratory rate from a PPG signal, used for calculating respiratory rate from a PPG signal in the method according to any one of claims 1 to 10, characterized in that: The system for calculating the respiratory rate from the PPG signal includes a signal acquisition module, a processing module, and a display module; The signal acquisition module is used to emit red light and infrared light to the human body, and then collect PPG signals of the red light and infrared light; The processing module processes the collected PPG signal, performs peak-valley identification on the processed PPG signal, uses the change of the peak-valley difference as a discrete respiratory waveform, detects abnormal data of the discrete respiratory waveform and corresponding abnormal discrete points, replaces the abnormal discrete point data to obtain a trimmed discrete respiratory waveform, and then identifies the cycle of the trimmed discrete respiratory waveform, and selects the extreme point corresponding to the set cycle as a construction point, and constructs a higher-precision continuous respiratory waveform curve with the construction point, and finally calculates the current respiratory rate according to the continuous respiratory waveform curve, and transmits the current respiratory rate data to the display module; The display module is used to display the current respiratory rate data.
12. A blood oximeter, characterized in that: The blood oximeter comprises a housing and the system for calculating the respiratory rate from the PPG signal according to claim 11 mounted on the housing.
13. A readable storage medium, characterized in that: The readable storage medium stores a control program, and when the control program is executed by the processing module, the processing module executes the steps of the method according to any one of claims 1 to 10.
Citation Information
Patent Citations
PPG signal based respiratory rate measurement method and device
CN112494008A
PPG signal-based respiratory rate measurement method and device
CN114027822A
Respiration rate measuring method and device based on PPG signal and electronic equipment
CN115836856A