A LabVIEW-based real-time frequency tracking method for frequency converters
2026-04-06 06:15:23··#1
Abstract This paper introduces a real-time frequency tracking method for frequency converters based on LabVIEW point-by-point analysis technology. This method achieves real-time frequency tracking by performing simple point-by-point mathematical calculations on the fundamental component. The feasibility and effectiveness are demonstrated through comparison with two existing frequency tracking methods in LabVIEW. Keywords : frequency converter; frequency tracking; real-time; virtual instrument[b][align=center]A Real-time Frequency Tracking MethodBased on LabVIEW for Inverters LI Zhi-yuant[sup]1[/sup], WANG Yi[sup]1[/sup], WEN Long-xian[sup]2[/sup], YU Qing-song[sup]2[/sup][/align][/b] (1. School of Electrical Eng., Beijing Jiaotong University, Beijing 1 00044, China. 2. R&D department, Changchun Railway Vehicles co. LTD, Changchun 130062, China) Abstract A real-time frequency tracking method for lnverters based On Point-by-Point Analyses technique Of LabVIEW was introduced in this paper. The real time tracking of signal frequency was implemented by doing simple and point-by-piont mathematical operation for base wave component acquired. The feasibility and effectiveness of the method were proved by comparing it with two other methods provided by LabVIEW. Keywords : inverter; frequency tracking; real-time; virtual instrument 1 Introduction The frequency of the output voltage and current of a frequency converter is constantly changing, and the waveform may be distorted. Therefore, accurately tracking the frequency of the inverter's output electrical parameters is a crucial aspect of inverter product testing. Frequency detection methods include hardware and software. Hardware detection methods are often fast and have good real-time performance, but they increase testing costs and complexity. Software methods have poorer real-time performance, but they do not add hardware circuitry, are low-cost, and facilitate the miniaturization and portability of testing equipment. This paper will implement a real-time tracking method for the inverter's output frequency using LabVIEW's point-by-point analysis technology and compare the test results with two existing frequency tracking methods in LabVIEW. 2 Zero-Crossing Detection and DFT Method Currently, there are many software frequency tracking algorithms. LabVIEW provides two commonly used general-purpose subroutines for frequency tracking detection: Timing and Transition Measurements and Extract Single Tone Information. The former uses the zero-crossing detection method, while the latter uses the DFT method. The zero-crossing detection method works as follows: First, the sampled signal is passed through a low-pass filter to obtain the fundamental component. The fundamental waveform approximates a sine wave, crossing zero once every half cycle. Therefore, the frequency is calculated by monitoring the difference between two adjacent zero-crossing times in the same direction. Alternatively, for periodic signals containing a DC component, the Timing and Transition Measurements subroutine can be used for frequency measurement, except that the zero point becomes the midpoint or center line of the signal. Points to note when applying the zero-crossing detection method: ① The number of sampling data points required for each zero-crossing detection must be at least greater than one cycle; ② The fundamental wave of the signal may cross zero multiple times within one cycle due to interference, leading to errors; ③ To improve the accuracy of the zero-crossing, the software implementation often uses multiple curve fittings, increasing the computational load. The DFT method first performs a DFT on the signal under test to obtain the signal's spectral information and then finds the frequency corresponding to the fundamental wave based on amplitude characteristics (e.g., after removing the DC component, the fundamental wave amplitude is the largest among all spectral lines). This method is suitable for frequency detection of signals where the fundamental wave is dominant. The advantages of the DFT frequency measurement method are: it has a wide range of applications and is less affected by harmonics and noise. Its disadvantages are: ① the computational load is large due to the DFT calculation; ② spectral leakage and the picket fence effect can affect the measurement accuracy. In LabVIEW, the traditional data analysis process based on buffers and arrays is: buffer preparation, data analysis, and data output, with analysis performed in data blocks. Both zero-crossing detection and the DFT calculation process require a certain length of sampled data, and constructing data blocks takes time. In addition, both methods themselves have a large computational load and long transition time, so LabVIEW's Timing and Transition Measurements and Extract Single Tone Information cannot meet the requirements of real-time frequency tracking. 3 Implementation of Real-Time Frequency Tracking Method First, a frequency tracking algorithm with good real-time performance is introduced. This algorithm only needs to pass the signal through a low-pass filter to obtain the fundamental frequency component, and then perform simple mathematical operations on the fundamental frequency component to achieve real-time frequency measurement and tracking. The specific algorithm principle is as follows: Assuming that the fundamental component obtained after any signal passes through a low-pass filter can be expressed as: The above algorithm is implemented using the point-by-point analysis library in LabVIEW. In the point-by-point analysis library, data operations are performed on a per-data-point basis, one data point after another consecutively. There's no need to build data buffers or arrays; each data point undergoes the simple mathematical operations described above to obtain its corresponding frequency, thus improving the real-time performance of frequency tracking in terms of computational complexity and data structure. 4. Test Result Comparison The three frequency tracking methods described above were implemented and tested in LabVIEW. The test process is as follows: The original signal had an amplitude of 100 and was superimposed with 1% Gaussian white noise. The signal sampling rate was 1000Hz. The initial frequency was 180Hz, and then the frequency changed sequentially to 125Hz and 55Hz (see Figure 1). The signal first passed through a 13th-order Butterworth low-pass filter with a cutoff frequency of 200Hz, and then frequency tracking was performed on the filtered signal. The results are shown in Figures 2, 3, and 4. [align=center] Figure 1 Original signal waveform to be tested Figure 2 Test results of real-time frequency tracking method Figure 3 Timing and Transition Measurements results Figure 4 Test results of Extract Single Tone Information method[/align] As can be seen from Figure 2: ① The real-time frequency tracking method is inaccurate in calculating the first three calculation points of the initial and transition processes, which is one of the reasons for the frequency change in the transition process; ② The test results are affected by low-frequency interference and glitches appear. To extract the fundamental wave of the signal well and ensure that it is an approximate sine wave, the performance requirements of the front-end low-pass filter are very high. 5 Conclusion This paper adopts the point-by-point analysis technology based on LabVIEW to implement a real-time frequency tracking method for frequency converters. This method has the advantages of small calculation volume, fast tracking speed and high accuracy, and has high practical application value. However, it should also be noted in the application that this method requires good extraction of the fundamental wave of the signal to ensure that it is an approximate sine wave, which requires high performance of the front-end low-pass filter. References [1] Yang Leping, Li Haitao et al. Advanced LabVIEW Programming. Beijing: Tsinghua University Press, 2003.4 [2] Li Shaoming. Implementation of frequency tracking in signal analysis [J], Automation Instrumentation, 2000, 21(2) [3] Wang Xiaoping, Yang Weihan et al. Frequency tracking technology implemented by LabVIEW virtual instrument. Automation and Instrumentation, 2000, 15(2) [4] Shi Min, Wu Zhengguo et al. A simple real-time frequency tracking algorithm. Low Voltage Electrical Appliances, 2005, (7) [5] National Instruments Corporation. Measurement and Automation catalog 2006 [6] Liu Junhua. Modern detection technology and test system design, Xi'an: Xi'an Jiaotong University Press, 1997 About the author Li Zhiyuan, School of Electrical Engineering, Beijing Jiaotong University, is a master's student, mainly engaged in the research of online monitoring of electrical equipment status.