A method for detecting respiratory rate based on acoustic wave FMCW
By combining FMCW technology and autocorrelation calculation with Hilbert transform, the accuracy problem of respiratory rate detection in smartphone acoustic wave sensing technology is solved, realizing high-precision and convenient non-contact respiratory rate monitoring, which is suitable for smartphone devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING UNIV OF POSTS & TELECOMM
- Filing Date
- 2025-04-25
- Publication Date
- 2026-05-12
AI Technical Summary
Existing smartphone-based acoustic sensing technologies suffer from limitations in respiratory rate detection due to factors such as environmental noise and human movement, making it difficult to extract respiratory-related features from complex acoustic signals.
Frequency Modulated Continuous Wave (FMCW) technology is used to transmit sound wave signals with continuously changing frequencies through the mobile phone speaker. The signals are received by the microphone, filtered, and then autocorrelation is performed. Combined with Hilbert transform and fast Fourier transform, respiratory-related thoracic motion information is extracted to calculate the respiratory rate.
It effectively suppresses environmental noise interference, improves detection accuracy, and enables non-contact and convenient respiratory rate monitoring, avoiding the discomfort and high cost of traditional methods and providing a good visual experience.
Smart Images

Figure CN120436613B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of acoustic signal processing technology, specifically relating to a respiratory rate detection method based on acoustic FMCW. Background Technology
[0002] Respiratory rate is one of the important physiological indicators for assessing human health. Abnormal respiratory rates are often associated with various diseases, such as sleep apnea syndrome and chronic obstructive pulmonary disease. Therefore, real-time, convenient, and accurate monitoring of respiratory rate is of great significance for disease prevention, diagnosis, and treatment.
[0003] Traditional respiratory rate detection methods are mainly divided into two types: contact and non-contact. Contact methods, such as chest straps and nasal airflow sensors, offer high accuracy but require wearing the device, resulting in poor comfort and potential interference with normal breathing, making them unsuitable for long-term monitoring. Non-contact methods, such as cameras and radar, do not require contact with the human body but are susceptible to environmental factors such as light and obstructions, and their high cost makes widespread adoption difficult.
[0004] In recent years, with the widespread adoption of smartphones and the development of acoustic wave technology, smartphone-based acoustic wave sensing technology has gradually become a research hotspot. This technology utilizes the built-in speakers and microphones of smartphones to perceive the surrounding environment by emitting and receiving acoustic wave signals. Compared with traditional respiratory rate detection methods, smartphone-based acoustic wave sensing technology has advantages such as low cost, portability, and no need for additional equipment, and it can achieve non-contact measurement, showing broad application prospects.
[0005] However, existing smartphone-based acoustic sensing technologies still face some challenges in detecting respiratory rate. For example, environmental noise and human movement can affect the reception and processing of acoustic signals, leading to decreased detection accuracy. Furthermore, extracting respiratory-related features from complex acoustic signals remains a key challenge.
[0006] Therefore, how to extract breathing-related feature information from complex sound wave signals and improve detection accuracy is the technical problem that this invention aims to solve. Summary of the Invention
[0007] The purpose of this invention is to provide a respiratory rate detection method based on acoustic FMCW to solve the problems mentioned in the background art.
[0008] The objective of this invention is achieved as follows: a respiratory rate detection method based on acoustic FMCW, characterized by the following steps:
[0009] Step S1: Use the mobile phone speaker to generate a sound wave signal with a continuously changing frequency. The starting frequency is low, and it gradually increases to high frequency. The sound wave signal is emitted in a loop to form a continuous sound wave detection sequence.
[0010] Step S2: Use the mobile phone microphone to synchronously receive the reflected sound wave signal and time-align it with the original transmitted signal;
[0011] Step S3: Filter the received reflected sound wave signal;
[0012] Step S4: Perform autocorrelation calculation on the transmitted signal and the reflected signal to generate a curve showing the change in distance of the thoracic cavity with respiratory movement;
[0013] Step S5: Smooth the distance change curve to remove sudden interference;
[0014] Step S6: Process the thoracic movement waveform, obtain the dominant frequency through fast Fourier transform, and calculate the respiratory rate.
[0015] Preferably, in step S1, the starting frequency is low frequency, gradually increasing to high frequency, specifically as follows:
[0016] Low frequencies are defined as no greater than 17kHz, and high frequencies as no less than 23kHz. The calculation formula is as follows:
[0017]
[0018] Where A is the amplitude of the sound wave signal, f min It is the initial frequency of the signal, f max It is the final frequency of the signal, T represents the time period of the linear frequency sweep, and t represents the time elapsed since the signal was emitted.
[0019] Preferably, in step S3, the received reflected sound wave signal is filtered, specifically as follows:
[0020] The received signal, after removing high-frequency noise, is obtained by passing a low-pass filter, and then the echo data r(t) is obtained by passing a band-pass filter.
[0021]
[0022] Where τ refers to the time delay caused by propagation time; A is the amplitude of the sound wave signal, and f min It is the initial frequency of the signal, f max It is the final frequency of the signal, T represents the time period of the linear frequency sweep, and t represents the time elapsed since the signal was emitted.
[0023] Preferably, in step S4, the transmitted signal and the reflected signal are subjected to autocorrelation calculation to generate a curve showing the change in distance of the thoracic cavity with respiratory movement, specifically as follows:
[0024] Step S4-1: Perform autocorrelation calculation on the reflected and transmitted signals to obtain the autocorrelation function R(τ):
[0025]
[0026] Where s(t) is the starting frequency emitted by the mobile phone, r(t) is the echo signal filtered by the Butterworth bandpass filter; τ refers to the time delay variable caused by the propagation time; L represents the length of the integration time window;
[0027] Step S4-2: Find the time difference between the reflected signal and the emitted signal, and generate a curve showing the change in distance of the thoracic cavity with respiratory motion, specifically:
[0028] The formula r(t) includes a time delay. Using the Hilbert transform, a clearer contour image is obtained. The transformed formula is as follows:
[0029]
[0030] Where H(t) is the analytic signal after Hilbert transform; τ is the time delay variable;
[0031] The waveform after Hilbert transform will clearly show the first peak and the second peak. The horizontal axis, time, is then plotted using the formula:
[0032]
[0033] Where d represents distance and v represents the speed of sound; the distance corresponding to the second highest peak point minus the distance corresponding to the highest peak point is the chest distance.
[0034] Preferably, in step S5, the distance change curve is smoothed, specifically as follows:
[0035] In the signal processing stage, a moving average algorithm is used to smooth the thoracic displacement data, and a sliding window averaging method is used to smooth the distance variation curve data. The window size is set to 5 consecutive sampling points, with each sampling point corresponding to a 0.05-second time interval. Starting from the first sampling point, the average value of the data in each window is calculated sequentially, and the data boundaries are processed by symmetrical zero padding. The smoothed data is output as a new distance variation curve, and the processing effect is verified by comparing the waveforms before and after smoothing. If the smoothing effect is insufficient, the window size is adjusted and the calculation is repeated.
[0036] Preferably, in step S6, the thoracic movement waveform is processed by obtaining the dominant frequency through a fast Fourier transform and calculating the respiratory rate, specifically as follows:
[0037] The Fast Fourier Transform (FFT) is used to perform spectral analysis on the signal, as shown in the following formula:
[0038]
[0039] Where j is the imaginary unit; f is the signal frequency; t is the time elapsed since the signal was emitted; and x(t) is the waveform of the thoracic cavity moving over time.
[0040] Compared with the prior art, the present invention has the following improvements and advantages:
[0041] 1. By leveraging the advantages of FMCW technology, environmental noise interference can be effectively suppressed. By analyzing the autocorrelation coefficient of the reflected signal, chest movement information related to breathing can be accurately extracted, thereby achieving precise detection of human respiratory rate. At the same time, by utilizing the property that the autocorrelation function makes it easier to find the peak and thus easier to track, the time difference between the received transmitted signal and the reflected signal can be determined, and the distance from the chest cavity to the mobile phone can be calculated, greatly increasing the convenience for users.
[0042] 2. By using Hilbert transform, peak tracking is more stable and convenient, and the visualization provides users with an excellent visual experience. At the same time, using a smartphone as a detection device eliminates the need to wear any sensors or make contact with the human body, avoiding the discomfort of traditional contact devices. Attached Figure Description
[0043] Figure 1 This is a schematic diagram of the method flow of the present invention.
[0044] Figure 2 This is a schematic diagram of the transmitted signal waveform.
[0045] Figure 3 This is a schematic diagram of the echo signal waveform.
[0046] Figure 4 This is a schematic diagram of the autocorrelation waveform after processing.
[0047] Figure 5 This is a schematic diagram of the thoracic waveform.
[0048] Figure 6 This is a diagram illustrating the correlation function in the comparison algorithm – distance comparison. Detailed Implementation
[0049] The invention will be further summarized below with reference to the accompanying drawings.
[0050] like Figure 1As shown, a respiratory rate detection method based on acoustic FMCW includes the following steps:
[0051] Step S1: Use the mobile phone speaker to generate a sound wave signal with a continuously changing frequency. The starting frequency is low, and it gradually increases to high frequency. The sound wave signal is emitted in a loop to form a continuous sound wave detection sequence.
[0052] The mobile phone continuously outputs a chirp signal, starting at a low frequency and gradually increasing to a high frequency. Each signal lasts approximately 0.05 seconds, including a 0.025-second signal segment and a 0.025-second window period. The low frequency is no greater than 17kHz, and the high frequency is no less than 23kHz. The calculation formula is as follows:
[0053]
[0054] Where A is the amplitude of the sound wave signal, f min It is the initial frequency of the signal, f max It is the final frequency of the signal, T represents the time period of the linear frequency sweep, and t represents the time elapsed since the signal was emitted.
[0055] Step S2: Use the phone's microphone to synchronously receive the reflected sound wave signal and time-align it with the original transmitted signal. Specifically:
[0056] When a mobile phone microphone records ambient sound, it marks the start time of the emitted sound wave, and then locates the obvious start point and amplitude increase point of the reflected wave in the received signal, so as to align the time reference of the emitted and received signals.
[0057] Step S3: Filter the received reflected sound wave signal, specifically as follows:
[0058] like Figure 2 As shown, after receiving the reflected signal, a Butterworth sixth-order low-pass filter is used to obtain the received signal with high-frequency noise removed. Then, a Butterworth sixth-order band-pass filter is used to obtain the final clear echo data r(t). The echo signal is as follows: Figure 3 As shown:
[0059]
[0060] Where τ refers to the time delay caused by propagation time; A is the amplitude of the sound wave signal, and f min It is the initial frequency of the signal, f max It is the final frequency of the signal, T represents the time period of the linear frequency sweep, and t represents the time elapsed since the signal was emitted.
[0061] Step S4: Perform autocorrelation calculation on the transmitted and reflected signals to generate a curve showing the change in distance of the thoracic cavity with respiratory motion, specifically:
[0062] like Figure 4 As shown, step S4-1: Perform autocorrelation operation on the reflected signal and the transmitted signal to obtain the autocorrelation function R(τ):
[0063]
[0064] Where s(t) is the starting frequency emitted by the mobile phone, r(t) is the echo signal filtered by the Butterworth bandpass filter; τ refers to the time delay variable caused by the propagation time; L represents the length of the integration time window;
[0065] Step S4-2: Find the time difference between the reflected signal and the emitted signal, and generate a curve showing the change in distance of the thoracic cavity with respiratory motion, specifically:
[0066] The formula r(t) includes a time delay. Using the Hilbert transform, a clearer contour image is obtained. The transformed formula is as follows:
[0067]
[0068] Where H(t) is the analytic signal after Hilbert transform; τ is the time delay variable;
[0069] The waveform after Hilbert transform will clearly show the first peak and the second peak. The horizontal axis, time, is then plotted using the formula:
[0070]
[0071] Where d represents distance and v represents the speed of sound; the distance corresponding to the second highest peak point minus the distance corresponding to the highest peak point is the chest distance.
[0072] Because the initial peak value is large, and the target peak value is smaller compared to the initial peak value, making it difficult to observe, we use the gain function y(s) to process the values corresponding to the correlation function on the vertical axis of the coordinate system.
[0073] y(d) = 0.65ln(d);
[0074] We then tracked the second peak over time to obtain the waveform of the thoracic cavity.
[0075] Step S5: Smooth the distance change curve to remove sudden interference;
[0076] like Figure 5As shown, in the signal processing stage, the moving average algorithm is used to smooth the thoracic displacement data, and the sliding window averaging method is used to smooth the distance change curve data. The window size is set to 5 consecutive sampling points, and each sampling point corresponds to a 0.05-second time interval. Starting from the first sampling point, the average value of the data in each window is calculated sequentially, and the data boundaries are processed by symmetrical zero padding. The smoothed data is output as a new distance change curve, and the processing effect is verified by comparing the waveforms before and after smoothing. If the smoothing effect is insufficient, the window size is adjusted and the calculation is repeated.
[0077] Step S6: Process the thoracic movement waveform, obtain the dominant frequency through fast Fourier transform, and calculate the respiratory rate.
[0078] The Fast Fourier Transform (FFT) is used to perform spectral analysis on the signal, as shown in the following formula:
[0079]
[0080] Where j is the imaginary unit; f is the signal frequency; t is the time elapsed since the signal was emitted; and x(t) is the waveform of the thoracic cavity moving over time.
[0081] A method for detecting human respiratory rate based on acoustic FMCW technology involves transmitting a chirp signal from a mobile phone to the human chest cavity, generating a reflected signal. The time difference between the received and reflected signals is determined by calculating the autocorrelation function of the reflected and transmitted signals, thus calculating the distance from the chest cavity to the mobile phone. The second maximum value of the autocorrelation coefficient is then tracked, and the left-right movement of this second peak on the distance spectrum is observed to obtain a waveform of chest cavity movement. Finally, the period of the chest cavity waveform is analyzed to determine the respiratory rate of the target human body.
[0082] To demonstrate the effectiveness of this invention, a comparison is made between existing technologies that use radar as a detection device and this invention that uses a mobile phone as a detection device; for example... Figure 6 As shown, the method of the present invention mainly uses time-domain operations on the signal, namely, performing time-domain transformation of the signal by applying the autocorrelation function and Hilbert transform. This method is simpler, easier to understand, and easier to operate and implement.
[0083] The above description is merely an embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principle of the present invention should be included within the scope of the claims of the present invention.
Claims
1. A respiratory rate detection method based on acoustic wave FMCW, characterized in that: The method includes the following steps: Step S1: Use the mobile phone speaker to generate a sound wave signal with a continuously changing frequency. The starting frequency is low, and it gradually increases to high frequency. The sound wave signal is emitted in a loop to form a continuous sound wave detection sequence. Step S2: Use the mobile phone microphone to synchronously receive the reflected sound wave signal and time-align it with the original transmitted signal; Step S3: Filter the received reflected sound wave signal; Step S4: Perform autocorrelation calculation on the transmitted and reflected signals to generate a curve showing the change in distance of the thoracic cavity with respiratory motion, specifically as follows: Step S4-1: Perform autocorrelation calculation on the reflected signal and the transmitted signal to obtain the autocorrelation function. : ; in, This is the starting frequency emitted by the mobile phone. The echo signal filtered by the Butterworth bandpass filter; This refers to the time delay variable caused by the propagation time; Indicates the length of the integration time window; Step S4-2: Find the time difference between the reflected signal and the emitted signal, and generate a curve showing the change in distance of the thoracic cavity with respiratory motion, specifically: in the formula With a built-in time delay, a clearer contour image is obtained using the Hilbert transform. The transformed formula is as follows: ; in, The analytic signal after Hilbert transform; For time delay variables; The waveform after Hilbert transform will clearly show the first peak and the second peak. The horizontal axis, time, is then plotted using the formula: ; in, Represents distance, This represents the speed of sound; the distance corresponding to the second highest peak point minus the distance corresponding to the highest peak point equals the chest distance. Step S5: Smooth the distance change curve to remove sudden interference; Step S6: Process the thoracic movement waveform, obtain the dominant frequency through fast Fourier transform, and calculate the respiratory rate.
2. The respiratory rate detection method based on acoustic FMCW according to claim 1, characterized in that: In step S1, the starting frequency is low, gradually increasing to high frequency, specifically as follows: Low frequencies are defined as no greater than 17kHz, and high frequencies as no less than 23kHz. The calculation formula is as follows: ; in, It is the amplitude of the sound wave signal. It is the initial frequency of the signal. It is the final frequency of the signal. The time period of the linear frequency sweep is represented by t, which represents the time elapsed since the transmitted signal was emitted.
3. The respiratory rate detection method based on acoustic FMCW according to claim 1, characterized in that: In step S3, the received reflected sound wave signal is filtered, specifically as follows: The received signal, after removing high-frequency noise, is obtained by passing a low-pass filter, and then the echo data is obtained by passing a band-pass filter. : ; in, This refers to the time delay variable caused by the propagation time; It is the amplitude of the sound wave signal. It is the initial frequency of the signal. It is the final frequency of the signal. This represents the time period of the linear frequency sweep. It indicates the time elapsed since the signal was sent.
4. The respiratory rate detection method based on acoustic FMCW according to claim 1, characterized in that: In step S5, the distance variation curve is smoothed, specifically as follows: In the signal processing stage, a moving average algorithm is used to smooth the thoracic displacement data, and a sliding window averaging method is used to smooth the distance variation curve data. The window size is set to 5 consecutive sampling points, with each sampling point corresponding to a 0.05-second time interval. Starting from the first sampling point, the average value of the data in each window is calculated sequentially, and the data boundaries are processed by symmetrical zero padding. The smoothed data is output as a new distance variation curve, and the processing effect is verified by comparing the waveforms before and after smoothing. If the smoothing effect is insufficient, the window size is adjusted and the calculation is repeated.
5. The respiratory rate detection method based on acoustic FMCW according to claim 1, characterized in that: In step S6, the thoracic movement waveform is processed, and the dominant frequency is obtained through Fast Fourier Transform to calculate the respiratory rate. Specifically: The Fast Fourier Transform (FFT) is used to perform spectral analysis on the signal, as shown in the following formula: ; in, The imaginary unit; The signal frequency; The time elapsed since the signal was transmitted; The waveform represents the movement of the thoracic cavity over time.