Remote monitoring system of branch circuit in the family

In order to estimate and predict human real-time heating demand and optimize the existing electric heating control methods, a large number of household electricity data samples are required for training. This article mainly introduces the method of obtaining data samples, and realizes the monitoring of household branch circuit information by establishing a modern remote monitoring system. The author gives the detailed hardware design and software function introduction of the system. Each collection terminal in the system uses LAN, LTE and Wi-Fi modes to establish communication with the monitoring center, completing the basic functions of collecting electricity information for each branch circuit in the family, and having a remote upgrade function makes the system more complete. An experiment conducted in a family in Jinan City, Shandong Province, China tested the function of the verification system. The proposed remote monitoring system can be a useful tool to grasp the power consumption of each line of the family and study the energy demand of users.


Introduction
The long-term coal-fired heating method has seriously affected people's daily life and physical health [1]. In the terminal energy consumption link, replacing traditional primary energy sources such as coal with electric energy can bring greater environmental benefits [2,3]. Electric energy substitution is an important part of the energy Internet strategy and is of great significance for promoting the development of clean energy [4]. "Coal to electricity" can fundamentally reduce the generation of PM2.5, which is economical and feasible [5]. However, the access of a large number of electric heating equipment can easily cause peak loads and affect the safety of electricity consumption. On the other hand, the existing temperature control mode is difficult to maximize the use of the heat energy produced [6]. Therefore, it is necessary to optimize the existing electric heating control technology, based on the existing electrical load status monitoring technology, to explore the correlation between power monitoring and user energy consumption behaviour. It serves as an important basis for adjusting the operating status of electric heating equipment and ensuring the heating effect, making electricity monitoring an important means to perceive users' energy needs.
In this regard, it is necessary to develop a set of electric heating control algorithms based on artificial intelligence. The estimation and prediction of human real-time heating demand is an important basis for the generation of control algorithms. The estimation and prediction model requires a large number of data samples for training. Collecting specific electricity consumption information of household appliances is the most important step. The traditional intrusive load monitoring system needs to install sensors for each consumer, which costs a lot of time and investment. Non-intrusive load monitoring and decomposition (NILMD) decomposes the total household power into the power of individual appliances. However, there are many types of electrical appliances, and many electrical appliances have low power, which makes NILMD encounter a great dilemma. In addition, the use of many household appliances in

System hardware design
The structure of the remote monitoring system of branch circuit in the family consists of collection terminal and monitoring center. Each acquisition terminal consists of an electric energy meter and remote terminal unit (RTU) which can measure electricity consumption information. Each electric energy meter is manufactured with advanced microelectronic technology and SMT production process [8]. It can measure single-phase active electric energy with rated voltage of 220 V and rated frequency of 50 Hz. The electric energy meter uses the internal current sampling network, voltage sampling network and metering integrated circuit to form an electric energy metering unit, which converts the corresponding voltage and current into electrical signals and transmits them to RTU, which then connects them to the Internet through various communication methods. The real-time monitoring server is a PC with control software and a fixed IP internet connection. The monitoring center has a good manmachine interface, which can display and store the electricity consumption information of the household branch circuit. The personnel can also set and update the acquisition terminal through the monitoring center. Figure 1 is the frame diagram of the remote monitoring system of branch circuit in the family.
The acquisition terminal realizes the remote monitoring of household branch circuit through the transformation of electric energy meter. The RTU is connected with the RS485 interface of the electric energy meter to form the data intercommunication in the acquisition terminal. The acquisition terminal is connected with the socket and plugboard in the user's home to obtain the power consumption of each branch circuit. The site layout is shown in    Figure 3. Hardware block diagram of RTU

Main controller circuit design
Based on the requirement of high performance, STM32F407ZGT6 is selected as the core MCU of the main control board. STM32F407ZGT6 has built-in 32-bit high-performance arm Cortex-M processor, operating frequency up to 168MHz, with 1M bytes of ROM and 192K bytes of RAM, and supports access to high-performance DSP and FPU instructions with advanced features. At the same time, the price of STM32F407ZGT6 is relatively low, which makes it a reasonable choice for many highperformance applications. The communication interface of STM32F407ZGT6 includes three SPI interfaces, three IIC interfaces, two UARTS, two USB interfaces, two can interfaces, two IIS audio communication interfaces and one SDIO communication interface.

Data storage design
For the scene of information collection of family branch circuit, the collected data not only need realtime monitoring, but also need to be saved for a long time. Therefore, RTU needs to have the ability of data storage. In our design, the stored data include the total active power energy (including sharp, peak, shoulder, off peak) of each branch circuit on a certain settlement day, and the real-time monitoring information of voltage, current, power, accumulated energy and power factor, as well as the corresponding time information.
EEPROM is a kind of memory which can be read and written. The erase times is much higher than that of flash memory. It is generally suitable for storing data with small amount of data and frequent reading and writing. The system uses 24LC256 chip of microchip technology company of America, uses 2.5V single power supply and Serial EEPROM through I2C interface of 32kByte. 24LC256 uses Schmidt trigger input for noise suppression. More than one million erasure / write cycles are set internally, and data is retained for more than 200 years. The 24LC256 adopts low-power CMOS technology, and has the function of hardware write protection, which is suitable for household branch circuit power consumption information acquisition scene [8]. The system has the advantages of simple structure, convenient implementation and stable operation.
W25Q64 chip is used in the flash of this system, which is a kind of high-performance serial flash memory, which is 6 times of the performance of ordinary serial flash memory. It supports standard SPI, 160MHz dual output SPI and 320MHz quad output SPI. The data transmission rate reaches 40MB / s and only needs 8 clock cycles to process memory. W25Q64 has low power consumption and wide temperature range. At the same time, it has flexible 4KB sector architecture, which can perform unified erasure (4KB) and block erasure (32KB and 64KB). It can carry out more than 100000 erasure / write cycles and save data for more than 20 years.
At the same time, the RTU is also equipped with TF-card interface. Users can store electricity information by inserting TF-card into the collection terminal. TF-card is a flexible way to store information, as an alternative scheme for users to store information. TF-card also has a copyright protection management system to protect the stored information.

RS485 interface circuit design
This paper studies and realizes the communication between RTU and multiple electric energy meter [9]. All electric energy meters are connected to RTU through RS485BUS. RS485BUS is a standard to define the electrical characteristics of the driver and receiver in a balanced digital multipoint system. Its network topology generally adopts the bus structure of terminal matching, and uses a bus to connect the nodes in series. The most common application is the communication between programmable logic controllers in industrial environment. The RS485 interface adopts differential signal negative logic to enhance the resistance to general mode interference. This system uses MAX13085E chip, which is a + 5.0V power supply, with ± 15kV ESD protection RS485 transceiver, including a driver and a receiver. Device built-in failure protection circuit, when the receiver input open or short circuit, to ensure the receiver output logic high level. If all transmitters (high resistance) attached to the terminal matching bus are disabled, the receiver will output a logic high level. Max13085E is ideal for half duplex communication and consumes only 1.2mA power supply current at no load or full load when the driver is disabled. The MAX13085E receiver has an input impedance of 18 units of load, and up to 256 transceivers can be connected to the bus.

CAN interface circuit design
This paper uses TJA1050, a high-speed CAN bus driver produced by Philips company [10]. TJA1050 is the interface between CAN protocol controller and physical bus. The CAN bus provides differential reception capability for the CAN bus. There is a current limiting circuit and a temperature protection circuit, which integrates CAN protocol into the chip hardware, which is convenient for users. It has the characteristics of high speed, low power consumption, high security and excellent electromagnetic performance. More importantly, due to the best matching of the output signals CANH and CANL, electromagnetic emission is greatly reduced. TJA1050 also improves the behaviour without power node and has no standby mode. Based on the above reasons, TJA1050 is very suitable for the node in the partially powered network in the power-off state.

Uplink communication circuit design
This system uses a variety of uplink communication methods, including LTE, LAN and Wi-Fi.
Among them, the LTE module adopts SIM7600CE, mainly including the following functions: voice call function, SMS receiving and sending function, HTTP operation function, LTE network communication, TF card operation function, etc. MCU connects with SIM7600CE through serial port and sends AT command to control 4G module SIM7600CE to complete remote communication function. Sim7600ce power supply mode is a single power supply, external 3.4-4.2V power supply, support one power input, two power output, in sleep state, the power consumption current is less than 5mA. The uplink / downlink transmission rate of LTE communication using sim7600ce is as high as 85.6Kbps. 5 LAN8720 is a low-power 10 / 100M Ethernet PHY layer chip, supporting RMII interface and LAN MAC layer communication, built-in 10-base-T / 100base-TX full duplex transmission module, and can establish the best working mode (speed and duplex mode) with the destination host through selfnegotiation. LAN8720 also has automatic polarity detection and correction, as well as link state change wake-up detection.
The module of Wi-Fi module is ESP8266 with ultra-low power consumption. Its core processor integrates the industry-leading Tensilica L106 ultra-low power 32-bit micro MCU in a small size package, with 16-bit compact mode, the main frequency supports 80MHz and 160MHz, supports RTOS, and has built-in TCP / IP protocol stack. ESP8266 also supports at remote upgrade and cloud OTA upgrade [11].

Power circuit design
The 220 V AC voltage of the home power supply supplies the switching power supply of the measuring terminal through the varistor and the safety device. The switching power supply outputs 24 V DC voltage, and then outputs 5 V through the 7805 three terminal voltage stabilizing integrated circuit. At the same time, there are large capacitors in parallel to ensure that the capacitors can continue to discharge after power failure. The power stored in the terminal capacitor can maintain itself, and report the power failure event to the center actively, so that the center can know the terminal power failure. The 5V output voltage of 7805 three terminal voltage stabilizing integrated circuit outputs 3.3V through LM1117-3.3 to supply power to MCU or other chips. Figure 4 is the schematic diagram of power circuit design.  Therefore, it can be determined that the functions of the application software are mainly divided into initialization, timer interrupt, downlink communication, uplink communication, remote upgrade and so on. According to the actual needs, RTU needs to collect and report data regularly. The timer interrupt

Uplink communication
Uplink communication means that RTU uploads the collected information, which is the link between RTU and mobile network. 376.1 protocol is the protocol standard of uplink communication. As a communication protocol between master station and acquisition terminal, 376.1 protocol specifies the frame format, data coding and transmission rules of data transmission between master station and acquisition terminal of power user electric energy information acquisition system. This unified standard is helpful to realize the remote monitoring and management of home branch circuit. The RTU is configured with the IP address and port number of the monitoring station, and is connected with the monitoring center through LTE / LAN / Wi-Fi module. After the TCP connection is consistent, the data exchange between RTU and monitoring center can be completed through TCP link. Users can set the time interval of each data upload to different lengths according to their needs. The uplink communication flow chart is shown in Figure 8.

Initialization
For RTU, the scheme of local upgrade is not realistic, because the number of home branch circuits is too many, so it is too cumbersome to manually upgrade the equipment one by one. The remote upgrade function enables users to upgrade the program through the monitoring center, and the same effect can be achieved when the personnel are not on site, which makes the upgrade process become economic and efficient. The process of remote upgrade is shown in the figure, which mainly includes the following steps: (1) the RTU confirms the status of upgrading, and the center sends the total number of data frames to the terminal and gets confirmation; (2) the center sends the upgrade data to the terminal, and the terminal confirms that it has received the last frame; (3) verifies whether the upgrade is successful. The remote upgrade flow chart is shown in Figure 9.

System operation
The system described in this paper has been tested in a home in Jinan City, Shandong Province, China.

Equipment installation
The model of electric energy meter applied in acquisition terminal is DDZY102. A total of 11 electric energy meters have been installed in the household, including three in the kitchen, two in the balcony, one in the secondary bedroom, one in the study, two in the master bedroom and two in the living room. Three terminals were set up in the experiment, including one for kitchen and balcony, one for secondary bedroom and study, and one for master bedroom and living room. The installation of home branch circuit acquisition terminal should be simple and convenient, reduce installation cost and reduce data error. In addition, the installation location should not affect the daily life of personnel. According to the above requirements, the user's socket is transformed according to the safety specification, and connected with the socket through the electric energy meter. The electric energy meter is connected with RTU through RS485 interface to complete data transmission. Figure 10 shows the acquisition terminal used in the branch circuit of the washing machine on the balcony.

Data display of electric energy meter
After a month's test, these meters and terminal equipment are in normal operation. The original function of electric energy meter is in good condition, and can display real-time information such as voltage, current, power, accumulated electric energy, etc., as shown in Figure 11.

Data display of monitoring center
The data collected by the electric energy meter is transmitted to the corresponding RTU via RS485, and the three terminals upload the data to the monitoring center by LTE / LAN / Wi-Fi. The terminal shared by kitchen and balcony uses Wi-Fi communication, terminal shared by secondary bedroom and study uses LTE communication, and terminal shared by master bedroom and living room uses LAN communication. The initial data acquisition frequency is set at 1 minute, and the experimental time is from 0:00 on November 5, 2020 to 23:59, November 27, 2020. After one month's information collection, the monitoring center can download the status information and energy accumulation of 11 branch circuits at all times (with one-minute interval) in the experimental time, a total of 33120 pieces. If the original data is not processed by the system, some data will be missing, as shown in Figure 12.  Figure 12. Display of data missing The missing data amount of 11 branch circuits is shown in Table 1. It can be seen that the missing data of different branch circuits is mainly affected by the location, and the missing data of different branch circuits in the same room is similar. The total number of lost data in 11 branch circuits is 3010, and the average number of data lost in each branch is 273.63, accounting for 0.826% of the total data. Among them, the data loss ratio of terminal 1 transmitted by Wi-Fi is 0.743%, that of terminal 2 transmitted by LTE is 0.768%, and that of terminal 3 transmitted by LAN is 0.959%. Obviously, the performance of various communication modes of remote monitoring system is good.

System upgrade
The administrator can choose the acquisition terminal to upgrade through the monitoring center. After the upgrade program is started, the monitoring center displays the remote upgrade progress, as shown in Figure 13. In order to verify the reliability and stability of remote upgrade, the function of remote upgrade is tested: (1) when the terminal receives the application program, the terminal power is cut off; (2) when the terminal receives the application program, the network connection between the terminal and the monitoring center is disconnected; (3) the power is cut off when the terminal loads the application program. According to our test, case (1) and case (2) will lead to upgrade failure, but the terminal will continue to execute the original program after the power supply or network returns to normal. In case (3), when the power supply continues, the terminal loads the application and completes the upgrade process.

Conclusion
In order to promote the replacement of electric energy and realize the optimal control of electric heating, a large number of samples are required to estimate and predict the real-time heating demand of people. This article mainly designs a method for obtaining household electricity consumption information, and establishes a household branch circuit remote monitoring system based on multiple communication methods. The branch circuit information collected by each electric energy meter is transmitted to RTU through rs485bus. RTU uses LAN / LTE / Wi-Fi communication mode to send data to the monitoring center according to the set time interval, and the monitoring center can also transmit commands to RTU through various communication methods. Through the hardware and software design of RTU, the system can complete the basic functions such as data collection. In order to facilitate maintenance, it can also remote upgrade the terminal. The system has been tested in a family in Jinan City, Shandong Province, China, with complete functions and good transmission effect. The household branch circuit electricity consumption information collected by this system can be used as a data set to study the energy consumption behaviour of users, and contribute to the next step of studying the energy demand of users. Supporting work for optimized control of electric heating is currently underway.