Design of Multi-mode Heterogeneous Fusion Terminal for Power System

With the increasing demand of users and power supply quality in the power grid market, this puts forward higher requirements on the power system. However, the traditional power system has many limitations. People need to be able to upgrade on the basis of the traditional power grid to adapt to changing requirements. The purpose of this paper is to study the design of multi-mode heterogeneous fusion terminal in power system. This article is based on two wireless network technology solutions, GPRS wireless public network and LTE-230 wireless private network, a hardware development platform with STM32F107VCT6 microprocessor as the core, and a μ C/OS-III embedded real-time operating system software development platform, has designed the multi-mode heterogeneous fusion terminal of the electricity information collection system. This article deeply analyzes the demand for multi-mode heterogeneous fusion terminals of the electricity consumption information collection system, which is mainly used for the collection of electricity consumption information and the marketing and distribution automation management of power services; then it analyzes the work of the GPRS network and the LTE-230 network Principle and network system structure. This article designs the communication driver and application program, and analyzes the software architecture in detail. According to the logic processing structure of the internal data of the multi-mode heterogeneous fusion terminal, this article designs the data forwarding process in detail. In this paper, protocol conversion test, interface test and communication test are carried out on multi-mode heterogeneous fusion terminal. The test results show that when the system buffer K is 2 or 4, that is, if the average size of each message in the system is 100 Bytes, and the buffer is set to 800 Bytes, the system loss rate will approach zero.


Introduction
The power system is a part of the industrial Internet of Things [1][2], which enables the intelligent interconnection of power communications through the Internet of Things technology, and ultimately promotes the development of smart grids [3][4]. As an important part of our country's energy, the power system plays a vital role in production development and people's lives [5][6]. With the continuous development of science and technology, my country's smart grid has developed rapidly. Relying on the development of network communication technology and electronic technology, our country's smart grid has been promoted to a higher level of information and intelligent development [7][8].
In the research on the design of multi-mode heterogeneous fusion terminal in power system, many scholars have studied it and achieved good results. For example, Rahimzadeh T designed detailed schematic diagrams for each functional module of the hardware platform, including power supply modules and microprocessors. Clock setting, FLASH, DDR RAM, Ethernet port, USB, wireless module interface, keyboard, MMC card interface, and the connectors between the core board and the backplane [9]. Morimoto T has carried out research on smart grids, and formulated a series of smart grid plans, integrated power dispatching systems, and developed digital substations [10].
This article analyzes modules such as control module, network side interface, user side interface, other peripheral interfaces and power supply module. And carried out a detailed analysis and selection of each functional module, the whole hardware design meets the system requirements. This paper designs the driver, the message and conversion of the communication protocol, and the transplantation of µC/OS-operating system. Ⅲ

Network Scheme of Multi-Mode Heterogeneous Converged Communication Terminal
(1) GPRS wireless network GPRS is a mobile packet data communication service developed on the basis of the existing GSM mobile communication system. The reason why the GPRS network can seamlessly link with the base station subsystem is that the circuit-switched voice channel is similar to the GPRS network. Users can send and receive data through the end-to-end packet transmission mode without using circuit-switched network resources.
(2) LTE-230 wireless network TD-LTE is the long-term evolution version of the third-generation mobile communication standard TD-SCDMA. It uses OFDM, MIMO and other technologies to greatly improve system performance. The LTE-230 network is a dedicated power communication network and an applied smart grid communication network developed using TD-LTE core technology. It has the characteristics of two-way, real-time, and reliability.
(3) Embedded operating system Embedded operating system is currently a widely used system software, which usually includes graphical interfaces, communication protocols, hardware-related underlying driver software, device driver interfaces, and system kernels. The allocation of software and hardware resources, task scheduling, control and coordination of the embedded system are all controlled by the embedded operating system. It must reflect the characteristics of the system where it is located, and can achieve the required functions of the system by loading and unloading certain modules. VxWorks, eCos, µClinux and µC/OS-are currently four widely used real Ⅲ -time operating systems. They have good performance and can well meet the applications in the industrial field.

Hardware Scheme Design of Multi-Mode Heterogeneous Converged Communication Terminal (1) Main control chip
The MCU control module mainly completes the system's interface processing, network switching, data analysis, frame format conversion and control functions and other functions to meet the needs of 3 multi-task concurrent processing. Therefore, it is necessary to select the entire core module program and equipment. Based on the above analysis, the hardware design of the multi-mode heterogeneous fusion terminal of the electricity consumption information collection system adopts a modular structure design, so the requirements for the hardware design of the multi-mode heterogeneous fusion terminal have the following four requirements: 1) Hardware The MCU must have at least 4 USART serial ports, one SPI interface, and one GPIO interface. In addition, it also needs to have high reliability.
2) Software The MCU needs to support an embedded real-time operating system and be able to run smoothly, be able to manage multiple tasks, and support software, and it needs a processor module with good performance. 3

) Cost
The MCU needs to have a sufficiently low cost, and the output must be stable to facilitate subsequent purchases.

4) Application scenarios
It is necessary to adopt highly reliable electronic devices to meet the special needs of electric power business. Therefore, it is necessary to consider the use of industrial-grade electronic components.
(2) Selection of processor The STM32 processing chip is an ST microprocessor based on the ARM Cortex-M3 core, which contains high-speed memory, has two APB buses connected to peripherals and a wealth of enhanced I/O ports, and STM32 can be used in the system according to requirements Reasonable design for multiple power consumption modes. And the chip's high integration, high compatibility, superior real-time performance, strong functionality, low power consumption and easy development make the chip have outstanding advantages among similar chips, and its excellent product characteristics have become the design of industrial control the best choice.

User-Side Interface (1) RS-485 interface module
Considering that when a smart meter communicates with a multi-mode heterogeneous fusion communication terminal, voltage and electromagnetic interference may be generated. Therefore, it is necessary to isolate the circuit of each device to play a role in circuit protection. In this scheme, consider using ADUM1201 chip to interfere with electromagnetic characteristics. In the RS-485 communication bus, the ADUM1201 dual-channel digital isolator is used to achieve electrical isolation between the control chip and the MAX485 chip to prevent interference at both ends.
(2) Reset the interface module In actual applications, MCU often suffers from some interference from the outside world, and the program runs away. At this time, the MCU often enters a state of infinite loop, which not only causes the entire system to fall into a stagnant state, but also prevents the entire system from automatically returning to a controllable working state. Therefore, the watchdog circuit is added to the design. Therefore, the watchdog circuit is added to the design. When the MCU fails, the MCU can be forcibly reset to ensure the normal operation of the MCU.
(3) Clock interface module The clock interface module is RTC (Real-Time Clock), and the real-time clock is an independent timer. The RTC module has a set of counters that count continuously, and under the corresponding software configuration, it can provide the clock calendar function.  (2) Uplink communication driver After completing the baud rate synchronization, the subsequent initialization process can be carried out. After power-on, the module starts to initialize, and the system automatically detects the network access of the SIM card, and then initializes the GPRS communication module. The initialization process of LTE-230 module is almost the same as that of GPRS module.

Driver Design
(3) Protocol conversion module The multi-mode heterogeneous fusion terminal protocol conversion module mainly analyzes the commands issued by the master station and converts them into data frames capable of downlink communication to communicate with the smart meter; after obtaining the information feedback from the meter, the message is analyzed and converted as a message for upstream communication, upload it to the master station. Obviously, the role of the protocol conversion module is equivalent to a translator. In order to realize the translation function, you need to master the "two languages", namely the Q/GDW376.1-2013 and DL/T645-2007 protocols.

Build G/M/1/K Model
The communication between the power system terminal and the server is carried out in the form of messages. There are various messages in the terminal system. The byte length of each message is usually different, and the message will continue to be sent when the system is stable. The mixed system is adopted to receive messages, and the FCFS method is used to process and send the messages.
B * (s) is the Laplace-Stieltjes transformation of the input distribution function B(x), the transformation formula is: Set P to be the probability that i (x≥ 0) customers are found in the system when the system is stable. According to the nature of G/M/1, the steady-state probability equation can be known: P = (1 − σ)σ , i ≥ 0 (2) P = 1 − σ (3) Where x is the only value in the interval (0,1), which satisfies the equation:

Build G/M/1/K Model
The communication between the multi-mode fusion terminal and the server is carried out in the form of messages. There are various messages in the terminal system. The byte length of each message is usually different, and the message will be sent continuously when the system is stable. Clients in queuing theory can correspond to terminal messages, correspond to the processing and sending of messages by the communication module, adopt a mixed system to receive messages, and use FCFS to process and send messages.

Simulation Analysis and Testing of Queuing Model
This paper uses the G/M/1/K queuing model to verify and analyze the various communication modes of the vehicle terminal, and then use the result parameters and actual application scenarios to select the communication mode.

Single Mode Performance Analysis Experiment
The experiment selects GPRS as the communication mode, and uses queuing theory to analyze the performance of GPRS communication and optimize its performance. The experimental results are shown in Table 1.  1. Single mode performance analysis As shown in Figure 1, for GPRS communication, when in the same signal environment, the data processing speed is constant. In order to reduce the system data loss rate, combined with the loss rate curve, when the system buffer K is 2 or 4, that is, if in the system the average size of each message is 100Bytes, and the buffer is set to 800Bytes, the system loss rate will approach zero. When the system buffer exceeds 6, the area is stable, which means that the system does not need to apply for a buffer exceeding 8 for the communication module.

Loss Rate of Terminal Parameters Within a Certain Period of Time
The statistical analysis of the message loss in each case within 8 minutes of the terminal is carried out, and the experimental results are shown in Table 2.  Figure 2, when the system is stable, random arrival messages have a greater impact on system communication performance than timing messages. Similarly, when the value of K is the same, it can be found that random messages require more system resources than messages with equal intervals, and the number of random messages in the system needs to be reduced.

Conclusions
This paper uses queuing theory to establish a queuing model G/M/1/K suitable for multi-mode heterogeneous fusion terminal communication systems, and analyzes several performance indicators of the queuing model in detail, and analyzes the influence on terminal communication quality and system resources. It also compared the performance indicators of different communication modes, pointed out the applicable scenarios and corresponding advantages. Through queuing modeling analysis, this article further demonstrates the feasibility and practical value of multi-mode heterogeneous fusion communication terminal. At the same time, this article verifies some functions of the terminal.