A time-frequency learning estimation method for frequency of mixed noise sinusoidal signal
By combining autocorrelation and spectral features with deep neural networks and gray wolf hunting algorithm optimization, the accuracy and adaptability problems of frequency estimation of mixed noise sinusoidal signals are solved, and high-precision and robust frequency estimation is achieved.
Patent Information
- Application Number
- CN202411702796.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2044-11-26
AI Technical Summary
When estimating the frequency of a mixed-noise sinusoidal signal, existing technologies have difficulty in fully describing the signal in actual scenarios, especially the frequency drift and phase disturbance, resulting in poor estimation performance.
After using a bandpass filter to filter out the noise component, the frequency estimation model is fine-tuned and optimized through autocorrelation operation and spectral feature extraction, combined with deep neural network and gray wolf hunting algorithm, and the model adaptability is improved using sparse matrix transformation and meta-optimization algorithm.
High-precision estimation of the frequency of mixed noise sinusoidal signals is achieved, which enhances the adaptability and robustness of the algorithm and can continuously improve the estimation performance.
Smart Images

Figure CN119646416B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of signal processing, and in particular relates to a method for estimating the frequency of a mixed noise sinusoidal signal. Background Art
[0002] With the rapid advancement of modern technology, high-precision frequency measurement of mixed-noise sinusoidal signals is gaining increasing attention across various fields. In fields such as communications, radar, and audio, many critical signals exhibit near-sine wave morphology. Due to environmental interference and inherent system nonlinearities, these ideal sinusoidal signals inevitably incorporate noise components, resulting in 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 communications field, sinusoidal carrier signals are widely used for data modulation and demodulation. However, due to channel noise and hardware distortion, the receiver receives a mixed, noisy sinusoidal signal. Accurately estimating the carrier frequency is crucial to ensuring the accuracy of the demodulated data. Furthermore, the use of advanced technologies such as multi-carrier in modern wireless communications places even higher demands on the accuracy of carrier frequency measurement.
[0004] In radar systems, echo signals, after traveling long distances, experience frequency drift and phase disturbance due to multipath effects and the mirror effect. Accurately estimating the echo signal's frequency is fundamental to radar signal processing, including anti-interference and target identification. High-resolution radars require even higher accuracy in frequency estimation.
[0005] In the audio field, speech and music signals also contain 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, traditional frequency estimation methods for mixed noise sinusoidal signals have certain limitations and are unable to meet the stringent accuracy requirements of the above application scenarios.
[0007] Spectral analysis estimation methods based on Fourier transforms are limited by spectral leakage and the picket fence effect, resulting in limited estimation accuracy. While the time-domain autocorrelation method is simple and effective, noise can lead to estimation bias and is not robust to conditions such as frequency drift. While some wavelet transform or subspace decomposition algorithms have shown improvements, their implementation is complex and computationally intensive. Some algorithms are designed for specific noise models, such as maximum likelihood estimation in additive white Gaussian noise environments. However, in reality, noise models are complex and variable, resulting in poor robustness. Other methods, such as Bayesian estimation or small perturbation theory, require strict prior assumptions and are computationally complex.
[0008] In addition, the above-mentioned traditional method is mostly based on the parameterized model of ideal sinusoidal signal, and it is difficult to fully describe the signal in the actual scene, and the description ability of mixed noise factors such as frequency drift and phase disturbance is limited, and the estimation performance is often poor. SUMMARY
[0009] Therefore, the present application provides a mixed noise sinusoidal signal frequency estimation method, which can solve the problem that the prior art is mostly based on the parameterized model of ideal sinusoidal signal when estimating the frequency of the signal, and it is difficult to fully describe the signal in the actual scene, and the description ability of mixed noise factors such as frequency drift and phase disturbance is limited, and the estimation performance is often poor.
[0010] The present application is implemented as follows:
[0011] The present application provides a mixed noise sinusoidal signal frequency estimation method, comprising the following steps:
[0012] S10, obtaining the mixed noise sinusoidal signal through signal acquisition and preprocessing;
[0013] S20, filtering out the high-frequency and low-frequency noise components in the mixed noise sinusoidal signal by using a band-pass filter, and obtaining a filtered signal as a first signal;
[0014] S30, performing autocorrelation operation on the first signal to obtain an autocorrelation function;
[0015] S40, performing optimization search on the autocorrelation function to find a first significant non-zero delay peak value, and the delay time corresponding to the delay peak value is the preliminary period estimation value of the first signal; thus, the preliminary frequency estimation value of the first signal can be calculated, which is recorded as a first frequency estimation value;
[0016] S50, using a pre-trained frequency fine estimation model to input the spectral feature and autocorrelation peak feature of the first signal and the first frequency estimation value to obtain a fine frequency estimation value, which is recorded as a second frequency estimation value;
[0017] S60, collecting the spectral feature, autocorrelation peak feature and corresponding second frequency estimation value of a plurality of first signals to construct a model parameter fine-tuning data set; using sparse matrix transformation on the spectral feature and autocorrelation peak feature in the fine-tuning data set to obtain a first spectral sparse matrix and a first autocorrelation peak sparse matrix; taking the first spectral sparse matrix, the first autocorrelation peak sparse matrix and the corresponding first frequency estimation value as input, and taking the second frequency estimation value as output label, 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 parameters of the first model by using a gray wolf hunting algorithm, inputting the first frequency sparse matrix, the first autocorrelation peak sparse matrix and the second frequency estimation value, obtaining a third frequency estimation value, repeating the step until the third frequency estimation value converges, saving the current parameters of the first model to form a second model;
[0019] S80, continuously performing S30-S70, inputting the newly obtained first signal spectrum characteristics, autocorrelation peak characteristics and first frequency estimation value in the second model, taking the result output by the second model as the final frequency estimation value of the mixed noise sinusoidal signal and outputting it to the operator.
[0020] M is a positive integer of 1-4, and M is less than the number of neural network layers.
[0021] The frequency fine estimation model is pre-trained as follows:
[0022] 1) Collect a large number of mixed noise sinusoidal signal samples and their autocorrelation functions and spectrum characteristics;
[0023] 2) Extract autocorrelation peak delay, peak amplitude, spectrum peak and spectrum width as autocorrelation peak characteristics;
[0024] 3) The ideal frequency value of the actually detected mixed noise sinusoidal signal sample is taken as the output label;
[0025] 4) Select a deep neural network as a machine learning model, and train it using the above spectrum characteristics, autocorrelation peak characteristics and ideal frequency value data;
[0026] 5) Evaluate the model generalization performance on the validation set, and select the best model instance as the frequency fine estimation model.
[0027] The specific steps of S30 include: autocorrelation operation on the first signal, autocorrelation operation estimates the signal period by calculating the similarity between the signal and the delayed version, first construct the equal length autocorrelation function, the autocorrelation function delay range is [0, T], T is the maximum expected period of the first signal, the sampling interval is set according to the expected time resolution; When calculating the autocorrelation value at each delay, the method of sum of squares correlation or cross correlation is used; After the autocorrelation function is calculated, normalization processing is performed.
[0028] The specific steps of S40 include: performing an optimized search on the normalized autocorrelation function to find a first significant non-zero delay peak, and setting the signal-to-noise ratio of the band-pass filtered signal to 0.4-0.7 as a peak threshold; searching for a first peak point greater than the peak threshold in the non-zero delay part of the autocorrelation function, and the point corresponding to the delay is a preliminary cycle estimation value, if a programming method is used for the search, then the search algorithm adopts an exhaustive method or a gradient descent algorithm.
[0029] The calculation method of the preliminary frequency estimation value of the first signal is to divide the sampling interval of the normalized autocorrelation function by the preliminary cycle estimation value.
[0030] The specific steps of S70 include: using a grey wolf hunting algorithm to optimize and adjust the first model parameter, taking the first frequency sparse matrix, the first autocorrelation peak sparse matrix and the second frequency estimation value as input, taking the third frequency estimation value as a target function value, simulating the hunting behavior of a wolf pack, exploring the solution space through a wolf pack position update formula, approximating the optimal parameter combination, and terminating when the target function converges or reaches the maximum iteration number, and saving the current model parameter as a second model.
[0031] When the autocorrelation function is optimized and searched, a genetic algorithm or a simulated annealing algorithm is used.
[0032] 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] Further, the maximum number of iterations of the grey wolf algorithm is 500.
[0035] Compared with the prior art, the mixed noise sinusoidal signal frequency estimation method provided by the application has the beneficial effects that the limitations of the prior art can be effectively overcome, higher frequency estimation accuracy and stronger adaptability are achieved, and the advantages of the method are reflected in the following aspects:
[0036] Firstly, the method of the application fuses multiple features in the time domain and the frequency domain, and enhances the problem representation capability. Most traditional methods are based on a parameterized model of an ideal sinusoidal signal, and it is difficult to effectively describe a mixed noise sinusoidal signal in an actual complex scene. The method of the application extracts features from two perspectives of time domain autocorrelation and frequency spectrum at the same time, can more comprehensively depict the time-frequency behavior of the mixed noise sinusoidal signal, and thus provides more abundant prior knowledge for fine frequency estimation.
[0037] Secondly, the method of the present application uses an end-to-end deep neural network to model frequency estimation, without explicitly modeling the mixed noise sinusoidal signal, avoiding the bias caused by model distortion in traditional methods. The deep learning model has strong 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 application introduces model fine-tuning and meta-optimization algorithms to improve the adaptability of the model in specific scenarios. A general deep neural network model can be fine-tuned with scene data to adjust to the optimal state of the scene. Meta-optimization algorithms such as GWO can further optimize neural network parameters to make the model accurately fit the frequency distribution of the scene, thereby achieving the best estimation result. This avoids the poor universality problem in traditional methods.
[0039] In addition, the method of the present application can effectively utilize big data and continuously accumulate learning from new samples to 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 fine frequency estimation value of the sample. After a large amount of data training and updating, the model can gradually improve the adaptability to various complex situations, so that the estimation accuracy is continuously improved.
[0040] In summary, the method of the present application innovatively integrates various technologies such as signal processing, machine learning, and optimization algorithms, achieving high precision and intelligence of mixed noise sinusoidal signal frequency estimation. Not only does it improve the accuracy of frequency estimation, but also enhances the universality and robustness of the algorithm, solving the technical problem that existing technologies are mostly based on parameterized models of ideal sinusoidal signals, which are difficult to fully describe signals in actual scenarios, have limited description ability for mixed noise factors such as frequency drift and phase disturbance, and often have poor estimation performance. BRIEF DESCRIPTION OF DRAWINGS
[0041] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the description of the embodiments of the present application. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0042] Figure 1 The flowchart of the method provided by the present application is shown in Figure 1.
[0043] Figure 2 The experimental error comparison chart in the embodiment is shown in Figure 2. DETAILED DESCRIPTION
[0044] In order to make the purposes, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application.
[0045] As Figure 1 shown in a flow chart of a mixed noise sinusoidal signal frequency estimation method provided by the present application, the method comprises the following steps:
[0046] S10, obtaining the mixed noise sinusoidal signal through signal acquisition and preprocessing;
[0047] S20, filtering out high-frequency and low-frequency noise components in the mixed noise sinusoidal signal by using a band-pass filter to obtain a filtered signal, denoted as a first signal;
[0048] S30, performing autocorrelation operation on the first signal to obtain an autocorrelation function;
[0049] S40, performing optimization search on the autocorrelation function to find a first significant non-zero delay peak value, wherein the delay time corresponding to the delay peak value is a preliminary period estimation value of the first signal; thus, a preliminary frequency estimation value of the first signal can be calculated, denoted as a first frequency estimation value;
[0050] S50, using a pre-trained frequency fine estimation model to input the spectral feature and autocorrelation peak value feature of the first signal and the first frequency estimation value to obtain a fine frequency estimation value, denoted as a second frequency estimation value;
[0051] S60, collecting the spectral feature, autocorrelation peak value feature and corresponding second frequency estimation value of a plurality of first signals to construct a model parameter fine-tuning data set; using sparse matrix transformation on the spectral feature and autocorrelation peak value feature in the fine-tuning data set to obtain a first spectral sparse matrix and a first autocorrelation peak value sparse matrix; taking the first spectral sparse matrix, the first autocorrelation peak value sparse matrix and the corresponding first frequency estimation value as input and the second frequency estimation value as output label, 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 by using a grey wolf hunting algorithm, inputting the first spectral sparse matrix, the first autocorrelation peak value sparse matrix and the second frequency estimation value to obtain a third frequency estimation value, repeating the step until the third frequency estimation value converges, saving the current parameters of the first model to form a second model;
[0053] S80, continuously performing S30-S70, inputting the newly obtained first signal spectrum feature, autocorrelation peak value feature and first frequency estimation value in the second model, taking the result output by the second model as the final frequency estimation value of the mixed noise sinusoidal signal and outputting it to the operator.
[0054] The frequency fine estimation model is pre-trained as follows:
[0055] 1) Collect a large number of mixed noise sinusoidal signal samples and their autocorrelation functions and spectrum features;
[0056] 2) Extract the autocorrelation peak delay, peak amplitude, spectrum peak and spectrum width as the autocorrelation peak value feature;
[0057] 3) Take the ideal frequency value of the actually detected mixed noise sinusoidal signal sample as the output label;
[0058] 4) Select a deep neural network as the machine learning model and train it using the above spectrum features, autocorrelation peak value features and ideal frequency value data;
[0059] 5) Evaluate the model generalization performance on the validation set and select the best performance model instance as the frequency fine estimation model.
[0060] The specific implementation of the above steps is described in detail as follows:
[0061] The specific implementation of step S10 is: first, obtain the mixed noise sinusoidal signal by simulation or actual measurement. In the present application, the mixed noise sinusoidal signal refers to a composite signal obtained by superimposing a noise component on an ideal sinusoidal signal. The pre-processing method is a common pre-processing method in the art.
[0062] The filtering method of step S20 is a common filtering method in the art.
[0063] The specific implementation of step S30 is: performing autocorrelation operation on the first signal. Autocorrelation operation is a commonly used periodic signal analysis method, which can estimate the period of a signal by calculating the similarity between the signal and its time delay version. Specifically, first construct an autocorrelation function with 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 at each delay. Common autocorrelation calculation methods include sum of squares correlation and cross correlation. For additive noise, cross correlation performs better. After the autocorrelation function is calculated, it should be normalized for subsequent peak search.
[0064] The specific implementation of step S40 is to perform an optimization search on 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, first set a peak threshold, which can be set with reference to the signal-to-noise ratio of the band-pass filtered signal, such as 0.4-0.7. A threshold that is too low will misjudge noise peaks as period peaks, and a threshold that is too high will miss real period peaks. Then search for the first peak point greater than the peak threshold in the non-zero delay part of the autocorrelation function. The delay corresponding to this point is the preliminary period estimate. The search algorithm can use exhaustive search, local optimization algorithms such as gradient descent, or global optimization algorithms such as genetic algorithms and ant colony algorithms, the latter of which has better convergence performance.
[0065] The specific implementation of step S50 is to calculate a 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 subsequent fine frequency estimation. Specifically, divide the sampling interval of the autocorrelation function by the preliminary period estimate to obtain the preliminary frequency estimate. Due to the influence of noise and autocorrelation calculation errors, this preliminary frequency estimate will have some deviation, which needs to be fine-tuned in subsequent steps. Use a pre-trained frequency fine estimation model to input the spectral features and autocorrelation peak features of the first signal and the first frequency estimate to obtain a fine frequency estimate, denoted as a second frequency estimate. The purpose of this step is to use a machine learning model to fuse multiple features to correct and fine-tune 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, and can extract peak frequency, frequency width, etc. from the power spectral density or Fourier transform spectrum of the first signal as a feature vector; the autocorrelation peak features include peak delay, peak amplitude, etc. to describe the shape of the autocorrelation peak, and have a certain correlation with the frequency; the first frequency estimate is the initial value input of the model. When the model is pre-trained, a labeled data set needs to be constructed, a large number of mixed noise sinusoidal signal samples are collected, the corresponding features are extracted, and supervised training is performed with the ideal frequency value as the label. The model is evaluated on the validation set to evaluate the generalization ability, and the model with the best performance is selected as the frequency fine estimation model. The second frequency estimate output has high precision and can be used as the final frequency estimation result output, or can be further fine-tuned and optimized.
[0066] The specific implementation of step S60 is: collecting the spectral features, autocorrelation peak features and corresponding second frequency estimation values of multiple first signals to construct a model fine-tuning data set; using sparse matrix transformation on the spectral features and autocorrelation peak features in the fine-tuning data set respectively to obtain a first spectral sparse matrix and a first autocorrelation peak sparse matrix; taking 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 to fine-tune the last M layers of neural network 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 a specific application scenario to improve the adaptability and accuracy of the model. The data set used for fine-tuning is a batch of data samples and corresponding second frequency estimation values collected before. The original input features are transformed by matrix sparsification to realize feature dimension reduction and information compression. Common matrix sparsification transformations include PCA, LDA linear transformation or non-linear transformation based on autoencoder. The sparse matrix features after transformation can effectively compress the model complexity and calculation amount and improve the model efficiency. Then the sparse features of the spectrum and autocorrelation peak and the first frequency estimation value are input to the original model after the first M layers, and the second frequency estimation value is used as the label to fine-tune the weight of the last M layers of neural network. The value of M can be determined according to the complexity of the specific problem, and M = 1-4 is usually better. Fine-tuning can be realized by using optimization methods such as back propagation algorithm and stochastic gradient descent.
[0067] The specific implementation of step S70 is: further optimizing and adjusting the parameters of the first model by using the grey wolf hunting algorithm, inputting the first spectral 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 to form a second model. The specific method is: first, the parameter matrix of the first model is flattened to form a high-dimensional vector to be optimized, and the problem is modeled as a black box optimization problem. The first spectral sparse matrix, the first autocorrelation peak sparse matrix and the second frequency estimation value are input, and the third frequency estimation value is taken as the objective function value. In the algorithm iteration, the wolf pack hunting behavior is simulated, the solution space is explored through the wolf pack position update formula, and the optimal parameter combination is constantly approached. When the objective function value converges or the maximum iteration number is reached, the termination is terminated, and the model parameters at this time are saved as the second model. This algorithm has the advantages of fast convergence speed and not easy to fall into local minimum. Key parameters such as the number of wolf packs and the maximum step factor can be initialized according to the experience value, or can be optimized by grid search method.
[0068] The specific implementation of step S80 is: continuously performing S30-S70, inputting the newly obtained first signal spectrum feature, autocorrelation peak value feature and first frequency estimation value in the second model, taking the result output by the second model as the final frequency estimation value of the mixed noise sinusoidal signal and outputting it to the operator. The purpose of this step is to apply the optimized second model to the actual frequency estimation process. The specific method is to first repeatedly perform S10-S50, obtain a new mixed noise sinusoidal signal sample, extract its spectrum and autocorrelation peak value feature, and calculate a 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 is fully trained and fine-tuned and optimized, the estimation accuracy of the 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 demand for accurate measurement of the frequency of the mixed noise sinusoidal signal.
[0069] In the above specific implementation description, the calculation steps involved are described as follows:
[0070] Let the output signal of step S20 be y(n), that is, the first signal of step S20.
[0071] The specific calculation method of step S30 is:
[0072] The autocorrelation operation is performed on the first signal y(n) to estimate its periodicity. The autocorrelation function is defined as:
[0073]
[0074] Where k is the delay, and the autocorrelation function R yy (k) reflects the degree of similarity between y(n) and its delayed version by k sampling points.
[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) will have a peak at k=nT0(n=0, ±1, ±2, …).
[0076] Therefore, the first significant non-zero delay peak in R yy (k) can be searched to estimate the preliminary period of y(n), and further obtain the estimation value of the preliminary frequency .
[0077] To improve the accuracy of peak search, R yy (k) needs to be normalized. The normalized autocorrelation function is:
[0078]
[0079] where ρ yy (0)=1, the normalized autocorrelation function value is in 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为预设的最大延迟。自相关函数的取样间隔Δt应根据期望的时间分辨率设置,即Δt=1 / f s , where f s is the sampling frequency.
[0081] The specific calculation method of step S40 is:
[0082] Normalized autocorrelation function ρ yy (k) Perform an optimization search to find the first significant non-zero latency peak.
[0083] First, set a peak threshold γ. Typically, the value of γ ranges from 0.4 to 0.7 and can be adjusted based on the signal-to-noise ratio of y(n). A value that is too low can misidentify noise peaks as true peaks, while a value that is too high can miss true periodic peaks.
[0084] Then in ρ yy The non-zero delay part of (k) k∈[1, N k ]Search for the first peak point greater than γ, and set the delay corresponding to the peak point to be but Initial cycle An estimated value of . That is:
[0085]
[0086] Optimized search algorithms can be used:
[0087] Exhaustive method, calculate k∈[1, N k ] corresponding to ρ yy (k) value, take the delay corresponding to the first k value greater than γ
[0088] Gradient-based local search algorithms, such as gradient descent
[0089] Global optimization algorithms, such as genetic algorithms, ant colony algorithms, etc.
[0090] Among them, global optimization algorithms have better convergence performance but higher computational complexity. Local search algorithms such as gradient descent are computationally simple but may fall into local minima.
[0091] The specific calculation method of step S50 is:
[0092] The preliminary period estimation value obtained according to step S40 The preliminary frequency estimation value of the first signal y(n) can be further calculated
[0093]
[0094] wherein is the delay corresponding to the autocorrelation peak, which is a relatively rough frequency estimation value and has a certain deviation;
[0095] Next, a pre-trained frequency fine estimation model M is used θ The preliminary frequency estimation value is corrected to obtain a fine frequency estimation value
[0096] Let M θ be a multi-layer neural network model with parameters θ. The input of the model includes the spectral feature φ(y) of the first signal y(n), the autocorrelation peak feature ψ(ρ yy ), and the preliminary frequency estimation value The output is the fine frequency estimation value That is:
[0097]
[0098] wherein φ(y) can be extracted from the power spectral density or Fourier transform of y(n), such as peak frequency, frequency width, etc.; ψ(ρ yy ) includes the autocorrelation peak delay, peak amplitude, etc.
[0099] The pre-training process of the model M θ is as follows:
[0100] A large number of mixed noise sinusoidal signal samples {y i} and their autocorrelation functions {ρ yy,i}, spectral features {φ(y i )}
[0101] Extract the autocorrelation peak feature {ψ(ρ yy,i )}
[0102] Take the actual frequency value {f i} of {y i} as the output label
[0103] Use the back propagation optimization algorithm to train M θ with {φ(y i ), ψ(ρ yy,i )} as input and {f i} as label
[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 θ , which 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 Build a model fine-tuning dataset
[0108] right The spectral characteristics φ(y j ) and autocorrelation peak characteristics ψ(ρ yy,j ) perform sparse matrix transformation respectively 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 purpose of feature dimensionality reduction and compression.
[0111] by and preliminary frequency estimates For input, For label, θ Fine-tune the last M layers to get 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 as follows:
[0117] The Grey Wolf Optimizer (GWO) algorithm is used to further optimize and adjust the parameters θ'=(θ' M 1:M-1 , θ'
[0118] The GWO algorithm simulates the behavior of wolf hunting and has global optimization capability. The frequency estimation error is taken 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), which corresponds to the model parameter θ'
[0124] Calculate the fitness δ(X i ) of each wolf, and sort the α, β, and δ wolves according to the fitness
[0125] Update the wolf pack position X(t+1):
[0126]
[0127] where, and are coefficient vectors, denotes the vector of the positions of α, β, and δ wolves.
[0128] 4) Repeat steps 2) ~ 3) until the termination condition is met (such as reaching the maximum number of iterations or ε(X) converges)
[0129] 5) Assign the current optimal position X * to the corresponding parameter θ' to
[0130] where, and are key parameter vectors of the algorithm, used to control the exploration and attack behavior of the wolf pack, defined as follows:
[0131]
[0132] where, is a linearly decaying weight that controls the convergence speed of the algorithm, and is a random vector in the interval [0, 1]. linearly decays from 2 to 0 to balance the exploration and exploitation behavior.
[0133] respectively represent the vector distance between the current wolf pack position and the positions of the alpha, beta, and delta wolves, defined as:
[0134]
[0135] Other key parameters of the algorithm include the number of wolves n, the maximum number of iterations T max , etc., which can be set according to the complexity and requirements of the actual problem.
[0136] After optimization by the GWO algorithm, the second model with parameters close to the optimal value, the frequency estimation performance is better than the first model, but there is still room for further improvement.
[0137] The specific calculation method of step S80 is as follows:
[0138] Steps S30-S70 are continuously executed to obtain new mixed noise sinusoidal signal samples y new , extract their spectral features φ(y yy,new ) and autocorrelation peak features ψ(ρ ), and calculate the preliminary frequency estimate
[0139] The above features and preliminary estimate are input into the second model , and the final frequency estimate
[0140]
[0141] Since it has undergone a large amount of data pre-training, fine-tuning, and parameter optimization, its generalization ability is strong, and the output will be significantly more accurate than the original , thus achieving high-precision measurement of the frequency of a mixed noise sinusoidal signal.
[0142] This step is the online application stage of the algorithm, and the model optimized offline is deployed to the actual scene to solve the problem of accurate measurement of the frequency of a mixed noise sinusoidal signal in engineering practice. It should be noted that in the above description, the formulas used are explained as shown in the following table:
[0143]
[0144]
[0145]
[0146]
[0147] Specifically, the principle of the present application is:
[0148] Traditional frequency estimation methods are often based on the parametric model 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, and noise pollution, thereby limiting the estimation accuracy.
[0149] The method of the present application first uses traditional methods such as time domain autocorrelation and frequency domain Fourier spectrum to preliminarily estimate the frequency, and then inputs the preliminary estimation values and the time-frequency characteristics of the initial signal into a deep neural network model, and outputs the fine frequency estimation value from the model end to end.
[0150] Deep neural networks have strong automatic learning ability and can automatically model and fit the complex nonlinear mapping relationship between frequency and time-frequency characteristics, thereby overcoming the model distortion defect of traditional methods. The network model is pre-trained based on a large number of ideal and mixed noise sinusoidal signal samples, and the network automatically learns to capture various implicit factors in the signal during the training process, thereby obtaining good frequency estimation capability.
[0151] Compared with traditional algorithms, the neural network model can fully utilize big data and has absolute advantages in the scale and diversity of training samples, and has stronger generalization performance. During training, rich features such as autocorrelation peaks are also integrated, so that the network can 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 the adaptability to specific scenarios needs to be further improved. Therefore, the method of the present application further introduces model fine-tuning and meta-heuristic optimization algorithm on the basis of pre-training.
[0153] The fine-tuning stage collects a certain amount of scene data and constructs an adaptive data set, uses the real frequency estimation value in the scene as the label, and re-trains and optimizes part of the network layers of the original model. After fine-tuning, the model can transfer the original generalization ability to the specific scene, so that the parameters of the model are more suitable for the real distribution of the frequency in the scene, thereby greatly improving the estimation performance.
[0154] In addition to the gradient-based fine-tuning optimization, the method of the present application also uses grey wolf hunting and other meta-heuristic algorithms to directly adjust and optimize the parameters of the neural network. By drawing on the intelligent behavior of wolf hunting, the algorithm can optimize the neural network from a global perspective by constantly exploring and approaching the optimal solution, enabling the network to more effectively fit the complex frequency distribution in this specific scenario.
[0155] Finally, the neural network model in the method of the present application is optimized in multiple ways and can adapt to the actual mixed noise sinusoidal signal environment. 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, fully utilize the powerful pattern recognition capability of deep learning, and thus output accurate frequency estimation values.
[0156] Therefore, the method of the present application innovatively combines various technical means such as signal processing, machine learning, and optimization algorithms, and takes advantage of each of them while complementing each other. Relying on the powerful learning and fitting capability of the neural network model, combined with rich features such as autocorrelation and spectrum, and the scene adaptability brought by model fine-tuning and meta-optimization algorithms, the method realizes high-precision intelligent estimation of the frequency of mixed noise sinusoidal signals, breaks through the limitations of traditional algorithms, and achieves extremely high estimation precision and robustness. Another key advantage of the method of the present application is that the precision 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 changing needs in actual applications. By setting a reasonable model fine-tuning strategy and timeliness requirement, the model parameters can be updated online to maintain a high estimation accuracy at all times.
[0157] In different application fields, the noise sources and types in mixed noise sinusoidal signals are different, mainly including:
[0158] 1. Communication field: such as channel noise, noise caused by hardware loss;
[0159] 2. Radar field: such as circuit noise, noise caused by clutter;
[0160] 3. Audio field: such as environmental noise, pickup noise, etc.
[0161] 4. The noise contained in the power field is as follows:
[0162] Generator noise: when the generator is running, due to electromagnetic vibration, mechanical vibration, etc., certain noise will be generated, which will be coupled into the sinusoidal voltage signal output by the generator;
[0163] Load noise: different types of electrical load devices will inject harmonic components and impulse noise into the power grid when they are running due to nonlinearity, asymmetry, etc.
[0164] Power electronic device noise: power electronic devices such as transformers, inverters, rectifiers, etc. will generate switching noise and electromagnetic interference when working, affecting the grid sinusoidal wave signal;
[0165] Harmonics caused by reactive devices: reactive power compensation devices in power systems, such as capacitor banks, reactive power parallel compensation devices, etc., due to the existence of nonlinear characteristics, will inject harmonic current into the power grid, causing harmonic distortion of the voltage waveform;
[0166] Voltage sag caused by high-power electrical equipment: when high-power electrical equipment (such as electric arc furnaces, electric motors, etc.) starts or the load changes suddenly, it will cause a short-term large current impact, resulting in a transient voltage sag.
[0167] Voltage oscillation caused by high-power electrical equipment: the start and stop of high-power motors, welding machines, etc. will excite oscillation components in the power grid, causing voltage waveform oscillation;
[0168] The above disturbances will superimpose on the grid sinusoidal voltage signal to form a complex mixed noise sinusoidal signal. These disturbances have the following characteristics: the harmonic component has a large amplitude, the frequency distribution range is wide, the voltage sag duration is short, but the sag depth can be large, the voltage oscillation frequency range is wide, and there is damping and environmental noise interference.
[0169] The above noise sources are finally superimposed into the observed mixed noise sinusoidal signal through different transmission and coupling mechanisms, causing signal frequency shift, amplitude attenuation and phase disturbance. These noises usually exhibit complex statistical characteristics and time-varying dynamics, posing great challenges to frequency estimation. The following provides a specific embodiment in the field of electric power, in which various noise sources are finally superimposed with the sinusoidal voltage / current signal in the power grid through different propagation and coupling paths, forming a complex mixed noise sinusoidal signal. These noises not only affect the amplitude and phase of the grid signal, but also can cause the fundamental frequency to shift and drift. Therefore, it is very important to accurately estimate the frequency of the grid sinusoidal wave in the power system, such as for reactive power detection, harmonic detection, synchronous phasor measurement, etc. However, the complex noise environment poses great challenges to frequency estimation.
[0170] This embodiment illustrates how to use the method of the present application to estimate the frequency of the electric energy metering signal in the electric power data acquisition scenario in the power system. The electric energy metering signal is a monitoring signal inside the system, which should ideally exhibit a stable sinusoidal waveform, but in actual operation, due to instrument aging, line faults, etc., the collected electric energy metering signal will have distortion, noise and other mixed noise factors. Accurate estimation of the frequency of this mixed noise sinusoidal signal is of great significance for subsequent electric behavior anomaly analysis, etc.
[0171] In this embodiment, 2000 power metering signal samples are continuously collected from a certain collection point of an actual power system, with a sampling frequency of 3.2 kHz, and each sample contains 4096 points. After preprocessing, 1800 valid mixed noise sinusoidal signal samples are extracted, and the frequency estimation method of the present application is performed on these samples to calculate the final frequency estimation value.
[0172] Step S10. Obtain and preprocess mixed noise sinusoidal signals
[0173] Firstly, the 2000 original collected power 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) Standardize each sample signal to the value range of [-1, 1].
[0177] After preprocessing, 200 samples with severe distortion and missing data are removed, and 1800 valid mixed noise sinusoidal signal samples are retained as the input of the subsequent steps.
[0178] Step S20. Band-pass filtering
[0179] A wavelet transform band-pass filter is designed with a center frequency of 50 Hz, a passband width of 10 Hz, and a stopband attenuation of 50 dB. The 1800 preprocessed mixed noise sinusoidal signal samples are filtered through the band-pass filter to filter out high and low frequency noise components, obtaining 1800 mixed noise sinusoidal signals, denoted as first signals.
[0180] Step S30. Autocorrelation operation
[0181] Autocorrelation operation is performed on each of the above 1800 first signals to obtain 1800 corresponding autocorrelation functions.
[0182] Step S40. Autocorrelation peak search
[0183] A genetic algorithm is used to search for the first significant non-zero delay peak value for each autocorrelation function. The specific method is as follows: first, initialize a population, each individual in the population corresponds to a delay time value, and calculate the autocorrelation function value corresponding to the delay time as the fitness evaluation index of the individual; then through genetic operations such as selection, crossover and mutation, iteratively search for the optimal solution until the global optimal solution is converged. In this way, 1800 corresponding preliminary period estimation values are obtained.
[0184] Step S50. Preliminary frequency estimation
[0185] Based on the 1800 preliminary period estimation values obtained in the previous step, 1800 corresponding preliminary frequency estimation values are further calculated, denoted as first frequency estimation values.
[0186] Step S60. Fine frequency estimation
[0187] A frequency fine estimation model is used, which has a structure of 3 layers of convolution layers, 2 layers of fully connected layers, and 1 layer of output layer. For each first signal, its spectral features (including spectral peak value, spectral width, etc.) and autocorrelation peak value features (including peak delay, peak amplitude, etc.) and the corresponding first frequency estimation value are extracted and input into the frequency fine estimation model, and 1800 fine second frequency estimation values are output.
[0188] Step S70. Data set construction and model initial fine-tuning
[0189] The spectral features, autocorrelation peak value features, and corresponding second frequency estimation values of the above 1800 first signals are constructed into a model fine-tuning data set. Then, using the K-SVD dictionary learning algorithm, the spectral features and autocorrelation peak value features in the data set are respectively transformed into sparse matrices to obtain a first spectral sparse matrix and a first autocorrelation peak value sparse matrix. Taking the first spectral sparse matrix, the first autocorrelation peak value sparse matrix, and the corresponding first frequency estimation value as input, and the second frequency estimation value as output label, the last 2 layers of fully connected layers of the above frequency fine estimation model are fine-tuned to obtain a first model.
[0190] Step S80. Grey wolf optimization algorithm further fine-tuning
[0191] The grey wolf hunting algorithm is used to further optimize and adjust the parameters of the first model. Specifically, a wolf pack consisting of 30 wolves is initialized, and the root mean square error of the difference between the second frequency estimation value and the third frequency estimation value is minimized as the objective function to optimize the search of the parameter values of the first model. The maximum number of iterations is set to 500, and the step factor is 2.0. Taking the first spectral sparse matrix, the first autocorrelation peak value sparse matrix, and the second frequency estimation value as input, the grey wolf algorithm is repeatedly executed until the optimal solution is converged, i.e., 1800 third frequency estimation values are obtained. The parameters of the first model at this time are saved to form a second model.
[0192] Step S90. Apply the second model for frequency estimation
[0193] In practical applications, S10-S50 are continuously executed to obtain new mixed noise sinusoidal signal samples and corresponding spectral features, autocorrelation peak features and first frequency estimation values. These data are input into the second model, and the model output values are used as the final frequency estimation values of the mixed noise sinusoidal signal. The results are output to the operator for subsequent behavior analysis and other processing.
[0194] To evaluate the effect of the method of the application, the above-mentioned 1800 mixed noise sinusoidal signal samples are divided into 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 estimation value 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 level of the conventional autocorrelation estimation method (RMSE is 0.395 Hz) and the wavelet pulse coupling reconstruction method (RMSE is 0.212 Hz), which verifies the effectiveness of the method of the application.
[0199] After the above steps are completed, the mixed noise sinusoidal signals with known frequencies are tested again, and the conventional autocorrelation estimation method and the wavelet pulse coupling reconstruction method are used to obtain the measurement errors as shown in the following table:
[0200]
[0201] The specific error distribution is shown in Figure 2
[0202] The above is only a specific embodiment of the application, but the protection scope of the application is not limited thereto, and any person skilled in the art can easily think of changes or replacements within the technical range disclosed by the application, which should be covered within the protection scope of the application.
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, performing an optimization search on the autocorrelation function to find a first significant non-zero delay peak, where the delay time corresponding to the delay peak is a preliminary period estimate of the first signal; thereby calculating a preliminary frequency estimate of the first signal, which is recorded as a first frequency estimate; S50: Using a pre-trained fine frequency estimation model, inputting the spectrum characteristics and autocorrelation peak characteristics of the first signal and the first frequency estimation value, to obtain a fine frequency estimation value, recorded as a second frequency estimation value; S60: Collect spectral features, autocorrelation peak features, and corresponding second frequency estimates of multiple first signals to construct a model parameter fine-tuning dataset; use sparse matrix transformation on the spectral features and autocorrelation peak features in the fine-tuning dataset to obtain a first spectral sparse matrix and a first autocorrelation peak sparse matrix; use the first spectral sparse matrix, the first autocorrelation peak sparse matrix, and the corresponding first frequency estimates as input and the second frequency estimates as output labels to fine-tune the last M-layer neural network of the frequency fine estimation model to obtain a first model; S70: Further optimize and adjust the parameters of the first model using a gray wolf hunting algorithm, input the first spectrum sparse matrix, the first autocorrelation peak sparse matrix, and the second frequency estimate to obtain a third frequency estimate, repeat this step until the third frequency estimate converges, save the current parameters of the first model, and form a second model; S80. Continue executing 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.
2. The time-frequency learning method for 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 train it using the above time-frequency features and ideal frequency values; 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 method for estimating 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 setting the sampling interval according to the expected time resolution; using the square sum correlation or cross-correlation method when calculating the autocorrelation value at each delay; and performing normalization processing after the autocorrelation function calculation is completed.
4. The time-frequency learning method for 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 estimate.
5. The time-frequency learning method for estimating 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 hunting behavior, exploring the solution space through the wolf 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 method for estimating 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 method for estimating 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 method for estimating the frequency of a mixed noise sinusoidal signal according to claim 1, characterized in that: The maximum number of iteration steps of the S70 gray wolf hunting algorithm is 500.
Citation Information
Patent Citations
Phase matching method for sinusoidal signal frequency estimation
CN104142425A
Sinusoidal signal frequency estimation method based on interpolation DFT
CN110333389A