Design of a frequency measurement software system based on virtual instruments
2026-04-06 07:38:40··#1
Introduction In internal ballistic radar velocity measurement, to complete the projectile velocity measurement, according to the Doppler velocity measurement principle, it is necessary to estimate the Doppler frequency, which is also a classic problem in signal parameter estimation. Currently, many methods have been proposed both domestically and internationally, mainly time-domain methods, spectral estimation methods, and time-frequency domain methods. Among these, time-domain methods mainly include the periodic method and the zero-crossing detection method, whose main drawback is low measurement accuracy. Time-frequency domain methods mainly include short-time Fourier transform and Wegener-Weil distribution, but the computational load is generally large, making real-time processing difficult. Furthermore, with the development of virtual instruments, leveraging their user-friendly interface and powerful signal processing capabilities, the construction of signal processing platforms is increasingly becoming a trend. Essentially, virtual instruments are a product of the deep integration of instrument technology and computer technology. They emphasize the concept that "software is the instrument," enabling users to define instrument functions according to their needs and better build their required testing systems. It is a general signal processing hardware platform established according to the structure of signal processing and acquisition (ADC), data analysis and processing (DSP), result output (DAC) and display. On this general signal processing hardware platform, calling different test software constitutes instruments with different functions [1]. Based on this, this paper uses a virtual instrument platform and combines power spectrum estimation and frequency measurement to design a signal frequency measurement system. 1 Frequency Measurement Methods Generally, since the spectral characteristics of useful signals and noise are different, power spectrum estimation is an effective method to extract useful signals (such as sinusoidal signals) in a noisy background. In view of this, in Doppler frequency measurement, the collected data can be analyzed by power spectrum first, and then the Doppler frequency can be obtained by frequency domain frequency measurement. Power spectrum analysis can be divided into classical spectrum estimation and modern spectrum estimation. Typical representatives of classical spectrum estimation methods include periodogram method, Welch method, etc.; while typical representatives of modern spectrum estimation methods include AR model method, MA model method, ARMA model method, entropy spectrum method, maximum likelihood method and eigenvalue decomposition method, etc. Frequency domain frequency measurement methods mainly include the energy centroid method and the spectral peak search method. By selecting different combinations of power spectrum analysis methods and frequency domain frequency measurement methods, the purpose of measuring signal frequency can be achieved. 1.1 Welch power spectrum estimation In classical power spectrum estimation, the spectrum performance estimated by the direct periodogram method is often poor, mainly manifested in the large fluctuation of the spectrum and the large variance. The Welch method can improve the variance characteristics of the spectrum estimated by the direct periodogram method. Its basic idea is to use the segmented windowing method to divide a data XN(n) of length N into L segments, each segment of length M, and allow some overlap between each segment. The power spectrum Pi(ω) of each segment is calculated separately, and then averaged to obtain the averaged power spectrum, i.e.: i.e.: The power spectrum of the analyzed signal is obtained by exciting a linear time-invariant system H(x) (i.e., AR model) with white noise ω(n). The power spectrum estimate of the analyzed signal is: where: is the variance of the input sequence, and n1, a2, ..., ap are the parameters to be estimated [3-4]. [b]2 Frequency Measurement System Design[/b] 2.1 Design of Virtual Instrument Front Panel After starting LabVIEW, select the option to open a new panel, and then use the control objects and indicators on the Controls template to create a graphical user interface (i.e., the front panel) [5]. In the design of the frequency measurement system, based on the frequency measurement method mentioned above, the front panel mainly includes four parts: signal generation module, power spectrum estimation module, frequency measurement module and result display module. Its interface design is shown in Figure 1. The signal generation module can select the data source and set the simulation parameters; the power spectrum estimation module can select the power spectrum estimation method and set the spectrum estimation parameters; the frequency measurement module can complete the function of selecting the measurement method and setting the parameters; the result display module includes two parts: numerical display and graphical display. The numerical display mainly includes the display of the measured frequency and the measurement error, while the graphical display includes the time domain display of the signal and the power spectrum display corresponding to various methods. 2.2 Design of the block diagram program. Open the block diagram program window, first arrange the positions of the objects selected in the front panel design, and then add the graphical function code for controlling the objects on the front panel by selecting the sub-items in the function template. These function codes will complete the relevant numerical calculation, data processing and other functions. Finally, connect to each control object and each display object on the front panel according to the specific function of the virtual instrument [6], and finally complete the frequency measurement software system based on power spectrum estimation. The two core parts of the measurement system are the power spectrum estimation module and the frequency measurement module. According to the current development status of power spectrum estimation, the design mainly adopts four methods: periodogram, Welch, AR spectrum estimation and ARMA spectrum estimation; while in the frequency measurement module, the energy centroid method, the improved energy centroid method, the direct frequency measurement method and the peak search method are mainly adopted. Among them, the improved energy centroid method is based on the original energy centroid method. By calling the Array Max & Min function, the index number of the largest element is found. Then, starting from the first element of the power spectrum array, a subarray of a certain length is extracted. It can be considered that this array contains all the power spectrum lines of the signal frequency, so as to perform energy centroid frequency measurement. The direct frequency measurement method is to directly measure the frequency of the input signal by calling the Ext.ract Single Tone Information function [7]. 3 Results Processing and Analysis In the designed frequency measurement system based on power spectrum estimation, the simulated signal from the data source is selected, the signal frequency is set to 100 Hz, the DC bias is 1 V, the noise amplitude is 2 V, the sampling frequency is 512 Hz, the number of sampling points is 102,400, the number of FFT points is 1,024, the window function type is Hanning window, the window length is 32 points, and the number of overlapping points is 50% of the window length. By using the power spectrum estimation method and the frequency domain frequency measurement method, the signal frequency can be measured and the relative error of the measured frequency can be obtained. Under the same frequency measurement method, the Welch spectrum estimation method can obtain higher frequency measurement accuracy, while under the same power spectrum estimation method, the improved energy centroid method can achieve higher frequency measurement accuracy. However, under practical conditions, factors such as spectral leakage caused by non-integer period sampling, the influence of the picket fence effect window function, and environmental factors can all reduce frequency measurement accuracy. Therefore, different combinations of power spectrum estimation and frequency measurement methods should be selected according to specific application conditions to achieve high-precision frequency measurement. 4. Conclusion In signal frequency measurement, the combination of power spectrum estimation and frequency measurement can effectively improve measurement accuracy. Furthermore, by leveraging the user-friendly interface and powerful data analysis and processing function library of virtual instruments, and combining the concepts of software-defined radio, a frequency measurement software system can be constructed, which also has practical significance and research value for signal frequency measurement. Editor: He Shiping