Time-frequency learning estimation method for mixed noise sinusoidal signal frequency
By performing signal preprocessing, autocorrelation operations and fine estimation of deep neural network models on mixed noise sinusoidal signals, combined with model fine-tuning and optimization parameters of gray wolf hunting algorithm, the problem of insufficient frequency estimation capability of mixed noise signals in the prior art is solved, and high-precision and high-adaptive frequency estimation is achieved.
Patent Information
- Application Number
- CN202411702796.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2044-11-26
AI Technical Summary
When estimating the frequency of mixed noise sinusoidal signals in the prior art, it is difficult to fully describe the signals in actual scenarios. The ability to describe mixed noise factors such as frequency drift and phase disturbance is limited, and the estimation performance is often poor.
A mixed noise sinusoidal signal frequency estimation method is used to filter out noise components through signal acquisition and preprocessing, perform autocorrelation operations and optimized searches, and initially estimate the signal period and frequency. Then, a pre-trained deep neural network model is used to combine spectrum and autocorrelation features to perform fine frequency estimation, and parameters are optimized through model fine-tuning and gray wolf hunting algorithm to improve estimation accuracy.
It achieves higher frequency estimation accuracy and stronger adaptability, can effectively overcome the limitations of traditional methods, and is suitable for complex practical scenarios.
Smart Images

Figure CN119646416A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of signal processing, and in particular, relates to a mixed noise sinusoidal signal frequency estimation method. Background Art
[0002] With the rapid development of modern science and technology, high-precision frequency measurement of mixed noise sinusoidal signals has received increasing attention in various fields. In many fields such as communications, radar, and audio, many key signals are approximately sinusoidal. Due to the interference of the actual environment and the nonlinear factors of the system itself, these ideal sinusoidal signals will inevitably superimpose noise components to form mixed noise sinusoidal signals. Accurately measuring the frequency of such signals is crucial for tasks such as system performance evaluation, fault diagnosis, and parameter tuning.
[0003] In the field of communications, sinusoidal carrier signals are widely used in data modulation and demodulation. Due to channel noise and hardware distortion, the receiver obtains a mixed noise sinusoidal signal. Accurately estimating the carrier frequency is crucial to ensure the accuracy of the demodulated data. At the same time, in modern wireless communications, the use of advanced technologies such as multi-carrier also places higher requirements on the accuracy of carrier frequency measurement.
[0004] In radar systems, after long-distance propagation, echo signals experience frequency drift and phase disturbance due to multipath effects, mirror effects, etc. Accurate frequency estimation of echo signals is the basis for radar signal processing such as anti-interference and target recognition. High-resolution radars require higher accuracy for frequency estimation.
[0005] In the audio field, speech signals and music signals also have mixed noise sinusoidal components. Accurately capturing and tracking the fundamental frequency is a prerequisite for tasks such as speech coding and music signal processing. Audio signal frequency estimation is also used for audio enhancement needs such as tuning and noise reduction.
[0006] However, the traditional frequency estimation method for mixed noise sinusoidal signals has certain limitations and is difficult to meet the stringent accuracy requirements of the above application scenarios.
[0007] The spectral analysis estimation method based on Fourier transform is limited by spectral leakage and fence effect, and the estimation accuracy is limited. Although the time domain autocorrelation method is simple and effective, noise will cause estimation bias, and it is not robust enough to frequency drift and other situations. Although some wavelet transform or subspace decomposition algorithms have been improved, their implementation is complex and computationally intensive. Some algorithms are designed for specific noise models, such as maximum likelihood estimation in additive Gaussian white noise environments, but in actual situations, noise models are complex and changeable, and their robustness is poor. There are also methods such as Bayesian estimation or small perturbation theory, but they must meet strict prior assumptions and are computationally complex.
[0008] In addition, most of the above traditional methods are based on parameterized models of ideal sinusoidal signals, which are difficult to fully describe signals in actual scenarios. They have limited ability to describe mixed noise factors such as frequency drift and phase disturbance, and their estimation performance is often poor. Summary of the invention
[0009] In view of this, the present invention provides a mixed noise sinusoidal signal frequency estimation method, which can solve the problem that most of the existing technologies are based on parameterized models of ideal sinusoidal signals when estimating the frequency of signals, which is difficult to fully describe the signals in actual scenarios, has limited ability to describe mixed noise factors such as frequency drift and phase disturbance, and the estimation performance is often poor.
[0010] The present invention is achieved in that:
[0011] The present invention provides a mixed noise sinusoidal signal frequency estimation method, which comprises the following steps:
[0012] S10, obtaining the mixed noise sinusoidal signal through signal acquisition and preprocessing;
[0013] S20, using a bandpass filter to filter out high-frequency and low-frequency noise components in the mixed noise sinusoidal signal, and obtaining a filtered signal as a first signal;
[0014] S30, performing an autocorrelation operation on the first signal to obtain an autocorrelation function;
[0015] S40, optimizing and searching the autocorrelation function to find the first significant non-zero delay peak, wherein the delay time corresponding to the delay peak is the preliminary period estimation value of the first signal; thereby calculating the preliminary frequency estimation value of the first signal, which is recorded as the first frequency estimation value;
[0016] S50, using a pre-trained frequency estimation model, inputting the frequency spectrum characteristics and autocorrelation peak characteristics of the first signal and the first frequency estimation value, to obtain a precise frequency estimation value, recorded as a second frequency estimation value;
[0017] S60, collecting spectral features, autocorrelation peak features, and corresponding second frequency estimation values of multiple first signals, and constructing a model parameter fine-tuning data set; using sparse matrix transformation on the spectral features and autocorrelation peak features in the fine-tuning data set to obtain a first spectral sparse matrix and a first autocorrelation peak sparse matrix; using the first spectral sparse matrix, the first autocorrelation peak sparse matrix, and the corresponding first frequency estimation values as inputs, and the second frequency estimation values as output labels, fine-tuning the last M-layer neural network of the frequency fine estimation model to obtain a first model;
[0018] S70, further optimizing and adjusting the parameters of the first model using a gray wolf hunting algorithm, inputting the first spectrum sparse matrix, the first autocorrelation peak sparse matrix, and the second frequency estimation value to obtain a third frequency estimation value, repeating this step until the third frequency estimation value converges, saving the current parameters of the first model, and forming a second model;
[0019] S80, continue to execute S30 to S70, input the newly obtained first signal spectrum characteristics, autocorrelation peak characteristics and first frequency estimation value into the second model, use the result output by the second model as the final frequency estimation value of the mixed noise sinusoidal signal and output it to the operator.
[0020] M is a positive integer from 1 to 4, and M is less than the number of neural network layers.
[0021] The steps of pre-training the frequency fine estimation model are as follows:
[0022] 1) Collect a large number of mixed noise sinusoidal signal samples and their autocorrelation functions and spectrum characteristics;
[0023] 2) extracting autocorrelation peak delay, peak amplitude, spectrum peak, and spectrum width as autocorrelation peak features;
[0024] 3) taking the ideal frequency value of the mixed noise sinusoidal signal sample actually detected as the output label;
[0025] 4) Select a deep neural network as the machine learning model and use the above-mentioned spectrum features, autocorrelation peak features and ideal frequency value data for training;
[0026] 5) Evaluate the model generalization performance on the validation set and select the best performing model instance as the frequency fine estimation model.
[0027] Among them, the specific steps of S30 include: performing an autocorrelation operation on the first signal, the autocorrelation operation estimates the signal period by calculating the similarity between the signal and the delayed version, first constructing an equal-length autocorrelation function, the delay range of the autocorrelation function is [0, T], T is the maximum expected period of the first signal, and the sampling interval is set according to the expected time resolution; when calculating the autocorrelation value at each delay, the square sum correlation or cross-correlation method is used; after the autocorrelation function is calculated, normalization processing is performed.
[0028] Among them, the specific steps of S40 include: optimizing the search of the normalized autocorrelation function to find the first significant non-zero delay peak, setting the signal-to-noise ratio of the signal after bandpass filtering to 0.4-0.7 as the peak threshold; searching for the first peak point greater than the peak threshold in the non-zero delay part of the autocorrelation function, and the delay corresponding to this point is the preliminary period estimate. If the search is performed programmatically, the search algorithm adopts an exhaustive method or a gradient descent algorithm.
[0029] The method for calculating the preliminary frequency estimation value of the first signal is to divide the normalized autocorrelation function sampling interval by the preliminary period estimation value.
[0030] Among them, the specific steps of S70 include: using the gray wolf hunting algorithm to optimize and adjust the first model parameters, taking the first spectrum sparse matrix, the first autocorrelation peak sparse matrix and the second frequency estimation value as input, and the third frequency estimation value as the objective function value, simulating the wolf pack hunting behavior, exploring the solution space through the wolf pack position update formula, approximating the optimal parameter combination, terminating when the objective function converges or reaches the maximum number of iterations, and saving the current model parameters as the second model.
[0031] Wherein, when optimizing and searching the autocorrelation function, a genetic algorithm or a simulated annealing algorithm is used.
[0032] Among them, the frequency fine estimation model is a deep convolutional neural network model.
[0033] The sparse matrix transformation is a K-SVD dictionary learning algorithm.
[0034] Furthermore, the maximum number of iteration steps of the grey wolf algorithm is 500 times.
[0035] Compared with the prior art, the mixed noise sinusoidal signal frequency estimation method provided by the present invention has the beneficial effect of effectively overcoming the limitations of the prior art and achieving higher frequency estimation accuracy and stronger adaptability. The advantages of this method are reflected in the following aspects:
[0036] First, the method of the present invention integrates multiple features in the time domain and frequency domain, and enhances the characterization ability of the problem. Most traditional methods are based on parameterized models of ideal sinusoidal signals, which are difficult to effectively describe mixed noise sinusoidal signals in actual complex scenarios. The method of the present invention extracts features from both the time domain autocorrelation and spectrum perspectives at the same time, which can more comprehensively characterize the time-frequency behavior of mixed noise sinusoidal signals, thereby providing richer prior knowledge for fine frequency estimation.
[0037] Secondly, the method of the present invention uses an end-to-end deep neural network for frequency estimation modeling, without the need to explicitly model the mixed noise sinusoidal signal, thus avoiding the deviation caused by model distortion in traditional methods. The deep learning model has a powerful function fitting ability and can automatically learn the high-dimensional nonlinear mapping relationship between frequency and features from a large number of data samples, thereby achieving accurate frequency estimation.
[0038] Thirdly, the method of the present invention introduces model fine-tuning and meta-optimization algorithms to improve the adaptability of the model in specific scenarios. The general deep neural network model can be adjusted to the optimal state of the scene by fine-tuning the scene data. Meta-optimization algorithms such as GWO can further optimize the neural network parameters so that the model accurately fits the frequency distribution of the scene, thereby achieving the best estimation result. This avoids the problem of poor universality in traditional methods.
[0039] In addition, the method of the present invention can effectively utilize big data, continuously accumulate and learn from new samples, and continuously improve the frequency estimation performance. In the online application stage of the algorithm, the newly collected data can be continuously input into the trained model, and the model will output the refined frequency estimation value of the sample. After training and updating with a large amount of data, the model can gradually improve its adaptability to various complex situations, so that the estimation accuracy can be continuously improved.
[0040] In general, the method of the present invention innovatively integrates multiple technologies such as signal processing, machine learning and optimization algorithms, and realizes high-precision and intelligent frequency estimation of mixed noise sinusoidal signals. It not only improves the accuracy of frequency estimation, but also enhances the universality and robustness of the algorithm, and solves the technical problems that the existing technology is mostly based on the parameterized model of ideal sinusoidal signals when estimating the frequency of signals, which is difficult to fully describe the signals in actual scenarios, has limited ability to describe mixed noise factors such as frequency drift and phase disturbance, and often has poor estimation performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0042] Figure 1 A flow chart of the method provided by the present invention;
[0043] Figure 2 2 is a comparison chart of the experimental errors in the examples. DETAILED DESCRIPTION
[0044] In order to make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0045] like Figure 1 FIG. 1 is a flow chart of a mixed noise sinusoidal signal frequency estimation method provided by the present invention. The method comprises the following steps:
[0046] S10, obtaining the mixed noise sinusoidal signal through signal acquisition and preprocessing;
[0047] S20, using a bandpass filter to filter out high-frequency and low-frequency noise components in the mixed noise sinusoidal signal, and obtaining a filtered signal as a first signal;
[0048] S30, performing an autocorrelation operation on the first signal to obtain an autocorrelation function;
[0049] S40, optimizing and searching the autocorrelation function to find the first significant non-zero delay peak, wherein the delay time corresponding to the delay peak is the preliminary period estimation value of the first signal; thereby calculating the preliminary frequency estimation value of the first signal, which is recorded as the first frequency estimation value;
[0050] S50, using a pre-trained frequency estimation model, inputting the frequency spectrum characteristics and autocorrelation peak characteristics of the first signal and the first frequency estimation value, to obtain a precise frequency estimation value, recorded as a second frequency estimation value;
[0051] S60, collecting spectral features, autocorrelation peak features, and corresponding second frequency estimation values of multiple first signals, and constructing a model parameter fine-tuning data set; using sparse matrix transformation on the spectral features and autocorrelation peak features in the fine-tuning data set to obtain a first spectral sparse matrix and a first autocorrelation peak sparse matrix; using the first spectral sparse matrix, the first autocorrelation peak sparse matrix, and the corresponding first frequency estimation values as inputs, and the second frequency estimation values as output labels, fine-tuning the last M-layer neural network of the frequency fine estimation model to obtain a first model;
[0052] S70, further optimizing and adjusting the parameters of the first model using a gray wolf hunting algorithm, inputting the first spectrum sparse matrix, the first autocorrelation peak sparse matrix, and the second frequency estimation value to obtain a third frequency estimation value, repeating this step until the third frequency estimation value converges, saving the current parameters of the first model, and forming a second model;
[0053] S80, continue to execute S30 to S70, input the newly obtained first signal spectrum characteristics, autocorrelation peak characteristics and first frequency estimation value into the second model, use the result output by the second model as the final frequency estimation value of the mixed noise sinusoidal signal and output it to the operator.
[0054] The steps of pre-training the frequency fine estimation model are as follows:
[0055] 1) Collect a large number of mixed noise sinusoidal signal samples and their autocorrelation functions and spectrum characteristics;
[0056] 2) extracting autocorrelation peak delay, peak amplitude, spectrum peak, and spectrum width as autocorrelation peak features;
[0057] 3) taking the ideal frequency value of the mixed noise sinusoidal signal sample actually detected as the output label;
[0058] 4) Select a deep neural network as the machine learning model and use the above-mentioned spectrum features, autocorrelation peak features and ideal frequency value data for training;
[0059] 5) Evaluate the model generalization performance on the validation set and select the best performing model instance as the frequency fine estimation model.
[0060] The specific implementation methods of the above steps are described in detail below:
[0061] The specific implementation of step S10 is: firstly, a mixed noise sinusoidal signal is obtained by simulation or actual measurement, wherein the mixed noise sinusoidal signal mentioned in the present invention refers to a composite signal with noise components superimposed on an ideal sinusoidal signal. The preprocessing method is a common preprocessing method in the art.
[0062] The filtering method in step S20 is a common filtering method in the art.
[0063] The specific implementation method of step S30 is: perform autocorrelation operation on the first signal. Autocorrelation operation is a commonly used periodic signal analysis method. By calculating the similarity between the signal and its delayed version, the period of the signal can be estimated. The specific method is to first construct an autocorrelation function of the same length as the first signal. The delay range of the autocorrelation function can be set to [0, T], where T is the maximum expected period, and the sampling interval of the autocorrelation function should be set according to the desired time resolution. Then calculate the autocorrelation value under each delay. Commonly used autocorrelation calculation methods include square sum correlation, cross correlation, etc. For additive noise, cross correlation performance is better. After the autocorrelation function is calculated, it should be normalized to facilitate subsequent peak search.
[0064] The specific implementation method of step S40 is: optimize the search of the normalized autocorrelation function to find the first significant non-zero delay peak. The purpose of this step is to obtain a preliminary period estimate. Specifically, a peak threshold is first set. The threshold can be set with reference to the signal-to-noise ratio of the signal after bandpass filtering, such as 0.4-0.7. If the threshold is too low, the noise peak will be misjudged as a period peak, and if the threshold is too high, the real period peak will be missed. Then search for the first peak point greater than the peak threshold in the non-zero delay part of the autocorrelation function, and the delay corresponding to this point is the preliminary period estimate. The search algorithm can adopt local optimization algorithms such as exhaustive method and gradient descent, or global optimization algorithms such as genetic algorithm and ant colony algorithm, and the latter has better convergence performance.
[0065] The specific implementation method of step S50 is: calculate the preliminary frequency estimate of the first signal based on the preliminary period estimate. The purpose of this step is to provide a more accurate initial value for the subsequent fine frequency estimation. Specifically, the sampling interval of the autocorrelation function is divided by the preliminary period estimate to obtain the preliminary frequency estimate. Due to the influence of noise and autocorrelation calculation errors, the preliminary frequency estimate will have a certain deviation and needs to be finely corrected in subsequent steps. Use a pre-trained frequency fine estimation model, input the spectral characteristics and autocorrelation peak characteristics of the first signal and the first frequency estimate, and obtain a fine frequency estimate, which is recorded as the second frequency estimate. The purpose of this step is to use a machine learning model to fuse multiple features to correct and refine the preliminary frequency estimate. The frequency fine estimation model is a deep neural network model, which often uses network structures such as convolutional neural networks and long short-term memory networks, and is pre-trained on a large amount of data. The spectral features in the input features reflect the frequency distribution information of the signal. The peak frequency, frequency width, etc. can be extracted from the power spectral density or Fourier transform spectrum of the first signal as feature vectors; the autocorrelation peak features include peak delay, peak amplitude and other features that describe the shape of the autocorrelation peak, which have a certain correlation with the frequency; the first frequency estimate is the initial value input of the model. When pre-training the model, it is necessary to construct a labeled data set, collect a large number of mixed noise sinusoidal signal samples, extract the corresponding features, and use the ideal frequency value as the label for supervised training. The model evaluates the generalization ability on the validation set and selects the model with the best performance as the frequency fine estimation model. The output second frequency estimate has high accuracy and can be output as the final frequency estimation result, or it can be further fine-tuned and optimized.
[0066] The specific implementation of step S60 is: collect the spectrum features, autocorrelation peak features and corresponding second frequency estimation values of multiple first signals to construct a model fine-tuning data set; use sparse matrix transformation to transform the spectrum features and autocorrelation peak features in the fine-tuning data set respectively to obtain a first spectrum sparse matrix and a first autocorrelation peak sparse matrix; use the first spectrum sparse matrix, the first autocorrelation peak sparse matrix and the corresponding first frequency estimation value as input, and the second frequency estimation value as output label to fine-tune the last M layers of the frequency fine estimation model to obtain a first model. The purpose of this step is to further fine-tune the general model for specific application scenarios to improve the adaptability and accuracy of the model. The data set used for fine-tuning is a batch of data samples collected previously and the corresponding second frequency estimation value. During fine-tuning, the original input features are transformed by matrix sparse transformation to achieve feature dimensionality reduction and information compression. Commonly used matrix sparse transformations include linear transformations such as PCA and LDA, or nonlinear transformations based on autoencoders. The transformed sparse matrix features can effectively compress the model complexity and computational complexity, and improve the model efficiency. Then, the sparse features of the spectrum and autocorrelation peak are input into the first M layers of the original model together with the first frequency estimate, and the weights of the last M layers of the neural network are fine-tuned using the second frequency estimate as a label. The value of M depends on the complexity of the specific problem, and usually M = 1 to 4 works better. Fine-tuning can be achieved using optimization methods such as back propagation algorithm and stochastic gradient descent.
[0067] The specific implementation method of step S70 is: further optimize and adjust the parameters of the first model using the gray wolf hunting algorithm, input the first spectrum sparse matrix, the first autocorrelation peak sparse matrix and the second frequency estimate, obtain the third frequency estimate, repeat this step until the third frequency estimate converges, save the current parameters of the first model, and form the second model. The specific method is to first straighten the parameter matrix of the first model to form a high-dimensional vector to be optimized, and model the problem as a black box optimization problem. The first spectrum sparse matrix, the first autocorrelation peak sparse matrix and the second frequency estimate are input, and the third frequency estimate is used as the objective function value. In the algorithm iteration, the wolf hunting behavior is simulated, and the solution space is explored through the wolf position update formula to continuously approach the optimal parameter combination. When the objective function value converges or reaches the maximum number of iterations, it is terminated, and the model parameters at this time are saved as the second model. The algorithm has the advantages of fast convergence speed and not easy to fall into local minima. Key parameters of the algorithm, such as the number of wolves, the maximum step size factor, etc., can be initialized according to empirical values, or can be tuned by grid search and other methods.
[0068] The specific implementation method of step S80 is: continue to execute S30~S70, input the newly obtained first signal spectrum characteristics, autocorrelation peak characteristics and first frequency estimation value into the second model, use the result output by the second model as the final frequency estimation value of the mixed noise sinusoidal signal and output it to the operator. The purpose of this step is to apply the optimized second model to the actual frequency estimation process. Specifically, first repeat S10~S50, obtain new mixed noise sinusoidal signal samples, extract its spectrum and autocorrelation peak characteristics, and calculate the preliminary frequency estimation value. Then input these feature data into the second model, and the model will output the final frequency estimation value based on the internal parameter combination. Since the second model has been fully trained and fine-tuned, the estimation accuracy of its output result will be significantly higher than the original first frequency estimation value. This step is the online application stage of the algorithm, which deploys the offline trained model to the actual scene to solve the actual needs of accurate frequency measurement of mixed noise sinusoidal signals.
[0069] The calculation steps involved in the above specific implementation are described as follows:
[0070] Assume that the output signal of step S20 is recorded as y(n), that is, the first signal of step S20.
[0071] The specific calculation method of step S30 is:
[0072] Perform an autocorrelation operation on the first signal y(n) to estimate its periodicity. The autocorrelation function is defined as:
[0073]
[0074] Where k is the delay, the autocorrelation function R yy (k) reflects the similarity between y(n) and its version delayed by k samples.
[0075] For a periodic signal y(n), its autocorrelation function R yy (k) is also a periodic function. Let the theoretical period of y(n) be T0, then R yy (k) A peak value will appear when k=nT0 (n=0, ±1, ±2, ...).
[0076] Therefore, by searching for R yy The first significant non-zero delay peak in (k) estimates the initial period of y(n) Then get the initial frequency The estimated value of .
[0077] In order to improve the accuracy of peak search, it is necessary to yy (k) Perform normalization processing, and the normalized autocorrelation function is:
[0078]
[0079] where ρ yy (0) = 1, and the values of the normalized autocorrelation function are within the interval [-1, 1].
[0080] In actual calculation, the length of the constructed autocorrelation function is N, and the delay range is [0, N k , where N k < N is the preset maximum delay. The sampling interval Δt of the autocorrelation function should be set according to the desired time resolution, i.e., Δt = 1 / f s , where f s is the sampling frequency.
[0081] Specific calculation method of step S40:
[0082] Perform an optimization search on the normalized autocorrelation function ρ yy (k) to find the first significant non-zero delay peak.
[0083] First, set a peak threshold γ. Usually, the value range of γ is 0.4 - 0.7, and it can be adjusted with reference to the signal-to-noise ratio of y(n). If the value of γ is too low, the noise peak will be misjudged as a real peak; if the value of γ is too high, the real periodic peak will be missed.
[0084] Then, search for the first peak point greater than γ in the non-zero delay part k ∈ [1, N yy of ρ k (k). Let the delay corresponding to this peak point be Then is the estimated value of the preliminary period . That is:
[0085]
[0086] The optimization search algorithm can adopt:
[0087] Exhaustive method, calculate the values of ρ k (k) corresponding to k ∈ [1, N yy , and take the delay corresponding to the first k value greater than γ
[0088] Gradient-based local search algorithms, such as gradient descent method, etc.
[0089] Global optimization algorithms, such as genetic algorithm, ant colony algorithm, etc.
[0090] Among them, the global optimization algorithm has better convergence performance, but higher computational complexity. Local search algorithms such as gradient descent are computationally simple, but may fall into local minima.
[0091] Specific calculation method of step S50:
[0092] According to the preliminary period estimation value obtained in step S40 The preliminary frequency estimate of the first signal y(n) can be further calculated
[0093]
[0094] in is the delay corresponding to the autocorrelation peak, which is a rough frequency estimate with some deviation;
[0095] Next, use the pre-trained frequency refinement estimation model M θ Preliminary frequency estimates Correction is performed to obtain a fine frequency estimate
[0096] Assume M θ is a multi-layer neural network model with parameter θ. The input of the model includes the spectrum feature φ(y) of the first signal y(n), the autocorrelation peak feature ψ(ρ yy ), and preliminary frequency estimates The output is a fine frequency estimate Right now:
[0097]
[0098] Among them, φ(y) can be extracted from the power spectrum density or Fourier transform of y(n), such as peak frequency, frequency width, etc.; ψ(ρ yy ) includes autocorrelation peak delay, peak amplitude, etc.
[0099] M θ The pre-training process of the model is as follows:
[0100] Collect a large number of mixed noise sinusoidal signal samples {y i} and its autocorrelation function {ρ yy,i}、Spectral characteristics{φ(y i )}
[0101] Extract the autocorrelation peak feature {ψ(ρ yy,i )}
[0102] {y i The actual frequency value of {f i} as output label
[0103] {φ(y i ),ψ(ρ yy,i )} is the input, {f i} is a label, and M is trained using optimization algorithms such as back propagation. θ
[0104] Evaluate M on the validation set θ Generalization performance, select the best performance model instance as M θ
[0105] Input the features of the first signal y(n) into the pre-trained model M θ , can be output as a fine estimate of the frequency.
[0106] The specific calculation method of step S60 is:
[0107] Collect multiple first signals {y j} and the corresponding refined estimated frequency Constructing a model fine-tuning dataset
[0108] right The spectral characteristics φ(y j ) and the autocorrelation peak characteristic ψ(ρ yy,j ) respectively perform sparse matrix transformation to obtain the first spectrum sparse matrix and the first autocorrelation peak sparse matrix
[0109]
[0110] in, and It is a sparse transformation function, which can be implemented by linear transformations such as PCA and LDA, or nonlinear transformations such as autoencoders, with the goal of reducing and compressing features.
[0111] by and preliminary frequency estimates For input, For label, for M θ The last M layers are fine-tuned to obtain the first model
[0112]
[0113] in, Represents an M-layer neural network with weight θ M , usually M∈[1,4].
[0114] Use back propagation and other algorithms to optimize θ M , to minimize Fine-tune the network weights for the objective function.
[0115] After fine-tuning will be better than the original M θ The estimation performance for this scene sample is better.
[0116] The specific calculation method of step S70 is:
[0117] The Grey Wolf Optimizer (GWO) algorithm is used to The parameter θ′=(θ′ M ,θ′ 1:M-1 ) is further optimized and adjusted to obtain the second model
[0118] The GWO algorithm simulates the hunting behavior of wolves and has global optimization capabilities. The frequency estimation error is used as the fitness function:
[0119]
[0120] The goal of the algorithm is to minimize ε(θ′) and find the optimal parameter combination θ * :
[0121]
[0122] The basic steps of the algorithm are as follows:
[0123] Initialize the wolf pack position X i (i=1,2,…,n), corresponding to the model parameter θ′
[0124] Calculate the fitness of each wolf δ(X i ), according to the fitness ranking, we get α, β, and δ wolves
[0125] Update the wolf pack position X(t+1):
[0126]
[0127] In the formula, and is the coefficient vector, The vectors representing the wolf positions α, β, and δ.
[0128] 4) Repeat steps 2) to 3) until the termination condition is met (such as reaching the maximum number of iterations or ε(X) converges)
[0129] 5) Set the current optimal position X * The corresponding parameter θ′ is given
[0130] in, and is the key parameter vector of the algorithm, which is used to control the exploration and attack behaviors of the wolf pack and is defined as follows:
[0131]
[0132] in, is the linear attenuation weight, which controls the convergence speed of the algorithm. and is a random vector in the interval [0, 1]. Decays linearly from 2 to 0 to balance exploration and aggression behavior.
[0133] Respectively represent the vector distance between the current wolf position and the positions of α, β, and δ wolves, and are defined as:
[0134]
[0135] Other key parameters of the algorithm include: the number of wolves n, the maximum number of iterations T max Etc., can be set according to the complexity and requirements of the actual problem.
[0136] After optimization by GWO algorithm, the second model is obtained Its parameters are close to the optimal value, and the frequency estimation performance is better. There is further improvement.
[0137] The specific calculation method of step S80 is:
[0138] Continue to execute S30 to S70 to obtain a new mixed noise sinusoidal signal sample y new , extract its spectral feature φ(y new ), autocorrelation peak characteristic ψ(ρ yy,new ), calculate preliminary frequency estimates
[0139] The above characteristics and preliminary estimates are input into the second model , output the final frequency estimate
[0140]
[0141] because After a large amount of data pre-training, fine-tuning and parameter optimization, its generalization ability is strong and the output Will be better than the original The accuracy is significantly improved, thus enabling high-precision measurement of the frequency of mixed-noise sinusoidal signals.
[0142] This step is the online application stage of the algorithm, which optimizes the offline training The model is deployed in actual scenarios to solve the problem of accurate frequency measurement of mixed noise sinusoidal signals in engineering practice.
[0143] It should be noted that the formulas used in the above description are explained as shown in the following table:
[0144]
[0145]
[0146]
[0147] Specifically, the principle of the present invention is:
[0148] Traditional frequency estimation methods are often based on parameterized models of ideal sinusoidal signals, or use linear operators such as Fourier transform and autocorrelation. However, these methods are difficult to fully characterize the complex characteristics of mixed noise sinusoidal signals, such as frequency drift, phase disturbance, noise pollution, etc., thus limiting the estimation accuracy.
[0149] The method of the present invention first uses traditional means such as time domain autocorrelation and frequency domain Fourier spectrum to preliminarily estimate the frequency, and then inputs these preliminary estimates together with the time-frequency characteristics of the initial signal into a deep neural network model, and the model outputs precise frequency estimates end-to-end.
[0150] Deep neural networks have powerful automatic learning capabilities and can autonomously model and fit the complex nonlinear mapping relationship between frequency and time-frequency features, thus overcoming the model distortion defects of traditional methods. The network model is pre-trained based on a large number of ideal and mixed noise sinusoidal signal samples. During the training process, the network automatically learns to capture various implicit factors in the signal, thereby obtaining good frequency estimation capabilities.
[0151] Compared with traditional algorithms, neural network models can make full use of big data, have absolute advantages in the scale and diversity of training samples, and have stronger generalization performance. Rich features such as autocorrelation peaks are also incorporated into the training, allowing the network to effectively mine various prior knowledge contained in the signal, thereby obtaining better estimation accuracy.
[0152] However, a single pre-trained neural network model still has certain limitations, and its adaptability to specific scenarios needs to be further improved. To this end, the method of the present invention further introduces model fine-tuning and meta-heuristic optimization algorithms based on pre-training.
[0153] In the fine-tuning phase, a certain amount of scene data is collected and an adaptive data set is constructed. The actual frequency estimation values in the scene are used as labels to retrain and optimize some network layers of the original model. After fine-tuning, the model can transfer its original generalization ability to the specific scene, making the model parameters more consistent with the actual distribution of frequencies in the scene, thereby greatly improving the estimation performance.
[0154] In addition to gradient-based fine-tuning optimization, the method of the present invention also uses meta-heuristic algorithms such as gray wolf hunting to directly adjust and optimize the neural network parameters. This algorithm draws on the intelligent behavior of wolf packs hunting. By continuously exploring and approaching the optimal solution, it can optimize the neural network from a global perspective, so that the network can more effectively fit the complex frequency distribution in this specific scenario.
[0155] Finally, the neural network model in the method of the present invention can adapt to the actual mixed noise sinusoidal signal environment after multiple optimizations. Whether it is environmental noise, frequency drift, or other mixed noise factors, the network model can extract effective information from the input time-frequency features, give full play to the powerful pattern recognition ability of deep learning, and output accurate frequency estimation values.
[0156] Therefore, the method of the present invention innovatively integrates various technical means such as signal processing, machine learning and optimization algorithms, giving full play to their respective advantages and complementing each other. Relying on the powerful learning and fitting ability of the neural network model, combined with rich features such as autocorrelation and spectrum, plus the improved scene adaptability brought by model fine-tuning and meta-optimization algorithms, high-precision intelligent estimation of the frequency of mixed noise sinusoidal signals is achieved, breaking through the limitations of traditional algorithms and achieving extremely high estimation accuracy and robustness. Another key advantage of the method of the present invention is that the accuracy of the frequency estimation model can be continuously improved by continuously adding new sample data, updating the training set and repeatedly performing model fine-tuning, thereby meeting the ever-changing needs in practical applications. By setting reasonable model fine-tuning strategies and timeliness requirements, the model parameters can be updated online to always maintain a high estimation accuracy.
[0157] In different application fields, the sources and types of noise in mixed noise sinusoidal signals are different, mainly:
[0158] 1. Communications field: such as channel noise and noise caused by hardware loss;
[0159] 2. Radar field: such as circuit noise and noise caused by clutter;
[0160] 3. Audio field: such as environmental noise, pickup noise, etc.;
[0161] 4. The noise included in the power field is as follows:
[0162] Generator noise: When the generator is running, it will generate certain noise due to electromagnetic vibration, mechanical vibration and other reasons. These noises will be coupled into the sinusoidal voltage signal output by the generator.
[0163] Load noise: Different types of electrical load equipment will inject harmonic components and pulse noise into the power grid due to nonlinear and asymmetric characteristics when in operation;
[0164] Power electronic equipment noise: When power electronic equipment such as transformers, inverters, and rectifiers are working, they will generate switching noise and electromagnetic interference, which will affect the sinusoidal wave signal of the power grid;
[0165] Harmonics caused by reactive equipment: Reactive power compensation equipment in the power system, such as capacitor banks, reactive power shunt compensation devices, etc., will inject harmonic currents into the power grid due to their nonlinear characteristics, thereby causing harmonic distortion in the voltage waveform;
[0166] Voltage sag caused by high-power electrical equipment: When high-power electrical equipment (such as arc furnaces, motors, etc.) is started or the load changes suddenly, it will cause a brief high current shock, resulting in an instantaneous voltage sag.
[0167] Voltage oscillation caused by high-power electrical equipment: The start and stop of high-power motors, welding machines and other equipment will stimulate oscillation components in the power grid, causing the voltage waveform to oscillate;
[0168] The above interferences will be superimposed on the grid sinusoidal voltage signal to form a complex mixed noise sinusoidal signal. These interferences have the following characteristics: large amplitude of harmonic components, wide frequency distribution range, short duration of voltage sag, but the depth of sag may be large, wide frequency range of voltage oscillation, and damping and environmental noise interference.
[0169] The above-mentioned noise sources are finally superimposed on the observed mixed noise sinusoidal signal through different transmission and coupling mechanisms, causing the signal frequency to shift, amplitude to attenuate, and phase to perturb. These noises usually present complex statistical characteristics and time-varying dynamics, which poses great challenges to frequency estimation. The following is a specific embodiment in the field of electric power. In the field of electric power, various noise sources are finally superimposed on the sinusoidal voltage / current signals in the power grid through different propagation and coupling paths to form a complex mixed noise sinusoidal signal. These noises not only affect the amplitude and phase of the power grid signal, but may also cause the fundamental frequency to shift and drift. Therefore, it is very important to accurately estimate the frequency of the power grid sinusoidal wave in the power system, such as for many applications such as reactive power detection, harmonic detection, and synchronous phasor measurement. However, the complex noise environment poses great challenges to frequency estimation.
[0170] This embodiment is aimed at the scenario of electricity consumption data collection in the power system, and explains how to use the method of the present invention to estimate the frequency of the electric energy metering signal. As a monitoring signal inside the system, the electric energy metering signal should ideally present a stable sinusoidal waveform, but in actual operation, due to reasons such as aging of instruments and equipment and line failures, the collected electric energy metering signal may contain mixed noise factors such as distortion and noise. Accurately estimating the frequency of this mixed noise sinusoidal signal is of great significance for subsequent analysis of abnormal electricity consumption behavior.
[0171] In this embodiment, 2000 electric energy metering signal samples are continuously collected from a certain collection point of the actual power system, the sampling frequency is 3.2kHz, and each sample contains 4096 points. After preprocessing, 1800 effective mixed noise sine signal samples are extracted, and the frequency estimation method of the present invention is performed on these samples to calculate the final frequency estimation value.
[0172] Step S10. Acquire and preprocess the mixed noise sinusoidal signal
[0173] First, the 2000 originally collected energy metering signal samples are preprocessed, including:
[0174] 1) Detect and mark the start and end time of each sample signal;
[0175] 2) Remove the DC component in the sample signal;
[0176] 3) Each sample signal is normalized to the value range of [-1, 1].
[0177] After preprocessing, 200 samples with severe distortion and missing data were removed, and 1800 valid mixed noise sinusoidal signal samples were retained as input for subsequent steps.
[0178] Step S20. Bandpass filtering
[0179] Design a wavelet transform bandpass filter with a center frequency of 50 Hz, a passband width of 10 Hz, and a stopband attenuation of 50 dB. Pass the preprocessed 1800 mixed noise sinusoidal signal samples through the bandpass filter to filter out high-frequency and low-frequency noise components, and obtain 1800 mixed noise sinusoidal signals, which are recorded as the first signal.
[0180] Step S30. Autocorrelation calculation
[0181] Autocorrelation operations are performed on the 1800 first signals to obtain corresponding 1800 autocorrelation functions.
[0182] Step S40. Autocorrelation peak search
[0183] A genetic algorithm is used to optimize each autocorrelation function to find the first significant non-zero delay peak. The specific method is: first initialize a population, each individual in the population corresponds to a delay time value, calculate the autocorrelation function value corresponding to the delay time as the fitness evaluation index of the individual; then iterate through genetic operations such as selection, crossover, and mutation to find the best solution until it converges to the global optimal solution. In this way, 1800 corresponding preliminary period estimates can be obtained.
[0184] Step S50. Preliminary frequency estimation
[0185] Based on the 1800 preliminary period estimates obtained in the previous step, 1800 corresponding preliminary frequency estimates are further calculated and recorded as first frequency estimates.
[0186] Step S60. Fine frequency estimation
[0187] The pre-trained fine frequency estimation model is used, which has a structure of 3 convolutional layers, 2 fully connected layers and 1 output layer. For each first signal, its spectrum features (including spectrum peak, spectrum width, etc.) and autocorrelation peak features (including peak delay, peak amplitude, etc.) are extracted, as well as the corresponding first frequency estimation value, and input into the fine frequency estimation model, and 1800 fine second frequency estimation values are output.
[0188] Step S70. Dataset construction and initial model fine-tuning
[0189] The spectral features, autocorrelation peak features and corresponding second frequency estimation values of the above 1800 first signals are constructed into a model fine-tuning data set. Then, the spectral features and autocorrelation peak features in the data set are transformed into sparse matrices using the K-SVD dictionary learning algorithm to obtain the first spectral sparse matrix and the first autocorrelation peak sparse matrix. With the first spectral sparse matrix, the first autocorrelation peak sparse matrix and the corresponding first frequency estimation value as input and the second frequency estimation value as output label, the last two fully connected layers of the above frequency fine estimation model are fine-tuned to obtain the first model.
[0190] Step S80. Further fine-tuning of the gray wolf optimization algorithm
[0191] The parameters of the first model are further optimized and adjusted using the gray wolf hunting algorithm. Specifically, a wolf pack consisting of 30 wolves is initialized, and the parameter values of the first model are optimized and searched with the objective function of minimizing the root mean square error of the difference between the second frequency estimate and the third frequency estimate. The maximum number of iterations is set to 500 times, and the step factor is 2.0. The gray wolf algorithm is repeatedly executed with the first spectrum sparse matrix, the first autocorrelation peak sparse matrix and the second frequency estimate as input until it converges to the optimal solution, that is, 1800 third frequency estimates are obtained. The parameters of the first model at this time are saved to form the second model.
[0192] Step S90. Apply the second model to perform frequency estimation
[0193] In practical applications, S10 to S50 are continuously executed to obtain new mixed noise sinusoidal signal samples and corresponding spectrum features, autocorrelation peak features and first frequency estimation values. These data are input into the second model, and the model output value is used as the final frequency estimation value of the mixed noise sinusoidal signal. The result is output to the operator for subsequent behavior analysis and other processing.
[0194] In order to evaluate the effect of the method of the present invention, the above 1800 mixed noise sinusoidal signal samples are divided into three parts: a training set (1200), a validation set (300) and a test set (300).
[0195] 1) Train the frequency fine estimation model on the training set and select the model instance with the best generalization performance;
[0196] 2) Perform the first model fine-tuning on the validation set to obtain the first model;
[0197] 3) Evaluate the second model on the test set and calculate the root mean square error (RMSE) of the difference between the third frequency estimate and the true frequency value of the sample.
[0198] The test results show that the RMSE of the third frequency estimation value is 0.117 Hz, which is much lower than the error levels of the traditional autocorrelation estimation method (RMSE is 0.395 Hz) and the wavelet-wavelet pulse coupled reconstruction method (RMSE is 0.212 Hz), verifying the effectiveness of the method of the present invention.
[0199] After completing the above steps, 8 groups of mixed noise sinusoidal signals with known frequencies were used for testing again, using the traditional autocorrelation estimation method and the wavelet pulse coupling reconstruction method respectively. The measurement errors obtained are shown in the following table:
[0200]
[0201] The specific error distribution is as follows: Figure 2 shown.
[0202] The above description is only a specific implementation mode of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A time-frequency learning method for estimating the frequency of a mixed noise sinusoidal signal, characterized in that: The following steps are involved: S10, obtaining the mixed noise sinusoidal signal through signal acquisition and preprocessing; S20, using a bandpass filter to filter out high-frequency and low-frequency noise components in the mixed noise sinusoidal signal, and obtaining a filtered signal as a first signal; S30, performing an autocorrelation operation on the first signal to obtain an autocorrelation function; S40, optimizing and searching the autocorrelation function to find the first significant non-zero delay peak, wherein the delay time corresponding to the delay peak is the preliminary period estimation value of the first signal; thereby calculating the preliminary frequency estimation value of the first signal, which is recorded as the first frequency estimation value; S50, using a pre-trained frequency estimation model, inputting the frequency spectrum characteristics and autocorrelation peak characteristics of the first signal and the first frequency estimation value, to obtain a precise frequency estimation value, recorded as a second frequency estimation value; S60, collecting spectral features, autocorrelation peak features, and corresponding second frequency estimation values of multiple first signals, and constructing a model parameter fine-tuning data set; using sparse matrix transformation on the spectral features and autocorrelation peak features in the fine-tuning data set to obtain a first spectral sparse matrix and a first autocorrelation peak sparse matrix; using the first spectral sparse matrix, the first autocorrelation peak sparse matrix, and the corresponding first frequency estimation values as inputs, and the second frequency estimation values as output labels, fine-tuning the last M-layer neural network of the frequency fine estimation model to obtain a first model; S70, further optimizing and adjusting the parameters of the first model using a gray wolf hunting algorithm, inputting the first spectrum sparse matrix, the first autocorrelation peak sparse matrix, and the second frequency estimation value to obtain a third frequency estimation value, repeating this step until the third frequency estimation value converges, saving the current parameters of the first model, and forming a second model; S80, continue to execute S30~S70, input the newly obtained first signal spectrum characteristics, autocorrelation peak characteristics and first frequency estimation value into the second model, use the result output by the second model as the final frequency estimation value of the mixed noise sinusoidal signal and output it to the operator.
2. The method for time-frequency learning and estimating the frequency of a mixed noise sinusoidal signal according to claim 1, characterized in that: The steps of pre-training the S50 frequency fine estimation model are as follows: 1) Collect a large number of mixed noise sinusoidal signal samples and their autocorrelation functions and spectrum characteristics; 2) Extract the autocorrelation peak delay, amplitude, and spectrum peak and width as time-frequency features; 3) taking the ideal frequency value of the mixed noise sinusoidal signal sample actually detected as the output label; 4) Select a deep neural network as the machine learning model and use the above time-frequency features and ideal frequency values for training; 5) Evaluate the model generalization performance on the validation set and select the best performing model instance as the frequency fine estimation model.
3. The time-frequency learning estimation method for the frequency of a mixed noise sinusoidal signal according to claim 1, characterized in that: The specific steps of S30 include: performing autocorrelation operation on the first signal, constructing an equal-length autocorrelation function, the delay range of the autocorrelation function is [0, T], T is the maximum expected period of the first signal, and the sampling interval is set according to the expected time resolution; when calculating the autocorrelation value at each delay, a square sum correlation or cross-correlation method is used; and after the autocorrelation function is calculated, normalization is performed.
4. The method for time-frequency learning and estimating the frequency of a mixed noise sinusoidal signal according to claim 1, characterized in that: The specific steps of S40 include: optimizing the search of the normalized autocorrelation function to find the first significant non-zero delay peak, setting the signal-to-noise ratio of the signal after bandpass filtering to 0.4~0.7 as the peak threshold; searching for the first peak point greater than the peak threshold in the non-zero delay part of the autocorrelation function, and the delay corresponding to this point is the preliminary period estimation value.
5. The time-frequency learning estimation method for the frequency of a mixed noise sinusoidal signal according to claim 1, characterized in that: The specific steps of S70 include: optimizing and adjusting the first model parameters using the gray wolf hunting algorithm, taking the first spectrum sparse matrix, the first autocorrelation peak sparse matrix and the second frequency estimation value as input, and the third frequency estimation value as the objective function value, simulating the wolf pack hunting behavior, exploring the solution space through the wolf pack position update formula, approximating the optimal parameter combination, terminating when the objective function converges or reaches the maximum number of iterations, and saving the current model parameters as the second model.
6. The time-frequency learning estimation method for the frequency of a mixed noise sinusoidal signal according to claim 1, characterized in that: In step S50, the frequency fine estimation model is a deep convolutional neural network model.
7. The time-frequency learning estimation method for the frequency of a mixed noise sinusoidal signal according to claim 1, characterized in that: In step S60, the sparse matrix is transformed into a K-SVD dictionary learning algorithm.
8. The time-frequency learning estimation method for the frequency of a mixed noise sinusoidal signal according to claim 1, characterized in that: The maximum number of iterations of the S70 Grey Wolf Algorithm is 500.
Citation Information
Patent Citations
Phase detection method based on adaptive filtering
CN101576586A
Phase matching method for sinusoidal signal frequency estimation
CN104142425A
Frequency estimation method for signals under impact noises and with data loss
CN104954298A
Sinusoidal signal frequency estimation method based on interpolation DFT
CN110333389A
Method for Determining a Spectrum from Time-Varying Data
US20150311050A1