# Electrical Control Online Monitoring System Based on Internet of Things

Authors: Shunzhi Fan
Journal: Wireless Communications and Mobile Computing
 (2021)

---

## Abstract

In order to improve the stability of the electrical control system, based on the Internet of Things technology, this paper constructs an online monitoring system for electrical control based on the Internet of Things. Based on actual needs, communication requirements, and common communication methods in the remote monitoring system, this paper combines the requirements of actual remote communication to conduct a detailed comparative analysis of the principles, performance characteristics, reliability, cost, maintenance, and other aspects of various communication methods, proposes a plan that can meet the communication requirements of the system, and completes the design of the wireless linear link communication network. In addition, according to the three-tier architecture of the Internet of Things, this paper comprehensively uses the technologies related to the Internet of Things to design and develop the perception layer, transmission layer, and application layer. Finally, this paper designs experiments to test the performance of the system constructed in this paper. The research results show that the online monitoring system based on the Internet of Things constructed in this paper meets the needs of intelligent monitoring of the electrical control system.


---

## Body

## 1. Introduction

The development of modern science and technology, especially the development of sensor technology, information processing technology, and computer technology, has made it possible for people to conduct real-time online monitoring of the operating status of electrical equipment, thereby providing maintenance basis for condition maintenance. As the technical basis of condition maintenance, the online monitoring technology of electrical equipment has been highly valued and has become a new topic in the field of electrical system research today.The rapid development of the Internet of Things, cloud computing, and artificial intelligence technology based on sensor technology and the Internet has made it possible for intelligent electrical systems to have self-learning capabilities. Through the analysis and processing of large data on electrical equipment operation, intelligent electrical systems can have the ability to think and judgment ability to meet the higher-level needs of mankind.The reliability of electrical equipment depends to a large extent on its insulating properties. For a long time, in order to prevent accidents, the equipment running in the electrical system has been regularly subjected to preventive insulation tests. This has played an important role in ensuring the safe and reliable operation of the equipment in the electrical system and preventing accidents. However, with the development of electrical production, traditional routine tests require power outage testing, and the test interval between two tests is long, so it is not easy to find equipment insulation defects in time, and power outages will also cause certain losses. Moreover, with the continuous development of electrical systems, there are more and more substations, and the number of substation equipment has increased sharply. Therefore, many units have been unable to complete preventive test tasks on time based on the original conditions. Therefore, the live detection and online monitoring of the insulation of electrical equipment are imperative. Live line measurement refers to electrical equipment is tested for insulation under working voltage. Online monitoring refers to detecting insulation conditions at any time during the operation of the equipment, which introduces a computer into the measurement system to automate the measurement process and achieve intelligent data processing [1]. At the same time, with the rapid development of modern technology, especially the new achievements of electronics, computers, and various sensor technologies, it provides favorable conditions for the development of live line measurement and online monitoring technology for electrical equipment insulation. The live line measurement of electrical equipment can shorten the inspection cycle and increase the probability of timely detection of insulation defects, thereby reducing the insulation accident rate. This is especially important in the initial stage and aging period of electrical equipment. Similarly, online monitoring of electrical equipment can further reduce the insulation accident rate, which is especially important in the early stage and aging period of electrical equipment put into operation. In addition, online monitoring of electrical equipment can realize online diagnosis of insulation, so that the electrical system transitions from preventive maintenance to predictive maintenance. This is because of the deterioration of insulation and the development of defects, although statistical, the development speed is also fast and slow, but most of them have a certain period of development [2]. During this period, the insulation will send out various physical and chemical information in response to changes in the insulation state. Through the processing and integration of this information, it is possible to judge the reliability of the equipment and predict the insulation life and provide early warning or prescribed operations when necessary. This can prevent accidents caused by the expansion of insulation defects and prevent blind power outages from conducting preventive tests. At present, our country’s insulation live line measurement and online monitoring are still in the development stage. How to develop various measurement systems, improve the accuracy and reliability of measurement, reduce the cost of measurement devices, etc., are all current and future work [3].For overcoming the shortcomings of traditional electrical control and monitoring systems, wireless sensor networks will be an excellent choice. A wireless sensor network is a new type of network that has emerged in recent years with the rapid development of technologies such as wireless communication, integrated circuits, sensors, and microelectromechanical systems. It consists of a large number of sensor nodes and is a brand-new information acquisition and processing technology. It can monitor, perceive, and collect information about various environments or monitored objects in real time. Therefore, wireless sensor networks have huge application value and potential application prospects in military, industrial, medical, environmental monitoring, traffic management, disaster relief, and other fields.In order to improve the stability of the electrical control system, based on the Internet of Things technology, this paper constructs an online monitoring system for electrical control based on the Internet of Things, based on actual needs, communication requirements, and common communication methods in the remote monitoring system.


## 2. Related Work

In the application of wireless communication technology in the power system, more research is to use GSM, GPRS, and Bluetooth technology for online monitoring of electrical equipment [4]. However, this type of technology is not developed for monitoring technology, so its application has inherent limitations and cannot form a complete monitoring system. Moreover, the existing research does not form a complete monitoring system. The application of a wireless sensor network in the condition monitoring of electrical equipment is as follows. The literature [5] used a wireless sensor network to estimate the energy efficiency of the motor and monitor the air gap to realize the state monitoring of the motor. The literature [6] gave a framework for the application of wireless sensor networks to nuclear power plants. The literature [7] used wireless sensor network nodes to monitor the fault point of the transmission line and locate the node itself, so as to obtain the location of the fault point of the transmission line. In the literature [8], the wireless sensor network products studied are used to monitor parameters such as stress, temperature, and vibration of long-span transmission lines. Moreover, each sensor node is deployed on a high-voltage transmission line, and the gateway is fixed on a high-voltage transmission tower.The literature [9] designed the WJY-II temperature monitoring device, which is mainly used in the heating temperature measurement of the contact line anchor section joints, the isolation switch of the traction substation, and the wire joints. However, this method can only use PC computer to collect temperature data of electrical connection clamp when riding a train or take a car on a parallel road along the railway to collect data, but it cannot realize real-time monitoring of the temperature condition of the electrical connection clamp of the catenary. In order to detect the overheating phenomenon of the electrical node equipment of the main circuit of the catenary in time, the literature [10] used the BC-type color-changing temperature measurement patch exclusively developed by Beijing Yadongxing Electromechanical Research Institute to monitor all electrical equipment that may be overheated. However, before it is put into use, the operator of the catenary maintenance needs to be trained on the key points of the use of the BC-type color-changing temperature measurement patch. The literature [11] posted or painted the temperature-indicating material on the surface of the electrical connection clamp of the main circuit of the catenary. When the temperature of the electrical connection clamp exceeds the threshold value, the color of the temperature indicating material changes, so that poor electrical connection defects can be found and treated to achieve the purpose of preventing accidents. The literature [12] used noncontact infrared thermal imaging measurement technology to monitor the temperature of the hot-prone parts on the contact line, which can be used to observe the degree of damage caused by the abnormal temperature rise of the contact line parts during the live operation of the contact line through the infrared thermal image. However, the measurement accuracy of infrared thermal imaging technology is easily affected by the environment. Taking into account the complex working environment of the catenary and the environmental climate, this method has general practicality and generalization. The literature [13] designed a catenary optical fiber temperature monitoring system. The system allocates an independent optical fiber to each fiber Bragg grating (FBG) sensor, uses the fiber Bragg grating (FBG) sensor to collect temperature data, and uses the optical fiber to transmit it to the computer located in the traction substation. The literature [14] designed a temperature monitoring system for the electrical railway catenary wire joints and commutation points to ensure the safe operation of the main circuit of the catenary. The system uses a special temperature sensor to collect the high1-voltage temperature measurement of the catenary and uses a two-level wireless network to transmit temperature data. The literature [15] developed a noncontact online monitoring system based on surface acoustic wave technology. When the ambient temperature is high, the wind speed is low, and the load is a strong electric system; the system uses surface acoustic wave sensors to monitor the working temperature of electrical nodes and uses wireless networks to transmit temperature information to the data center. The literature [16] used RFID tags with integrated sensors to find the temperature of the contact line feeder compression joint and the displacement of the STB spring. Field test results prove that the measuring sensor placed on the overhead contact line can regularly measure temperature and displacement. ZigBee technology is used to transmit temperature and displacement data to a data concentrator located in an electric locomotive. The literature [17] took infrared images when the train was traveling, compared the temperature map of normal catenary parts, and found abnormal parts of temperature rise. Since infrared rays cannot penetrate opaque objects, when the parts are in an environment such as sand, dust, haze, or dense fog, it will affect the judgment of the actual temperature rise of the catenary parts and affect the imaging effect.


## 3. Basic Concepts of the Expert Electrical Control System

Combined with the data analysis requirements of the system in this article, this article combines the expert system for algorithm construction. The expert control system is an intelligent control system constructed by applying the basic concepts and technology of the expert system to the control technology and virtualizing the knowledge and experience of human experts.There are some important differences between the expert system and the expert control system. The differences are as follows [18]:
(1)
The expert system only conducts consulting work for problems in specialized fields to assist users in the next step. The reasoning of the expert system is based on knowledge, and the final inference results are knowledge items, new knowledge items, etc. The expert control system makes decisions on the process automatically and independently, and its inference results can be changed knowledge items or executed algorithms(2)
The working mode of the expert system is offline work, while the expert control system is real-time online acquisition of object information, which is real-time online controlIn short, the expert system organizes the problem-solving experience, ideas, methods, etc., into an actual operating system, which has the intelligence of simulating human experience, and combines with traditional automatic control theory to form the basic idea of expert control [19].The expert control system is a knowledge-based system, and the core of expert control is the design of the controller.The knowledge of the control system is divided into the following two categories:(1)
In the knowledge, some belong to a priori knowledge, such as control type and process information; others are dynamic knowledge generated when the system is running(2)
Knowledge of control, identification, and supervision. Among them, the related analytical algorithm knowledge belongs to quantitative knowledge, and the related experience principle knowledge belongs to qualitative knowledgeThis article uses the Internet of Things technology to conduct intelligent monitoring of the electrical control system. The process needs to be restricted by the controller’s reasoning mechanism, so the process needs to be quantitatively processed. The reasoning mechanism model of the controller is as follows:(1)U=fE,K,I.Among them, the input set of the controller is(2)E=e1,e2,⋯,em.The knowledge item set of the system is(3)K=k1,k2,⋯,kn.The output set of the inference mechanism is(4)I=i1,i2,⋯,ip.The output set of the controller is(5)U=u1,u2,⋯,uq.Among them,f is a smart operator, and its form is as follows [20]:
(6)IFEANDKTHEN<IFITHENU>.The intelligent operator is defined as inferringI from the input information E, the empirical data K is the knowledge base and the rules, and then the control behavior U of the system is derived from I.Similar to the expert system, the reasoning engine used for knowledge decision-making and the knowledge base of the control problem domain constitute the main body of expert control.


### 3.1. Least Squares Curve Fitting

#### 3.1.1. The Principle of Least Squares

The basic principle of the least squares method is that the sum of the squares of the distance between the observation point and the estimated point is the minimum. Among them, the distance between the observation point and the estimated point is measured in the form of a square, so it is called a square. The minimum means to minimize the sum of squares of the distance between the estimated point and the observation point. For example, for the regression model shown in the following formula [21]:
(7)Y=fxθ+ε.If it is assumed thatx1,Y1,x2,Y2,⋯,xn,Yn is the collected observation point data, the following formula is used:
(8)Y^i=fx^iθ,to estimate Yi. In these formulas, x^i is the estimated value of xi, and the estimated value of point xi,Yi is x^i,Y^i. Then, the square of the distance between the observation point and the estimated point is as follows:
(9)xi−x∧i2+Yi−fx∧iθ2.Therefore, the core idea of the least squares method is to make the least squares estimator as shown in the following formula:(10)Qθ=∑i=1Nxi−x∧i2+∑i=1NYi−fx∧iθ2.When it is the smallest, the parameter value is evaluated. In special cases, when eachxi and the corresponding estimated value are equal, that is, xi=x^i, the estimator at this time is as follows [22]:
(11)Qθ=∑i=1NYi−fx∧iθ2.The parameters when the minimum is reached.


#### 3.1.2. Least Squares Method Is Used for Curve Fitting

When conducting scientific experiments, it is necessary to record experimental data, but even the most sophisticated instruments will have measurement errors, and accidental errors are inevitable. The experimental data on the two-dimensional plane is embodied as some discrete points. If you want to study the possible change trend of the data, you can study based on these discrete points on the plane and finally obtain the statistical merger effect. A curve that can reflect the data distribution and development trend can be combined, and the least squares method can be used to obtain the fitted polynomial, so as to describe the experimental data more closely. It is very common to use the least squares method for curve fitting. If a set of unrelated experimental dataxi,yi,i=0,1,2,3,⋯,n is obtained during a certain scientific experiment, a polynomial is sought, that is, a functional relationship Y=Fx between the independent variable xi and the dependent variable yi is found to reflect the possible development trend of the experimental data. However, in the course of the experiment, since the error is difficult to avoid, it is impossible to expect all the experimental data points to fall on the function curve Y=Fx.Therefore, we can only require the error
(12)δi=Fxi−yi,i=0,1,2,3,⋯,n,at a given point xi is the smallest according to a certain agreed standard, which is recorded as δ=δ0,δ1,⋯,δn. If the range δ of the vector δ is required to be the smallest, that is to say, for a set of experimental data xi,yi,i=0,1,2,3,⋯,n, it is required to find a function in the set of functions to meet the minimum sum of squares of the error. This is the basic principle of the least squares method. This also shows that the least squares theory can be well applied to curve fitting. In the research of this subject, the nonlinear curve fitting in least squares curve fitting is used. In the MATLAB environment, the polyfit function is used for curve fitting [23].In the air compressor control system, the body temperature of the air compressor is an important parameter index. According to the requirements of this system, it is necessary to collect the body temperature of the air compressor in real time and use this as the input reference value for the alarm and control output of the control system. The measurement range required for the temperature of the air compressor body is that the minimum temperature that can be distinguished. PT100 is used as a temperature sensor, and the temperature signal is converted into a standard analog signal through a temperature conditioning circuit, and then, the signal is collected by an AD converter. Filtering and conversion realize the acquisition and control of the temperature of the air compressor body.Figure1 shows the system structure diagram of the temperature acquisition and conditioning circuit [24].Figure 1
System structure diagram of temperature acquisition and conditioning circuit.The working principle of the PT100 platinum resistance temperature sensor is to use the temperature heating effect of platinum resistance to measure. When the temperature changes, the resistance of the platinum resistor will also change. Moreover, the resistance value of the resistor has a certain relationship with the temperature. According to the relationship expression between temperature and resistance, the resistance value of the resistance can be converted into the corresponding temperature value. The relationship between the resistance value and temperature of PT100 platinum resistance is(13)RT=R01+AT+BT2+Ct−100T3,0≤T≤850°C.In the above formula,R0 is the resistance value of PT100 under 0°C, the standard resistance value is R0=100Ω, RT is the resistance value of PT100 under T°C, T is the temperature in degrees Celsius, and the coefficient is
(14)A=3.9083×10−3,B=−5.775×10−7,C=0,t≥0°C,−4.183×10−3,t<0°C.There is not a linear relationship between the resistance of platinum resistance and temperature. When the control requirements of the system are not very high, it can be approximated as a linear relationship. The relationship between resistance and temperature of platinum resistance can be approximated as(15)RT=R01+AT.PT100 platinum resistors are generally divided into two-wire and three-wire connection modes in the circuit. In the two-wire connection mode, the wire resistance is connected in series with the PT100, which increases the resistance value of the wire in the circuit and increases the overall resistance value, which will increase the error of the measurement result; the three-wire connection mode adds an extra to the PT100 circuit A wire with the same electrical characteristics which can well compensate the wire resistance and eliminate the influence of the resistance on the wire on the measurement result.The circuit uses a three-terminal adjustable shunt regulator TL431 chip to adjust the bridge reference voltage. The internal reference voltage of TL431 is 2.5 V, and the output voltage can be configured to any voltage value betweenVref (about 2.5 V) and 36 V through an external resistor. As a high-performance voltage reference device, it is widely used in various power circuits. In the bridge temperature measurement circuit, R64,R65,R60PT100,VR61 constitutes the measurement bridge, where R64=R65, and VR61 is the adjustable precision resistances of 100Ω. LM324 is a four-channel independent operational amplifier with internal frequency compensation. It can be powered by a single power supply with a power supply range of 3~30 V. It has the characteristics of low power consumption and linear compensation.In the above circuit, the reference voltage at the upper end ofVR60 and the reference voltage at the upper end of UREF can be adjusted by adjusting the resistor VR60. R1 represents the resistance value at the upper end of the resistor VR60, and R2 represents the resistance value at the lower end of the resistor VR60. Then, the calculation formula of the reference voltage UREF is
(16)UREF=2.5×1+R1R2.In the measurement bridge, if the resistance value of PT100 is different from the resistance value ofVR61 in the bridge, a voltage difference signal will be output. The calculation formula of the voltage difference signal UVIA is
(17)UVIA=R65RVR64−R64RPT100R64+R65RVR61+RPT100UREF.Because the pressure difference signal output by the resistance bridge is small due to the direct change of the resistance of the PT100, it cannot be directly applied to the interface of the single-chip microcomputer. Therefore, the input voltage difference signal is converted into a voltage signal of a desired magnitude through an operational amplifier, and the output signal can be directly sent to the ADC channel of the single-chip microcomputer for signal measurement. IfR66=R69,R63=R70 in the differential amplifier circuit in the above figure, the magnification of the circuit is determined by the resistance values of resistors R63 and R66, and the magnification is R63/R66. Then, it goes through a first-level operational amplifier circuit to enhance the driving ability of the signal, and the magnification is R61+R62/R61. In order to reduce the noise and interference of the output signal, the accuracy of measuring the output signal is improved. For the signal UTEMP input to the single-chip microcomputer, in order to reduce the noise and interference of the output signal, the accuracy of measuring the output signal is improved. For the signals R67 and R61 input to the single-chip microcomputer, an RC filter circuit is formed to further filter the noise signal in the signal, and the Zener diode D60 prevents the voltage input to the single-chip microcomputer from being too high and burning the pins of the single-chip microcomputer.Through the design and analysis of the PT100 three-wire resistance bridge circuit, the relationship between the signalUTEMP input to the ADC channel of the single-chip microcomputer and the resistance value of PT100 can be obtained as follows:
(18)UTEMP=1+R62R61R63R66R65RVR61−R64RPT100R64+R65RVR61+RPT100UREF.According to the relational expression between the output signalUTEMP and the resistance value of the PT100, the resistance value of the PT100 can be calculated through the collected UTEMP signal. After that, the relationship between the actual temperature of the air compressor body and the analog input signal is calculated through the relationship between the PT100 resistance value and the temperature.From the voltage signal input terminal, the 0-10 V voltage signal passes through a stage of reverse adder, where the input voltage signal is reduced to−R41/R42 times the original. Furthermore, the signal is converted into a positive voltage signal through an inverter with a one-stage amplification factor of 1. Therefore, the conversion expression of the input voltage signal is
(19)VADC=VIN×−R41R42×−1.From the input terminal of the current signal, the 4-20 mA current signal first passes through the sampling resistorR47 of 165Ω and forms a voltage drop signal of 0.66~3.3 V. The input terminal is connected to a TVS bidirectional transient suppression diode D40 to protect the input terminal interface from the inrush of static electricity. Then, after the signal passes through a voltage follower with a one-stage amplification factor of 1, the drive capability of the output signal is increased, and the signal is sent to the ADC channel of the single-chip microcomputer. Therefore, the conversion formula of the input current signal is
(20)VADC=IIN×R47.Because the converter reference voltage of the single-chip ADC adopts 3.3 V, in the voltage input signal, the resistance values of the resistorsR41 and R42 determine the voltage value finally output to the single-chip channel. In the input channel of the 0-10 V voltage signal, R41=1K,R42=3.09K is selected, and the output voltage is VADC=0~3.24V. In the input channel of the 4-20 mA current signal, R47=165Ω is selected and the output voltage is VADC=0.66~3.3V.The voltage transformer adopts ZMPT101B produced by Zeming Electronics. The ratio of the rated input current to the rated output current of the voltage transformer is 2 mA : 2 mA, and the linear voltage range reaches 0~1000 V. The two resistorsR32 and R35 in this circuit play the role of current limiting, and the current of the circuit is as follows:
(21)I=UVWR32+R35.When the current-limiting resistance isR32=100K,R35=100K and the bus voltage UVW in the circuit is 380 V, if the primary side current of the voltage transformer is I=1.9mA, then the secondary side current is also 1.9 mA. When the current passes through the sampling resistor R34, the voltage U2 on the secondary side is
(22)U2=I×R34.The output voltageUAD after the secondary side voltage U2 passes through the operational amplifier is
(23)UAD=U2×1+R29R28.When the resistance isR29=2K,R28=1K and the bus voltage UVW is 380 V, UAD=2.8557V is obtained by bringing the value into the above formula.


## 3.1. Least Squares Curve Fitting

### 3.1.1. The Principle of Least Squares

The basic principle of the least squares method is that the sum of the squares of the distance between the observation point and the estimated point is the minimum. Among them, the distance between the observation point and the estimated point is measured in the form of a square, so it is called a square. The minimum means to minimize the sum of squares of the distance between the estimated point and the observation point. For example, for the regression model shown in the following formula [21]:
(7)Y=fxθ+ε.If it is assumed thatx1,Y1,x2,Y2,⋯,xn,Yn is the collected observation point data, the following formula is used:
(8)Y^i=fx^iθ,to estimate Yi. In these formulas, x^i is the estimated value of xi, and the estimated value of point xi,Yi is x^i,Y^i. Then, the square of the distance between the observation point and the estimated point is as follows:
(9)xi−x∧i2+Yi−fx∧iθ2.Therefore, the core idea of the least squares method is to make the least squares estimator as shown in the following formula:(10)Qθ=∑i=1Nxi−x∧i2+∑i=1NYi−fx∧iθ2.When it is the smallest, the parameter value is evaluated. In special cases, when eachxi and the corresponding estimated value are equal, that is, xi=x^i, the estimator at this time is as follows [22]:
(11)Qθ=∑i=1NYi−fx∧iθ2.The parameters when the minimum is reached.


### 3.1.2. Least Squares Method Is Used for Curve Fitting

When conducting scientific experiments, it is necessary to record experimental data, but even the most sophisticated instruments will have measurement errors, and accidental errors are inevitable. The experimental data on the two-dimensional plane is embodied as some discrete points. If you want to study the possible change trend of the data, you can study based on these discrete points on the plane and finally obtain the statistical merger effect. A curve that can reflect the data distribution and development trend can be combined, and the least squares method can be used to obtain the fitted polynomial, so as to describe the experimental data more closely. It is very common to use the least squares method for curve fitting. If a set of unrelated experimental dataxi,yi,i=0,1,2,3,⋯,n is obtained during a certain scientific experiment, a polynomial is sought, that is, a functional relationship Y=Fx between the independent variable xi and the dependent variable yi is found to reflect the possible development trend of the experimental data. However, in the course of the experiment, since the error is difficult to avoid, it is impossible to expect all the experimental data points to fall on the function curve Y=Fx.Therefore, we can only require the error
(12)δi=Fxi−yi,i=0,1,2,3,⋯,n,at a given point xi is the smallest according to a certain agreed standard, which is recorded as δ=δ0,δ1,⋯,δn. If the range δ of the vector δ is required to be the smallest, that is to say, for a set of experimental data xi,yi,i=0,1,2,3,⋯,n, it is required to find a function in the set of functions to meet the minimum sum of squares of the error. This is the basic principle of the least squares method. This also shows that the least squares theory can be well applied to curve fitting. In the research of this subject, the nonlinear curve fitting in least squares curve fitting is used. In the MATLAB environment, the polyfit function is used for curve fitting [23].In the air compressor control system, the body temperature of the air compressor is an important parameter index. According to the requirements of this system, it is necessary to collect the body temperature of the air compressor in real time and use this as the input reference value for the alarm and control output of the control system. The measurement range required for the temperature of the air compressor body is that the minimum temperature that can be distinguished. PT100 is used as a temperature sensor, and the temperature signal is converted into a standard analog signal through a temperature conditioning circuit, and then, the signal is collected by an AD converter. Filtering and conversion realize the acquisition and control of the temperature of the air compressor body.Figure1 shows the system structure diagram of the temperature acquisition and conditioning circuit [24].Figure 1
System structure diagram of temperature acquisition and conditioning circuit.The working principle of the PT100 platinum resistance temperature sensor is to use the temperature heating effect of platinum resistance to measure. When the temperature changes, the resistance of the platinum resistor will also change. Moreover, the resistance value of the resistor has a certain relationship with the temperature. According to the relationship expression between temperature and resistance, the resistance value of the resistance can be converted into the corresponding temperature value. The relationship between the resistance value and temperature of PT100 platinum resistance is(13)RT=R01+AT+BT2+Ct−100T3,0≤T≤850°C.In the above formula,R0 is the resistance value of PT100 under 0°C, the standard resistance value is R0=100Ω, RT is the resistance value of PT100 under T°C, T is the temperature in degrees Celsius, and the coefficient is
(14)A=3.9083×10−3,B=−5.775×10−7,C=0,t≥0°C,−4.183×10−3,t<0°C.There is not a linear relationship between the resistance of platinum resistance and temperature. When the control requirements of the system are not very high, it can be approximated as a linear relationship. The relationship between resistance and temperature of platinum resistance can be approximated as(15)RT=R01+AT.PT100 platinum resistors are generally divided into two-wire and three-wire connection modes in the circuit. In the two-wire connection mode, the wire resistance is connected in series with the PT100, which increases the resistance value of the wire in the circuit and increases the overall resistance value, which will increase the error of the measurement result; the three-wire connection mode adds an extra to the PT100 circuit A wire with the same electrical characteristics which can well compensate the wire resistance and eliminate the influence of the resistance on the wire on the measurement result.The circuit uses a three-terminal adjustable shunt regulator TL431 chip to adjust the bridge reference voltage. The internal reference voltage of TL431 is 2.5 V, and the output voltage can be configured to any voltage value betweenVref (about 2.5 V) and 36 V through an external resistor. As a high-performance voltage reference device, it is widely used in various power circuits. In the bridge temperature measurement circuit, R64,R65,R60PT100,VR61 constitutes the measurement bridge, where R64=R65, and VR61 is the adjustable precision resistances of 100Ω. LM324 is a four-channel independent operational amplifier with internal frequency compensation. It can be powered by a single power supply with a power supply range of 3~30 V. It has the characteristics of low power consumption and linear compensation.In the above circuit, the reference voltage at the upper end ofVR60 and the reference voltage at the upper end of UREF can be adjusted by adjusting the resistor VR60. R1 represents the resistance value at the upper end of the resistor VR60, and R2 represents the resistance value at the lower end of the resistor VR60. Then, the calculation formula of the reference voltage UREF is
(16)UREF=2.5×1+R1R2.In the measurement bridge, if the resistance value of PT100 is different from the resistance value ofVR61 in the bridge, a voltage difference signal will be output. The calculation formula of the voltage difference signal UVIA is
(17)UVIA=R65RVR64−R64RPT100R64+R65RVR61+RPT100UREF.Because the pressure difference signal output by the resistance bridge is small due to the direct change of the resistance of the PT100, it cannot be directly applied to the interface of the single-chip microcomputer. Therefore, the input voltage difference signal is converted into a voltage signal of a desired magnitude through an operational amplifier, and the output signal can be directly sent to the ADC channel of the single-chip microcomputer for signal measurement. IfR66=R69,R63=R70 in the differential amplifier circuit in the above figure, the magnification of the circuit is determined by the resistance values of resistors R63 and R66, and the magnification is R63/R66. Then, it goes through a first-level operational amplifier circuit to enhance the driving ability of the signal, and the magnification is R61+R62/R61. In order to reduce the noise and interference of the output signal, the accuracy of measuring the output signal is improved. For the signal UTEMP input to the single-chip microcomputer, in order to reduce the noise and interference of the output signal, the accuracy of measuring the output signal is improved. For the signals R67 and R61 input to the single-chip microcomputer, an RC filter circuit is formed to further filter the noise signal in the signal, and the Zener diode D60 prevents the voltage input to the single-chip microcomputer from being too high and burning the pins of the single-chip microcomputer.Through the design and analysis of the PT100 three-wire resistance bridge circuit, the relationship between the signalUTEMP input to the ADC channel of the single-chip microcomputer and the resistance value of PT100 can be obtained as follows:
(18)UTEMP=1+R62R61R63R66R65RVR61−R64RPT100R64+R65RVR61+RPT100UREF.According to the relational expression between the output signalUTEMP and the resistance value of the PT100, the resistance value of the PT100 can be calculated through the collected UTEMP signal. After that, the relationship between the actual temperature of the air compressor body and the analog input signal is calculated through the relationship between the PT100 resistance value and the temperature.From the voltage signal input terminal, the 0-10 V voltage signal passes through a stage of reverse adder, where the input voltage signal is reduced to−R41/R42 times the original. Furthermore, the signal is converted into a positive voltage signal through an inverter with a one-stage amplification factor of 1. Therefore, the conversion expression of the input voltage signal is
(19)VADC=VIN×−R41R42×−1.From the input terminal of the current signal, the 4-20 mA current signal first passes through the sampling resistorR47 of 165Ω and forms a voltage drop signal of 0.66~3.3 V. The input terminal is connected to a TVS bidirectional transient suppression diode D40 to protect the input terminal interface from the inrush of static electricity. Then, after the signal passes through a voltage follower with a one-stage amplification factor of 1, the drive capability of the output signal is increased, and the signal is sent to the ADC channel of the single-chip microcomputer. Therefore, the conversion formula of the input current signal is
(20)VADC=IIN×R47.Because the converter reference voltage of the single-chip ADC adopts 3.3 V, in the voltage input signal, the resistance values of the resistorsR41 and R42 determine the voltage value finally output to the single-chip channel. In the input channel of the 0-10 V voltage signal, R41=1K,R42=3.09K is selected, and the output voltage is VADC=0~3.24V. In the input channel of the 4-20 mA current signal, R47=165Ω is selected and the output voltage is VADC=0.66~3.3V.The voltage transformer adopts ZMPT101B produced by Zeming Electronics. The ratio of the rated input current to the rated output current of the voltage transformer is 2 mA : 2 mA, and the linear voltage range reaches 0~1000 V. The two resistorsR32 and R35 in this circuit play the role of current limiting, and the current of the circuit is as follows:
(21)I=UVWR32+R35.When the current-limiting resistance isR32=100K,R35=100K and the bus voltage UVW in the circuit is 380 V, if the primary side current of the voltage transformer is I=1.9mA, then the secondary side current is also 1.9 mA. When the current passes through the sampling resistor R34, the voltage U2 on the secondary side is
(22)U2=I×R34.The output voltageUAD after the secondary side voltage U2 passes through the operational amplifier is
(23)UAD=U2×1+R29R28.When the resistance isR29=2K,R28=1K and the bus voltage UVW is 380 V, UAD=2.8557V is obtained by bringing the value into the above formula.


## 3.1.1. The Principle of Least Squares

The basic principle of the least squares method is that the sum of the squares of the distance between the observation point and the estimated point is the minimum. Among them, the distance between the observation point and the estimated point is measured in the form of a square, so it is called a square. The minimum means to minimize the sum of squares of the distance between the estimated point and the observation point. For example, for the regression model shown in the following formula [21]:
(7)Y=fxθ+ε.If it is assumed thatx1,Y1,x2,Y2,⋯,xn,Yn is the collected observation point data, the following formula is used:
(8)Y^i=fx^iθ,to estimate Yi. In these formulas, x^i is the estimated value of xi, and the estimated value of point xi,Yi is x^i,Y^i. Then, the square of the distance between the observation point and the estimated point is as follows:
(9)xi−x∧i2+Yi−fx∧iθ2.Therefore, the core idea of the least squares method is to make the least squares estimator as shown in the following formula:(10)Qθ=∑i=1Nxi−x∧i2+∑i=1NYi−fx∧iθ2.When it is the smallest, the parameter value is evaluated. In special cases, when eachxi and the corresponding estimated value are equal, that is, xi=x^i, the estimator at this time is as follows [22]:
(11)Qθ=∑i=1NYi−fx∧iθ2.The parameters when the minimum is reached.


## 3.1.2. Least Squares Method Is Used for Curve Fitting

When conducting scientific experiments, it is necessary to record experimental data, but even the most sophisticated instruments will have measurement errors, and accidental errors are inevitable. The experimental data on the two-dimensional plane is embodied as some discrete points. If you want to study the possible change trend of the data, you can study based on these discrete points on the plane and finally obtain the statistical merger effect. A curve that can reflect the data distribution and development trend can be combined, and the least squares method can be used to obtain the fitted polynomial, so as to describe the experimental data more closely. It is very common to use the least squares method for curve fitting. If a set of unrelated experimental dataxi,yi,i=0,1,2,3,⋯,n is obtained during a certain scientific experiment, a polynomial is sought, that is, a functional relationship Y=Fx between the independent variable xi and the dependent variable yi is found to reflect the possible development trend of the experimental data. However, in the course of the experiment, since the error is difficult to avoid, it is impossible to expect all the experimental data points to fall on the function curve Y=Fx.Therefore, we can only require the error
(12)δi=Fxi−yi,i=0,1,2,3,⋯,n,at a given point xi is the smallest according to a certain agreed standard, which is recorded as δ=δ0,δ1,⋯,δn. If the range δ of the vector δ is required to be the smallest, that is to say, for a set of experimental data xi,yi,i=0,1,2,3,⋯,n, it is required to find a function in the set of functions to meet the minimum sum of squares of the error. This is the basic principle of the least squares method. This also shows that the least squares theory can be well applied to curve fitting. In the research of this subject, the nonlinear curve fitting in least squares curve fitting is used. In the MATLAB environment, the polyfit function is used for curve fitting [23].In the air compressor control system, the body temperature of the air compressor is an important parameter index. According to the requirements of this system, it is necessary to collect the body temperature of the air compressor in real time and use this as the input reference value for the alarm and control output of the control system. The measurement range required for the temperature of the air compressor body is that the minimum temperature that can be distinguished. PT100 is used as a temperature sensor, and the temperature signal is converted into a standard analog signal through a temperature conditioning circuit, and then, the signal is collected by an AD converter. Filtering and conversion realize the acquisition and control of the temperature of the air compressor body.Figure1 shows the system structure diagram of the temperature acquisition and conditioning circuit [24].Figure 1
System structure diagram of temperature acquisition and conditioning circuit.The working principle of the PT100 platinum resistance temperature sensor is to use the temperature heating effect of platinum resistance to measure. When the temperature changes, the resistance of the platinum resistor will also change. Moreover, the resistance value of the resistor has a certain relationship with the temperature. According to the relationship expression between temperature and resistance, the resistance value of the resistance can be converted into the corresponding temperature value. The relationship between the resistance value and temperature of PT100 platinum resistance is(13)RT=R01+AT+BT2+Ct−100T3,0≤T≤850°C.In the above formula,R0 is the resistance value of PT100 under 0°C, the standard resistance value is R0=100Ω, RT is the resistance value of PT100 under T°C, T is the temperature in degrees Celsius, and the coefficient is
(14)A=3.9083×10−3,B=−5.775×10−7,C=0,t≥0°C,−4.183×10−3,t<0°C.There is not a linear relationship between the resistance of platinum resistance and temperature. When the control requirements of the system are not very high, it can be approximated as a linear relationship. The relationship between resistance and temperature of platinum resistance can be approximated as(15)RT=R01+AT.PT100 platinum resistors are generally divided into two-wire and three-wire connection modes in the circuit. In the two-wire connection mode, the wire resistance is connected in series with the PT100, which increases the resistance value of the wire in the circuit and increases the overall resistance value, which will increase the error of the measurement result; the three-wire connection mode adds an extra to the PT100 circuit A wire with the same electrical characteristics which can well compensate the wire resistance and eliminate the influence of the resistance on the wire on the measurement result.The circuit uses a three-terminal adjustable shunt regulator TL431 chip to adjust the bridge reference voltage. The internal reference voltage of TL431 is 2.5 V, and the output voltage can be configured to any voltage value betweenVref (about 2.5 V) and 36 V through an external resistor. As a high-performance voltage reference device, it is widely used in various power circuits. In the bridge temperature measurement circuit, R64,R65,R60PT100,VR61 constitutes the measurement bridge, where R64=R65, and VR61 is the adjustable precision resistances of 100Ω. LM324 is a four-channel independent operational amplifier with internal frequency compensation. It can be powered by a single power supply with a power supply range of 3~30 V. It has the characteristics of low power consumption and linear compensation.In the above circuit, the reference voltage at the upper end ofVR60 and the reference voltage at the upper end of UREF can be adjusted by adjusting the resistor VR60. R1 represents the resistance value at the upper end of the resistor VR60, and R2 represents the resistance value at the lower end of the resistor VR60. Then, the calculation formula of the reference voltage UREF is
(16)UREF=2.5×1+R1R2.In the measurement bridge, if the resistance value of PT100 is different from the resistance value ofVR61 in the bridge, a voltage difference signal will be output. The calculation formula of the voltage difference signal UVIA is
(17)UVIA=R65RVR64−R64RPT100R64+R65RVR61+RPT100UREF.Because the pressure difference signal output by the resistance bridge is small due to the direct change of the resistance of the PT100, it cannot be directly applied to the interface of the single-chip microcomputer. Therefore, the input voltage difference signal is converted into a voltage signal of a desired magnitude through an operational amplifier, and the output signal can be directly sent to the ADC channel of the single-chip microcomputer for signal measurement. IfR66=R69,R63=R70 in the differential amplifier circuit in the above figure, the magnification of the circuit is determined by the resistance values of resistors R63 and R66, and the magnification is R63/R66. Then, it goes through a first-level operational amplifier circuit to enhance the driving ability of the signal, and the magnification is R61+R62/R61. In order to reduce the noise and interference of the output signal, the accuracy of measuring the output signal is improved. For the signal UTEMP input to the single-chip microcomputer, in order to reduce the noise and interference of the output signal, the accuracy of measuring the output signal is improved. For the signals R67 and R61 input to the single-chip microcomputer, an RC filter circuit is formed to further filter the noise signal in the signal, and the Zener diode D60 prevents the voltage input to the single-chip microcomputer from being too high and burning the pins of the single-chip microcomputer.Through the design and analysis of the PT100 three-wire resistance bridge circuit, the relationship between the signalUTEMP input to the ADC channel of the single-chip microcomputer and the resistance value of PT100 can be obtained as follows:
(18)UTEMP=1+R62R61R63R66R65RVR61−R64RPT100R64+R65RVR61+RPT100UREF.According to the relational expression between the output signalUTEMP and the resistance value of the PT100, the resistance value of the PT100 can be calculated through the collected UTEMP signal. After that, the relationship between the actual temperature of the air compressor body and the analog input signal is calculated through the relationship between the PT100 resistance value and the temperature.From the voltage signal input terminal, the 0-10 V voltage signal passes through a stage of reverse adder, where the input voltage signal is reduced to−R41/R42 times the original. Furthermore, the signal is converted into a positive voltage signal through an inverter with a one-stage amplification factor of 1. Therefore, the conversion expression of the input voltage signal is
(19)VADC=VIN×−R41R42×−1.From the input terminal of the current signal, the 4-20 mA current signal first passes through the sampling resistorR47 of 165Ω and forms a voltage drop signal of 0.66~3.3 V. The input terminal is connected to a TVS bidirectional transient suppression diode D40 to protect the input terminal interface from the inrush of static electricity. Then, after the signal passes through a voltage follower with a one-stage amplification factor of 1, the drive capability of the output signal is increased, and the signal is sent to the ADC channel of the single-chip microcomputer. Therefore, the conversion formula of the input current signal is
(20)VADC=IIN×R47.Because the converter reference voltage of the single-chip ADC adopts 3.3 V, in the voltage input signal, the resistance values of the resistorsR41 and R42 determine the voltage value finally output to the single-chip channel. In the input channel of the 0-10 V voltage signal, R41=1K,R42=3.09K is selected, and the output voltage is VADC=0~3.24V. In the input channel of the 4-20 mA current signal, R47=165Ω is selected and the output voltage is VADC=0.66~3.3V.The voltage transformer adopts ZMPT101B produced by Zeming Electronics. The ratio of the rated input current to the rated output current of the voltage transformer is 2 mA : 2 mA, and the linear voltage range reaches 0~1000 V. The two resistorsR32 and R35 in this circuit play the role of current limiting, and the current of the circuit is as follows:
(21)I=UVWR32+R35.When the current-limiting resistance isR32=100K,R35=100K and the bus voltage UVW in the circuit is 380 V, if the primary side current of the voltage transformer is I=1.9mA, then the secondary side current is also 1.9 mA. When the current passes through the sampling resistor R34, the voltage U2 on the secondary side is
(22)U2=I×R34.The output voltageUAD after the secondary side voltage U2 passes through the operational amplifier is
(23)UAD=U2×1+R29R28.When the resistance isR29=2K,R28=1K and the bus voltage UVW is 380 V, UAD=2.8557V is obtained by bringing the value into the above formula.


## 4. Electrical Control Online Monitoring System Based on the Internet of Things

According to the three-tier architecture of the Internet of Things, this paper comprehensively uses the technologies related to the Internet of Things to design and develop the perception layer, transmission layer, and application layer. The sensing layer uses STM32 as the host, and the NDIR sensor is used as the monitoring probe for the monitoring. The data transmission module selects the GPPRS communication network for data transmission and reserves a variety of communication interfaces to facilitate the access of other products.The specific system structure diagram is shown in Figure2.Figure 2
System architecture.The high-level design of the database system helps reduce data redundancy and facilitates data storage, processing, and access. The design of the configuration software database system of the electrical equipment Internet of Things system includes the design of the real-time database and the design of the historical database. In general, it includes three stages: demand analysis, logical structure design, and physical realization.When the monitored value reaches the alarm threshold, the audible and visual alarm is activated to remind relevant personnel to take protective measures to ensure the safety of equipment operation. The online monitoring device mainly includes a monitoring host, a gas detection unit, an alarm unit, a human body infrared sensor, and a fan. Figure3 shows the structure of the perception layer.Figure 3
Structure diagram of the perception layer.The multichannel control unit realizes the detection of multiple monitoring points through the connection of the relay and the solenoid valve. This device uses an electronic flow control meter for gas distribution, and a high-precision electronic flow controller. Figure4 is a schematic diagram of a multichannel controller.Figure 4
Schematic diagram of a multichannel controller.When the system enters normal operation, the program starts to read the sampled values of each module, then performs data processing on the sampled values through the A/D port, and stores the data in the storage module of the monitoring host. The software flow chart is shown in Figure5.Figure 5
Flow chart of software.In machine learning, the role of the classifier is to determine the category of a new observation sample based on the training data of the labeled category. The classifier can be divided into unsupervised learning and supervised learning according to the way of learning. Unsupervised learning, as the name implies, refers to the samples given to the classifier to learn but without corresponding category labels, mainly to find hidden structures in unlabeled data. Supervised learning infers the classification function through the labeled training data, and the classification function can be used to map the new sample to the corresponding label. The device access server includes all the services and software related to the WEB module and is connected through API access services and news subscription publishing services. It mainly includes four parts: equipment authentication service, data publishing service, equipment connection management service, and equipment connection management WEB service. Figure6 shows the architecture diagram of the device access server.Figure 6
Architecture diagram of the device access server.Data monitoring and data transmission are carried out through machine vision combined with IoT nodes, so this article builds the model on this basis.It is also one of the key technologies for system software decoupling and is an important part of connecting basic data and storage services in the cloud platform. Through the API interface module, users can directly call the real-time data measured by various sensors in the basic platform through the API interface, call the historical data stored in the database, and control the terminal actuator to perform actions through the API interface. Provide interface services for WEB-side software development based on the Internet of Things. The system structure design is designed and analyzed from the three-tier architecture of the Internet of Things, which mainly includes three levels of design. One is the perception layer: SF6 online monitoring and alarm device with automatic comparison function and remote calibration function, and the second is the transmission layer: a data communication module capable of data transmission and storage. The third is the application layer, which is also the focus of this paper: develop an application platform that supports information monitoring and early warning and data visualization. In order to realize the real-time monitoring of gases in the environment of various substations, the operation status of the gas online leak detection and alarm system is monitored, compared, calibrated, and decision-making. Support to provide technical support.Figure7 shows the architecture diagram of the API interface service subsystem.Figure 7
Architecture diagram of API interface service subsystem.The application layer develops cloud platform modules and WEB application modules and develops PC-side applications according to application requirements. According to the three-tier architecture of the Internet of Things, this article comprehensively uses the technologies related to the Internet of Things to design and develop the perception layer, transmission layer, and application layer.The IPC software and the server software are the same set of software, so the server can be synchronized with the IPC or the lower server. In theory, the level of servers can be unlimited. The software deployment situation is shown in Figure8.Figure 8
The deployment diagram of the upper computer software.


## 5. Performance Analysis of the Electrical Control Online Monitoring System Based on the Internet of Things

After constructing the system, this paper evaluates the performance of the electrical control online monitoring system based on the Internet of Things constructed above. This paper simulates the electrical control scenario to study the effectiveness of the system and evaluates the abnormal problem mechanism of the electrical control online monitoring system. The results are shown in Table1 and Figure 9.Table 1
Statistical table of evaluation of abnormal problem mechanism of electrical control online monitoring system based on the Internet of Things.
NumAbnormal problem mechanism evaluationNumAbnormal problem mechanism evaluationNumAbnormal problem mechanism evaluation188.352789.485388.93284.342887.755483.35382.722982.515590.21486.083086.195688.41591.643187.545791.11683.973285.125883.36788.773383.945987.56891.883487.006082.00991.683583.876183.711089.493686.766282.591190.203791.836381.311285.433889.526483.201381.503985.696585.161481.804086.716681.801591.324187.416791.291686.314283.126885.321783.354384.226983.561881.514487.507089.501986.034587.527190.412089.624681.777287.382182.584782.357387.032282.444885.727489.902390.384985.297583.762491.405085.827685.012585.075181.247783.292682.845284.667887.36Figure 9
Statistical diagram of evaluation of abnormal problem mechanism of electrical control online monitoring system based on the Internet of Things.From the analysis results of the above charts, it can be seen that the abnormal problem mechanism of the electrical control online monitoring system based on the Internet of Things constructed in this paper is very effective, and the system can effectively find abnormal problems in the electrical system. On this basis, by simulating 100 sets of data, this paper conducts system stability analysis and obtains the effective data among them for statistics. The results are shown in Table2 and Figure 10.Table 2
Statistical table of system stability.
NumSystem stabilityNumSystem stabilityNumSystem stability194.152788.245385.51289.782891.515485.04388.652994.785591.41488.913090.805690.67585.123194.015785.50689.443291.085886.78793.133387.205986.38891.033485.846092.50982.833583.156189.911084.363689.556286.601193.593789.296394.271284.493894.986487.251392.743991.916587.891485.684084.816684.761588.854183.096794.791684.504289.006884.771793.254382.866988.021884.864490.067093.021988.134584.087186.592094.864684.737290.052187.114784.597382.122285.924893.997489.152383.914994.777594.772484.875092.037690.522583.095186.827790.032694.535292.667884.33Figure 10
Statistical diagram of system stability.From the above analysis, the system constructed in this paper has a certain effect and can basically meet the online monitoring needs of the electrical control system.


## 6. Conclusion

According to the three-tier architecture of the Internet of Things, this paper comprehensively uses the technologies related to the Internet of Things to design and develop the perception layer, transmission layer, and application layer. The sensing layer uses STM32 as the host, and the NDIR sensor is used as the monitoring probe for the monitoring. The data transmission module selects the GPPRS communication network for data transmission and reserves a variety of communication interfaces to facilitate the access of other products. The application layer develops cloud platform modules and WEB application modules and develops PC-side applications according to application requirements. According to the three-tier architecture of the Internet of Things, comprehensively use the technologies related to the Internet of Things to design and develop the perception layer, transmission layer, and application layer. Design experiments to test the performance of the system constructed in this paper. Research shows that the online monitoring system of the Internet of Things constructed in this paper meets the needs of intelligent monitoring of electrical control systems.



---

*Source: 2156529-2021-07-01.xml*