A self-powered intelligent snoring detection system based on a smart pillow
Through the self-sufficient power supply system and signal processing technology in the smart pillow, the problem of low recognition rate in the existing snoring detection system is solved, more efficient snoring recognition and noise elimination are achieved, and more accurate snoring signals are obtained.
Patent Information
- Application Number
- CN202411914342.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-09-16
- Estimated Expiration
- 2044-12-24
AI Technical Summary
In existing snoring detection systems, the snoring recognition accuracy is low, there is a lot of noise, and the signal acquisition is not sensitive enough.
A self-sufficient power supply system based on a smart pillow is adopted, including a power supply module, a snoring detection module and a self-charging module. A piezoelectric sensor is used to generate electricity when the sleeper is active. Noise cancellation is performed through multiple MEMS compensation receivers and speakers. A microprocessor is used for signal processing and decomposition and reorganization to achieve efficient recognition of snoring.
The accuracy of snoring recognition is improved, noise interference is reduced, and a more realistic snoring signal is obtained.
Smart Images

Figure CN119837494B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of intelligent devices, and in particular relates to a self-powered intelligent snoring detection system based on an intelligent pillow. Background Art
[0002] Snoring is a common sleep problem for humans, becoming more common and often worsening with age. Existing medical research indicates that snorers are more likely to suffer from sleep apnea. This respiratory disorder can disrupt sleep, reduce sleep quality, and even be life-threatening. It has become a significant issue in the field of respiratory diseases.
[0003] In existing contact or non-contact snoring detection systems, snoring extraction is not sensitive enough, the collected signal contains a lot of noise, and the snoring recognition rate and accuracy are low. Summary of the Invention
[0004] The present invention aims to solve the problem of low accuracy in recognizing snoring sounds in smart pillows. A self-powered intelligent snoring detection system based on a smart pillow is provided, comprising:
[0005] Power supply module, snoring detection module, self-charging module and rechargeable battery;
[0006] The power supply module is electrically connected to the snoring detection module and the rechargeable battery;
[0007] The power supply module is used to provide power from the rechargeable battery to the snoring detection module;
[0008] The snoring detection module is used to collect the original environmental signal when the sleeper is sleeping; and perform snoring detection based on the original environmental signal to obtain the snoring signal when the sleeper is sleeping;
[0009] The self-charging module is electrically connected to the rechargeable battery and is used to charge the rechargeable battery when the sleeper is sleeping.
[0010] The snoring detection module includes:
[0011] a main signal receiver, a first MEMS compensation receiver, a second MEMS compensation receiver, a first speaker, a second speaker, and a microprocessor;
[0012] The microprocessor is electrically connected to the main signal receiver, the first MEMS compensation receiver, the second MEMS compensation receiver, the first speaker and the second speaker;
[0013] The preferred microprocessor model is ATmega328P;
[0014] The self-charging module is a piezoelectric sensor;
[0015] The specific process of the self-charging module charging the rechargeable battery when the sleeper is sleeping is as follows:
[0016] When a sleeper performs sleeping activities, pressure is generated on the piezoelectric sensor, causing the piezoelectric sensor to deform, and the piezoelectric sensor generates electrical energy to charge the rechargeable battery.
[0017] The snoring detection module is used to collect the original environmental signal when the sleeper is sleeping; and perform snoring detection based on the original environmental signal to obtain the snoring signal when the sleeper is sleeping. The specific process is as follows:
[0018] S1: Collects the original environmental signals when the sleeper is performing sleep activities;
[0019] S2: performing noise elimination processing on the surrounding environment according to the original environmental signal, and then collecting the multi-source snoring signal after the noise elimination processing;
[0020] S3: performing snoring detection on the multi-source snoring signals after noise elimination processing to obtain the snoring signals of the sleeper during sleep activities;
[0021] The specific process of collecting the original environmental signal of the sleeper during sleep activity in S1 is as follows:
[0022] Using the main signal receiver, the first MEMS compensation receiver and the second MEMS compensation receiver to collect the original environmental signal when the sleeper is performing sleep activities;
[0023] The preferred main signal receiver model is MAX9814.
[0024] The beneficial effects of the present invention are:
[0025] The hardware system of the present invention uses a piezoelectric sensor to generate a circuit to power the system and stores energy in a rechargeable battery to maintain system operation. Through three sound receivers, a multi-source snoring signal containing noise is obtained. The signal is processed through initial weights. Two speakers emit anti-phase sound signals to eliminate noise. The weights w1 and w2 are then updated based on the anti-phase denoised signals. The updated anti-phase sound signals are output, and the difference signal e(n) is further reduced. The above steps are repeated until the difference between the current weight and the previous weight is close to zero. The denoised multi-source snoring signal y3(n) is obtained and input into a two-way decomposition and recombination path. One path decomposes it into multiple modal signals. The ratio of the first k correlation factors to the total correlation factor is greater than 90%. The current k value is taken to determine the decomposition into k modal signals. These modal signals are formed into a data matrix to obtain a matrix P consisting of a standard data matrix and j eigenvectors for signal reconstruction. The second path converts the multi-source snoring signal y3(n) into the frequency domain to obtain two dimensionality reduction matrices E ab 、F ba , iterate the matrix, stop iteration after meeting the convergence condition, complete the decomposition, and then perform overlap and sum to obtain the reconstructed signal, and merge the two reconstructed signals to obtain the combined signal R i , calculate R i The signal corresponding to the maximum correlation factor is selected from the correlation factors of one modal signal, and the best matching signal is cyclically screened to detect a more realistic snoring signal. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 This is a schematic diagram of the weight update process of the inverse phase denoising of the present invention;
[0027] Figure 2 This is a schematic flow chart of the dual decomposition and recombination pathway of the present invention;
[0028] Figure 3 It is a schematic diagram of the algorithm flow of the present invention;
[0029] Figure 4 It is a time domain schematic diagram of the original signal of the present invention;
[0030] Figure 5 This is a time domain schematic diagram of adding random noise signals in the present invention;
[0031] Figure 6 It is a time domain schematic diagram of the output result of the present invention. DETAILED DESCRIPTION
[0032] Specific implementation method 1: Combination Figures 1-6 The present invention is described. The present invention is used in a smart pillow to identify the snoring sound of a sleeper. The present invention is a self-powered intelligent snoring detection system based on a smart pillow, comprising:
[0033] Power supply module, snoring detection module, self-charging module and rechargeable battery;
[0034] The power supply module is electrically connected to the snoring detection module and the rechargeable battery;
[0035] The power supply module is used to provide power from the rechargeable battery to the snoring detection module;
[0036] The snoring detection module is used to collect the original environmental signal when the sleeper is sleeping; and perform snoring detection based on the original environmental signal to obtain the snoring signal when the sleeper is sleeping;
[0037] The self-charging module is electrically connected to the rechargeable battery and is used to charge the rechargeable battery when the sleeper is sleeping.
[0038] Specific embodiment 2: This embodiment differs from specific embodiment 1 in that:
[0039] The snoring detection module includes:
[0040] a main signal receiver, a first MEMS compensation receiver, a second MEMS compensation receiver, a first speaker, a second speaker, and a microprocessor;
[0041] The microprocessor is electrically connected to the main signal receiver, the first MEMS compensation receiver, the second MEMS compensation receiver, the first speaker and the second speaker;
[0042] The model of the microprocessor is ATmega328P;
[0043] The self-charging module is a piezoelectric sensor;
[0044] The specific process of the self-charging module charging the rechargeable battery when the sleeper is sleeping is as follows:
[0045] When the sleeper is sleeping, pressure is generated on the piezoelectric sensor, causing the piezoelectric sensor to deform, and the piezoelectric sensor generates electricity to charge the rechargeable battery.
[0046] Other steps and parameters are the same as those in the first embodiment.
[0047] Specific embodiment three: This embodiment differs from the specific embodiment one in that:
[0048] The snoring detection module is used to collect the original environmental signal when the sleeper is sleeping; and perform snoring detection based on the original environmental signal to obtain the snoring signal when the sleeper is sleeping. The specific process is as follows:
[0049] S1: Collects the original environmental signals when the sleeper is performing sleep activities;
[0050] S2: performing noise elimination processing on the surrounding environment according to the original environmental signal, and then obtaining a multi-source snoring signal after the noise elimination processing;
[0051] S3: Performing snoring detection on the multi-source snoring signals to obtain snoring signals of the sleeper during sleep activities.
[0052] The other steps and parameters are the same as those in the first and second embodiments.
[0053] Specific embodiment 4: This embodiment differs from specific embodiments 1 to 4 in that:
[0054] The specific process of collecting the original environmental signal of the sleeper during sleep activity in S1 is as follows:
[0055] Using a main signal receiver, a first MEMS compensation receiver, and a second MEMS compensation receiver to collect an original environmental signal when the sleeper is sleeping; the original environmental signal includes snoring and noise from multiple sources to form a mixed sound input signal;
[0056] The model of the main signal receiver is MAX9814;
[0057] The other steps and parameters are the same as those in the first to third embodiments.
[0058] Specific embodiment 5: This embodiment differs from specific embodiments 1 to 4 in that:
[0059] In S2, the surrounding environment is subjected to noise elimination processing according to the original environmental signal, and then a multi-source snoring signal after noise elimination processing is obtained. The specific process is as follows:
[0060] S2.1: Input the collected original ambient signal x(n) into a microprocessor to obtain a first anti-phase audio signal y1(n) and a second anti-phase audio signal y2(n);
[0061] S2.2: Output the first anti-phase audio signal y1(n) to the first speaker and transmit it into the environment for preliminary noise cancellation processing;
[0062] Outputting the second anti-phase audio signal y2(n) to the second speaker and transmitting it into the environment for preliminary noise cancellation processing;
[0063] S2.3: Collect the ambient signal e(n) after the preliminary noise elimination process; update the first anti-phase audio signal y1 according to the ambient signal e(n) after the preliminary noise elimination process r and the second anti-phase audio signal y2 r,
[0064] S2.4: Update the first anti-phase audio signal y1 r The output is sent to the first speaker and emitted into the environment for noise cancellation processing;
[0065] The updated second anti-phase audio signal y2 r Output to the second speaker and transmit to the environment for noise cancellation processing; then repeat steps S2.3-S2.4, stop the loop when the condition is met, and then collect the multi-source snoring signal after noise cancellation processing;
[0066] The other steps and parameters are the same as those in the first to fourth embodiments.
[0067] Specific embodiment 6: This embodiment differs from specific embodiments 1 to 5 in that:
[0068] In S2.1, the collected original ambient signal x(n) is input into the microprocessor to obtain the first anti-phase audio signal y1(n) and the second anti-phase audio signal y2(n); the specific process is as follows:
[0069] S2.1.1: Preprocess the collected original environmental signal x(n) to obtain a preprocessed mixed sound signal y(n); the specific process is as follows:
[0070] Set preprocessing parameters; sample, normalize and frame the original environmental signal x(n) in sequence according to the processing parameters to obtain the preprocessed mixed sound signal y(n)
[0071] The pre-processing parameters include: sampling frequency L=12KHz, frame length of 20ms, frame shift of 120 sampling points and weight function a(n);
[0072] The formula of the weight function a(n) is expressed as
[0073]
[0074] N represents a constant, N=400,
[0075] S2.1.2: Convert the preprocessed mixed sound signal y(n) into a frequency domain signal Y(k);
[0076] S2.1.3: Set a first weight vector w1 and a second weight vector w2, and obtain a first anti-phase audio signal y1(n) and a second anti-phase audio signal y2(n) based on the first weight vector, the second weight vector, and the original ambient signal; this can be expressed as follows:
[0077]
[0078] y1(n)=[w 11 x(n)w 12 x(n)……w 1N x(n)]
[0079] y2(n)=[w 21 x(n)w 22 x(n)……w 2N x(n)]
[0080] Among them, w 1(N-1) Represents the element in row N-1 of w1, w 2(N-1) represents the element in the N-1th row of w2, rand(-0.1,0.1) represents a random number in the interval (-0.1,0.1);
[0081] ; Other steps and parameters are the same as those in one of the specific implementation methods one to five.
[0082] Specific embodiment 7: This embodiment differs from specific embodiments 1 to 6 in that:
[0083] In S2.3, the ambient signal e(n) after the preliminary noise elimination process is collected; the first anti-phase audio signal y1(n) and the second anti-phase audio signal y2(n) are updated according to the ambient signal e(n) after the preliminary noise elimination process, which can be expressed as follows:
[0084] e(n)=x(n)+y1(n)+y2(n)
[0085] y 11 =e(n)*M 11 (n)
[0086] y 12 =e(n)*M 12 (n)
[0087] y 21 =e(n)*M 21 (n)
[0088] y 22 =e(n)*M 22 (n)
[0089]
[0090]
[0091] ρ=0.0001
[0092] y1 r =x(n)*w1 r
[0093] y2 r =x(n)*w2 r
[0094] Where y11, y12, y21 and y22 represent intermediate signals, m represents discrete time, x(m) represents the discrete time index of x(n), a[nm] represents the impulse response of a(n), e(n) represents the error signal, e(m) represents the discrete time signal, and M 11 [nm] means M 11 Compensation signal processing unit impulse response, M 21 [nm] means M 21 Compensation signal processing unit impulse response, M 12 [nm] means M 12 Compensation signal processing unit impulse response, M 22 [bm] means M 22 Compensation signal processing unit impulse response, M 11 (n), M 12 (n), M 21 (n) and M 22 (n) represents the compensation signal processing unit, f1(n) represents the first compensation signal, f2(n) represents the second compensation signal, w1 r Represents the first weight vector after update, w2 r Represents the updated second weight vector, y1 r represents the updated first anti-phase audio signal, y2 r represents the updated second anti-phase audio signal; μ represents the step size, * represents the convolution operation; r represents the number of updates, and r is a positive integer;
[0095] The satisfying condition for stopping the cycle in S2.4 is expressed as follows:
[0096] w1 r -w1 r-1 <0.0001
[0097] w2 r -w2 r-1 <0.0001
[0098] The multi-source snoring signal after noise elimination is collected and expressed as follows:
[0099] y3(n)=x(n)+y1 r +y2 r
[0100] The other steps and parameters are the same as those in the first to sixth embodiments.
[0101] Specific embodiment eight: This embodiment differs from specific embodiments one to seven in that:
[0102] In S3, snoring detection is performed on the snoring signals from multiple sources to obtain the snoring signals of the sleeper during sleep activity. The specific process is as follows:
[0103] S3.1: Remove signals outside the frequency range of 300 to 3400 Hz from the multi-source snoring signal y3(n) to obtain a retained signal, and decompose the retained signal to obtain a first decomposed signal;
[0104] The retained signal is represented by y4, and the first decomposed signal is represented by y g (n);
[0105] S3.2: Decompose the retained signal to obtain a second decomposed signal; the second decomposed signal is represented by y h (n)
[0106] S3.3: Combine the first decomposed signal and the second decomposed signal to obtain a combined signal; the combined signal represents R i ;
[0107] S3.4: Obtain a snoring signal based on the combined signal and the multi-source snoring signal
[0108] The other steps and parameters are the same as those in the first to seventh embodiments.
[0109] Specific embodiment 9: This embodiment differs from specific embodiments 1 to 8 in that:
[0110] The specific process of decomposing the retained signal y4 in S3.1 to obtain the first decomposed signal and the second decomposed signal is as follows:
[0111] S3.1.1: Set the number of multi-channels m d , signal modal bandwidth constraint coefficient α d , the initial value of the center frequency w m , m d is a positive integer; α d =5000;w m =500;
[0112] S3.1.2: According to the set multi-channel number m d Decompose the retained signal y4 into m d signal mode; it can be expressed as:
[0113]
[0114] S1(n), S2(n), S3(n), S i (n), represents the decomposed signal mode;
[0115] S3.1.3: Calculate the correlation factor between the retained signal y4 and each decomposed signal mode, where the correlation factor between the i-th signal mode and the retained signal y4 is expressed as It can be expressed as:
[0116]
[0117] represents the mean of the i-th signal mode, represents the mean of the retained signal, y4(n) represents the retained signal, N represents the sequence length, N=500,
[0118] S3.1.4: Calculate the maximum relevance factor Corresponding to the optimal K value, the retained signal y4 is decomposed into K dissolution signals according to the optimal K value, and the K dissolution signals are expressed as
[0119] Positive frequency domain phase shift of K disintegrated signals and negative frequency domain phase shift Processing, we get S1(n), S2(n), S3(n), ..., S k (n) unilateral spectrum;
[0120] S3.1.5: Put S1(n), S2(n), S3(n),…,S k The unilateral spectrum of (n) is combined into a data matrix Q, and then the data matrix Q is standardized to obtain the standardized matrix Q std ; expressed as:
[0121]
[0122] Among them, s 11 represents the first coefficient of S1(n), Indicates S k-1 (n) the nth 1 -1 coefficient, n 1 is the number of rows of the data matrix Q, μ is the mean vector of each column of the data matrix Q, Z d is the standard deviation vector matrix of each column of the data matrix Q, Represents Z d The inverse of
[0123] μ=[μ1 … μ k ]
[0124]
[0125]
[0126] Where, σ1, σ k represents the standard deviation vector;
[0127] S3.1.6: Compute the normalization matrix Q std The data distribution matrix Q c , get the data distribution matrix Q c The matrix eigenvalue λ k And the corresponding eigenvector v k , the eigenvalue λ k Sort by size from large to small; data distribution matrix Q c It is expressed as:
[0128]
[0129] Among them, Q std T Represents Q std The transpose of
[0130] S3.1.7: Calculate the cumulative value of the first z eigenvectors before sorting, and calculate the ratio R of the cumulative value to the total eigenvectors; expressed as:
[0131]
[0132] The value range of z is (1, k), and the calculation starts from z value 1. The ratio R of the accumulated value to the total eigenvector is calculated.
[0133] If R≤0.9, add one to the value of z and recalculate the R value.
[0134] If R>0.9, select the eigenvector combination corresponding to the first z eigenvectors in the ranking to form the matrix P; it can be expressed as:
[0135] P=[v1…v z ]
[0136] S3.1.8: By normalizing the matrix Q std Construct the first decomposition signal y with the matrix P g (n); expressed as
[0137] y g (n) = Q std PZ d +μ
[0138] where μ is the mean vector of each column of the data matrix Q, and Z d is the standard deviation vector matrix of each column of the data matrix Q
[0139] In S3.2, the retained signal is decomposed to obtain a second decomposed signal; the specific process is:
[0140] S3.2.1: Convert the retained signal y4 into a frequency domain mixed signal Y4(N) and perform frame segmentation on it to obtain a frequency domain amplitude spectrum H representing the energy of the mixed signal at different times and frequencies.
[0141] S3.2.2: Separate the frequency domain amplitude spectrum H into decomposed signal E and decomposed signal F; the specific process is:
[0142] Set the initial element values of decomposition signal E and decomposition signal F to random numbers
[0143] Update the decomposition signal E and decomposition signal F through the iterative convergence function,
[0144] The iterative convergence function is expressed as:
[0145]
[0146]
[0147] The convergence condition ||H-EF|| is reached Fro When <0.01, the iteration is stopped and the decomposition signals E and F are obtained. Fro represents the norm, ← represents the update assignment, log represents the logarithm of the matrix, E T The transpose of E, F T represents the transpose of F
[0148] S3.2.3: Convert the decomposed signals E and F to the time domain to obtain time domain signals e1 and f1;
[0149] Perform windowing on adjacent frames of time domain signals e1 and f1 to obtain windowed signals e2 and f2;
[0150] Use weight ε(n) to overlap and sum the adjacent frames of the windowed signals e2 and f2 to obtain the second decomposed signal y h (n) signal;
[0151] The formula of the weight ε(n) is expressed as
[0152]
[0153] Where N1 is the length of the combined signal sequence, N1 = 400;
[0154] The other steps and parameters are the same as those in the first to eighth embodiments.
[0155] Specific embodiment 10: This embodiment differs from specific embodiments 1 to 9 in that:
[0156] In S3.4, the snoring signal is obtained based on the combined signal and the multi-source snoring signal. The specific process is as follows:
[0157] S3.4.1: Combine the signal R i It is divided into T segment signals, and the T segment signal is represented by S R 1(n), S R 2(n), S R 3(n),…S R c (n)…、S R T (n),
[0158] Calculate the combined signal R i Correlation factor with T segment signal,
[0159] The c-th segment signal S R c (n) and the combined signal R i The correlation factor table between It can be expressed as:
[0160]
[0161] Where R i (n) represents the combined signal, N1 represents the length of the combined signal sequence, and n represents the time variable;
[0162] Select the maximum correlation factor The corresponding segment signal S R c (n) as snoring signal M c ;
[0163] S3.4.3: The snoring signal M c Segment processing is performed to obtain segmented snoring signals of segment 0, which are represented by S O 1(n), S O 2(n), S O 3(n),…S O l (n)…、S O O (n)
[0164] Calculate the correlation factor between the multi-source snoring signal y4(n) and each snoring segment signal;
[0165] The first segment signal S O l (n) and the combined signal R i The correlation factor table between It can be expressed as:
[0166]
[0167] If the relevance factor of the current segment is less than the relevance factor of the next segment, the current segment is considered irrelevant and is normalized.
[0168] If the correlation factor of the current segment is not less than the correlation factor of the next segment, the current segment is retained until the correlation factor corresponding to the next segment signal is greater than the correlation factor of the current segment.
[0169] S3.4.4: Combine signal R i Segment processing is performed to obtain an O-segment merged segment signal, which is represented by: S OR 1(n), S OR 2(n), S OR 3(n),…S OR p (n)…、S OR O (n)
[0170] Calculate the correlation factor between the multi-source snoring signal y3(n) and each merged segment signal;
[0171] The p-th segment signal S OR p (n) and the combined signal R i The correlation factor table between It can be expressed as:
[0172]
[0173] Will meet the conditions The corresponding merged segmented signal replaces the corresponding snoring segmented signal,
[0174] The replaced snoring segmented signals are combined into a snoring signal
[0175] The other steps and parameters are the same as those in the first to ninth embodiments.
[0176] In summary, the hardware system of the present invention partially uses a piezoelectric sensor to generate a circuit to power the system and stores energy in a rechargeable battery to maintain system operation. Through three sound receivers, a multi-source snoring signal containing noise is obtained. The signal is processed through initial weights, and two speakers emit anti-phase sound signals to eliminate noise. The weights w1 and w2 are then updated based on the anti-phase denoised signals, and the updated anti-phase sound signals are output to further reduce the difference signal e(n). The above steps are repeated until the difference between the current weight and the previous weight is close to zero, obtaining the denoised multi-source snoring signal y3(n). y3(n) is input into a two-way decomposition and recombination path. One path decomposes it into multiple modal signals, and the ratio of the first k correlation factors to the total correlation factor is greater than 90%. The current k value is taken to determine the decomposition into k modal signals, which are formed into a data matrix to obtain a matrix P consisting of a standard data matrix and j eigenvectors for signal reconstruction. The second path converts the multi-source snoring signal y3(n) into the frequency domain to obtain two dimensionality reduction matrices E ab 、F ba , iterate the matrix, stop iteration after meeting the convergence condition, complete the decomposition, and then perform overlap and sum to obtain the reconstructed signal, and merge the two reconstructed signals to obtain the combined signal R i , calculate R i The signal corresponding to the maximum correlation factor is selected from the correlation factors of one modal signal, and the best matching signal is cyclically screened to detect a more realistic snoring signal.
[0177] The above only describes the preferred embodiments of the present invention. It should be understood that the present invention is not limited to the above-mentioned specific implementation methods. Although the present invention has been disclosed as above with preferred embodiments, it is not intended to limit the present invention. Any technician familiar with this profession can make some changes or modifications to equivalent embodiments of equivalent changes using the technical content disclosed above without departing from the scope of the technical solution of the present invention. However, any simple modifications, equivalent replacements and improvements made to the above embodiments without departing from the content of the technical solution of the present invention, based on the technical essence of the present invention, within the spirit and principles of the present invention, still fall within the scope of protection of the technical solution of the present invention.
Claims
1. A self-powered intelligent snoring detection system based on a smart pillow, characterized by: The system comprises: Power supply module, snoring detection module, self-charging module and rechargeable battery; The power supply module is electrically connected to the snoring detection module and the rechargeable battery; The power supply module is used to provide power from the rechargeable battery to the snoring detection module; The snoring detection module is used to collect the original environmental signal when the sleeper is sleeping; and perform snoring detection based on the original environmental signal to obtain the snoring signal when the sleeper is sleeping; The self-charging module is electrically connected to the rechargeable battery and is used to charge the rechargeable battery when the sleeper is sleeping; The snoring detection module includes: a main signal receiver, a first MEMS compensation receiver, a second MEMS compensation receiver, a first speaker, a second speaker, and a microprocessor; The microprocessor is electrically connected to the main signal receiver, the first MEMS compensation receiver, the second MEMS compensation receiver, the first speaker and the second speaker; The model of the microprocessor is ATmega328P; The snoring detection module is used to collect the original environmental signal when the sleeper is sleeping, and perform snoring detection based on the original environmental signal. The specific process of obtaining the snoring signal when the sleeper is sleeping is as follows: S1: Collects the original environmental signals when the sleeper is performing sleep activities; S2: performing noise elimination processing on the surrounding environment according to the original environmental signal, and then collecting the multi-source snoring signal after the noise elimination processing; S3: performing snoring detection on the multi-source snoring signals after noise elimination processing to obtain the snoring signals of the sleeper during sleep activities; The specific process of collecting the original environmental signal of the sleeper during sleep activity in S1 is as follows: Using the main signal receiver, the first MEMS compensation receiver and the second MEMS compensation receiver to collect the original environmental signal when the sleeper is performing sleep activities; The original environmental signal is represented by x(n); n represents a time variable; The model of the main signal receiver is MAX9814; In S2, the surrounding environment is subjected to noise elimination processing according to the original environmental signal, and then a multi-source snoring signal after noise elimination processing is obtained. The specific process is as follows: S2.1: Input the collected original ambient signal x(n) into a microprocessor to obtain a first anti-phase audio signal y1(n) and a second anti-phase audio signal y2(n); S2.2: Output the first anti-phase audio signal y1(n) to the first speaker and transmit it into the environment for preliminary noise cancellation processing; Outputting the second anti-phase audio signal y2(n) to the second speaker and transmitting it into the environment for preliminary noise cancellation processing; S2.3: Use the main signal receiver, the first MEMS compensation receiver, and the second MEMS compensation receiver to collect the ambient signal e(n) after preliminary noise cancellation processing; update the first anti-phase audio signal y1 based on the ambient signal e(n) after preliminary noise cancellation processing r and the second anti-phase audio signal y2 r ; S2.4: Update the first anti-phase audio signal y1 r The output is sent to the first speaker and emitted into the environment for noise cancellation processing; The updated second anti-phase audio signal y2 r The output is sent to the second speaker and emitted into the environment for noise cancellation processing; Then, steps S2.3-S2.4 are repeated, and the loop is stopped when the condition is met, and then the multi-source snoring signal after noise elimination processing is acquired; The specific process of inputting the collected original ambient signal x(n) into the microprocessor to obtain the first anti-phase audio signal y1(n) and the second anti-phase audio signal y2(n) in S2.1 is as follows: S2.1.1: Preprocess the collected original environmental signal x(n) to obtain a preprocessed mixed sound signal y(n); the specific process is as follows: Set preprocessing parameters; sample, normalize and frame the original environmental signal x(n) in sequence according to the processing parameters to obtain the preprocessed mixed sound signal y(n) The pre-processing parameters include: sampling frequency L=12KHz, frame length of 20ms, frame shift of 120 sampling points and weight function a(n); The formula of the weight function a(n) is expressed as N represents the sequence length; S2.1.2: Set a first weight vector w1 and a second weight vector w2, and obtain a first anti-phase audio signal y1(n) and a second anti-phase audio signal y2(n) based on the first weight vector, the second weight vector, and the original ambient signal; this can be expressed as follows: y1(n)=[w 11 x(n) w 12 x(n) …… w 1N x(n)] y2(n)=[w 21 x(n) w 22 x(n) …… w 2N x(n)] Among them, w 1(N-1) Represents the element in row N-1 of w1, w 2(N-1) represents the element in the N-1th row of w2, rand(-0.1,0.1) represents a random number in the interval (-0.1,0.1); In S2.3, the first anti-phase audio signal y1(n) and the second anti-phase audio signal y2(n) are updated according to the ambient signal e(n) after the preliminary noise elimination process, which can be expressed as follows: e(n)=x(n)+y1(n)+y2(n) y 11 =e(n)*M 11 (n) y 12 =e(n)*M 12 (n) y 21 =e(n)*M 21 (n) y 22 =e(n)*M 22 (n) ρ=0.0001 y1 r =x(n)*w1 r y2 r =x(n)*w2 r Where y 11 represents the first intermediate signal, y 12 Represents the second intermediate signal, y 21 represents the third intermediate signal, y 22 represents the fourth intermediate signal, m represents the discrete time index, x(m) represents the first discrete time signal, a[nm] represents the impulse response of a(n), e(m) represents the second discrete time signal, M 11 (nm) represents M 11 Compensation signal processing unit impulse response, M 21 (nm) represents M 21 Compensation signal processing unit impulse response, M 12 (nm) represents M 12 Compensation signal processing unit impulse response, M 22 (nm) represents M 22 Compensation signal processing unit impulse response, M 11 (n) represents the first compensation signal processing unit, M 12 (n) represents the second compensation signal processing unit, M 21 (n) represents the third compensation signal processing unit, M 22 (n) represents the fourth compensation signal processing unit, f1(n) represents the first compensation signal, f2(n) represents the second compensation signal, w1 r Represents the first weight vector after update, w2 r Represents the updated second weight vector, y1 r represents the updated first anti-phase audio signal, y2 r represents the updated second anti-phase audio signal; μ represents the step size, * represents the convolution operation; r represents the number of updates, and r is a positive integer; The satisfying condition for stopping the cycle in S2.4 is expressed as follows: w1 r -w1 r-1 <0.0001 w2 r -w2 r-1 <0.0001 w1 r-1 Represents the first weight vector before update, w2 r-1 represents the second weight vector before updating; The multi-source snoring signal after noise elimination is collected and expressed as follows: y3(n)=x(n)+y1 r +y2 r 。 2. The self-powered intelligent snoring detection system based on a smart pillow according to claim 1, characterized in that: In S3, snoring detection is performed on the snoring signals from multiple sources to obtain the snoring signals of the sleeper during sleep activity. The specific process is as follows: S3.1: Remove signals outside the frequency range of 300 to 3400 Hz from the multi-source snoring signal y3(n) to obtain a retained signal, and decompose the retained signal to obtain a first decomposed signal; The retained signal is represented by y4, and the first decomposed signal is represented by y g (n); S3.2: Decompose the retained signal to obtain a second decomposed signal; the second decomposed signal is represented by y h (n) S3.3: Combine the first decomposed signal and the second decomposed signal to obtain a combined signal; the combined signal represents R i ; S3.4: Obtain a snoring signal according to the combined signal and the multi-source snoring signals.
3. The self-powered intelligent snoring detection system based on a smart pillow according to claim 2, characterized in that: The specific process of decomposing the retained signal y4 in S3.1 to obtain the first decomposed signal and the second decomposed signal is as follows: S3.1.1: Set the number of multi-channels m d , signal modal bandwidth constraint coefficient α d , the initial value of the center frequency w m , m d is a positive integer; α d =5000;w m =500; S3.1.2: According to the set multi-channel number m d Decompose the retained signal y4 into m d signal mode; it can be expressed as: S1(n) represents the first signal mode after decomposition, S2(n) represents the second signal mode after decomposition, S3(n) represents the third signal mode after decomposition, S i (n) represents the i-th signal mode after decomposition, Represents the mth d signal modes; S3.1.3: Calculate the correlation factor between the retained signal y4 and each decomposed signal mode, where the correlation factor between the i-th signal mode and the retained signal y4 is expressed as It can be expressed as: represents the mean of the i-th signal mode, represents the mean of the retained signal, y4(n) represents the retained signal, N represents the sequence length, N=500, S3.1.4: Calculate the maximum relevance factor Corresponding to the optimal K value, the retained signal y4 is decomposed into K dissolution signals according to the optimal K value, and the K dissolution signals are expressed as Positive frequency domain phase shift of K disintegrated signals and negative frequency domain phase shift Processing, we get S1(n), S2(n), S3(n), ..., S k (n) unilateral spectrum; S k (n) represents the kth signal mode after decomposition; S3.1.5: Put S1(n), y2(n), y3(n),…,S k The unilateral spectrum of (n) is combined into a data matrix Q, and then the data matrix Q is standardized to obtain the standardized matrix Q std ; expressed as: Among them, s 11 represents the first coefficient of S1(n), Indicates S k-1 (n) the nth 1 -1 coefficient, n 1 is the number of rows of the data matrix Q, μ is the mean vector of each column of the data matrix Q, Z d is the standard deviation vector matrix of each column of the data matrix Q, Represents Z d The inverse of μ=[μ1 … μ k ] Where, σ1, σ k represents the standard deviation vector; S3.1.6: Compute the normalization matrix Q std The data distribution matrix Q c , get the data distribution matrix Q c The matrix eigenvalue λ k And the corresponding eigenvector v k , the eigenvalue λ k Sort by size from large to small; data distribution matrix Q c It is expressed as: Among them, Q std T Represents Q std The transpose of S3.1.7: Calculate the cumulative value of the first z eigenvectors before sorting, and calculate the ratio R of the cumulative value to the total eigenvectors, which can be expressed as: The value range of z is (1, k), and the calculation starts from z value 1. The ratio R of the accumulated value to the total eigenvector is calculated. If R≤0.9, add one to the value of z and recalculate the R value. If R>0.9, select the eigenvector combination corresponding to the first z eigenvectors in the ranking to form the matrix P; it can be expressed as: P=[v1…v z ] In the formula, v1 represents the first eigenvector of the sort; v z Indicates the sorted zth eigenvector; S3.1.8: By normalizing the matrix Q std Construct the first decomposition signal y with the matrix P g (n); expressed as and g (n)=Q std PZ d +μ where μ is the mean vector of each column of the data matrix Q, and Z d is the standard deviation vector matrix of each column of the data matrix Q In S3.2, the retained signal is decomposed to obtain a second decomposed signal; the specific process is: S3.2.1: Convert the retained signal y4 into a frequency domain mixed signal Y4(N) and perform frame segmentation on it to obtain a frequency domain amplitude spectrum H representing the energy of the mixed signal at different times and frequencies. S3.2.2: Separate the frequency domain amplitude spectrum H into decomposed signal E and decomposed signal F; the specific process is: Set the initial element values of decomposition signal E and decomposition signal F to set random numbers, Update the decomposition signal E and decomposition signal F through the iterative convergence function, The iterative convergence function is expressed as: Reach the convergence condition ‖H-EF‖ Fro When <0.01, the iteration is stopped and the decomposition signal E and decomposition signal F are obtained. ||| |ro represents the norm, ← represents the update assignment, log represents the logarithm of the matrix, E T The transpose of E, F T represents the transpose of F; S3.2.3: Convert the decomposed signals E and F to the time domain to obtain time domain signals e1 and f1; Perform windowing on adjacent frames of time domain signals e1 and f1 to obtain windowed signals e2 and f2; Use weight ε(n) to overlap and sum the adjacent frames of the windowed signals e2 and f2 to obtain the second decomposed signal y h (n) signal; The formula of the weight ε(n) is expressed as Wherein N1 is the length of the combined signal sequence, N1=400.
4. The self-powered intelligent snoring detection system based on a smart pillow according to claim 3, characterized in that: In S3.4, the snoring signal is obtained based on the combined signal and the multi-source snoring signal. The specific process is as follows: S3.4.1: Combine the signal R i (n) is divided into T segment signals, and the T segment signal is represented by S R 1(n), S R 2(n), S R 3(n),…S R c (n)…、S R T (n), Calculate the combined signal R i Correlation factor with T segment signal, The c-th segment signal S R c (n) and the combined signal R i The correlation factor table between (n) is It can be expressed as: Where R i (n) represents the combined signal, N1 represents the combined signal length, Select the maximum correlation factor The corresponding segment signal S R c (n) as snoring signal M c ; S3.4.3: The snoring signal M c Segment processing is performed to obtain segmented snoring signals of segment O, where O=T. The segmented snoring signals of segment O are represented by S O 1(n), S O 2(n), S O 3(n),…S O l (n)…、S O O (n); Calculate the correlation factor between the multi-source snoring signal y4(n) and each snoring segment signal; The first segment signal S O l (n) and the combined signal R i The correlation factor table between It can be expressed as: If the relevance factor of the current segment is less than the relevance factor of the next segment, the current segment is considered irrelevant and is normalized. If the correlation factor of the current segment is not less than the correlation factor of the next segment, the current segment will be retained until the correlation factor of the subsequent segment signal is greater than the correlation factor of the current segment; finally, the maximum correlation factor is obtained. S3.4.4: Combine the signal R i Segment processing is performed to obtain an O-segment merged segment signal, which is represented by: S OR 1(n), S OR 2(n), S OR 3(n),…S OR p (n)…、S OR O (n); Calculate the correlation factor between the multi-source snoring signal y4(n) and each merged segment signal; The p-th segment signal S OR p (n) and the combined signal R i The correlation factor table between It can be expressed as: Will meet the conditions The corresponding merged segmented signal replaces the corresponding snoring segmented signal, and the replaced snoring segmented signals are combined into a snoring signal.
Citation Information
Patent Citations
Pillow having active noise reducing and dynamic correction functions
CN107174080A
Intelligent pillow sleep aiding system and control method thereof
CN109044273A
Three stage mattress
KR102061870B1