| Electricity has become the most widely used important energy alongwith social progress and technological development. At the same time, powersystem faces some negative effects brought by technical innovation, such aspower quality problems caused by non-linear, asymmetrical, frequentlyvariable loads, etc. To ensure power quality has important implications forsafety operation of power system, good power supply to residents, efficientproduction of industry and commerce and so on. And it is the first conditionto ensure power quality that implements power quality monitor with highprecision, real-time, flexible configuration.In order to monitor and analyze power quality in real-time andcomprehensive control all data, this paper designed and implemented amodular power quality monitor based on embedded Linux. This systemadopted double processor architecture that is composed of super-computingDSP and powerful ARM, and uses modular design for softwareimplementation. There are three function modules in this system: maincontrol board, electric current monitoring board and electric voltagemonitoring board. Different amounts of voltage and current monitoringmodule can be adopted depending on the power grid size.This paper customized and transplanted the embedded Linux operatingsystem on the main control module, including the transplantation of u-boot,customizing and transplanting the embedded Linux kernel, building the ubifsroot file system and transplanting the driver SPI and I2C. Then, we gave thesolutiosns and implementations for the problems we encountered whendesigning the main control program for the power quality monitor: Based onthe characteristics of power quality data, we adopted the embedded databasefor storing and managing the statistical power quality data which improved the efficiency of the power quality data management; implemented fourmeanses communication of RS232, RS485, TCP and UDP forcommunicating with the host computer, and gave the specific solutions andimplementations in the design of communication protocol for the problemssuch as the packet is too long and lead to stuck and data transmission errors;proposed a custom bus transmission scheme based on the SPI and I2C, tosolve the problem of data transfer between the various modules; separated thetransfer and storage of power quality real-time data and power event data toensure that the real-time data processing system; Implemented the script ofsoftware update, to solve the problem of remote upgrade of the softwaresystem; Implemented the program self-healing function when DSP moduleencountered an exception occurs, to improve the system robustness; Finally,implemented the embedded graphics interface based on QT/Embedded, toimprove the human-computer interaction. |