Design of a substation monitoring system with Ethernet interface
2026-04-06 05:05:02··#1
Abstract: This paper introduces the design and implementation of a substation monitoring system with an industrial Ethernet interface. A dual-CPU substation monitoring system is proposed. The TMS320VC5402 digital signal processor serves as the main CPU, used for Ethernet interface control and management, periodically sending data to the host computer, and simultaneously reading data collected by the lower-level digital signal processor. The TMS320LF2407A digital signal processor serves as the slave CPU, used for keyboard and display control, acquisition of data such as switch quantities, pulse quantities, power grid frequency, and analog quantities, and output control of analog quantities and relays. The system software supports MAC, TCP/IP, and other protocol specifications, thus realizing the networking of the monitoring system. The hardware design of the TMS320VC5402 digital signal processor and the RTL8019AS Ethernet controller, as well as the assembly program design for the embedded TCP/IP protocol, are presented. Keywords: Ethernet; monitoring system; digital signal processor (DSP) Abstract: This paper introduces the design and realization of transformer substation monitoring system with industrial Ethernet interface. A new type of transformer substation monitoring system structure with double CPU is proposed. In this system, the digital signal processor (DSP) TMS320VC5402, as the master CPU, is used to control and manage the Ethernet interface. data to the host computer in a certain time. DSP TMS320LF2407A acts as the slave CPU which carries out following tasks: processing keyboard input information, controlling data display, various data gathering such as digital variables, pulse variables, power grid frequency and analog variables, and controlling the output of analog variables and relay. The system software supports MAC and TCP/IP protocols, so that the cyberization of monitoring system comes true. In addition, the hardware design between DSP TMS320VC5402 and Ethernet controller RTL8019AS and the software design of embedded TCP/IP is given in this paper. Keywords: Ethernet; monitoring system; digital signal processor (DSP) 1 Introduction With the development of information technologies such as computers, communications, and networks, information exchange has expanded to factories, enterprises, and even markets worldwide. Establishing enterprise information systems based on industrial control network technology has become a trend. Currently, the most widely used substation monitoring systems are fieldbus-based structures. Fieldbus technology, which emerged and developed in the 1980s, replaces the analog transmission method of 4-20mA current with fully digital communication. However, fieldbus technology also has many shortcomings in its development. Various fieldbuses on the market cannot achieve uniformity and are incompatible with each other. In contrast, COTS (Commercial-Off-The-Shelf) information network communication technology, represented by Ethernet, has gained global technical support due to its simple protocol, complete openness, and high stability and reliability. Compared with fieldbus, Ethernet has advantages such as wide application, low cost, high communication speed, abundant hardware and software resources, great potential for sustainable development, easy connection to the Internet, and seamless integration of office automation networks and industrial control networks. This paper develops a networked substation monitoring system based on the TI TMS320VC5402 digital signal processor and the Realtek RTL8019AS Ethernet controller chip, realizing the automation, digitization, and networking of substation monitoring and management. 2. System Structure The overall structure of the substation monitoring system adopts a dual-CPU architecture, as shown in Figure 1. The system uses a master-slave structure. The TMS320VC5402 digital signal processor serves as the master CPU, used for embedded Ethernet interface control and management, primarily for communication management, periodically sending data to the host computer, and simultaneously reading data collected by the slave digital signal processor. The TMS320LF2407A digital signal processor serves as the slave CPU, used to manage the acquisition of data such as keyboard input, display input, switch input, pulse input, grid frequency, and analog input, as well as analog and relay output control. Serial communication is used between the TMS320VC5402 and the TMS320LF2407A. [align=center]Figure 1. Structure Diagram of the Monitoring System[/align] 3. Hardware Circuit Design of the Signal Acquisition Section The monitoring system mainly acquires field signals and converts them into corresponding electrical parameters for display, transmitting them to other computers via Ethernet. The signals acquired by the signal acquisition section include: three-phase AC voltage and three-phase current after conversion by external voltage and current transformers; switch quantities reflecting the substation line status and protection operation; power meter pulse quantities; and grid frequency. The signal acquisition section uses TI's TMS320LF2407A as the embedded microprocessor, and ISSI's IS61LV6416 low-voltage, low-power high-speed static RAM as external data storage space and program space expansion during debugging. The program memory uses the TMS320LF2407A's internal 32K FLASH, and the MAX7128STC100-6 programmable logic device is used to integrate peripheral digital circuits. The four key signals from the keyboard are input to the MAX7128STC100-6, generating an XINT1 signal as an external interrupt input for the TMS320LF2407A. Simultaneously, the four key signals are sent to the TMS320LF2407A's I/O ports. A QPY-ENH6255 LCD module displays the corresponding acquired data. System parameters, including voltage transformer ratios and current transformer ratios, are stored by a non-volatile voltage monitor, watchdog timer, and X25045 data storage chip. Both switching and pulse signals are optocoupled and isolated. The isolated switching and pulse signals are then sent to the TMS320LF2407A's external I/O input ports via the MAX7128STC100-6. The grid frequency is hardware-sampled using the TMS320LF2407A's capture port CAP1. To achieve remote protection of the power system, the monitoring system includes driven relay output ports. Voltage and current signals are acquired using a 12-bit A/D converter, AD1674. The general-purpose I/O ports of the TMS320LF2407A and the MAX7128STC100-6 are used to control the read/write and conversion timing of the AD1674 sampling. The system also includes a D/A converter, the MAX7128STC100-6, a 12-bit D/A chip from Maxim Integrated. The chip select and write signals are generated by decoding with the MAX7128STC100-6, and the 12-bit data lines are buffered by the MAX7128STC100-6 for isolation. 4. Communication Hardware Circuit Design 4.1 TMS320VC5402 and TMS320LF2407A Communication Interface Design The TMS320VC5402 provides a multi-channel buffered serial port, which can be configured according to different user needs, making it convenient and flexible to use. It includes 6 pins: serial data transmit signal BDX, serial data receive signal BDR, transmit serial clock signal BCLKX, receive serial clock signal BCLKR, transmit frame synchronization signal BFSX, and receive frame synchronization signal BFSR. The TMS320LF2407A has a Serial Peripheral Interface (SPI) module with 4 pins. SPI is a high-speed, synchronous serial I/O port. The four pins are Slave Output/Active Input SPISOMI, Slave Input/Active Output SPISIMO, Slave Transmit Enable, and Serial Clock SPICLK. The TMS320VC5402 is the master controller, and the TMS320LF2407A is the slave controller. The communication interface schematic is shown in Figure 2. [align=center]Figure 2 Schematic diagram of the communication interface between TMS320VC5402 and TMS320LF2407A[/align] 4.2 Ethernet Interface Circuit Design The Ethernet interface management and control section consists of a TMS320VC5402, a programmable logic device XC95144XL, an Ethernet controller RTL8019AS, an Ethernet interface device HR61101G, and an RJ45 connector. Its hardware connection schematic is shown in Figure 3. The RTL8019AS is a highly integrated Ethernet controller manufactured by Realtek Corporation of Taiwan. It implements all functions of the Ethernet Media Access Layer (MAC) and Physical Layer (PHY). The JP pin is pulled up to a 5V power supply through a 10K resistor, thus putting the RTL8019 into jumper mode. The base address is determined by the IOS0 to IOS3 pins. All of these are grounded in the system, and the base address is set to 300H, resulting in an address range of 0300H to 031FH. This eliminates the need for an EEPROM 93C46 and avoids the hassle of changing resource configurations via jumpers. IRQ0-IRQ2 are grounded, making INT0 (IRQ2/9) of the RTL8019AS an interrupt output, while other interrupt outputs are disabled. INT0 is connected to the DSP's INT1 via an inverter (implemented using an XC95144x1). Since the DSP lacks a DMA controller, the TL8019AS pin is directly grounded. The IOCS16B pin is used for data width selection; the data exchanged between the TMS320VC5402 and the RTL8019AS is 16 bits wide, so it is connected to a 5V power supply via a pull-up resistor. The IOCHRDY port is connected to the DSP's READY port to insert wait cycles, resolving the conflict between the DSP's fast read/write speeds and slow peripheral I/O. The RTL8019AS signal lines are decoded using these three lines from the TMS320VC5402. Data is exchanged with the RTL8019AS via I/O. The RTL8019A has 32 I/O ports, and operations such as receiving data, sending data, and resetting are all performed through these 32 I/O ports. Therefore, to coordinate with the DSP, only 5 address lines are needed. Thus, the A0-A4 pins of the RTL8019AS are connected to the lower 5 bits of the DSP's address lines. SD15-0 are 16 data lines, connected to the D15-0 pins of the DSP. Additionally, the RSTDRV reset pin of the RTL8019AS is connected to an output port of the DSP for reset purposes; connecting this pin high disables the remote bootstrap function. The AUI pin determines whether the RTL8019AS uses AUI, BNC, or UTP for Ethernet connection. UTP is the widely used 10Base-T twisted-pair interface; a low AUI level indicates a BNC or UTP interface, so it is directly grounded. The specific type of the network interface is determined by PL0 and PL1. Grounding these selects the automatic detection mode, meaning the RTL8019AS will automatically detect the interface type. If it's a 10Base-T cable signal, the interface type is selected as UTP; otherwise, it's selected as BNC. TRIN+ and TRIN- connect to the differential input terminals of the twisted pair, and TPOUT+ and TPOUT- connect to the differential output terminals of the twisted pair. The HR61101G is a 10BASE-T interface device, serving as a low-pass filter and isolation transformer. The above signals are connected to the RJ45 interface through the transmission transformer in the HR61101G, i.e., connected to the Ethernet network. [align=center] Figure 3: Ethernet Interface Hardware Connection Schematic[/align] 5. Assembly Program Design of Embedded TCP/IP Protocol on TMS320VC5402 Due to the limited resources of the TMS320VC5402, the network protocol has been tailored for embedded applications. This paper implements ARP, IP, and UDP protocols, ensuring that the TMS320VC5402 can access Ethernet while meeting the requirements of embedded system applications. A union structure is chosen as the buffer for the TMS320VC5402 to receive and send Ethernet packets. The union allows definitions of different sizes and types to be temporarily stored in the same memory space. This has the advantage that data transfer between different protocol layers is essentially a data pointer transfer, rather than a data copy transfer. The union `databuf` contains four structure members: `ethernetpkt`, `ippkt`, `udppkt`, and `arppkt`. These correspond to the frame formats of Ethernet data frames, IP protocols, UDP protocols, and ARP protocols, respectively. These four structure members are defined according to the frame formats of their respective protocols. The following describes the implemented embedded TCP/IP protocol in four layers. Physical Layer: This layer mainly handles the reset of the RTL8019AS, register initialization, and setting the RTL8019AS operating mode, interrupt response, and DMA channel receive buffer address. Network Layer: This layer primarily implements the IP and ARP protocols. When the TMS320VC5402 receives a correct Ethernet packet, it calls the `check_packet` function to process it: if it's an ARP request, it sends an ARP reply; if it's an ARP reply, it adds the recipient's IP address and Ethernet address to the ARP cache; if it's an IP packet, it calls the IP processing module to process and receive the data. Transport Layer: If the protocol type in the IP datagram is 17, it's a UDP datagram. After correctly receiving the data, it can be processed. In this article, after correctly receiving a datagram, an acknowledgment message is sent to the PC, notifying it that the datagram has been correctly received and data can be sent again. The acknowledgment encapsulation first calls `create_udp_packet` to encapsulate the UDP protocol acknowledgment message, then calls the `create_ip_packet` function, which encapsulates the encapsulated UDP datagram back into an IP datagram, and finally calls the `send_packet` function to complete the transmission. Application Layer: Data and voice signal data sent from the CPU TMS320LF2407 are transmitted to the data buffer (databuf) of the TMS320VC5402, and then sent to the PC using the TCP/IP protocol. Data sent from the PC is also transmitted to the TMS320VC5402. 6. Conclusion This paper applies Ethernet technology to the design of a substation monitoring system. Leveraging the openness, compatibility, and simple communication protocol of Ethernet, a substation monitoring system with an embedded Ethernet interface was successfully developed. An Ethernet controller, composed of a microcontroller (DSP) and an Ethernet interface, is embedded into the substation monitoring system. The software supports MAC, TCP/IP, and other protocol specifications, thus achieving network connectivity for the monitoring system. This system offers advantages such as simple communication lines, high reliability, clear network hierarchy, good maintainability, high-speed transmission, and high real-time performance. The innovation of this paper lies in the design and implementation of a substation monitoring system with an Ethernet interface. References [1] Yang Gang, Yang Rengang, Guo Xiqing. Implementation of embedded Ethernet on intelligent electrical equipment in substation automation system [J]. Automation of Electric Power System, 2004, 28(3): 74-76, 85 [2] Qu Yanbin, Wang Jianping et al. Substation monitoring system based on CAN bus and DSP [J]. Automation of Electric Power System, 2002, 27(12): 86-89 [3] Yang Peng, Zhao Qi, Kong Xin, Chen Lingling. Development and technical characteristics of industrial Ethernet [J]. Microcomputer Information, 2006, 22(2-1): 32-33, 28 [4] Liu Kang, Wang Xuanyin. Design and implementation of single-chip microcomputer data communication system with embedded TCP/IP protocol [J]. Electrical Measurement & Instrumentation, 2003, 40(6): 43-45