---
title: "Design of Distribution Automation Terminal Based on DSP"
url: "https://maker.wiznet.io/emimamanna/projects/design-of-distribution-automation-terminal-based-on-dsp/"
markdown_url: "https://maker.wiznet.io/emimamanna/projects/design-of-distribution-automation-terminal-based-on-dsp/md"
type: "UCC: User Created Content"
author: "emimamanna"
author_url: "https://maker.wiznet.io/emimamanna/"
original_author: "Weiqing Tao, Xiong Chen, Lin Li"
original_url: "https://ieeexplore.ieee.org/abstract/document/5448617"
published: "2022-10-25"
language: "en"
hardware: ["WIZnet W5100"]
likes: 4
views: 1282
comments: 0
source: "WIZnet Makers (https://maker.wiznet.io/)"
---

# Design of Distribution Automation Terminal Based on DSP

> The system use full-function hardware protocol stack chip W5100 of Wiznet Company and RJ45 port which integrated network transformer

Original author: Weiqing Tao, Xiong Chen, Lin Li (source: https://ieeexplore.ieee.org/abstract/document/5448617)

## Components

- **WIZnet W5100** x 1 ([docs](https://docs.wiznet.io/Product/Chip/Ethernet/W5100))

## Article

I. INTRODUCTION

As the completion of projects for upgrading power grids and the construction of smart grid, the management of 10KV distribution network becomes more and more important. We have to increase the process and communication ability of the FTU in order to reach the target of more than 98% reliability proposed by State Grid Corporation of China. In researching and designing FTU, FTU generally uses multi-chip CPU and off chip AD in the past, but with DSP technology becoming mature, the advanced digital signal processing techniques has been applied to the design of FTU in distribution automation system. The design of FTU based on DSP makes full use of DSP with its rapid computing speed and powerful processing capabilities, as well as the ability to run in parallel, which can meet the distribution automation system to monitor real-time requirements. So the research of FTU based on DSP technology has far-reaching significance for improving the level of automation in our distribution network.This paper selects new DSP chip TMS320F2812 of TI Company as the main control chip, uses on chip AD of TMS320F2812 to acquisition, and take a series of hardware and software measures to improve the sampling precision. Meanwhile, this paper realizes Ethernet communication in FTU in order to meet the requirements of communication in real-time and reliability.

Ⅱ. SYSTEM SOLUTION

According to power industry standard of China DL/T721-2000 "Distribution Automation System Remote Terminal", feeder remote terminal is used to achieve distribution network monitoring. The automation equipments for data collection and processing of the pole top breaker FTU in distribution system, the Ring switchgear FTU and the switching station FTU, as well as for communication with regional workstations and control centers (SCADA) are the device interface part between the feeder automation system and the primary equipment distribution switches etc. The basic function of FTU include: AC and DC samples, electrical parameters calculation, fault detection, diagnosis and wave recording, parameter modification, remote control, status monitoring, communication, etc. [3].

Based on the above requirements, Terminal hardware design uses a modular design approach which can be divided into the following modules: core processor module, power supply module, analog acquisition module, digital input/output module, the clock and memory module, communication module, as shown in Figure 1. Hardware uses multi-layer PCB board with strong anti-interference technology, as well as the effective separation between strong electricity and weak electricity in order to improve system reliability. Divided the input current into protection channel and measurement channel, it takes consideration to the protection and measurement functions of the FTU. Through the two serial ports, CAN bus interface and data bus of DSP, this paper realizes the RS232, RS485, CAN bus and ethernet communication of the FTU.

![](https://maker.wiznet.io/upload/ckeditor5/1015659894%5F1666729042%5F0%2Epng)

Figure 1. The system hardware block diagram of FTU

Terminal software adopts top-down, structured, modular programming, combining the ideas of data structures and software engineering, following real-time task scheduling and task-driven mechanism. Firstly, establishing a framework structure for the entire system software which can be divided into relatively independent multi-modules, then designing the overall function of each module, building task scheduling mechanism related to modules, setting up a associated link between the modules and tasks. Secondly, using the stepwise refinement approach to refine for each module and perfecting the program structure for each task until the completion of the entire software programming. Software design is divided into initialization module, self-test module, clock synchronization module, data acquisition and processing module, remote signal detection module, fault detection processing module, serial communication module, CAN bus communication module, Ethernet communication module, data maintenance storage module, remote update module. The software design platform mainly adopts CCS3.3 and VC++6.0.

Ⅲ. Data acquisition and processing

Data acquisition mainly includes AC analog capture. AC signal comprise the three-phase AC voltage and three-phase AC current. AC analog are converted and isolated by the precise voltage and current transformer, then through the signal conversion based on the bipolar operational amplifier and conditioning circuits, finally enter the DSP on-chip AD converter by sampling and transforming. DSP process the transformed data from each channel for FFT conversion, get information such as voltage, current, power, power factor, electric energy, harmonic and record each phase voltage and current waveform data to monitor distribution line running state for fault detection, fault handling, fault records, the work of fault to eliminate in real-time. The hardware frequency measurement circuit is designed at the same time with the capture unit of DSP to track grid frequency synchronously.

The on-chip AD of DSP is 12-bit, The accuracy of 12-bit AD alternating current sampling is not high when the current varies greatly, especially inter-phase short circuit diagnosis requires a certain degree of overload (4 ~ 20 times). In order to improve the accuracy , we divide input current into protection channel and measurement channel, the protection channel ensure range of measurement mainly for inter-phase short circuit fault discrimination but accuracy is not high, the measuring channel adopts variable-gain approach which we control the light relay by switch output to switching sampling resistor according to the current range, thus ensuring the accuracy of current measurement (available 16-bit).We make use of fast complex FFT simultaneously (the value of voltage, current sampling compose complex) to increase speed of operation. Meanwhile, we make use of phase compensation and Calibration in software. Finally, the accuracy of sample passes the test of the electric power industry equipment and instrumentation quality inspection test center. The test report number is PD2009047.According to the test report, the maximum error of voltage test at room temperature is in the range of -0.17%–0.02%, and the permissible error is ±0.5%. The maximum error of current test at room temperature is in the range of -0.22%–0.07%, and the permissible error is ±1.0%. The maximum error of active power test at room temperature is in the range of -0.14%–0.01%, and the permissible error is ±1.0%. The maximum error of reactive power test at room temperature is in the range of -0.12%–0.01%, and the permissible error is ±1.0%.

Single phase grounding fault is the main fault in the distribution network. In China, the distribution network is mostly isolated neutral system. When single phase grounding fault occurred, the zero-sequence current will be larger. But its value is much smaller than load current and the transformer is difficult to be installed on the overhead line. So how to accurately detect the zero-sequence current is the premise of accurate judgment single phase grounding fault. FTU general adopts digital methods calculating zero-sequence current from Ia, Ib and Ic. However, the zero-sequence measurement error is very large because the values of sampling resistor are impossible completely consistent. We adopt approach combining analog and digital: In the hardware, we can complete analog addition of

| 3I0=Ia+Ib+Ic, and use a larger resistance which is connected way, you can get an accurate zero-sequence current and to operational amplifier feedback branch to amplify the signal greatly improve fault recognition accuracy of small current of zero-sequence current and improve the sampling accuracy. grounding. The circuit of zero-sequence current acquisition is In the software, we use digital filtering to filter much noise shown in figure 2. interference and further ensure the sampling accuracy. In this ![](https://maker.wiznet.io/upload/ckeditor5/1015659894%5F1666729041%2Ejpeg) Figure 2. zero-sequence current acquisition |
| --- |

Ⅳ. THE COMMUNICATION OF SYSTEM

Communication module is a core part of the entire system, the system acquisition data and fault information must be transmitted to the master station through communication module in time. At the same time, fault must be isolated by the master sending remote control commands. Furthermore, the relations between FTU must also rely on communication module. The system supports RS232, RS485, CAN bus and Ethernet communication, so it can meet a variety of on-site communication requirement. We will mainly introduce the design of Ethernet communication for lack of space.

The system use full-function hardware protocol stack chip W5100 of Wiznet Company and RJ45 port which integrated network transformer to design ethernet, which will make the ethernet port simpler and more miniature and improve the system integration. The interface circuit diagram between DSP and W5100 is how as diagram three. Through connect the /CS pin of W5100 with the /XZCS2 pin of DSP, W5100 will be mapped to the ZONE2 area of DSP. GPIOB0 of F2812 as the reset signal of W5100,the read and write signal, address bus and data bus can connect directly between F2812 and W5100, the interrupt signal of W5100 connect to the F2812 XINT1 pin directly. It is easy to see, the design of hardware circuit is simple under this mode, which is similar to the RAM DSP extended and just increase reset and interrupt control signals. In terms of the F2812,the operation with the W5100 is just like reading and writing the RAM[4-5].

![](https://maker.wiznet.io/upload/ckeditor5/1015659894%5F1666729042%2Epng)

Figure 3. interface circuit between DSP and W5100

Ⅴ. Realization of Communication Protocol

Companion standard for basic telecontrol tasks(IEC 60870-5-101) specified the data transmission message format through interrogation reply system between master station and slave station(remote terminal unit) in SCADA. It applies to serial communication working mode of traditional RTU. It usually use non-balanced transmission mode, that is the master station (dispatching center) apply ordinal query(call) slave station to control data transmission. IEC 60870-5-104 telecontrol protocol apply the IEC 60870-5-101 standard to the TCP/IP network. For the master station and slave station, Ethernet is a full-duplex high-speed network, so IEC 60870-5-104 use the balanced transmission mode. The functions of 101 protocol realized in FTU are the same as 104 protocol. The functions include: general interrogation, clock synchronization, telemetry, remote signal, remote control, electric degree call, file transmission and parameters loading. However, the communication mode and process between 101 protocol and 104 protocol are different. At first, initialization process is different as the difference of physical channel.Because of the difference of transmission mode, the communication process between 101 protocol and 104 protocol are different, the difference mainly embodies in initiative report. When important event occurred need initiative report to master station,101 protocol set the ACD bit to be one and then the master station call primary data, after that the slave station transmit the important event to the master station. However, 104 protocol directly transmit the important event to the master station and the data is not divided into primary and secondary data[6-8].

Ⅵ. CONCLUSION

According to the shortcomings of the feeder remote terminal FTU in terms of performance, the paper study and design FTU based on DSP chip TMS320F2812 combined with the current mature digital signal processing technology and high-performance DSP chip. The paper reduce sampling error and increase measurement accuracy through the frequency measurement circuit to tracking power frequency.In order to improve the operation speed, the paper use fast complex FFT (the value of voltage, current sampling compose complex). The paper divides the input current into protection channel and measurement channel to meet current measurement accuracy and measurement range of protection requirements. The measurement channel use variable gain treatment to acquire high measuring accuracy. Through a method combination of analog and digital to acquire accurate zero-sequence current, it greatly increases the small current grounding fault identification accuracy.

---

Source: https://maker.wiznet.io/emimamanna/projects/design-of-distribution-automation-terminal-based-on-dsp/
