Development of a Power Quality Verification Device Based on LabVIEW
2026-04-06 06:00:45··#1
Application Areas: Power Industry Challenges: Traditional power quality verification equipment has fixed functions, is complex to operate manually, and requires additional instruments as calibration items increase; operation and data recording are very inconvenient. Virtual instrument technology significantly reduces the cost and size of instrument hardware, improves the automation level of calibration testing, and completely changes the traditional state of manual measurement, operation, and calculation in metrology units. Application Solution: An automated testing system is built using NI's LabVIEW graphical development environment, data acquisition card, and GPIB bus. Different software modules are used to implement multiple calibration functions, greatly enhancing the system's automation, reliability, and accuracy. This calibration device can complete the calibration of key power quality technical indicators such as frequency deviation, AC voltage RMS deviation, flicker value, and harmonic (interharmonic) content of power quality analysis and measurement instruments. Products Used: LabVIEW 7.0, PCI-4474 dynamic signal acquisition card, PCI-GPIB instrument communication interface introduction: With the development of China's economic construction, nonlinear loads and impulsive loads in the power system have led to increasingly serious pollution of the power grid, resulting in the deployment of various types of power quality analyzers. To ensure the accuracy of testing and analysis of these devices, it is essential to calibrate power quality testing and analysis equipment, drawing on experience in managing metrological instruments. This article introduces the functional principle, hardware structure, and design concept of the testing software for a LabVIEW-based power quality verification device, as well as the implementation method using LabVIEW software. I. System Principle Overview The system composition diagram is shown in Figure 1. Its basic principle is as follows: A virtual instrument testing platform controls an arbitrary waveform generator via a GPIB card to generate harmonic signals, sinusoidal modulation signals, or square wave modulation signals. These signals are amplified to target voltage and current values by voltage and current power amplifiers. Then, a data acquisition card takes the signal from the amplifier output for analysis, calculates the harmonic amplitude and voltage fluctuation, and monitors changes in the signal source. Subsequently, the output signal is compared and analyzed with a metrological standard table. Based on the analysis results, the waveform parameters in the software program are corrected, thereby ensuring that the signal applied to the device under test meets a certain target accuracy requirement. This system uses a standard plug-in data acquisition card to replace traditional measuring instruments to complete the data acquisition task. It employs NI's high-precision PCI 4474 dynamic signal acquisition card for the acquisition and analysis of harmonic and flicker signals. The system controls and transmits data to arbitrary waveform generators and voltage/current amplifiers via the GPIB bus. Simultaneously, it leverages the powerful hardware and software resources of a PC, with a virtual instrument software development platform controlling and coordinating the entire system's operation. The software interface is shown in Figure 2. The system software mainly includes four software modules: ① Arbitrary waveform generation module; ② Harmonic function calibration and testing module: including the generation of power system harmonics and interharmonics. On the harmonic calibration interface, the voltage and current output channels, total number of harmonics, harmonic order, and harmonic content can be selected. Users can not only perform single harmonic voltage and current calibration tests one by one, but also superimpose calibration tests of two or three harmonics of different orders; ③ Flicker function calibration and testing module: including the generation of sine wave modulation signals and square wave modulation, and the selection of flicker verification points can be performed to generate square wave fluctuation signals with Pst=1.00~5.00; ④ Spectrum analysis and feedback correction module: to monitor the stability and accuracy of the output signal. [align=center] Figure 1 Schematic diagram of power quality verification device Figure 2 Software operation interface[/align] II. Harmonic Signal Generation and Analysis In a power system, for a non-sinusoidal electrical quantity with a period of t, taking voltage u(t) as an example, under the Dirichlet conditions, it can be decomposed into the following Fourier series form: Where n≥2 corresponds to the nth harmonic component. Using the formula waveform.vi in LabVIEW software, input the harmonic (interharmonic) formula, and the VI will generate harmonic data. Then, the discretized data is sent to an arbitrary waveform generator to generate the actual harmonic signal. When performing harmonic signal analysis, the measurement algorithms mainly used are Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT). The real and imaginary parts of the nth harmonic voltage vector are respectively: Using the above formula, the real and imaginary parts of the fundamental wave and each harmonic can be calculated, and then the amplitude U<sub>n</sub> and phase angle φ<sub>n</sub> can be calculated. To analyze the magnitude of each harmonic, the harmonic content rate (HRU) is usually expressed as the percentage ratio of the effective value of the harmonic amplitude to the effective value of the fundamental frequency amplitude. For example, the voltage content rate HRU[sub]n[/sub] of the nth harmonic is: The degree to which a harmonic deviates from a sinusoidal waveform is expressed as the harmonic distortion rate (THD), which is equal to the root mean of the sum of the squares of the effective values of each harmonic and the effective value of the fundamental frequency. The amplitude and phase of each harmonic, as well as the total harmonic distortion rate (THD), can be obtained using Harmonic Analysis.VI. III. Flicker Signal Generation and Analysis According to the national standard GB12326—2000 "Power Quality—Permissible Voltage Fluctuations and Flicker" and IEC standards IEC868 and IEC61000-4-15, the complete flicker meter performance verification procedure includes the following two steps: ① Verify the unit apparent sensitivity of the flicker meter using voltage fluctuations generated by sinusoidal/square wave modulation (P[sub]max[/sub]=1) ② Verify the short-time unit flicker curve of the flicker meter using voltage fluctuations generated by square wave modulation (P[sub]st[/sub]=1) [align=center]Figure 3 Flicker Signal Generation Procedure[/align] There are two types of basic voltage fluctuation waveforms used in verifying flicker meters: sinusoidal modulation waves and equally spaced rectangular (square wave) modulation waves, with a modulation frequency range of 0–25Hz. Voltage fluctuation phenomena are usually considered as the voltage amplitude being modulated by an amplitude-modulated wave with the fluctuation component as the carrier, using the power frequency voltage as the carrier. For any waveform, the amplitude-modulated wave can be regarded as a signal synthesized from various frequency components. However, the signal used when calibrating the voltage fluctuation flicker meter is a single-frequency amplitude-modulated wave modulated by a power frequency carrier. The flicker signal generation procedure is shown in Figure 3. For modulation signals with slower fluctuation frequencies, time-domain analysis can be used to analyze them. The effective value of one cycle is calculated through digital sampling, and then the modulation depth is obtained. The modulation depth is usually calculated by the following formula (U[sub]max[/sub] and U[sub]min[/sub] are the maximum and minimum values in the modulated voltage signal, respectively): For modulation signals with faster fluctuation frequencies, frequency-domain analysis is used. For sinusoidal modulation signals, let the carrier angular frequency be ω[sub]c[/sub] and the amplitude-modulated signal angular frequency be ω[sub]m[/sub], that is: Then the sinusoidal amplitude-modulated signal is: Performing a Fourier transform on the above signal yields three spectral components, from which the amplitude of the carrier and amplitude-modulated wave signals can be obtained. [align=center] Figure 4 Sinusoidal Amplitude Modulation Signal Analysis [/align] For square wave signals, they can be considered as signals synthesized from a series of odd harmonics. k is an odd number. The square wave amplitude modulation signal is as follows: [align=center] Figure 5 Square Wave Amplitude Modulation Signal Analysis[/align] Assuming the modulation frequency ωm = 8Hz, the spectrum analysis is shown in Figure 5. The spectrum lines to the right of the main frequency ωc are: The spectrum lines to the left of the main frequency ωc are: Where ω4L and ω5L are negative frequencies, they are converted to the positive frequency axis for convenient calculation and analysis. The FFT analysis of square wave amplitude modulation has a large number of spectrum lines, but when performing flicker analysis, only one spectrum line and the carrier spectrum line ωc need to be extracted to obtain the amplitude of the carrier and amplitude-modulated wave signals. IV. Data Acquisition The data acquisition part of this device uses PCI-4474, a high-precision data acquisition card from NI (National Instruments) specifically designed for dynamic signal analysis. This card features four pseudo-differential analog input channels, each with a maximum sampling rate of 102.4 KS/s, a voltage input range of ±10V, and a 24-bit sampling resolution. Data acquisition can be performed using both analog and digital triggering methods. Data acquisition utilizes the AI waveform scan.VI, which allows for the acquisition of a specified number of data points from the voltage and current channels at a specified sampling rate. Then, FFT calculations are used to perform spectral analysis of harmonic and flicker signals, monitoring changes in the source. V. Advantages of Using LabVIEW for Development Power quality verification devices primarily calibrate the harmonic content, flicker, and frequency deviation functions of power quality analyzers. Traditional calibration equipment has fixed functions, is complex to operate manually, and requires additional hardware or instruments as calibration items increase, resulting in bulky equipment and inconvenient operation and data recording. Virtual instrument technology effectively solves these problems. Through software programming, the functions of multiple instruments can be defined and implemented, and instrument control panels can be generated on the display screen to complete calibration tests for various functions. Meanwhile, the software uses the graphical programming language LabVIEW, making it user-friendly for test engineers. It features convenient programming, a user-friendly interface, and powerful data visualization and analysis capabilities, as well as instrument control capabilities. The software includes pre-packaged controls and functions, making it simple and easy to use, greatly improving development efficiency and facilitating later system maintenance and upgrades. VI. Technical Specifications and Accuracy During harmonic voltage and current testing, the output accuracy and maximum deviation of the 2nd to 50th harmonic voltage and current were tested and analyzed multiple times. The resulting harmonic technical specifications are shown in Table 1. [align=center]Table 1 Harmonic Voltage and Current Technical Specifications:[/align] VII. Summary To industrialize and practically apply power quality verification devices, the Electric Power Research Institute developed a power quality verification device based on virtual instrument technology. This device is an automatic testing system built around a PC, greatly enhancing the system's automation, reliability, and accuracy. In recent years, virtual instrument technology has developed rapidly in China and has been applied in power systems such as power metering, equipment verification and testing, and power system status monitoring. The development space for virtual instruments is even broader in dedicated measurement systems. The ubiquitous application of computers provides a solid foundation for the promotion of virtual instruments. Actual operation shows that the power quality verification device developed using virtual instrument technology has the characteristics of a user-friendly interface, powerful functions, convenient operation, stable operation, and high accuracy. The promotion and use of this device will greatly improve the testing accuracy and calibration level of power quality analyzers, providing accurate basis and technical support for improving the power quality of power systems.