Noise elimination method and system based on smart home
By calculating and optimizing the phase difference between the microphone and speakers in the smart home noise cancellation system, combined with fuzzy logic analysis, the harmonic distortion problem caused by phase mismatch is solved, and the noise reduction effect and user experience are improved.
Patent Information
- Application Number
- CN202411275556.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-12
- Publication Date
- 2024-12-20
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Due to the differences in position of microphone and speakers and hardware limitations, the existing smart home noise cancellation system leads to phase mismatch, reducing noise reduction effect and generating high-frequency and harsh harmonic distortion, affecting the user experience.
By installing microphones and speakers, using standard noise sources and test signals to calculate phase differences, optimize phase matching, evaluate the degree of harmonic distortion, and analyze noise reduction based on fuzzy logic, generate adjustment strategies and visual feedback to ensure that the system is in complex acoustic environments efficient noise cancellation.
It improves the phase matching accuracy and noise reduction effect of the ANC system, significantly improves the user experience and the comfort of the smart home environment, and ensures the reliability and sustainability of the noise reduction effect.
Smart Images

Figure CN119169987A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart home, and in particular to a noise elimination method and system based on smart home. Background Art
[0002] Noise cancellation in smart homes refers to the use of advanced technology and equipment to reduce or eliminate unnecessary background noise in a home environment. This technology can monitor and process noise through microphones, sensors, and speakers installed in the house. These devices can detect noise in the environment and cancel these noises by generating opposite sound waves, thereby creating a quieter and more comfortable living environment. In the prior art, two methods are usually used: active noise control (ANC) and passive noise control. Among them, active noise control technology uses digital signal processing (DSP) to generate sound waves with opposite phases to the noise, thereby achieving noise cancellation. However, the ANC system relies on precise phase matching to generate sound waves with opposite phases to the noise. However, due to changes in environmental acoustic conditions, slight position differences between microphones and speakers, or hardware limitations of the equipment, phase mismatch may occur. Phase mismatch not only reduces the noise reduction effect, but may even produce harmonic distortion. This distortion generates new noises, which are usually high-frequency and harsh, which may cause discomfort or ear fatigue to the occupants. Such problems are not easy to detect during technical debugging and use, but have a significant negative impact on user experience. Summary of the invention
[0003] The purpose of the present invention is to provide a noise elimination method and system based on smart home to solve the shortcomings of the background technology.
[0004] In order to achieve the above object, the present invention provides the following technical solution: a noise elimination method based on smart home, comprising the following steps;
[0005] S1: Install n microphones and speakers at different locations in the room, and perform preliminary calibration on the ANC system using a standard noise source. Based on each microphone, obtain the initial noise signal in the room in real time when the ANC system does not start to intervene.
[0006] S2: Using a loudspeaker to emit a test signal of a specific frequency and amplitude, the microphone is used to receive and record the test signal, analyze the test signal, and calculate the phase difference between the test signal received by each microphone and the initial noise signal;
[0007] S3: Compare and analyze the phase difference actually calculated with the reference phase difference under the standard state, and classify the accuracy of phase pairing into different levels according to the analysis results, such as accurate matching phase, possible accurate matching phase and inaccurate matching phase, and generate an adjustment strategy;
[0008] S4: For phases that can be accurately matched, optimize the phase matching by adjusting the strategy, and perform spectrum analysis on the noise signal in the optimized monitoring environment to determine the change in noise level and evaluate the degree of harmonic distortion;
[0009] S5: Analyze the harmonic distortion and phase difference fluctuation based on fuzzy logic, evaluate the noise reduction effect of the ANC system, and provide visual feedback of the evaluation results.
[0010] Preferably, in S2, the phase difference between the test signal received by each microphone and the initial noise signal is calculated, specifically:
[0011] In the absence of a test signal, record the initial background noise signal in the room as a benchmark, convert the analog signal received by the microphone into a digital signal, use a filter to remove high-frequency and low-frequency interference in the initial noise signal, retain the main frequency components of the test signal, perform fast Fourier transform on the received test signal and the initial noise signal, convert the signal from the time domain to the frequency domain, extract the phase value of the specific frequency component from the frequency domain signal, and calculate the phase difference between the test signal and the initial noise signal.
[0012] Preferably, in S3, the phase difference actually calculated is compared with the reference phase difference under the standard state, and the accuracy of the phase pairing is divided into different levels according to the analysis result;
[0013] The calculated phase difference is compared and analyzed with the reference phase difference under the standard state, and the error between the phase difference and the reference phase difference is calculated and recorded as the phase difference error value. The level standard of phase matching accuracy is set according to the phase error. If the error is less than 5 degrees, the phase matching is accurate and it is classified as an accurately matched phase; if the error is between 5 and 15 degrees, the phase matching accuracy is average and it is classified as a possibly accurately matched phase; if the error is greater than 15 degrees, there is an error in the phase matching and it is classified as an inaccurately matched phase.
[0014] Preferably, in S4, a noise signal fluctuation index is generated according to the change of the overall noise level before and after the optimization, and the degree of harmonic distortion after the optimization is evaluated. The method for obtaining the noise signal fluctuation index is:
[0015] The environmental noise signals before and after optimization are collected, the signals are preprocessed, the wavelet function is selected, and the scale parameter and displacement parameter of the wavelet transform are determined. The wavelet transform value of the signal is calculated, and the signal energy before and after optimization is calculated according to the wavelet transform value of the signal. After analysis, the noise signal fluctuation index is calculated.
[0016] Preferably, the acquired noise signal fluctuation index is compared with a preset noise signal fluctuation index reference threshold. If the noise signal fluctuation index is greater than or equal to the preset noise signal fluctuation index reference threshold, a high-quality optimization signal is generated and the noise level after optimization is significantly improved. If the noise signal fluctuation index is less than the preset noise signal fluctuation index reference threshold, a low-quality optimization signal is generated and the optimization effect is not obvious.
[0017] Preferably, in S5, the harmonic distortion degree and phase difference fluctuation are analyzed based on fuzzy logic to evaluate the noise reduction effect of the ANC system, specifically:
[0018] Analyze the phase difference fluctuation within a fixed time period, collect the phase difference between the test signal received by each microphone and the initial noise signal within the fixed time period, establish a data set, calculate the standard deviation of the data set, that is, calculate the phase difference outlier index;
[0019] The noise signal fluctuation index and phase difference outlier index are used as the input items of fuzzy logic, and the noise reduction effect of the ANC system is used as the output item of fuzzy logic;
[0020] Define the noise signal fluctuation index, phase difference outlier index and fuzzy membership function of the noise reduction effect of the ANC system;
[0021] Design fuzzy rules for noise signal fluctuation index, phase difference outlier index and noise reduction effect of ANC system, and fuzzify the actual values of noise signal fluctuation index and phase difference outlier index through membership function;
[0022] Reasoning is performed according to fuzzy rules to calculate the fuzzy value of the output item, the noise reduction effect of the ANC system;
[0023] The fuzzy value of the noise reduction effect of the ANC system is converted into a specific value through a defuzzification method to obtain the noise reduction effect of the ANC system.
[0024] The present invention also provides a noise elimination system based on smart home, including a preliminary noise signal acquisition module, a test signal analysis module, a phase difference comparison module, a harmonic analysis module and a visualization module;
[0025] Preliminary noise signal acquisition module: n microphones and speakers are installed at different locations in the room, and the ANC system is preliminarily calibrated using a standard noise source. The initial noise signal in the room is acquired in real time based on each microphone without the ANC system intervening.
[0026] Test signal analysis module: The speaker sends out a test signal with a specific frequency and amplitude. The microphone is used to receive and record the test signal, analyze the test signal, and calculate the phase difference between the test signal received by each microphone and the initial noise signal.
[0027] Phase difference comparison module: compares and analyzes the phase difference actually calculated with the reference phase difference under the standard state, and divides the accuracy of phase pairing into different levels according to the analysis results, such as accurate matching phase, possible accurate matching phase and inaccurate matching phase, and generates adjustment strategies;
[0028] Harmonic analysis module: For phases that can be accurately matched, the phase matching is optimized by adjusting the strategy, and the noise signal in the optimized monitoring environment is analyzed by spectrum to determine the change of noise level and evaluate the degree of harmonic distortion;
[0029] Visualization module: Analyzes the degree of harmonic distortion and phase difference fluctuation based on fuzzy logic, evaluates the noise reduction effect of the ANC system, and provides visual feedback of the evaluation results.
[0030] In the above technical solution, the technical effects and advantages provided by the present invention are:
[0031] 1. The present invention installs and calibrates the microphone and speaker in the ANC system, calculates the phase difference using the standard noise source and the test signal, compares and analyzes and optimizes the phase matching, evaluates the degree of harmonic distortion, and performs noise reduction effect evaluation and visual feedback based on fuzzy logic. First, the basic data of the system is accurate through preliminary calibration and real-time acquisition of the initial noise signal. Then, the accuracy of the phase matching is evaluated and optimized by issuing a test signal and calculating the phase difference. Next, the possible accurate matching phase is optimized through adjustment strategies, and the optimized spectrum and harmonic distortion degree are analyzed to generate a noise signal fluctuation index. Finally, fuzzy logic is used to comprehensively analyze the harmonic distortion and phase difference fluctuations, evaluate the noise reduction effect, and enable users to intuitively understand the system performance through visual feedback.
[0032] 2. The present invention not only improves the phase matching accuracy and noise reduction effect of the ANC system, but also provides accurate noise reduction performance feedback through spectrum analysis and fuzzy logic evaluation, significantly improving the user experience and comfort of the smart home environment. In particular, through accurate phase difference calculation and optimization strategy, the harmonic distortion caused by phase mismatch is effectively reduced, solving the common problem of unstable noise reduction effect in the prior art. The comprehensive analysis of harmonic distortion and phase difference fluctuation using fuzzy logic ensures the reliability and sustainability of the noise reduction effect, so that the ANC system in the smart home can maintain efficient noise cancellation performance in a complex acoustic environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0034] Figure 1 The figure is a flow chart of the method of the present invention.
[0035] Figure 2 It is a system module diagram of the present invention. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0037] Example 1, please refer to Figure 1 As shown, the noise elimination method based on smart home described in this embodiment includes the following steps:
[0038] S1: Install n microphones and speakers at different locations in the room, and perform preliminary calibration on the ANC system using a standard noise source. Based on each microphone, obtain the initial noise signal in the room in real time when the ANC system does not start to intervene.
[0039] S2: Using a loudspeaker to emit a test signal of a specific frequency and amplitude, the microphone is used to receive and record the test signal, analyze the test signal, and calculate the phase difference between the test signal received by each microphone and the initial noise signal;
[0040] S3: Compare and analyze the phase difference actually calculated with the reference phase difference under the standard state, and classify the accuracy of phase pairing into different levels according to the analysis results, such as accurate matching phase, possible accurate matching phase and inaccurate matching phase, and generate an adjustment strategy;
[0041] S4: For phases that can be accurately matched, optimize the phase matching by adjusting the strategy, and perform spectrum analysis on the noise signal in the optimized monitoring environment to determine the change in noise level and evaluate the degree of harmonic distortion;
[0042] S5: Analyze the harmonic distortion and phase difference fluctuation based on fuzzy logic, evaluate the noise reduction effect of the ANC system, and provide visual feedback of the evaluation results.
[0043] In S1, n microphones and speakers are installed at different locations in the room, and the ANC system is preliminarily calibrated using a standard noise source. The initial noise signal in the room is obtained in real time based on each microphone when the ANC system does not start to intervene. Specifically,
[0044] Prepare n microphones and n speakers and ensure that the equipment functions properly. Install and configure digital signal processing (DSP) software and data acquisition system.
[0045] Choose the appropriate installation location based on the size and shape of the room, ensuring that the microphones are evenly distributed. Secure the microphones in their intended locations to avoid movement or vibration that may affect data collection. Connect all microphones to the data acquisition system, ensuring that each microphone is able to transmit data in real time.
[0046] Select the position of the speakers to match the microphones and ensure that the whole room is covered. Fix the speakers in the intended position to avoid movement that may affect the accuracy of noise generation. Connect all speakers to the audio output system to ensure that each speaker can accurately produce sound.
[0047] Select a standard noise source type, such as pink noise or white noise. Play the standard noise through the speakers to ensure that the noise is evenly distributed in the room.
[0048] Start the data acquisition system and record the initial noise signals received by each microphone in real time. Record the noise signals received by each microphone without the intervention of the ANC system as the initial baseline. Convert the collected initial noise signals into digital signals for further processing. Use DSP software to perform spectrum analysis on the initial noise signals to understand the frequency distribution and intensity of the noise.
[0049] Compare the noise signals received by each microphone and calculate the phase difference. Record the phase difference error between each microphone as a reference for subsequent phase matching. Adjust the DSP parameters and device position based on the initial noise signal and phase difference results to ensure phase matching. Repeatedly generate a standard noise source and adjust the parameters until the phase of the signal received by each microphone is consistent.
[0050] The final adjusted initial noise signal and phase difference result are saved as a benchmark for subsequent ANC system operation. The ANC system is initialized and real-time noise cancellation is started using the saved benchmark data as a reference.
[0051] S2: The speaker emits a test signal of specific frequency and amplitude. The microphone is used to receive and record the test signal, analyze the test signal, and calculate the phase difference between the test signal received by each microphone and the initial noise signal.
[0052] Make sure n microphones and speakers are installed and connected to the data acquisition system. Select a specific frequency and amplitude as the test signal (for example, a 1kHz sine wave). Use a signal generator or DSP software to generate the test signal.
[0053] The test signal is transmitted to the loudspeaker via the audio output system. The loudspeaker plays the generated test signal in the room, ensuring that the signal is evenly propagated in the room. The data acquisition system is started, and the individual microphones receive and record the test signal in real time. Ensure that all microphones record the received test signal synchronously to avoid time differences.
[0054] In the absence of a test signal, record the initial background noise signal in the room as a baseline. Convert the analog signal received by the microphone to a digital signal. Use a filter to remove high- and low-frequency interference in the initial noise signal and retain the main frequency components of the test signal.
[0055] Perform fast Fourier transform on the received test signal and the initial noise signal to convert the signal from the time domain to the frequency domain. The transformation expression is: Where X(f) is the value of the frequency signal at the fth frequency point, x(n) is the value of the time domain signal at the nth sample point, N is the total number of signal sample points, and e -j2πfn / N is the kernel function of Fourier transform, where j is an imaginary unit, and the phase value of a specific frequency component is extracted from the frequency domain signal. The expression is: Where Re(X(f)) 2 is the real part of X(f),
[0056] IM(X(f)) 2 is the imaginary part of X(f), θ X The phase value is used to calculate the phase difference between the test signal and the initial noise signal. The expression is: Δθ = θ Xtest -θ Xinit ; In the formula,
[0057] θ Xtest is the test signal phase value, θXinit is the initial noise signal phase value, and Δθ is the phase difference.
[0058] S3: Compare and analyze the phase difference actually calculated with the reference phase difference under the standard state, and divide the accuracy of phase pairing into different levels according to the analysis results, such as accurate matching phase, possible accurate matching phase and inaccurate matching phase, and generate an adjustment strategy.
[0059] The calculated phase difference Δθ is compared with the reference phase difference EΔθ under the standard state, and the error between the phase difference Δθ and the reference phase difference EΔθ is calculated and recorded as the phase difference error value EC, which is expressed as: EC = Δθ - EΔθ; the level standard of phase matching accuracy is set according to the phase error, and it is divided into accurate matching phase, possible accurate matching phase and inaccurate matching phase, specifically:
[0060] If the error is less than 5 degrees, it means that the phase matching is very accurate and it is classified as accurately matched phase; if the error is between 5 and 15 degrees, it means that the phase matching accuracy is average and it is classified as possibly accurately matched phase; if the error is greater than 15 degrees, it means that there is a significant error in the phase matching and it is classified as inaccurately matched phase.
[0061] According to the phase error of each microphone, its phase pairing accuracy is divided into corresponding levels, and an adjustment strategy is generated, specifically:
[0062] Accurately match the phase: If the phase match is very accurate, no adjustment is required. Monitor regularly to ensure that the phase match remains within the accurate range.
[0063] Possible accurate phase match: Make small adjustments to DSP parameters, such as gain and phase compensation, to reduce errors. It is recommended that users fine-tune the microphone or speaker position to optimize phase matching. Repeat the test to confirm the effect of the adjustment.
[0064] Inaccurately matched phase: Sharply adjust DSP parameters to optimize phase matching. Recommend that users reposition microphones and speakers to eliminate significant errors. Also, analyze noise sources in the environment to determine if there are any interfering factors affecting phase matching. Recalibrate equipment, including signal generation and data collection, to ensure accuracy. Continuously monitor after adjustments to provide real-time feedback on phase matching for further optimization.
[0065] S4: For phases that can be accurately matched, the phase matching is optimized by adjusting the strategy, and the noise signal in the optimized monitoring environment is subjected to spectrum analysis to determine the change in noise level and evaluate the degree of harmonic distortion.
[0066] Use the noise signal spectrum before optimization as a benchmark, compare the optimized noise signal spectrum with the benchmark spectrum, compare the peak changes at each frequency before and after optimization, record the change amplitude, generate the noise signal fluctuation index according to the overall noise level change before and after optimization, and evaluate the degree of harmonic distortion after optimization. The method for obtaining the noise signal fluctuation index is as follows:
[0067] Collect the environmental noise signal xbefore(t) before optimization and the environmental noise signal xafter(t) after optimization, preprocess the signal, select the wavelet function ψ(t), determine the scale parameter a and displacement parameter b of the wavelet transform, and calculate the wavelet transform value of the signal. The expression is:
[0068] Where W x (a, b) are the wavelet transform coefficients of the signal x(t) at scale a and displacement b, ψ(t) is the mother wavelet function, a is the scale parameter that controls the width of the wavelet, b is the displacement parameter that controls the time position of the wavelet, x(t) is the input signal, and the signal energy before and after optimization is calculated respectively. The expression is:
[0069]
[0070] Where, Ebefore is the signal energy before optimization, Eafter is the signal energy after optimization, and W xbsfore (a, b) are the wavelet transform coefficients before optimization, W xafter (a, b) are the optimized wavelet transform coefficients; calculate the noise signal fluctuation index, the expression is:
[0071] Where DG is the noise signal fluctuation index.
[0072] The obtained noise signal fluctuation index is compared with the preset noise signal fluctuation index reference threshold. If the noise signal fluctuation index is greater than or equal to the preset noise signal fluctuation index reference threshold, a high-quality optimization signal is generated, indicating that the noise level after optimization is significantly improved and the degree of harmonic distortion is within an acceptable range; if the noise signal fluctuation index is less than the preset noise signal fluctuation index reference threshold, a low-quality optimization signal is generated, indicating that the optimization effect is not obvious and further adjustment and optimization of system parameters may be required.
[0073] S5: Analyze the harmonic distortion and phase difference fluctuation based on fuzzy logic, evaluate the noise reduction effect of the ANC system, and provide visual feedback of the evaluation results.
[0074] The phase difference fluctuation within a fixed time period is analyzed, the phase difference between the test signal received by each microphone and the initial noise signal within the fixed time period is collected, and a data set is established to calculate the standard deviation of the data set, that is, the phase difference outlier index is calculated.
[0075] The noise signal fluctuation index DG and the phase difference outlier index AD are used as the input items of fuzzy logic, and the noise reduction effect SF of the ANC system is used as the output item of fuzzy logic;
[0076] Define the fuzzy membership functions of DG and AD (such as low, medium, and high), and the fuzzy membership function of SF (such as poor, fair, and good).
[0077] Design fuzzy rules for input items and output items, Rule 1: If DG is low and AD is low, then SF is good. Rule 2: If DG is low and AD is medium, then SF is fair. Rule 3: If DG is low and AD is high, then SF is bad. Rule 4: If DG is medium and AD is low, then SF is fair. Rule 5: If DG is medium and AD is medium, then SF is fair. Rule 6: If DG is medium and AD is high, then SF is bad. Rule 7: If DG is high and AD is low, then SF is fair. Rule 8: If DG is high and AD is medium, then SF is bad. Rule 9: If DG is high and AD is high, then SF is bad.
[0078] The actual values of DG and AD are fuzzified through membership functions.
[0079] Reasoning is performed according to fuzzy rules to calculate the fuzzy value of the output item SF.
[0080] The fuzzy value of SF is converted into a specific value through the defuzzification method to obtain the noise reduction effect of the ANC system.
[0081] Plot the spectrum before and after optimization to show the intensity changes at each frequency. Plot the change graph of the noise signal fluctuation index (DG) to show the optimization effect, and plot the change graph of the phase difference outlier index (AD) to show the phase matching situation.
[0082] Visualize the noise reduction effect (SF) of the ANC system through charts or dashboards. At the same time, generate a detailed noise reduction effect evaluation report, including spectrum analysis, noise signal fluctuation index, phase difference outlier index and fuzzy logic evaluation results.
[0083] In this embodiment, n microphones and loudspeakers are installed at different positions in the room, and the ANC system is preliminarily calibrated through a standard noise source, and the initial noise signal in the room is obtained in real time based on each microphone when the ANC system does not start to intervene; a test signal of a specific frequency and amplitude is emitted by the loudspeaker, and the microphone is used to receive and record the test signal, analyze the test signal, and calculate the phase difference between the test signal received by each microphone and the initial noise signal; the phase difference actually calculated is compared and analyzed with the reference phase difference under the standard state, and the accuracy of the phase pairing is divided into different levels according to the analysis result, which is divided into accurate matching phase, possible accurate matching phase and inaccurate matching phase, and an adjustment strategy is generated; for the possible accurate matching phase, the phase matching is optimized through the adjustment strategy, and the noise signal in the optimized monitoring environment is subjected to spectrum analysis to determine the change in the noise level and evaluate the degree of harmonic distortion; the degree of harmonic distortion and the fluctuation of the phase difference are analyzed based on fuzzy logic, the noise reduction effect of the ANC system is evaluated, and the evaluation results are visually fed back. It not only improves the phase matching accuracy of the ANC system and optimizes the noise reduction effect, but also provides precise noise reduction performance feedback through spectrum analysis and fuzzy logic evaluation, allowing users to intuitively understand and optimize the operation of the ANC system, significantly improving the comfort and noise management efficiency of the smart home environment.
[0084] Example 2, please refer to Figure 2 As shown, the noise elimination system based on smart home described in this embodiment includes a preliminary noise signal acquisition module, a test signal analysis module, a phase difference comparison module, a harmonic analysis module and a visualization module;
[0085] Preliminary noise signal acquisition module: n microphones and speakers are installed at different locations in the room, and the ANC system is preliminarily calibrated using a standard noise source. The initial noise signal in the room is acquired in real time based on each microphone without the ANC system intervening.
[0086] Test signal analysis module: The speaker sends out a test signal with a specific frequency and amplitude. The microphone is used to receive and record the test signal, analyze the test signal, and calculate the phase difference between the test signal received by each microphone and the initial noise signal.
[0087] Phase difference comparison module: compares and analyzes the phase difference actually calculated with the reference phase difference under the standard state, and divides the accuracy of phase pairing into different levels according to the analysis results, such as accurate matching phase, possible accurate matching phase and inaccurate matching phase, and generates adjustment strategies;
[0088] Harmonic analysis module: For phases that can be accurately matched, the phase matching is optimized by adjusting the strategy, and the noise signal in the optimized monitoring environment is analyzed by spectrum to determine the change of noise level and evaluate the degree of harmonic distortion;
[0089] Visualization module: Analyzes the degree of harmonic distortion and phase difference fluctuation based on fuzzy logic, evaluates the noise reduction effect of the ANC system, and provides visual feedback of the evaluation results.
[0090] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters in the formula are set by technicians in this field according to actual conditions.
[0091] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any other combination. When implemented by software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that contains one or more available media sets. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state hard disk.
[0092] It should be understood that the term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship, but it may also indicate an "and / or" relationship. Please refer to the context for specific understanding.
[0093] In this application, "at least one" means one or more, and "more than one" means two or more. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b, or c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0094] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0095] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0096] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0097] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be covered by the protection scope of the present application.
Claims
1. A noise elimination method based on smart home, Features: The steps include: S1: Install n microphones and speakers at different locations in the room, and perform preliminary calibration on the ANC system using a standard noise source. Based on each microphone, obtain the initial noise signal in the room in real time when the ANC system does not start to intervene. S2: Using a loudspeaker to emit a test signal of a specific frequency and amplitude, the microphone is used to receive and record the test signal, analyze the test signal, and calculate the phase difference between the test signal received by each microphone and the initial noise signal; S3: Compare and analyze the phase difference actually calculated with the reference phase difference under the standard state, and classify the accuracy of phase pairing into different levels according to the analysis results, such as accurate matching phase, possible accurate matching phase and inaccurate matching phase, and generate an adjustment strategy; S4: For phases that can be accurately matched, optimize the phase matching by adjusting the strategy, and perform spectrum analysis on the noise signal in the optimized monitoring environment to determine the change in noise level and evaluate the degree of harmonic distortion; S5: Analyze the harmonic distortion and phase difference fluctuation based on fuzzy logic, evaluate the noise reduction effect of the ANC system, and provide visual feedback of the evaluation results.
2. A noise elimination method based on smart home according to claim 1, Features: In S2, the phase difference between the test signal received by each microphone and the initial noise signal is calculated, specifically: In the absence of a test signal, record the initial background noise signal in the room as a benchmark, convert the analog signal received by the microphone into a digital signal, use a filter to remove high-frequency and low-frequency interference in the initial noise signal, retain the main frequency components of the test signal, perform fast Fourier transform on the received test signal and the initial noise signal, convert the signal from the time domain to the frequency domain, extract the phase value of the specific frequency component from the frequency domain signal, and calculate the phase difference between the test signal and the initial noise signal.
3. A noise elimination method based on smart home according to claim 2, Features: In S3, the phase difference actually calculated is compared with the reference phase difference under the standard state, and the accuracy of the phase pairing is divided into different levels according to the analysis results; The calculated phase difference is compared and analyzed with the reference phase difference under the standard state, and the error between the phase difference and the reference phase difference is calculated and recorded as the phase difference error value. The level standard of phase matching accuracy is set according to the phase error. If the error is less than 5 degrees, the phase matching is accurate and it is classified as an accurately matched phase; if the error is between 5 and 15 degrees, the phase matching accuracy is average and it is classified as a possibly accurately matched phase; if the error is greater than 15 degrees, there is an error in the phase matching and it is classified as an inaccurately matched phase.
4. The noise elimination method based on smart home according to claim 1, Features: In S4, the noise signal fluctuation index is generated according to the change of the overall noise level before and after optimization to evaluate the degree of harmonic distortion after optimization. The method for obtaining the noise signal fluctuation index is: The environmental noise signals before and after optimization are collected, the signals are preprocessed, the wavelet function is selected, and the scale parameter and displacement parameter of the wavelet transform are determined. The wavelet transform value of the signal is calculated, and the signal energy before and after optimization is calculated according to the wavelet transform value of the signal. After analysis, the noise signal fluctuation index is calculated.
5. A noise elimination method based on smart home according to claim 4, Features: The obtained noise signal fluctuation index is compared with the preset noise signal fluctuation index reference threshold. If the noise signal fluctuation index is greater than or equal to the preset noise signal fluctuation index reference threshold, a high-quality optimization signal is generated, and the noise level after optimization is significantly improved. If the noise signal fluctuation index is less than the preset noise signal fluctuation index reference threshold, a low-quality optimization signal is generated and the optimization effect is not obvious.
6. A noise elimination method based on smart home according to claim 5, Features: In S5, the harmonic distortion level and phase difference fluctuation are analyzed based on fuzzy logic to evaluate the noise reduction effect of the ANC system. Specifically: Analyze the phase difference fluctuation within a fixed time period, collect the phase difference between the test signal received by each microphone and the initial noise signal within the fixed time period, establish a data set, calculate the standard deviation of the data set, that is, calculate the phase difference outlier index; The noise signal fluctuation index and phase difference outlier index are used as the input items of fuzzy logic, and the noise reduction effect of the ANC system is used as the output item of fuzzy logic; Define the noise signal fluctuation index, phase difference outlier index and fuzzy membership function of the noise reduction effect of the ANC system; Design fuzzy rules for noise signal fluctuation index, phase difference outlier index and noise reduction effect of ANC system, and fuzzify the actual values of noise signal fluctuation index and phase difference outlier index through membership function; Reasoning is performed according to fuzzy rules to calculate the fuzzy value of the output item, the noise reduction effect of the ANC system; The fuzzy value of the noise reduction effect of the ANC system is converted into a specific value through a defuzzification method to obtain the noise reduction effect of the ANC system.
7. A noise elimination system based on smart home, used to implement the noise elimination method based on smart home according to any one of claims 1 to 6, Features: It includes preliminary noise signal acquisition module, test signal analysis module, phase difference comparison module, harmonic analysis module and visualization module; Preliminary noise signal acquisition module: n microphones and speakers are installed at different locations in the room, and the ANC system is preliminarily calibrated using a standard noise source. The initial noise signal in the room is acquired in real time based on each microphone without the ANC system intervening. Test signal analysis module: The speaker sends out a test signal with a specific frequency and amplitude. The microphone is used to receive and record the test signal, analyze the test signal, and calculate the phase difference between the test signal received by each microphone and the initial noise signal. Phase difference comparison module: compares and analyzes the phase difference actually calculated with the reference phase difference under the standard state, and divides the accuracy of phase pairing into different levels according to the analysis results, such as accurate matching phase, possible accurate matching phase and inaccurate matching phase, and generates adjustment strategies; Harmonic analysis module: For phases that can be accurately matched, the phase matching is optimized by adjusting the strategy, and the noise signal in the optimized monitoring environment is analyzed by spectrum to determine the change of noise level and evaluate the degree of harmonic distortion; Visualization module: Analyzes the degree of harmonic distortion and phase difference fluctuation based on fuzzy logic, evaluates the noise reduction effect of the ANC system, and provides visual feedback of the evaluation results.
