Developing a Real-Time Power Quality Monitoring and Analysis System using LabVIEW and PXI
In this project, we built a system using National Instruments PXI hardware and LabVIEW graphical programming software.
"Because of the powerful analysis tools of LabVIEW combined with a high-performance Pentium-based PXI embedded controller, live monitoring of frequency deviations and the detection of deformations and spikes is possible."
- Chin Siet Choo,
Ngee Ann Polytechnic
Monitoring, analyzing, and simulating the power quality of commercial and industrial facilities.
Creating a portable power quality measurement and analysis system using NI LabVIEW software and PXI hardware.
Mark Kubis - Ngee Ann Polytechnic
Chin Siet Choo - Ngee Ann Polytechnic
Power quality, in recent years, has become an important issue and is receiving increasing attention by utility, facility, and consulting engineers. Present equipment setups and devices used in commercial and industrial facilities, such as digital computers, power electronic devices, and automated equipment, are sensitive to many types of power disturbances. Power disturbances arising within customer facilities have increased significantly due to the increasing use of energy efficient equipment such as switch-mode power supplies, inverters for variable speed drives, and more. The monitoring and data collection of power disturbances for power quality study therefore has to be conducted at the users’ premises
To understand the power quality problem better requires a comprehensive monitoring and data capturing system that is used to characterize disturbances and power quality variations. We need a configurable and programmable PXI/CompactPCI high-performance PC with high-speed data acquisition units and software to perform the required task.
In this project, we built a system using National Instruments PXI hardware and LabVIEW graphical programming software. Analysis and presentation tools available in LabVIEW were ideally suited for this task. The powerful analysis tools of LabVIEW combined with a high-performance Pentium-based PXI embedded controller allowed for live monitoring of frequency deviations and the detection of deformations and spikes. High-speed data acquisition to disk provided sufficient time resolution for detailed harmonic, phase shift analysis, and power analysis.
The system runs on a National Instruments PXI Pentium 233 MHz embedded computer and a PXI-6070E multifunction data acquisition board. We used an SCXI-1120 and an SCXI-1327 terminal block to isolate the power line voltage from the computer and to attenuate the power line voltage to a level suitable for the data acquisition card. We monitored the current signal using a current probe.
Continuous Event and Frequency Monitoring Mode
In this mode, the system samples voltage and current input and performs a continuous search for waveform distortion and glitches. We recorded all events that fall into a specified duration time and amplitude deviation as waveforms with timestamps.
During the monitoring process, the status of recorded events is shown on the front panel. We monitor the frequency using a counter on the PXI-6070E by measuring the time of 10 input signal periods. A simple TTL circuit that contains Schmidt Gates, a Decade Counter, and a Flip Flop converts the voltage signal to TTL level and produces a gate signal for the counter. The gate signal keeps the gate open for 10 periods of the incoming waveform. We used a digital output line on the PXI-6070E to reset the circuit for the subsequent frequency measurement. The current value of the frequency displays on the front panel. Once the monitoring is finished, we can display each of the recorded event’s waveforms together with timing information.
High-Speed Voltage and Current Acquisition Mode
This mode is intended for sampling and storing both waveforms to a disk for post acquisition analysis. The user selectable sampling rate determines the resolution of the analysis results. During the acquisition process, we display a part of every acquired data sample on the front panel. A hardware or software trigger initiates the acquisition at the zero voltage crossing point. User supplied comments, date, time, and acquisition settings are written as a header to each file. Acquisition to disk continues for a specified period of time or until it is aborted by the user.
In the analysis panel, the following functions are available:
- Select a data file from disk
- View selected files as waveforms on a graph
- Harmonics analysis - the software performs harmonic analysis for all or for a selected part, of acquired data by opening a specified number of periods from a file for each analysis. Results are displayed as a bar graph or in text form.
A typical number of periods taken for this analysis is twenty-five. We display total harmonic distortion for each analyzed period. In addition, we can select up to five harmonics for viewing the trend during an entire measurement period.
- Phase shift analysis - For this measurement an entire file or part of a file is scanned by reading a selected number of cycles and performing phase offset calculations between voltage and current waveforms. Results are displayed as a graph - phase vs. time.
- Power analysis - We calculate and display true power factor, real power (W), apparent power (VA), and reactive power (VAR).
The software contains a simulator for generating voltage and current input waveforms. We can program noise, harmonics, phase shift parameters as well as random spikes and distortions to appear randomly on the waveforms. In the simulation mode, we use generated waveforms as an input source for monitoring or for high-speed acquisition to disk. Optionally, we can redirect generated waveforms to the digital to analog converter on the data acquisition board and use them as a source for testing or analysis.
The prototype power line monitoring system based on high-performance PXI hardware acquires and displays the voltage and current waveforms. It monitors waveforms for distortion, glitches, and frequency deviations. The high-speed data acquisition card captures data to disk with sufficient time resolution for detailed post analysis of the waveforms. The harmonic, phase shift, and power analysis algorithms are made easy with the analysis tools in LabVIEW. We programmed the simulator to generate typical waveforms of different types of loads for demonstration and teaching purposes. With the flexibility and the expandability of the programming interface, we will further increase the analysis capability and the functionality of the present prototype system in the future.
Explore the NI Developer Community
Discover and collaborate on the latest example code and tutorials with a worldwide community of engineers and scientists.
Who is National Instruments?
National Instruments provides a graphical system design platform for test, control, and embedded design applications that is transforming the way engineers and scientists design, prototype, and deploy systems.