A method for sleep apnea detection based on millimeter wave radar
By processing intermediate frequency signals and using adaptive threshold judgment, the problems of unstable target locking and high false detection rate in millimeter-wave radar sleep apnea detection are solved, achieving high-precision, adaptive sleep apnea detection that is suitable for detection in complex environments and for different individuals.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUBEI UNIV OF TECH
- Filing Date
- 2026-02-06
- Publication Date
- 2026-06-05
Smart Images

Figure CN122140189A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the fields of radar signal processing and vital sign detection technology, and in particular to a method for detecting sleep apnea based on millimeter-wave radar. Background Technology
[0002] The incidence of sleep-related breathing disorders, especially sleep apnea syndrome (SAS), is increasing year by year, and has become a significant issue affecting public health. Sleep apnea can lead to various complications such as hypoxemia, cardiovascular and cerebrovascular diseases, and cognitive decline. Therefore, long-term, continuous, and accurate monitoring of sleep apnea has important clinical significance and application value.
[0003] Current methods for detecting sleep apnea mainly rely on contact-based sensing devices, such as breathing belts, ECG electrodes, and pulse oximeters. Although these methods offer high accuracy, they require direct contact with the body, which can cause discomfort and affect sleep quality with prolonged use. Furthermore, they are less suitable for burn patients, infants, and people with sensitive skin, making it difficult to meet the needs of home-based and long-term sleep monitoring.
[0004] To overcome the limitations of contact-based detection methods, non-contact sleep apnea detection technology has gradually gained widespread attention. Existing non-contact methods mainly include solutions based on optical imaging, acoustic ranging, and electromagnetic wave sensing. Among these, optical and acoustic methods are susceptible to changes in ambient light, obstructions, temperature disturbances, and background noise, and lack stability during nighttime sleep and in complex home environments, thus limiting their application in practical sleep apnea detection.
[0005] In contrast, millimeter-wave radar sleep apnea detection technology based on electromagnetic waves has advantages such as insensitivity to light conditions, strong anti-interference ability, and the ability to penetrate bedding and achieve non-contact detection. It can highly sensitively detect minute changes in the chest and abdomen, and is gradually becoming an important research direction in the field of sleep apnea detection. In recent years, with the improvement of millimeter-wave radar chip integration, the rapid development of miniaturized antenna arrays and signal processing algorithms, millimeter-wave radar has shown good application prospects in scenarios such as home sleep monitoring, smart elderly care, and telemedicine. However, existing millimeter-wave radar-based sleep apnea detection technologies still face several key technical challenges: (1) In actual sleep environment, due to environmental clutter, hardware noise and non-target echoes, problems such as DC bias, pulse noise and phase change are likely to occur in radar signal, which leads to unstable target range unit locking, and even misjudgment of noise or false targets as human breathing echoes, thus affecting the reliable extraction of breathing signals.
[0006] (2) Existing methods for determining sleep apnea lack the ability to adapt to distance and individual differences, and mostly use fixed energy or amplitude thresholds to determine the breathing state. However, the amplitude of the breathing signal will vary significantly with factors such as measurement distance, human posture, bedding thickness and environmental noise. Fixed thresholds are difficult to adapt to the sleep apnea detection needs of multiple scenarios and different subjects, resulting in a high false detection rate and false negative rate.
[0007] Therefore, there is currently a lack of millimeter-wave radar sleep apnea detection methods that are suitable for real-world sleep scenarios, have anti-interference capabilities, and possess adaptive characteristics. Summary of the Invention
[0008] This application provides a sleep apnea detection method based on millimeter-wave radar to overcome the shortcomings of the aforementioned related technologies. The technical solution is as follows: In a first aspect, this application provides a sleep apnea detection method based on millimeter-wave radar, characterized in that it includes: The detection signal is transmitted to the target using millimeter-wave radar, and the intermediate frequency signal is obtained based on the echo signal. The signal transformation matrix is obtained based on intermediate frequency signal processing, and the signal transformation matrix is preprocessed. The dynamic energy change value of each frame in each range bin is calculated based on the preprocessed signal transformation matrix, and the target range bin of each frame is determined based on the statistical results of the dynamic energy change value. Whether the target is in a stable position is determined based on the dispersion of the target distance bin in each frame within the preset time window; Extract the phase signal at the target range bin in each frame within a preset time window when the position is stable, and preprocess the phase signal; The waveform transformation curve caused by the mechanical motion of the thoracic cavity is obtained by modeling based on the preprocessed phase signal, and the respiratory signal waveform curve of the target is obtained by filtering based on the waveform transformation curve. Detect sleep apnea events of the target based on the respiratory signal waveform curve; In this configuration, each row of the signal transformation matrix corresponds to each frame of the intermediate frequency signal, and each column of the signal transformation matrix corresponds to each distance cell.
[0009] In one alternative embodiment of the first aspect, obtaining the signal transformation matrix based on intermediate frequency signal processing includes: A distance-dimensional Fast Fourier Transform is performed on the intermediate frequency signal to construct the signal transformation matrix, which is expressed as: ; Where S represents the signal transformation matrix, and the element in the nth row and kth column of the signal transformation matrix is represented as... N is the total number of rows in the signal transformation matrix, M is the total number of columns in the signal transformation matrix, and the symbols in [ ] represent the index of the corresponding distance bin. .
[0010] In one alternative embodiment of the first aspect, the preprocessing of the signal transformation matrix includes: Extract the column vectors of the signal transformation matrix, calculate the average value of the signal value in each column vector, and obtain the static component estimate for each distance cell; Extract each row vector of the signal transformation matrix, each row vector including the signal value of the same frame at each range cell, and subtract the signal value of the same frame at each range cell from the static component estimate of the corresponding range cell to obtain the signal value after eliminating DC interference; Output the preprocessed signal transformation matrix.
[0011] In one alternative embodiment of the first aspect, the step of calculating the dynamic energy change value of each frame in each range bin based on the preprocessed signal transformation matrix, and determining the target range bin for each frame based on the statistical results of the dynamic energy change value, includes: The dynamic energy change value of each frame in each distance cell is obtained by differential calculation and modulus calculation based on the signal value of each frame in the same distance cell as the previous adjacent frame. Each frame and the consecutive frames preceding each frame are determined to obtain the corresponding consecutive frame window. The dynamic energy change values of all frames within the consecutive frame window at the same distance bin are accumulated to obtain the accumulated dynamic energy change value of each frame in each distance bin. The maximum value of the cumulative dynamic energy change in each range bin for each frame is obtained statistically, and the range bin index corresponding to the maximum value is determined. For each frame, a history sliding window of a preset length is constructed. The history sliding window includes each frame and the consecutive historical frames before each frame. Count the number of times each distance bin index appears in the historical sliding window corresponding to each frame, and use the distance bin index with the most occurrences as the target distance bin index for the corresponding frame. The target distance bin for each frame is determined based on the mapping relationship between the target distance bin index and the distance bin.
[0012] In one alternative embodiment of the first aspect, determining whether the target is in a stable position based on the dispersion of the target distance bins in each frame within a preset time window includes: An index sequence is obtained based on the distance bin index of the target distance bin for each frame within a preset time window; The standard deviation of the distance warehouse index within the index sequence is calculated as the degree of dispersion. By comparing the standard deviation with the standard deviation threshold, if the standard deviation is less than the standard deviation threshold, the target is determined to be in a stable position.
[0013] In one alternative embodiment of the first aspect, the preprocessing of the phase signal includes: The phase difference signal of each frame is obtained by performing differential calculation on the phase signal of each frame and the phase signal of the previous adjacent frame. If the phase difference signal is greater than Or the phase difference signal is less than Then, phase correction is performed on the phase signal of the corresponding frame; The phase difference signals of multiple consecutive frames within a preset sliding window are obtained to obtain the phase difference sequence of the preset sliding window; Calculate the absolute value of the forward difference between the phase difference signal of each frame and the adjacent previous frame in the phase difference sequence, and calculate the absolute value of the backward difference between the phase difference signal of each frame and the adjacent next frame. If the absolute value of the forward difference or the absolute value of the backward difference is greater than the dynamic threshold, then the phase difference signal of the corresponding frame is determined to be a noise point; Noise points are corrected by linear interpolation. The preprocessed phase signal is obtained.
[0014] In one alternative embodiment of the first aspect, detecting sleep apnea events of the target based on the respiratory signal waveform curve includes: The respiratory signal energy for each consecutive detection cycle is calculated based on the respiratory signal waveform curve. The respiratory signal energy and the respiratory signal energy threshold are compared in each detection cycle. If the respiratory signal energy is less than the respiratory signal energy threshold, the sleep apnea counter is incremented by 1; otherwise, the value of the sleep apnea counter is cleared to zero. If the sleep apnea counter counts greater than the first counting threshold for multiple consecutive detection cycles, the target is determined to have entered a sleep apnea state; otherwise, the target is determined to be in a normal breathing state. If the target is determined to have entered a state of sleep apnea, and the respiratory signal energy in the next detection cycle is greater than a preset multiple of the respiratory signal energy threshold, then the normal breathing counter is incremented by 1; otherwise, the normal breathing counter is cleared to zero. If the continuous count of the normal breathing counter is greater than the second counting threshold within multiple consecutive detection cycles, the target is determined to have recovered to a normal breathing state; otherwise, the target is determined to be in a sleep apnea state.
[0015] Secondly, this application also provides a sleep apnea detection device based on millimeter-wave radar, comprising: The signal transmitting and receiving unit is used to transmit detection signals to the target via millimeter-wave radar and obtain intermediate frequency signals based on the echo signals; The signal processing unit is used to obtain the signal transformation matrix based on intermediate frequency signal processing. The signal processing unit is also used to preprocess the signal transformation matrix, calculate the dynamic energy change value of each frame in each distance bin based on the preprocessed signal transformation matrix, and determine the target distance bin of each frame based on the statistical results of the dynamic energy change value. The signal processing unit is also used to determine whether the target is in a stable sleep state based on the dispersion of the target distance bin in each frame within a preset time window. The signal processing unit is also used to extract the phase signal at the target distance bin in each frame within a preset time window when the target is in a stable sleep state, and to preprocess the phase signal. The signal processing unit is also used to model the waveform transformation curve caused by the mechanical motion of the thoracic cavity based on the preprocessed phase signal, and to filter the waveform transformation curve to obtain the target's respiratory signal waveform curve. A sleep apnea detection unit is used to detect sleep apnea events of the target based on the breathing signal waveform curve; In this configuration, each row of the signal transformation matrix corresponds to each frame of the intermediate frequency signal, and each column of the signal transformation matrix corresponds to each distance cell.
[0016] Thirdly, this application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method provided by the first aspect of this application or any implementation thereof.
[0017] Fourthly, this application also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the method provided by the first aspect of this application or any implementation thereof.
[0018] The beneficial effects of the technical solution provided in this application include at least the following: This application obtains a signal transformation matrix by processing the intermediate frequency signal and performs preprocessing, effectively suppressing noise problems such as impulse noise and phase abrupt changes, significantly improving the stability of target distance cell locking, and laying a solid foundation for subsequent reliable extraction of respiratory signals. Furthermore, the stability of the target position is determined by calculating the dispersion of the target distance cell. Based on this, by extracting the phase signal in the stable state and modeling it, the respiratory waveform caused by thoracic mechanical movement can be accurately separated. Furthermore, by calculating the respiratory waveform energy and using an adaptive threshold, it achieves adaptation to factors such as measurement distance, human posture, and bedding thickness, overcoming the shortcomings of existing technologies that use fixed thresholds, resulting in high false detection and false negative rates in varying scenarios and for different individuals. Ultimately, high-precision detection of sleep apnea events is achieved.
[0019] Furthermore, this application demonstrates excellent anti-interference capabilities and distance adaptability under complex real-world sleep scenarios, including environmental noise, different populations, and varying sleeping positions. It achieves non-contact, highly reliable, long-term continuous monitoring, effectively addressing key issues such as discomfort from wearing contact devices and insufficient stability of existing non-contact technologies. This has significant clinical application value for home-based sleep health monitoring and early screening for sleep apnea syndrome. It can achieve high-precision monitoring of sleep apnea events under complex conditions, including environmental noise, different populations, and varying sleeping positions, effectively solving problems such as unstable target locking, significant noise interference, and lack of distance adaptability in state determination in existing technologies. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in this application or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a schematic diagram of the structure of a detection device equipped with millimeter-wave radar provided in an embodiment of this application; Figure 2 This is one of the flowcharts illustrating a sleep apnea detection method based on millimeter-wave radar provided in this application embodiment; Figure 3 This is a schematic diagram of the respiratory signal waveform curve of a sleep apnea detection method based on millimeter-wave radar provided in an embodiment of this application; Figure 4 This is a second schematic flowchart of a sleep apnea detection method based on millimeter-wave radar provided in the embodiments of this application; Figure 5This is a schematic diagram of a sleep apnea detection device based on millimeter-wave radar provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation
[0022] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0023] The terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or apparatus that includes a series of steps or modules is not limited to the steps or modules listed, but may optionally include steps or modules not listed, or may optionally include other steps or modules inherent to such process, method, product, or apparatus.
[0024] It should be noted that the terms "first" and "second" used in this application are merely to distinguish similar objects and do not represent a specific ordering of the objects. It is understood that "first" and "second" can be interchanged in a specific order or sequence where permitted. It should be understood that the objects distinguished by "first" and "second" can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in an order other than those described or illustrated herein.
[0025] The sleep apnea detection device provided in this application embodiment is as follows: Figure 1 As shown, Figure 1 A schematic diagram of a specific sleep apnea detection device is provided.
[0026] It should be noted that in the detection scenario of this application embodiment, the detection device equipped with millimeter-wave radar can be set at a distance D0 in front of the human target. The specific value of the distance can be set according to the actual scenario. The detection device equipped with millimeter-wave radar provided in this application embodiment specifically includes the following components: voltage-controlled oscillator (VCO), power amplifier (PA), transmit antenna (TX), receive antenna (RX), low-noise amplifier (LNA), band-pass filter (BPF), and digital signal processor (DSP).
[0027] A schematic diagram of the detection equipment equipped with millimeter-wave radar is shown below. Figure 1 As shown, the testing process of the testing equipment includes: Signal transmission: The detection equipment generates a linear frequency modulated continuous wave (Chirp signal) under timing control through the voltage-controlled oscillator (VCO) inside the millimeter-wave radar. After being amplified by the power amplifier (PA), the linear frequency modulated continuous wave is transmitted to the detection target through the transmitting antenna (TX).
[0028] Signal reception and mixing: The echo signal carrying the human chest cavity displacement information X(t) reflected from the target is captured by the receiving antenna (RX) and amplified by a low-noise amplifier (LNA). In order to preserve complete phase information, the system can adopt a quadrature demodulation architecture: the amplified echo signal and the local oscillator signal generated by the VCO are mixed in two mixers (one of the local oscillator signals is phase-shifted by 90°).
[0029] Through this orthogonal sampling architecture, the obtained complex echo signal can completely retain phase information, thereby accurately inverting the minute displacement X(t) of the human chest cavity using phase changes, which can provide a data foundation for subsequent high-precision vital sign extraction.
[0030] Intermediate frequency signal acquisition: The mixed signal passes through a bandpass filter (BPF) to obtain an intermediate frequency (IF) signal containing the beat frequency. This IF signal is divided into an in-phase component (I-path) and a quadrature component (Q-path).
[0031] Digitalization and DSP processing: The analog I and Q signals are sampled by an analog-to-digital converter (ADC) and converted into digital signals I(n) and Q(n). These digital signals are then input to a digital signal processor (DSP) for further processing.
[0032] Figure 1The VCO, PA, LNA, mixer, ADC, and DSP functional modules shown can be integrated into the TI IWR6843 millimeter-wave radar sensor chip. The signal processing flow of the sleep apnea detection method based on millimeter-wave radar provided in this application embodiment can be executed by the digital signal processor in the chip, thereby realizing the detection of sleep apnea events.
[0033] The present application will now be described in detail with reference to specific embodiments.
[0034] Next, combine Figure 2 This application introduces a sleep apnea detection method based on millimeter-wave radar, as provided in its embodiments. For details, please refer to... Figure 2 , Figure 2 This illustration shows a flowchart of a sleep apnea detection method based on millimeter-wave radar provided in an embodiment of this application. Figure 2 As shown, the method includes the following steps: S201 transmits detection signals to the target via millimeter-wave radar and obtains intermediate frequency signals based on the echo signals; S202, Based on intermediate frequency signal processing, a signal transformation matrix is obtained, and the signal transformation matrix is preprocessed; S203, calculate the dynamic energy change value of each frame in each range bin based on the preprocessed signal transformation matrix, and determine the target range bin of each frame based on the statistical results of the dynamic energy change value. S204, determine whether the target is in a stable position based on the dispersion of the target distance bin in each frame within the preset time window; S205, extract the phase signal at the target range bin in each frame within a preset time window when the position is stable, and preprocess the phase signal; S206, Based on the preprocessed phase signal, a waveform transformation curve caused by the mechanical motion of the thoracic cavity is obtained by modeling, and the target's respiratory signal waveform curve is obtained by filtering based on the waveform transformation curve; S207, Detect sleep apnea events of the target based on the respiratory signal waveform curve.
[0035] Specifically, in S201, it can be based on Figure 1 The detection equipment shown transmits a detection signal—a linear frequency modulated continuous wave amplified by a power amplifier (PA)—to the target using a millimeter-wave radar. It then acquires the echo signal reflected from the target. Based on this echo signal, an intermediate frequency (IF) signal can be obtained. For details of the processing, please refer to [link to relevant documentation]. Figure 1 The description of the corresponding embodiments will not be repeated here.
[0036] In some embodiments, S202 specifically includes: A distance-dimensional Fast Fourier Transform is performed on the intermediate frequency signal to construct the signal transformation matrix, which is expressed as: ; Where S represents the signal transformation matrix, which has N rows and M columns. Each row corresponds to a frame of the intermediate frequency signal, and each column corresponds to a distance cell in the distance dimension. The element in the nth row and kth column of the signal transformation matrix is represented as... N is the total number of rows in the signal transformation matrix, M is the total number of columns in the signal transformation matrix, and the symbols in [ ] represent the index of the corresponding distance bin. .
[0037] Furthermore, the preprocessing step in S202 of the signal transformation matrix can be performed to eliminate DC interference, resulting in a processed signal transformation matrix, specifically including: Extract the column vectors of the signal transformation matrix. Each column vector represents the signal value in the same range cell for each frame. For example, the column vector when the range cell number k=1 is... ; The average value of the signal in each column vector is calculated to obtain the static component estimate for each range cell, expressed by the following formula: ; Furthermore, each row vector of the signal transformation matrix is extracted, and each row vector includes the signal value of the same frame at each range cell. The difference between the signal value of the same frame at each range cell and the static component estimate of the corresponding range cell is calculated to obtain the signal value after eliminating DC interference, expressed as the following formula: ; in, This represents the element of the k-th distance bin in the n-th frame of the signal transformation matrix S, where N represents the total number of frames. This represents the estimated value of the static component corresponding to distance k. This represents the matrix elements after DC interference has been eliminated.
[0038] The above steps yield the processed signal transformation matrix S', which eliminates static clutter in the original matrix S and preserves high-frequency motion information.
[0039] Furthermore, step S203 can be executed, wherein the dynamic energy change value of each frame in each range cell can be calculated based on the following process: Based on the signal values of each frame and the previous adjacent frame at the same range cell, differential calculation and modulus are performed to obtain the dynamic energy change value of each frame in each range cell, expressed as the following formula: ; in, This represents the signal value of the nth frame at distance k in the processed signal transformation matrix. This represents the signal value at distance k in the (n-1)th frame of the preceding adjacent frame in the processed signal transformation matrix. This indicates that the real part of the corresponding signal value is extracted. This indicates that the imaginary part of the corresponding signal value is extracted. This represents the dynamic energy change value at distance k in the nth frame.
[0040] It should be noted that the dynamic energy change value can be understood as the complex amplitude change value, which is specifically used to reflect the motion energy of the target in the time domain. When the human chest undergoes a slight displacement with breathing or heartbeat, the echo phase changes, resulting in an increase in the complex amplitude change value; while the change value corresponding to stationary clutter is close to zero, thus achieving effective differentiation between moving targets and static backgrounds.
[0041] Furthermore, the target range bin for each frame can be determined based on the statistical results of dynamic energy change values, specifically including: Each frame and the signals of the consecutive frames preceding each frame can be extracted to obtain the continuous frame window of each frame. For example, the continuous frame window of the nth frame specifically includes the nth frame and a preset number of consecutive frames preceding the nth frame, thus constructing a continuous frame window of a total of L frames.
[0042] The cumulative dynamic energy change value is obtained by summing the dynamic energy change values of all frames within a continuous frame window at the same distance bin, and the formula is applied: ; in, Indicates that the nth frame is in the same distance compartment The cumulative value of dynamic energy change.
[0043] Furthermore, the maximum value of the cumulative dynamic energy change in each range bin for each frame is obtained statistically, and the range bin index corresponding to the maximum value is determined.
[0044] Specifically, the cumulative value of dynamic energy change at each distance bin in the nth frame can be obtained. Determine the maximum value of the accumulated dynamic energy change at each distance bin in the nth frame, and extract the distance bin index corresponding to the maximum value of the accumulated dynamic energy change. The distance bin index of the nth frame is obtained and marked as... Apply the formula: ; in, This indicates the starting value of the distance warehouse index. This represents the end value of the distance warehouse index. , That is, corresponding to index 0, The corresponding index is M-1.
[0045] Next, we can further identify the target distance bin index based on the distance bin index of each frame, specifically including: A history sliding window of a preset length can be constructed for each frame. The history sliding window includes each frame and the consecutive historical frames before each frame. Count the number of times each distance bin index appears in the historical sliding window corresponding to each frame, and use the distance bin index with the most occurrences as the target distance bin index for the corresponding frame. The target distance bin is determined based on the mapping relationship between the target distance bin index and the distance bin, that is, the target distance bin in which the user is located in the corresponding frame.
[0046] Specifically, the history sliding window can be set to a window with a length of 20, corresponding to 20 frames.
[0047] In some embodiments, de-jittering can be performed based on a historical sliding window to exclude distance bins with edge jitter and update the target distance bin index, including the following steps: Calculate the distance bin index difference between the current frame's distance bin index and the target distance bin index of the adjacent previous frame. If the absolute value of the distance bin index difference corresponding to the current frame is greater than the difference threshold, then add the current frame's distance bin index to the index temporary storage area of the historical sliding window. Determine the distance bin index difference of multiple consecutive frames before the current frame in the historical sliding window. If the absolute value of the distance bin index difference of multiple consecutive frames is less than or equal to the difference threshold, and the number of frames of multiple consecutive frames is greater than or equal to the number of frames threshold, then add the distance bin index of the current frame to the index temporary storage area of the historical sliding window. Based on the index buffer of the historical sliding window, recalculate the distance bin index that appears most frequently, and update the target distance bin for the current frame.
[0048] The difference threshold can be set to... .
[0049] By following the steps above, we can ensure target tracking sensitivity while suppressing edge jitter.
[0050] Furthermore, the stability of the target's position can be determined based on the dispersion of the target range bins in each frame within a preset time window, specifically including: The distance bin index of the target distance bin can be obtained for each frame within a preset time window, resulting in an index sequence, which can be represented as: ; The standard deviation of the distance warehouse index within the index sequence is calculated as the degree of dispersion, using the formula: ; Comparison of standard deviations and standard deviation threshold At standard deviation Less than the standard deviation threshold Under these circumstances, it is determined that the target is in a stable position within a preset time window.
[0051] The signal value of each frame corresponding to the stable sleep state at the corresponding target distance bin can be further extracted for subsequent analysis.
[0052] In some embodiments, in S205, the phase signal at the target range bin in each frame within a preset time window when the position is stable can be extracted, and the phase can be solved by arctangent, applying the formula: ; in, This represents the phase signal of the nth frame. This represents the imaginary part of the signal in the nth frame. Let n represent the real part of the signal in the nth frame.
[0053] Furthermore, the phase signal can be preprocessed, including the following steps: The phase difference signal of each frame is calculated by performing a differential calculation on the phase signal of each frame and the phase signal of the previous adjacent frame. The formula is then applied: ; Since the range of the arctangent function is If the phase difference signal is greater than Or the phase difference signal is less than Then, phase correction is performed on the phase signal of the corresponding frame, using the formula: ; Furthermore, a three-point sliding filter method based on adaptive thresholding is used to eliminate impulse noise: The phase difference signals of multiple consecutive frames within a preset sliding window are obtained to form the phase difference sequence of the preset sliding window, which is represented as follows: ; Calculate the absolute value of the forward difference between the phase difference signal of each frame and the adjacent previous frame in the phase difference sequence, and calculate the absolute value of the backward difference between the phase difference signal of each frame and the adjacent next frame. Specifically, the absolute value of the forward difference The calculation formula is: Backward difference absolute value The calculation formula is: .
[0054] If the absolute value of the forward difference Or the absolute value of the backward difference Greater than the dynamic threshold Then the phase difference signal of the corresponding frame is determined. Noise point; Noise points are corrected using linear interpolation, applying the following formula: ; The preprocessed phase signal is obtained.
[0055] In some embodiments, the threshold can be dynamically updated by statistically analyzing the change characteristics of the phase difference signal over multiple consecutive frames, using the median and median absolute deviation (MAD). The specific steps are as follows: The absolute value of the forward difference of the phase difference signal in each frame of the phase difference sequence is calculated and expressed as: ; And stored in the forward differential sequence of the phase differential signal. : ; Calculate sequence First median This represents the central position of the overall trend of change; Obtain the absolute value of the forward difference of the phase difference signal for each frame. and The second median of the sequence of absolute differences, i.e.: ; The dynamic threshold is obtained based on the first median and the second median, and the formula is applied: ; Where K is a coefficient.
[0056] Furthermore, step S206 can be executed to model the waveform transformation curve caused by the mechanical motion of the thoracic cavity based on the preprocessed phase signal, specifically including: The cumulative value of the phase signal in the nth frame can be obtained by cumulative calculation based on the phase signal preprocessed by S205, using the following formula: ; in, This represents the initial value of the phase signal. This indicates the calculation of the cumulative value of the phase difference signal of the consecutive frames before the nth frame, where m represents the sequence number of each frame in the consecutive frames.
[0057] The waveform transformation curve caused by the mechanical motion of the thoracic cavity can be obtained by combining the relationship between phase and displacement with the cumulative value of the phase signal in each frame. Apply the formula: ; It should be noted that the thoracic mechanical motion curve is caused by the combined action of respiration and heartbeat. The displacement waveform caused by thoracic mechanical motion is separated and processed according to the different frequency bands corresponding to the respiration and heartbeat signals.
[0058] For example, the respiratory signal can be effectively acquired in an embedded system by processing it with a fourth-order IIR bandpass filter in the range of [0.1–0.5 Hz], resulting in the target's respiratory signal waveform curve, which can be denoted as... The respiratory signal waveform curve is as follows Figure 3 As shown, Figure 3 A schematic diagram of a respiratory signal waveform is shown.
[0059] Next, we can perform step S207 to detect sleep apnea events in the target based on the respiratory signal waveform curve. For details, please refer to... Figure 4 , Figure 4 This example illustrates a flowchart for detecting sleep apnea events based on respiratory signal waveform curves, including the following steps: S301, Calculate the respiratory signal energy for each consecutive detection cycle based on the respiratory signal waveform curve.
[0060] Specifically, the energy of the respiratory waveform within the rectangular window corresponding to the detection period can be calculated and multiplied by an amplification factor to enhance the signal-to-noise ratio, using the formula: ; The respiratory waveform energy is obtained for calculation. .
[0061] The detection cycle can be set to calculate the respiratory signal energy every 50 milliseconds.
[0062] S302, compare the respiratory signal energy and respiratory signal energy threshold for each detection cycle.
[0063] If respiratory signal energy Less than the respiratory signal energy threshold : ; Then execute step S303: S303, increment the sleep apnea counter by 1; Otherwise, proceed with step S304: S304, reset the sleep apnea counter to zero to confirm that the target has entered a normal breathing state; S305, determine whether the continuous count of the sleep apnea counter is greater than the first count threshold within multiple consecutive detection cycles; If the continuous count of the sleep apnea counter exceeds the first count threshold, proceed to step S306: S306, The target has entered a state of sleep apnea; Otherwise, proceed with step S307: S307, confirming that the target is in a normal breathing state; If, based on S305, it is determined that the target has entered a state of sleep apnea, then after S306, execute S308, including: S308, compare the respiratory signal energy of the next detection cycle with the respiratory signal energy threshold of a preset multiple.
[0064] If the respiratory signal energy in the next detection cycle is greater than a preset multiple of the respiratory signal energy threshold, then execute S309: S309, increment the normal breathing counter by 1; Otherwise, execute S310: S310: Clear the value of the normal breathing counter to zero and confirm that the target has entered a state of sleep apnea. S311, determine whether the continuous count of the normal breathing counter is greater than the second counting threshold within multiple consecutive detection cycles.
[0065] If the continuous count of the normal breathing counter exceeds the second counting threshold, proceed to S307 to confirm that the target has returned to a normal breathing state.
[0066] Otherwise, proceed to S306 to confirm that the target is in a state of sleep apnea.
[0067] For example, the first counting threshold and the second counting threshold can both be set to 40, or they can be set separately. The preset multiple can be set to 3 times, but this application embodiment does not limit this.
[0068] In some embodiments, after determining in S306 that the target is in a state of sleep apnea, the duration of the target being in a state of sleep apnea can be recorded. Similarly, after determining in S308 that the target is in a state of normal breathing, the duration of the target being in a state of normal breathing can also be recorded.
[0069] In some embodiments, after determining in S308 that the target is in a normal breathing state, the respiratory signal energy threshold can be updated at preset time intervals, for example, the respiratory signal energy threshold can be updated every 3 seconds, including the following steps: Based on respiratory signal energy Perform exponential smoothing: ; in, For smoothing coefficients, This refers to the smoothed respiratory signal energy.
[0070] Accumulate and move average the data within a preset time period preceding the current frame (e.g., 60 frames of data within 3 seconds): ; in, This represents the total number of frames within the most recent preset time period, where n represents the current frame and i represents the frame number within the preset time period. Accumulated average energy of respiratory signals after accumulation and moving average.
[0071] The respiratory signal energy threshold can be updated in real time based on the respiratory waveform energy within the most recent preset time period under normal respiratory conditions. This allows the respiratory signal energy threshold to be adjusted according to the actual energy intensity of the respiratory signal. Furthermore, the respiratory signal energy threshold can be adaptively adjusted based on the target distance chamber and the respiratory signal energy. Specifically, this includes: For the index of the target distance warehouse, Accumulate the average energy of respiratory signals from targets in a normal respiratory state within the most recent stored window.
[0072] Multiply the cumulative average energy of the respiratory signal by the adjustment factor. The respiratory signal energy threshold was obtained. .
[0073] The respiratory signal energy threshold can be adaptively changed based on the respiratory signal energy and target distance within a window when the target is in a normal breathing state: .
[0074] Optionally, since the respiratory signal energy within a window changes very little within a 50ms frame, a threshold can be set to update up to once every three seconds.
[0075] In this way, the method provided in this application embodiment can be applied to different application scenarios such as different groups of people, different measurement distances, different human postures, and different bedding thicknesses by dynamically updating the threshold, and has good adaptability to various environmental conditions.
[0076] The following are apparatus embodiments of this application, which can be used to execute the method embodiments of this application. For details not disclosed in the apparatus embodiments of this application, please refer to the method embodiments of this application.
[0077] Please see below. Figure 5 The image below is a schematic diagram of a sleep apnea detection device based on millimeter-wave radar, provided as an exemplary embodiment of this application. The device includes: The signal transmitting and receiving unit is used to transmit detection signals to the target via millimeter-wave radar and obtain intermediate frequency signals based on the echo signals; The signal processing unit is used to obtain the signal transformation matrix based on intermediate frequency signal processing. The signal processing unit is also used to preprocess the signal transformation matrix, calculate the dynamic energy change value of each frame in each distance bin based on the preprocessed signal transformation matrix, and determine the target distance bin of each frame based on the statistical results of the dynamic energy change value. The signal processing unit is also used to determine whether the target is in a stable sleep state based on the dispersion of the target distance bin in each frame within a preset time window. The signal processing unit is also used to extract the phase signal at the target distance bin in each frame within a preset time window when the target is in a stable sleep state, and to preprocess the phase signal. The signal processing unit is also used to model the waveform transformation curve caused by the mechanical motion of the thoracic cavity based on the preprocessed phase signal, and to filter the waveform transformation curve to obtain the target's respiratory signal waveform curve. A sleep apnea detection unit is used to detect sleep apnea events of the target based on the breathing signal waveform curve; In this configuration, each row of the signal transformation matrix corresponds to each frame of the intermediate frequency signal, and each column of the signal transformation matrix corresponds to each distance cell.
[0078] It should be noted that the above embodiments, when implementing a sleep apnea detection method based on millimeter-wave radar, are only illustrative examples of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the device and method embodiments provided above belong to the same concept, and their implementation process is detailed in the method embodiments, which will not be repeated here.
[0079] This application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of any of the methods described above.
[0080] Please see Figure 6 This is a structural block diagram of an electronic device provided in an embodiment of this application.
[0081] like Figure 6 As shown, the electronic device includes a processor and a memory.
[0082] In this embodiment, the processor is the control center of the computer system, and can be a processor of a physical machine or a processor of a virtual machine. The processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor can be implemented using at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), or PLA (Programmable Logic Array).
[0083] A processor can also include a main processor and a coprocessor. The main processor is used to process data in the wake-up state and is also called the CPU (Central Processing Unit). The coprocessor is a low-power processor used to process data in the standby state.
[0084] The memory may include one or more computer-readable storage media, which may be non-transitory. The memory may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments of this application, the non-transitory computer-readable storage media in the memory are used to store at least one instruction, which is executed by a processor to implement the methods in the embodiments of this application.
[0085] In some embodiments, the electronic device further includes a peripheral device interface and at least one peripheral device. The processor, memory, and peripheral device interface are connected via a bus or signal line. Each peripheral device is connected to the peripheral device interface via a bus, signal line, or circuit board. Specifically, the peripheral device includes: a display screen, a camera, and audio circuitry. The peripheral device interface can be used to connect at least one I / O (Input / Output) related peripheral device to the processor and memory.
[0086] In some embodiments of this application, the processor, memory, and peripheral device interfaces are integrated on the same chip or circuit board; in other embodiments of this application, any one or two of the processor, memory, and peripheral device interfaces can be implemented on separate chips or circuit boards. This application does not specifically limit the implementation in this regard.
[0087] The electronic device structural block diagrams shown in the embodiments of this application do not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or use different component arrangements.
[0088] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the methods in any of the foregoing embodiments. The computer-readable storage medium may include, but is not limited to, any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, microdrives, as well as magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic cards or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.
[0089] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the parts that contribute to the related technology, can be embodied in the form of software products. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0090] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application.
Claims
1. A method for detecting sleep apnea based on millimeter-wave radar, characterized in that, include: The detection signal is transmitted to the target using millimeter-wave radar, and the intermediate frequency signal is obtained based on the echo signal. The signal transformation matrix is obtained based on intermediate frequency signal processing, and the signal transformation matrix is preprocessed. The dynamic energy change value of each frame in each range bin is calculated based on the preprocessed signal transformation matrix, and the target range bin of each frame is determined based on the statistical results of the dynamic energy change value. Whether the target is in a stable position is determined based on the dispersion of the target distance bin in each frame within the preset time window; Extract the phase signal at the target range bin in each frame within a preset time window when the position is stable, and preprocess the phase signal; The waveform transformation curve caused by the mechanical motion of the thoracic cavity is obtained by modeling based on the preprocessed phase signal, and the respiratory signal waveform curve of the target is obtained by filtering based on the waveform transformation curve. Detect sleep apnea events of the target based on the respiratory signal waveform curve; In this configuration, each row of the signal transformation matrix corresponds to each frame of the intermediate frequency signal, and each column of the signal transformation matrix corresponds to each distance cell.
2. The sleep apnea detection method based on millimeter-wave radar according to claim 1, characterized in that, The signal transformation matrix obtained based on intermediate frequency signal processing includes: A distance-dimensional Fast Fourier Transform is performed on the intermediate frequency signal to construct the signal transformation matrix, which is expressed as: ; Where S represents the signal transformation matrix, and the element in the nth row and kth column of the signal transformation matrix is represented as... N is the total number of rows in the signal transformation matrix, M is the total number of columns in the signal transformation matrix, and the symbols in [ ] represent the index of the corresponding distance bin. .
3. The sleep apnea detection method based on millimeter-wave radar according to claim 2, characterized in that, The preprocessing of the signal transformation matrix includes: Extract the column vectors of the signal transformation matrix, calculate the average value of the signal value in each column vector, and obtain the static component estimate for each distance cell; Extract each row vector of the signal transformation matrix, each row vector including the signal value of the same frame at each range cell, and subtract the signal value of the same frame at each range cell from the static component estimate of the corresponding range cell to obtain the signal value after eliminating DC interference; Output the preprocessed signal transformation matrix.
4. The sleep apnea detection method based on millimeter-wave radar according to claim 2, characterized in that, The calculation of the dynamic energy change value of each frame in each range bin based on the preprocessed signal transformation matrix, and the determination of the target range bin for each frame based on the statistical results of the dynamic energy change value, includes: The dynamic energy change value of each frame in each distance cell is obtained by differential calculation and modulus calculation based on the signal value of each frame in the same distance cell as the previous adjacent frame. Each frame and the consecutive frames preceding each frame are determined to obtain the corresponding consecutive frame window. The dynamic energy change values of all frames within the consecutive frame window at the same distance bin are accumulated to obtain the accumulated dynamic energy change value of each frame in each distance bin. The maximum value of the cumulative dynamic energy change in each range bin for each frame is obtained statistically, and the range bin index corresponding to the maximum value is determined. For each frame, a history sliding window of a preset length is constructed. The history sliding window includes each frame and the consecutive historical frames before each frame. Count the number of times each distance bin index appears in the historical sliding window corresponding to each frame, and use the distance bin index with the most occurrences as the target distance bin index for the corresponding frame. The target distance bin for each frame is determined based on the mapping relationship between the target distance bin index and the distance bin.
5. The sleep apnea detection method based on millimeter-wave radar according to claim 4, characterized in that, The step of determining whether the target is in a stable position based on the dispersion of the target distance bin in each frame within a preset time window includes: An index sequence is obtained based on the distance bin index of the target distance bin for each frame within a preset time window; The standard deviation of the distance warehouse index within the index sequence is calculated as the degree of dispersion. By comparing the standard deviation with the standard deviation threshold, if the standard deviation is less than the standard deviation threshold, the target is determined to be in a stable position.
6. The sleep apnea detection method based on millimeter-wave radar according to claim 2, characterized in that, The preprocessing of the phase signal includes: The phase difference signal of each frame is obtained by performing differential calculation on the phase signal of each frame and the phase signal of the previous adjacent frame. If the phase difference signal is greater than Or the phase difference signal is less than Then, phase correction is performed on the phase signal of the corresponding frame; The phase difference signals of multiple consecutive frames within a preset sliding window are obtained to obtain the phase difference sequence of the preset sliding window; Calculate the absolute value of the forward difference between the phase difference signal of each frame and the adjacent previous frame in the phase difference sequence, and calculate the absolute value of the backward difference between the phase difference signal of each frame and the adjacent next frame. If the absolute value of the forward difference or the absolute value of the backward difference is greater than the dynamic threshold, then the phase difference signal of the corresponding frame is determined to be a noise point; Noise points are corrected by linear interpolation. The preprocessed phase signal is obtained.
7. The sleep apnea detection method based on millimeter-wave radar according to claim 2, characterized in that, The detection of sleep apnea events based on the respiratory signal waveform curve includes: The respiratory signal energy for each consecutive detection cycle is calculated based on the respiratory signal waveform curve. The respiratory signal energy and the respiratory signal energy threshold are compared in each detection cycle. If the respiratory signal energy is less than the respiratory signal energy threshold, the sleep apnea counter is incremented by 1; otherwise, the value of the sleep apnea counter is cleared to zero. If the sleep apnea counter counts greater than the first counting threshold for multiple consecutive detection cycles, the target is determined to have entered a sleep apnea state; otherwise, the target is determined to be in a normal breathing state. If the target is determined to have entered a state of sleep apnea, and the respiratory signal energy in the next detection cycle is greater than a preset multiple of the respiratory signal energy threshold, then the normal breathing counter is incremented by 1; otherwise, the normal breathing counter is cleared to zero. If the continuous count of the normal breathing counter is greater than the second counting threshold within multiple consecutive detection cycles, the target is determined to have recovered to a normal breathing state; otherwise, the target is determined to be in a sleep apnea state.
8. A sleep apnea detection device based on millimeter-wave radar, characterized in that, include: The signal transmitting and receiving unit is used to transmit detection signals to the target via millimeter-wave radar and obtain intermediate frequency signals based on the echo signals; The signal processing unit is used to obtain the signal transformation matrix based on intermediate frequency signal processing. The signal processing unit is also used to preprocess the signal transformation matrix, calculate the dynamic energy change value of each frame in each distance bin based on the preprocessed signal transformation matrix, and determine the target distance bin of each frame based on the statistical results of the dynamic energy change value. The signal processing unit is also used to determine whether the target is in a stable sleep state based on the dispersion of the target distance bin in each frame within a preset time window. The signal processing unit is also used to extract the phase signal at the target distance bin in each frame within a preset time window when the target is in a stable sleep state, and to preprocess the phase signal. The signal processing unit is also used to model the waveform transformation curve caused by the mechanical motion of the thoracic cavity based on the preprocessed phase signal, and to filter the waveform transformation curve to obtain the target's respiratory signal waveform curve. A sleep apnea detection unit is used to detect sleep apnea events of the target based on the breathing signal waveform curve; In this configuration, each row of the signal transformation matrix corresponds to each frame of the intermediate frequency signal, and each column of the signal transformation matrix corresponds to each distance cell.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method as described in any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.