Frequency correction algorithm for non-stationary signal

By using a frequency correction algorithm based on power spectrum interval division, the problems of insufficient accuracy and poor adaptability in non-stationary signal analysis are solved, high-precision frequency measurement is achieved, and spectral leakage error is reduced.

CN121958726APending Publication Date: 2026-05-01JIANGXI FASHION TECH
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGXI FASHION TECH
Filing Date
2026-01-09
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing technologies suffer from insufficient accuracy and poor adaptability when analyzing non-stationary signals, especially when the signal noise floor is high, resulting in large frequency measurement errors. Furthermore, the hardware circuit solutions are costly and complex, and cannot effectively handle spectral leakage.

Method used

A frequency correction algorithm based on power spectrum interval division is adopted. Through signal chain splitting and equal-precision frequency measurement by digital processor, combined with window function and FFT analysis, a suitable frequency correction formula is selected using the determination coefficient γ to achieve high-precision frequency estimation.

Benefits of technology

While preserving the original time-domain information of the signal, the accuracy and reliability of frequency measurement for non-stationary signals are improved, and spectral leakage errors are reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121958726A_ABST
    Figure CN121958726A_ABST
Patent Text Reader

Abstract

The invention discloses a frequency correction algorithm for a non-stationary signal, which is characterized in that a signal chain is specially designed, an original target non-stationary signal is divided into two paths after passing through a signal conditioning circuit, one path of signal x1 (t) is directly input to an analog-to-digital converter, and a discrete time domain signal x (n) is obtained after sampling by the analog-to-digital converter; the other path of signal passes through a waveform shaping circuit, a non-stationary signal is converted into a unipolar square wave digital signal x2 (t), the signal enters a digital processor with pulse capture and timer technical functions as a digital signal, and the digital processor can obtain a frequency value fc of the signal x2 (t) after passing through the waveform shaping circuit by adopting an equal-precision frequency measurement method; fc is defined as coarse frequency. Under the condition that all original time domain information of the signal is reserved, the judgment coefficient gamma is calculated by dividing frequency spectrum and power spectrum intervals, and the corresponding frequency correction formula is selected according to the value range of the judgment coefficient gamma, so that the accurate frequency correction of the non-stationary signal is realized, and the data measurement accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

A frequency correction algorithm for non-stationary signals Technical Field

[0001] This invention relates to the field of non-stationary signal technology, specifically to a frequency correction algorithm for non-stationary signals. Background Technology

[0002] Existing technologies: In the field of structural safety monitoring, dynamic sensors are frequently used to monitor the vibration characteristics of structures. For example, commonly used MEMS accelerometers and magnetoelectric accelerometers measure the natural frequencies of structures or perform modal analysis. Accelerometers can also be used for cable stress monitoring; fiber optic grating accelerometers are used to monitor the dynamic strain of structures; and vibrating wire stress-strain sensors are used to monitor the stress and strain of structures. Although vibrating wire stress-strain sensors ultimately obtain static data, the sensor signals analyzed during the measurement process are also dynamic signals. Moreover, when a vibrating wire sensor can be continuously excited and output dynamic signals, dynamic measurements can also be performed.

[0003] The dynamic signals output by these sensors all share a common characteristic: they are all non-steady-state signals, meaning that the frequency, amplitude, and phase of the vibration signal change over time.

[0004] Not only in the field of structural safety monitoring, but also in other monitoring scenarios, most dynamic signals are non-stationary signals, meaning that the mean, variance, and covariance of the signal do not change over time. For example, the frequency output by the steel string of a vibrating wire sensor or the vibration signal of a bridge after being subjected to impact excitation is generally a damped free vibration signal (periodic invariance), and its variance will change over time. In structural safety monitoring, frequency is a particularly important factor among the three elements of vibration.

[0005] Since the traditional Discrete Fourier Transform (DFT) analyzes the statistical average of the signal, the following problems will exist when analyzing non-stationary signals: (1) When non-stationary signals and stationary signals are analyzed in the frequency domain, due to the different mechanisms of spectral leakage, some correction techniques for stationary signals cannot be used to deal with spectral leakage, resulting in a large frequency measurement error, especially when the signal noise floor is large.

[0006] (2) If a scheme to convert non-stationary signals into stationary signals is adopted, the cost and complexity of the hardware circuit scheme are too high, and the characteristics of the vibration elements of the original signal are changed. This is because some scenarios require the retention of the vibration characteristics information of the original signal for other aspects of analysis, such as time domain analysis. Summary of the Invention

[0007] The purpose of this invention is to address the shortcomings of FFT in analyzing non-stationary signals, namely insufficient accuracy and poor adaptability. This paper proposes a frequency correction algorithm based on power spectrum interval division for non-stationary signals. This method divides the measurement interval into different regions according to the specific distribution of the target signal in the spectrum and applies corresponding frequency correction algorithms, thereby achieving high-precision frequency estimation across the entire frequency band and effectively improving the reliability of FFT analysis of non-stationary signals.

[0008] To achieve the above objectives, the present invention adopts the following technical solution: a frequency correction algorithm for non-stationary signals. The specific steps of this power battery calendar life estimation method are as follows: Step 1: Through a specially designed signal chain, the original non-stationary signal is divided into two paths after passing through a signal conditioning circuit. One signal, x1(t), is directly input to the analog-to-digital converter (ADC), and after sampling by the ADC, a discrete-time domain signal x(n) is obtained. The other signal passes through a waveform shaping circuit, converting the non-stationary signal into a unipolar square wave digital signal x2(t). The digital signal x2(t) is then input as a digital signal into a digital processor with pulse capture and timer technology. This digital processor can employ... The equal-precision frequency measurement method obtains the frequency value fc of signal x2(t) after passing through the waveform shaping circuit, and defines fc as the coarse frequency. Although the equal-precision frequency measurement method can obtain a preliminary signal frequency value, it is limited by the time-domain noise immunity and the limitations of the reference frequency and gate time (for example, for non-stationary signals with damped attenuation, the measurement accuracy will decrease when the signal duration does not meet the gate time requirement). The accuracy of this frequency value generally cannot meet engineering needs, but it can be used as a reference frequency value for frequency domain analysis. Step 2: The discrete time-domain signal x(n) obtained by sampling signal x1(t) through an analog-to-digital converter has a sampling frequency of Fs, a sampling point count of N, and a frequency resolution of . Step 3: Before performing FFT spectral analysis on x(n), a window function needs to be selected for x(n). Let the selected window function be w(n). The time-domain signal sequence after windowing is: y(n) = x(n) * Step 4: Perform FFT operation on the windowed time-domain signal sequence y(n) to obtain the spectrum data, and calculate the modulus of the frequency range 0 to Fs / 2 of the spectrum data to obtain the amplitude spectrum Y(N) of the time-domain signal. At the same time, calculate the self-power spectrum P(N); Step 5: Search for the point with the largest amplitude in the amplitude spectrum Y(N) (single-frequency signal) or use the peak search algorithm to find multiple peaks and select the target signal spectrum value to be analyzed (multi-frequency signal), and record its amplitude as a(k) and the corresponding frequency as f(k), where k is the frequency index of the discrete spectrum. Considering the boundary effect, k is generally 5, 6, 7, ..., N-6; Step 6: According to the frequency index value k, find the power values ​​in the self-power spectrum P(N): P(k-2), P(k-1), P(k), P(k+1), P(k+2), where Step 7: Calculate the decision interval r and the decision coefficient γ: where the decision interval... = %, which is the modulo operation, and the determination coefficient. Step 8: Select the correction formula based on the decision coefficient γ: (1) When the decision coefficient 0.75 < γ ≤ 1 or 0 ≤ γ ≤ 0.25, execute the frequency correction formula 1: Simplified to: (2) When the decision coefficient is 0.25 < γ ≤ 0.75, and a(k-1) < a(k+1), apply the frequency correction formula 2: (3) When the decision coefficient is 0.25 < γ ≤ 0.75, and a(k-1) > a(k+1), apply frequency correction formula 3: (4) When the decision coefficient is 0.25<γ≤0.75 and a(k-1)=a(k+1), the output frequency is f=f(k). The coarse frequency fc obtained by the equal precision frequency measurement method is used to calculate the decision interval r and the decision coefficient γ. The corresponding frequency correction formula is selected according to the range of the decision coefficient gamma. This will enable high-precision frequency correction of non-stationary signals.

[0009] Compared with the prior art, the beneficial effects of the present invention are: under the condition of preserving all the original time-domain information of the signal, by dividing the spectrum and power spectrum intervals to calculate the determination coefficient γ, and selecting the corresponding frequency correction formula according to the value range of the determination coefficient γ, the accurate frequency correction of non-stationary signals is realized, thereby improving the data measurement accuracy. Attached Figure Description

[0010] Figure 1 is a flowchart of the algorithm; Figure 2 is a diagram of the signal processing module; Figure 3 is a table comparing the acquisition frequency and standard frequency of this invention.

[0011] In the diagram: 1. Sensor; 2. Gain and Filtering; 3. Signal Shaping Circuit; 4. Analog-to-Digital Converter; 5. FPGA Controller; 6. Microprocessor Detailed Implementation

[0012] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0013] Example 1

[0014] The hardware configuration of the present invention is shown in Figure 2, including a sensor, gain and filtering, signal shaping circuit, analog-to-digital converter, FPGA controller, and microcontroller.

[0015] (1) The sensor is responsible for sensing and outputting non-stationary dynamic signals; (2) The gain and filtering circuit is responsible for conditioning the signal, including the signal amplification factor configuration and anti-aliasing filtering; the gain factor configuration is implemented by the microcontroller through writing to the gain circuit. Generally, the gain amplifier can be a programmable amplifier or a digitally controlled instrument amplifier; the gain configuration is generally selected according to the magnitude of the signal vibration amplitude. Generally, small signals (such as peak-to-peak values ​​less than 0.1mV) use a large gain configuration, while large signals do not need amplification processing, and the default gain is 1; the anti-aliasing filter mainly filters out aliasing signals outside the maximum bandwidth of the sampled signal to avoid crosstalk of aliasing signals into the effective bandwidth and causing interference to the original signal; (3) The analog-to-digital converter implements the discretization sampling of the analog continuous signal x1(t) to obtain the discretized digital signal x(n); the analog-to-digital converter The working mode and parameters are configured through the microcontroller; (4) The main functions of the FPGA controller are: ① According to the sampling parameters configured by the microcontroller, the discrete digital signal x(n) of the analog-to-digital converter is read through the digital interface with the analog-to-digital converter, and the reference clock signal is provided to the analog-to-digital converter to ensure equal interval sampling and other logic control; ② The timer and pulse capture circuit are established inside the FPGA to realize the equal precision frequency measurement of the unipolar square wave signal output by the signal shaping circuit; ③ The equal precision frequency measurement data fc and the discrete digital signal x(n) are transmitted to the microcontroller through the digital interface; (5) Signal shaping circuit: A zero-crossing detection circuit can be used to convert non-stationary signals (such as the damped attenuated sine wave signal of the vibrating wire sensor) into square waves of the same frequency, which is convenient for the FPGA to perform edge judgment. A voltage comparator with hysteresis function can effectively filter out small interferences near the threshold. Although the hysteresis comparator will have a certain delay on the input signal, the system is concerned with the periodicity of the signal and does not care about the phase delay, so it has no impact on the final frequency measurement accuracy. The shaped signal level range needs to match the FPGA interface; if necessary, a buffer or level converter should be added.

[0016] (6) Microcontroller: Based on the equal-precision frequency measurement data fc uploaded by the FPGA and the discretized digital signal x(n), execute the frequency correction algorithm for non-stationary signals.

[0017] 2. Implementation of Equal-Precision Frequency Measurement: Two timers, TIM1 and TIM2, a D flip-flop, and a latch are constructed using an FPGA to achieve equal-precision frequency measurement of a unipolar square wave signal x2(t). The specific implementation process is as follows: The preset software gate signal G is generated by timer TIM1 of the FPGA. The time width of the gate signal G can be selected according to the signal frequency range and the requirements for real-time signal processing. For example, if the output signal frequency range of the vibrating wire sensor is 400–4000Hz, the gate time Tg is generally around 100ms. TIM1 and TIM2 can be configured as two controllable 32-bit high-speed counters. EN1 and EN2 are their counting enable terminals, respectively. The reference frequency signal fj can be generated by the digital clock manager (DCM) inside the FPGA and input to timer TIM1. The signal to be measured, x2(t), is input from the clock input terminal of timer TIM2 and connected to the clock input terminal of the D flip-flop. During measurement, the FPGA's timing module generates a preset gate signal G. When G is high and at the rising edge of x2(t), two timers are started to count the measured signal x2(t) and the reference signal fj, respectively. Closing the counting gate requires that the gate signal G be low and at the rising edge of x2(t). In actual measurement, within one actual gate time Tg, the counter counts the measured signal as Nx and the reference signal as N0. The frequency of the reference signal is fj, and the frequency of the measured signal is fc. Therefore, fc = (Nx / N0)fj.

[0018] 3. Algorithm execution part: (1) Selection of window function w(n): In order to reduce spectral leakage, it is recommended to select a window function with a large main lobe width, such as Hanning window, Hamming window, triangular window, Blackman window, etc. Rectangular window is not recommended.

[0019] For example, in measuring the output signal of a vibrating wire sensor, a Hanning window is chosen to reduce leakage. The time-domain expression of the Hanning window is: Where n = 0, 1, 2, ..., N-1.

[0020] (2) The time-domain signal sequence after windowing is: y(n) = x(n) * w(n), that is, the discretized digital signal is directly multiplied by the window function. In engineering, N = 1024 is generally chosen. The discrete signal of 1024 points is multiplied directly by the points corresponding to the window function data of 1024 points.

[0021] (3) After performing FFT transformation on the windowed signal, the complex spectrum of the signal is obtained, and the real amplitude spectrum Y(N) within the Nyquist bandwidth is obtained after taking the modulus. The maximum value search algorithm can be used to find the spectral line a(k) with the largest amplitude, or the peak search algorithm can be used to find the target signal spectrum value (multi-frequency signal) of interest among multiple peaks. The former is more suitable for single-frequency signals (such as the fundamental frequency of the structure), while the latter is suitable for multi-frequency signals, such as structures with obvious multi-order natural frequencies.

[0022] (4) For example, in the measurement of vibrating wire signals, if the sampling frequency Fs is set to 16384 and the number of analysis points N is 2048, then the frequency resolution ΔF = Fs / N = 16384 / 2048 = 8Hz; according to the coarse frequency fc obtained by the equal precision frequency measurement method, it is 1812.03Hz, then the determination coefficient γ = (1812.03%8) / 8 = 0.50375; according to the interval where the determination coefficient is located, 0.25 < γ ≤ 0.75, it is further determined that if a in the amplitude spectrum If (k-1) < a(k+1), then execute frequency correction formula 2; if a(k-1) > a(k+1), then execute frequency correction formula 3; if a(k-1) = a(k+1), then the actual frequency f = f(k); if the coarse frequency fc is 1817.26Hz, then the determination coefficient γ = (1817.26%8) / 8 = 0.1575; according to the interval where the determination coefficient is located, 0.75 < γ ≤ 1 or 0 ≤ γ ≤ 0.25, execute frequency correction formula 1.

[0023] (5) Figure 3 shows the sampling rate of the device set to 16384Hz, the number of FFT analysis points to 2048, and the measurement of a standard sine wave signal with damping attenuation. The window function is Hanning window. By executing the algorithm, it can be seen that the absolute measurement error is within ±0.004Hz.

[0024] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A frequency correction algorithm for non-stationary signals, characterized in that: The specific steps of the frequency correction algorithm for this non-stationary signal are as follows: Step 1: Through a specially designed signal chain, the original non-stationary signal is divided into two paths after passing through a signal conditioning circuit. One path, signal x1(t), is directly input to the analog-to-digital converter (ADC), and after sampling by the ADC, a discrete-time domain signal x(n) is obtained. The other path passes through a waveform shaping circuit, converting the non-stationary signal into a unipolar square wave digital signal x2(t). Step 2: The discrete-time domain signal x(n) obtained by sampling signal x1(t) through the ADC has a sampling frequency of Fs, a sampling point count of N, and a frequency resolution of [missing information]. Step 3: Before performing FFT spectral analysis on x(n), a window function needs to be selected for x(n). Let the selected window function be w(n). The time-domain signal sequence after windowing is: y(n) = x(n) * Step 4: Perform FFT operation on the windowed time-domain signal sequence y(n) to obtain the spectrum data, and calculate the modulus of the spectrum data in the frequency range of 0 to Fs / 2 to obtain the amplitude spectrum Y(N) of the time-domain signal. At the same time, calculate the self-power spectrum P(N); Step 5: Search for the point with the largest amplitude in the amplitude spectrum Y(N) or use the peak search algorithm to find multiple peaks. Select the target signal spectrum value to be analyzed, and denote its amplitude as a(k) and the corresponding frequency as f(k), where k is the frequency index of the discrete spectrum. Considering the boundary effect, k is generally 5, 6, 7, ..., N-6; Step 6: According to the frequency index value k, find the power values ​​in the self-power spectrum P(N): P(k-2), P(k-1), P(k), P(k+1), P(k+2), where Step 7: Calculate the decision interval r and the decision coefficient γ: where the decision interval... = %, which is the modulo operation, and the determination coefficient. By obtaining the coarse frequency fc using the equal-precision frequency measurement method, calculating the decision interval r and decision coefficient γ, and selecting the corresponding frequency correction formula based on the range of the decision coefficient gamma, high-precision frequency correction of non-stationary signals can be achieved.

2. The frequency correction algorithm for non-stationary signals according to claim 1, characterized in that: Based on the decision coefficient γ, the correction formula is selected: when the decision coefficient 0.75 < γ ≤ 1 or 0 ≤ γ ≤ 0.25, the frequency correction formula 1 is executed. Simplified to: 。 3. The frequency correction algorithm for non-stationary signals according to claim 2, characterized in that: When the decision coefficient is 0.25 < γ ≤ 0.75, and a(k-1) < a(k+1), the frequency correction formula 2 is applied: 。 4. The frequency correction algorithm for non-stationary signals according to claim 2, characterized in that: When the decision coefficient is 0.25 < γ ≤ 0.75, and a(k-1) > a(k+1), apply frequency correction formula 3: 。 5. The frequency correction algorithm for non-stationary signals according to claim 2, characterized in that: When the decision coefficient is 0.25 < γ ≤ 0.75 and a(k-1) = a(k+1), the output frequency is f = f(k).

6. The frequency correction algorithm for non-stationary signals according to claim 1, characterized in that: The digital signal x2(t) enters a digital processor with pulse capture and timer technology. The digital processor can use the equal-precision frequency measurement method to obtain the frequency value fc of the signal x2(t) after passing through the waveform shaping circuit. fc is defined as the coarse frequency.