| Distribution automation is an effective way to improve power supply reliability and power quality. And it is also an important issue in the field of distribution currently. With the construction of distribution automation and Smart Grid, higher requirements for distribution automation are proposed. Distribution automation system is composed of main station, sub-stations, and distribution terminals. As the basic unit of distribution automation, the distribution terminal can realize real-time monitoring of the distribution network, which plays an important role in the normal operation of the distribution network. Basic function of the distribution terminal is achieved based on DF9320 low-voltage distribution terminal, such as data collecting and reactive power compensation, and the function test and reactive power compensation experiment are conducted in the laboratory.The function and composition of distribution automation are understood basically through the literature review. Distribution terminal's development status at home and abroad is recognized profoundly. And then each circuit module is described concretely based on a brief introduction to DF9320's performance characteristics and overall program, including signal sampling circuit, data storage circuit, real-time clock unit, input and output circuit of the switching value, serial interface circuit etc.Terminal's software design is the key part in this article.The implementation mechanism of multi-task scheduling and communication between tasks is investigated in detail based on the embedded real time operating systemμC/OS-Ⅱ. Directed towards the ColdFire family processor,μC/OS-Ⅱis transplanted to ColdFire processor by modifying the three transplanting files related with CPU, and the function test is completed after transplanting. Also the software debugging process is introduced, then the software and hardware problems encountered when debugging and solutions are described.Multi-task designing is performed on transplanted OS platform towards the function of the distribution terminal. Six tasks are designed based onμC/OS-Ⅱ, including initializing task, remote telemetering task, reactive power compensation task, serial communication task, keyboard scanning task, and liquid crystal display task. According to the nature of the task, the priority is assigned reasonably, and the compiling and debugging of applications are completed in Code Warrior development environment. Taking remote sensing task and reactive power compensation task as examples, the implementation process of the task are introduced minutely. Meanwhile, all the formulas are listed, and the data processing algorithms are introduced to improve the effectiveness and accuracy of data. In addition, a variety of anti-jamming measures are presented in software to improve anti-interference ability of the terminal, including watchdog, switch action detection, export atresia.Basic functions of the terminal are achieved, such as remote metering, serial interface communication and human-machine interface through terminal's function test in the laboratory, which illustrates that multiple tasks are reasonable designed inμC/OS-Ⅱand the whole system is effective. Directed towards reactive power compensation function, DF9320 adopts three-phase combined with single-phase compensation mode and the control algorithm of fifteen zones. Reactive power compensation experiment is conducted through building simulation platform and configuring terminal parameters. By contrast to the terminal used in Tonghai Yunnan, the results show that the reactive compensation method is reasonable and effective. |