# A WeChat-Based System of Real-Time Monitoring and Alarming for Power Grid Operation Status under Virtual Private Cloud Environment

Authors: Chunjie Lian; Hua Wei; Xiaoqing Bai; Zhongliang Lyu
Journal: Complexity
 (2020)

---

## Abstract

The existing power grid alarm system using SMS (SMSAS) is complex and suffers some problems such as high latency in data transmission, low reliability, and poor economy. For solving these problems, this paper proposes a WeChat-based system under the virtual private cloud environment to achieve real-time monitoring and alarming for the power grid operation status (WMAS). For WMAS, the WeChat mini program (WMP) is adopted, and it has the dedicated data channel using the Https protocol, which is set up in the WMP and the web API to encrypt the data content to ensure the integrity of the data. Combined with virtual private cloud technology, the hardware resources are virtualized, and the proposed system has strong disaster recovery capability, which significantly improves the flexibility and reliability of the system. Compared with SMSAS, our simulation shows that the time from sending to receiving the information in the proposed system is reduced from 4.9 seconds to 172 milliseconds, with the latency reduced by 28 times. On the contrary, the reliability of the proposed system is as high as 99.9971%, and the annual failure time is 15.24 minutes, which is 380 times lower than 96.51 hours of the SMSAS. The proposed system has been implemented in the Lipu power system in Guangxi, China. More than one year of stable operation indicates that the proposed system is safe, reliable, flexible, and convenient with a bright prospect for future applications.


---

## Body

## 1. Introduction

Currently, the smart grid has become the future development direction of the power industry [1]. As an essential part of the smart grid, the power grid alarm system (PGAS) is used as advice to system operators relating to problematic operating conditions [2]. Moreover, the operators that run the controlled process can utilize the provided information to make corrective actions [3]. However, with the increasing amount of the information in the power grid and the continuous popularization of mobile technology [4], the operation and monitoring of the power grid is developing towards informatization [5]. The existing PGAS is challenging to cope with the increasingly complex power grid in terms of real-time transmission and reliability in the future. Given the above problems, relevant scholars have carried out a series of studies.In [6], the fuzzy matching method, single-event reasoning, and multievent reasoning methods are used for reasoning and judging the alarm information. In [7], abductive temporal reasoning algorithms are used for rapid identification and classification of the alarm information such as break alarms, exception alarms, and missing alarms, which have achieved good results. Based on the temporal constraint network, a new analytic model is developed for alarm processing with temporal information being taken into account in [8]. The function of the analysis module is to find out what events cause the reported alarms and to estimate when these events happen and identify abnormal or missing alarms. In [9], an online intelligent alarm-processing system is developed which could determine not only the fault or disturbance cause but also the missing or false alarms as well as the causes of the false alarms. In [10, 11], the specific alarm system is adopted to the wind turbine and the UHV DC transmission. And in [12, 13], a rigorous anomaly detection scheme and a method to design the alarm deadband width are proposed. However, the systems and methods proposed in the above references are all running on local servers, subject to geographical factors and hardware and software architectures, so these systems and methods are difficult to adapt to the future development needs of the smart grid. Besides, most of the wireless communication applications of the power grid are based on the Short Messaging Service (SMS [14]) transmission protocol. For instance, the authors in [15] have built a system to acquire the remote electrical signals from distribution transformers such as voltage, current, power, and temperature and send these values to a monitoring node via SMS. The system provides a solid basis for load forecasting and fault repairing, but there are inevitable intermittent delays. In [16], the problem that the simultaneous charging of a large number of plug-in electric vehicles [17] will cause the grid to be overloaded at certain times of the day is given. The SMS is used to realize the intelligent control of the power grid when the plug-in electric vehicle is charged, which is economical and practical. However, the short message delivery is performed on a best-effort basis, and no quality of service (QoS [18, 19]) agreement is given. When the network is overloaded or blocked, the network cannot be operated efficiently. In other words, it cannot ensure how long it takes for the message to reach the recipient, and it cannot ensure whether the message has been successfully delivered [20]. In summary, the traditional PGAS running on local servers has limitations. The SMSAS using SMS has a short life cycle. The mobile application of the PGAS urgently needs a new solution, and the WMP emerges at a historic moment. The WMP belongs to the WeChat ecosystem. WeChat is the most significant social software in China, similar to Facebook in the United States. As of the fourth quarter of 2018, WeChat covered more than 94% of smartphones in China, with 1,098.8 million monthly active users, including more than 200 countries and more than 20 languages [21]. WeChat has a significant influence in China.In recent years, in the field of the power system, the application research of cloud computing technology is also underway. Integrating the smart grid into cloud computing has a bright prospect for future applications [22]. The authors of [23–25] proposed three corresponding solutions based on cloud computing technology to solve the severe challenge of the smart grid in big data processing and achieved excellent results. Yang et al. [26] proposed a virtual private cloud-based power dispatching automation system (VPC-PDAS) and put it into operation in the actual power system. The results show that the system is safe, reliable, and economical. Ma et al. [27] mentioned that ISO New England (ISO-NE) initiated a pilot project to explore the feasibility and implementation of cloud computing for the power system simulation. Research indicates that cloud computing can meet various computing needs in power system planning in a highly reliable, flexible, and convenient way without compromising cybersecurity and data privacy.Accordingly, this paper presents a WeChat-based system of real-time monitoring and alarming for the power grid operation status under the virtual private cloud environment based on real-time power data and combining mobile technology with cloud computing technology.The contributions are threefold:(1)
This paper proposes a new architecture of the PGAS based on WeChat and cloud computing technology, which could remedy those drawbacks of the existing PGAS based on SMS: high latency in data transmission, low reliability, and poor economy.(2)
The latency in data transmission and reliability of the proposed system and SMSAS are calculated and analyzed in detail. The results show that the annual failure time of the proposed system is 15.24 minutes, which is approximately 380 times lower than 96.51 hours under the SMSAS. And the latency in data transmission of the proposed system is 172 milliseconds, which is 28 times lower than 4.9 seconds under the SMSAS.(3)
To our knowledge, this is the first paper to apply WeChat which is the state-of-the-art social media platform to the power system. This paper provides a practical and effective solution for the mobile application of the complex system. And the proposed system has been applied to the actual industry and has a significant operation effect.The rest of this paper is organized as follows: Section2 describes the advantages of the WMP. In Section 3, the new architecture of the power grid alarm system based on WeChat and cloud computing technology is proposed, including architecture design and architecture contents. Section 4 calculates and analyzes the performance of the existing and the proposed system. Section 5 describes the implementation and advantages of the proposed system in detail and applies it in an actual power system. Finally, Section 6 concludes this paper.


## 2. Advantages of WeChat Mini Programs

At present, app types can be divided into web app, hybrid app, and native app. The native app has full functions and the best user experience [28]. Different from the native app, the WMP is a new lightweight application development mode, which uses JavaScript to implement logical functions and WXML and WXSS to jointly perform presentation layer functions. The WMP can be used without installation by using the components defined by itself. And the memory of the WMP is tiny. Each WMP does not exceed 1 MB, but it has a user experience that rivals or even surpasses that of the native app. Table 1 gives a comparison of the WMP and native app.Table 1
WMP vs. native app.
Properties
WMP
Native app
Programming language
JS/WXSS/WXML
Objective-C/java
Performance
High
High
Cost
Low
High
Productivity
Higher
High
Cross-platform
Enable
Unable
Eclipse RCP
Easy
Hard
Memory usage
Low
High
Development environment
Simple
ComplexTherefore, the advantages of the WMP can be summarized as follows:(1)
Cost-effective development and maintenance: the WMP has a short development cycle, less development workforce investment, no need to download and install, and a shorter marketing path. The cost of the WMP is lower than that of the native app. On the contrary, the version updates do not need to be downloaded and installed again. After developers submit the new version to the WeChat public platform for approval, version cloud push can be realized. Users can complete version updates by reloading the WMP.(2)
Cross-platform: the native app needs to develop multiple versions to adapt to different operating systems. In contrast, the WMP can adapt to various operating systems by developing only one version on the WeChat platform because the WMP can compile the corresponding runnable components of the relevant platform by using the components defined by itself.(3)
Occupying less memory: the WMP requires no installation and shares the memory with WeChat. The memory space occupied is neglected, which significantly compresses memory, liberates the mobile phone space, and improves the mobile phone performance.(4)
Protecting user privacy: the native app involves many behaviors that spy on user privacy, such as getting user SMS records, call logs, and address book lists. In contrast, the WMP does not have the behavior of spying on user privacy, which ensures the security of personal information, because the WMP runs on the WeChat platform and is restricted and regulated by WeChat.In conclusion, the WMP is superior to the native app and has incomparable advantages over other app types in terms of performance and security. In this paper, using the WMP as the client-side can solve a series of problems faced by the traditional alarm system to realize mobile applications.


## 3. The Contents of WMAS

In terms of the problems of traditional alarm systems, the WeChat-based system of real-time monitoring and alarming for the power grid operation status is proposed in this paper and applied to an actual power system. The framework of the proposed system is shown in Figure1.Figure 1
Framework of WMAS.As shown in Figure1, the proposed system architecture is divided into three parts: dispatching VPC, alarm WMP, and Internet communication mechanism.


### 3.1. Dispatching VPC

VPC is a secure, flexible, and high-performance cloud-based proprietary network. Users can quickly build an isolated private network environment on the cloud through the VPC to meet the requirements of high security. And the VPC has three remarkable characteristics:(i)
Network virtualization: the VPC can construct the virtual network on the basis of the physical network based on OverLay Technology.(ii)
Complete isolation between VPCs: the VXLAN protocol is used to isolate each VPC network. And the two-tier logic isolation between VPCs can be guaranteed, and communication cannot be carried out directly.(iii)
Customizable network environment: the VPC can customize the IP address range, network segment, routing table, and gateway to plan and manage the network on demand.Given the advantages of the VPC, the dispatching VPC is deployed with the app server of WMAS and the VPC-based power dispatching automation system (VPC-PDAS) proposed in reference [26]. WMAS inherits the security of VPC-PDAS and can meet the security protection requirements of the power grid. The alarm data of WMAS come from VPC-PDAS. The VPC-PDAS and alarm WMP client are connected through the dedicated data interface web API in WMAS to process and forward the relevant alarm data. Figure 2 shows the data interaction between web API, VPC-PDAS, and alarm WMP client.Figure 2
Relationship between API, VPC-PDAS, and WMP.As shown in Figure2, in the web API, the main body is the Http controller, and the controller performs real-time data interaction with the VPC-PDAS and filters and classifies the alarm information acquired from the VPC-PDAS. When the alarm WMP client initiates a data request to the controller in the Get method of the Http request method, the controller returns to the JSON [29] type of alarm data.


### 3.2. Alarm WMP Client

To design the alarm WMP client, MINA is adopted as the technical architecture of the WMP, and the functions of the WMP are implemented by modules and layers.


#### 3.2.1. The Technical Architecture of the Alarm WMP

MINA inherits from MVVM [30] (model-view-viewmodel) and has the advantages of low coupling, reusability, independent development, and page testability. As shown in Figure 3, MINA is divided into three parts: view layer, app service layer, and native layer.(i)
View layer: WXML and WXSS are the development languages of the view layer. The former builds the basic view structure of the page, and the latter controls the presentation style of the page. All the function pages presented to the users in WMP can be implemented at this layer, such as the user login page and alarm information display page.(ii)
App service layer: this is the service center of MINA. Using JavaScript, the page rendering, page interaction, and related data processing are realized by loading and running the asynchronous thread based on WeChat separately.(iii)
Native layer: this contains WeChat capability, file storage, network request, etc. and provides basic functional components for data management, network communication, application life cycle management, and page routing. JSBridge of the native layer is responsible for the connection between the view layer and the app service layer. The app service layer notifies the view layer of the data changes and triggers its page update; the view layer notifies the trigger of the event to the app service layer for business processing.Figure 3
Technical architecture of the WMP.


#### 3.2.2. Functional Modularity of the Alarm WMP

The alarm WMP is divided into four modules based on the MINA architecture, including WMP UI, network request module, business module, and data processing module. Furthermore, the alarm WMP also has global exception handling and permission control. Functional modularity of the alarm WMP is shown in Figure4.(i)
WMP UI: WXML, WXSS, and JavaScript are used and icons are combined appropriately to achieve the basic structure of the page.(ii)
Network request module: the web API and various interfaces of the WMP are used to initiate data requests by using the wx.request component of WeChat.(iii)
Business module: this is responsible for the display and management of the page of the alarm WMP, including user management, information time identification, timer, information cycle scroll display, information color display, and other business functions.(iv)
Data processing module: this is responsible for all basic data processing of the alarm WMP, such as power loss calculation, information disassembly and combination, local data reading and writing, and custom functions.(v)
Exception handling: this provides exception handling for the business module and data module, controls and processes illegal inputs in the program to prevent the occurrence of unknown errors, and makes the operation of the alarm WMP more stable.(vi)
Permission control: this provides more fine-grained permission control for the network request module, business module, and data processing module. Users only allow access to authorized resources, ensuring the security of the information.Figure 4
Module functions of the WMP.


#### 3.2.3. The Communication Mechanism of WMAS

The communication mechanism of WMAS is shown in Figure5.Figure 5
Communication mechanism of WMAS.As shown in Figure5, outside the alarm WMP, the communication of WMAS is divided into two parts:(1)
When the alarm WMP starts for the first time, an initialization request needs to be initiated to the CDN [31] (content delivery network), and the CDN will return the corresponding program packet to complete the download of resources.(2)
The alarm WMP communicates with the dispatching VPC through the SSLVPN [32] channel. In the SSLVPN, the alarm WMP initiates a network data request to the dispatching VPC through the wx.request component, and the web API returns the JSON data packet after capturing the network request.Inside the alarm WMP, JSBridge is used to communicate from the app service layer to the view layer in the way of one-way data binding, and from the view layer to the app service layer in the form of event binding.


## 3.1. Dispatching VPC

VPC is a secure, flexible, and high-performance cloud-based proprietary network. Users can quickly build an isolated private network environment on the cloud through the VPC to meet the requirements of high security. And the VPC has three remarkable characteristics:(i)
Network virtualization: the VPC can construct the virtual network on the basis of the physical network based on OverLay Technology.(ii)
Complete isolation between VPCs: the VXLAN protocol is used to isolate each VPC network. And the two-tier logic isolation between VPCs can be guaranteed, and communication cannot be carried out directly.(iii)
Customizable network environment: the VPC can customize the IP address range, network segment, routing table, and gateway to plan and manage the network on demand.Given the advantages of the VPC, the dispatching VPC is deployed with the app server of WMAS and the VPC-based power dispatching automation system (VPC-PDAS) proposed in reference [26]. WMAS inherits the security of VPC-PDAS and can meet the security protection requirements of the power grid. The alarm data of WMAS come from VPC-PDAS. The VPC-PDAS and alarm WMP client are connected through the dedicated data interface web API in WMAS to process and forward the relevant alarm data. Figure 2 shows the data interaction between web API, VPC-PDAS, and alarm WMP client.Figure 2
Relationship between API, VPC-PDAS, and WMP.As shown in Figure2, in the web API, the main body is the Http controller, and the controller performs real-time data interaction with the VPC-PDAS and filters and classifies the alarm information acquired from the VPC-PDAS. When the alarm WMP client initiates a data request to the controller in the Get method of the Http request method, the controller returns to the JSON [29] type of alarm data.


## 3.2. Alarm WMP Client

To design the alarm WMP client, MINA is adopted as the technical architecture of the WMP, and the functions of the WMP are implemented by modules and layers.


### 3.2.1. The Technical Architecture of the Alarm WMP

MINA inherits from MVVM [30] (model-view-viewmodel) and has the advantages of low coupling, reusability, independent development, and page testability. As shown in Figure 3, MINA is divided into three parts: view layer, app service layer, and native layer.(i)
View layer: WXML and WXSS are the development languages of the view layer. The former builds the basic view structure of the page, and the latter controls the presentation style of the page. All the function pages presented to the users in WMP can be implemented at this layer, such as the user login page and alarm information display page.(ii)
App service layer: this is the service center of MINA. Using JavaScript, the page rendering, page interaction, and related data processing are realized by loading and running the asynchronous thread based on WeChat separately.(iii)
Native layer: this contains WeChat capability, file storage, network request, etc. and provides basic functional components for data management, network communication, application life cycle management, and page routing. JSBridge of the native layer is responsible for the connection between the view layer and the app service layer. The app service layer notifies the view layer of the data changes and triggers its page update; the view layer notifies the trigger of the event to the app service layer for business processing.Figure 3
Technical architecture of the WMP.


### 3.2.2. Functional Modularity of the Alarm WMP

The alarm WMP is divided into four modules based on the MINA architecture, including WMP UI, network request module, business module, and data processing module. Furthermore, the alarm WMP also has global exception handling and permission control. Functional modularity of the alarm WMP is shown in Figure4.(i)
WMP UI: WXML, WXSS, and JavaScript are used and icons are combined appropriately to achieve the basic structure of the page.(ii)
Network request module: the web API and various interfaces of the WMP are used to initiate data requests by using the wx.request component of WeChat.(iii)
Business module: this is responsible for the display and management of the page of the alarm WMP, including user management, information time identification, timer, information cycle scroll display, information color display, and other business functions.(iv)
Data processing module: this is responsible for all basic data processing of the alarm WMP, such as power loss calculation, information disassembly and combination, local data reading and writing, and custom functions.(v)
Exception handling: this provides exception handling for the business module and data module, controls and processes illegal inputs in the program to prevent the occurrence of unknown errors, and makes the operation of the alarm WMP more stable.(vi)
Permission control: this provides more fine-grained permission control for the network request module, business module, and data processing module. Users only allow access to authorized resources, ensuring the security of the information.Figure 4
Module functions of the WMP.


### 3.2.3. The Communication Mechanism of WMAS

The communication mechanism of WMAS is shown in Figure5.Figure 5
Communication mechanism of WMAS.As shown in Figure5, outside the alarm WMP, the communication of WMAS is divided into two parts:(1)
When the alarm WMP starts for the first time, an initialization request needs to be initiated to the CDN [31] (content delivery network), and the CDN will return the corresponding program packet to complete the download of resources.(2)
The alarm WMP communicates with the dispatching VPC through the SSLVPN [32] channel. In the SSLVPN, the alarm WMP initiates a network data request to the dispatching VPC through the wx.request component, and the web API returns the JSON data packet after capturing the network request.Inside the alarm WMP, JSBridge is used to communicate from the app service layer to the view layer in the way of one-way data binding, and from the view layer to the app service layer in the form of event binding.


## 3.2.1. The Technical Architecture of the Alarm WMP

MINA inherits from MVVM [30] (model-view-viewmodel) and has the advantages of low coupling, reusability, independent development, and page testability. As shown in Figure 3, MINA is divided into three parts: view layer, app service layer, and native layer.(i)
View layer: WXML and WXSS are the development languages of the view layer. The former builds the basic view structure of the page, and the latter controls the presentation style of the page. All the function pages presented to the users in WMP can be implemented at this layer, such as the user login page and alarm information display page.(ii)
App service layer: this is the service center of MINA. Using JavaScript, the page rendering, page interaction, and related data processing are realized by loading and running the asynchronous thread based on WeChat separately.(iii)
Native layer: this contains WeChat capability, file storage, network request, etc. and provides basic functional components for data management, network communication, application life cycle management, and page routing. JSBridge of the native layer is responsible for the connection between the view layer and the app service layer. The app service layer notifies the view layer of the data changes and triggers its page update; the view layer notifies the trigger of the event to the app service layer for business processing.Figure 3
Technical architecture of the WMP.


## 3.2.2. Functional Modularity of the Alarm WMP

The alarm WMP is divided into four modules based on the MINA architecture, including WMP UI, network request module, business module, and data processing module. Furthermore, the alarm WMP also has global exception handling and permission control. Functional modularity of the alarm WMP is shown in Figure4.(i)
WMP UI: WXML, WXSS, and JavaScript are used and icons are combined appropriately to achieve the basic structure of the page.(ii)
Network request module: the web API and various interfaces of the WMP are used to initiate data requests by using the wx.request component of WeChat.(iii)
Business module: this is responsible for the display and management of the page of the alarm WMP, including user management, information time identification, timer, information cycle scroll display, information color display, and other business functions.(iv)
Data processing module: this is responsible for all basic data processing of the alarm WMP, such as power loss calculation, information disassembly and combination, local data reading and writing, and custom functions.(v)
Exception handling: this provides exception handling for the business module and data module, controls and processes illegal inputs in the program to prevent the occurrence of unknown errors, and makes the operation of the alarm WMP more stable.(vi)
Permission control: this provides more fine-grained permission control for the network request module, business module, and data processing module. Users only allow access to authorized resources, ensuring the security of the information.Figure 4
Module functions of the WMP.


## 3.2.3. The Communication Mechanism of WMAS

The communication mechanism of WMAS is shown in Figure5.Figure 5
Communication mechanism of WMAS.As shown in Figure5, outside the alarm WMP, the communication of WMAS is divided into two parts:(1)
When the alarm WMP starts for the first time, an initialization request needs to be initiated to the CDN [31] (content delivery network), and the CDN will return the corresponding program packet to complete the download of resources.(2)
The alarm WMP communicates with the dispatching VPC through the SSLVPN [32] channel. In the SSLVPN, the alarm WMP initiates a network data request to the dispatching VPC through the wx.request component, and the web API returns the JSON data packet after capturing the network request.Inside the alarm WMP, JSBridge is used to communicate from the app service layer to the view layer in the way of one-way data binding, and from the view layer to the app service layer in the form of event binding.


## 4. Performance Comparison between WMAS and SMSAS

### 4.1. Latency Comparison

#### 4.1.1. Minimum Theoretical Value of SMS Transmission Latency

SMS is transmitted through the dedicated control channel (DCCH), which is a point-to-point bidirectional control channel, including the stand-alone dedicated control channel (SDCCH), the fast associated control channel (FACCH), and the slow associated control channel (SACCH). SMS is delivered in the SDCCH or SACCH; the SACCH is used when the channel is busy, and the SDCCH is used when the channel is idle. The idle mode of the mobile phone of users is for the majority of the usage time of the day, and the transmission delay of the data in the idle mode is lower than that in the busy mode. To make the comparison more representative, the transmission delay in the idle mode is analyzed. SDCCH structures in the idle mode can be divided into two types, including SDCCH/8 and SDCCH/4 [33], as shown in Figure 6, where D is the SDCCH, A is the SACCH, B is the broadcast control channel (BCCH), C is the cell broadcast channel (CBCH), N is empty, ABCD is all four burst pulses, and one N means that a single burst pulse is empty.Figure 6
Structure of the SDCCH.
(a)
(b)The maximum byte capacity of a short message is 140 bytes. During the transmission, it is finally changed into 251 bytes after layers of encapsulation. An SDCCH frame contains two 51 duplicate frames, namely, 51 time-division multiple access (TDMA) frames, and one TDMA frame duration is 4.615 ms. An SDCCH can carry up to 23 bytes of upper information, so 251/23 = 11 SDCCH frames are required for 251 bytes of data units from the upper layer.As shown in Figure6(a), the SDCCH is divided into eight subchannels, SDCCH0–SDCCH7, and the repetition period of the channel is 51 frames, so the shortest time to transmit 251 bytes on the SDCCH/8 structure is(1)11×51×4.615=2.6s.As shown in Figure6(b), the SDCCH is divided into four subchannels, SDCCH0–SDCCH4, and the repetition period of the channel is 102 frames, so the shortest time to transmit 251 bytes on the SDCCH/8 structure is(2)11×102×4.615=5.178s.In summary, a 14-byte short message takes at least 2.6 s or 5.178 s to be delivered through the SDCCH, and the congestion rate of the SDCCH and the waiting time of short message queuing in the short message service center (SMSC) are ignored.


#### 4.1.2. Actual Measured Transmission Latency

To make a comparison between the proposed system and the SMSAS fairer, this paper uses web SMS for testing. The data source of the web SMS is the same as that of WMAS, from the VPC-PDAS. The SMS receiving module and the WMP computer client are installed on the same local computer connected to the mobile phone WiFi for receiving the alarm information transmitted from the cloud computer and recording the time when the alarm message is sent and the time of being received. The measured latency is the difference between the above two times.The test time is from 9:00 to 24:00, and an alarm message is generated and pushed every 9 minutes for a total of 100, and 10:00 to 14:00 and 20:00 to 23:00 are the peak time of the transmission network. The total time for each message transmitted to the mobile terminal is detected. The test is done continuously for 30 days. The specific time distribution is shown in Figures7 and 8.Figure 7
Test data of one day.Figure 8
Test data of 30 days. (a) SMSAS. (b) WMAS.
(a)
(b)Figure7 shows the time distribution of 100 tests in one day, and Figure 8 shows the time distribution of 3000 tests for 30 consecutive days. The ratio of the time distribution of the two is small, indicating that the test is reasonable and the test data are general. The detailed comparison between the actual test data of SMSAS and WMAS and the theoretical value of SMS transmission is shown in Figure 9.Figure 9
Detailed comparison between the actual test data of SMSAS and WMAS and the theoretical value of SMS transmission.As shown in Figure9, the actual test latency of WMAS is much smaller than the actual test latency and theoretical latency of SMSAS. The average latency of WMAS is 172 ms. Compared with the average latency of SMSAS of 4.9 s, the average latency is reduced by at least 28 times.


### 4.2. Reliability Comparison

When the SMSAS sends an alarm message, the alarm message needs to be sent to the SMSC for queuing and finally sent to the specified user via the network. And WMAS is sent directly to the user who initiated the network request through the network without any intermediate process. For convenience, the simplified network structure of SMSAS and WMAS is shown in Figure10.Figure 10
Simplified network structure of SMSAS and WMAS.This paper uses the full-state enumeration method to analyze the reliability of the network structure. Take SMSAS as an example. The network structure of SMSAS has five actual nodes and one virtual node. The relationship between these nodes can be expressed by the following relation matrix:(3)010000101110010101011011010101001110,where “0” represents no channel between the two nodes and “1” means that communication between the two nodes is possible.When information is transmitted from the SMSAS to the mobile terminal (from node 1 to node 6), there are three cases of information transmission failures: node 1 forming an information island, node 6 forming an information island, and nodes 1 and 6 forming an information island, and the relationship matrix corresponds to the following equations, respectively:(4)00000000∗∗∗00∗0∗0∗0∗10∗∗0∗0∗0∗00∗∗∗0,(5)0∗0000∗0∗∗∗00∗0∗000∗∗0∗00∗0∗00000000,(6)00000000∗∗∗00∗0∗000∗∗0∗00∗0∗00000000,where ∗ can be “0” or “1.” Assuming that there are n kinds of information islands among nodes, the corresponding probability is Pi (i∈n). Suppose that the reliability of a single channel and a node is α and β, respectively. The reliability of the network structure of SMSAS and WMAS can be expressed as(7)P=1−∑i=1nPiβ.For the SMSAS network structure, withn=3, according to the matrices (4)–(6), P1, P2, and P3 are estimated as(8)P1=1−α∑i=07C8iα8−i1−αi,(9)P2=1−α3∑i=05C6iα6−i1−αi,(10)P3=1−α4∑i=05C5iα5−i1−αi.Similarly, for the WMAS network structure, withn=3, P1, P2, and P3 are estimated as(11)P1=P2=1−α3∑i=04C5iα5−i1−αi,(12)P3=1−α6∑i=02C2iα2−i1−αi.


#### 4.2.1. The Calculation ofα

All undirected links in the network can be converted into two parallel and reverse-directed links, and the two links can also be considered independent variables, as shown in Figure11.Figure 11
Link conversion.As shown in Figure11, the reliability of a channel can be obtained by separately calculating the reliability of the uplink and downlink of the channel. To calculate the reliability of the uplink and downlink, this paper adopts the path loss model developed by the IEEE802.16 working group [34]. The IEEE802.16 working group divides the path loss model into three categories: A, B, and C, according to differences in the geographical environment. The specific model is as follows:(13)PL802.16d=20log104πdυ,d≤d0,20log104πdυ+10γlog10dd0+Cf+CRX,d>d0,where d is the actual distance between two nodes; d0=100m; υ is the wavelength in meters; and γ, Cf, and CRX are characterized as follows.The path loss exponentγ is a Gaussian random variable over the population of macrocells within each terrain category. It can be written as(14)γ=a−bhTx+chTx,10m≤hTx≤80m,where hTx is the base station antenna height in meters. The values of a, b, and c are shown in Table 2.Table 2
Values ofa, b, and c.
Model parameter
Terrain category
A
B
C
a
4.6
4.0
3.6
b
0.0075
0.0065
0.0050
c
12.6
17.1
20.0C
f is the data associated with the subcarrier frequency fc. And the value of Cf is(15)Cf=6log10fc2000.C
R
X is the data associated with the receiving antenna. And the value of CRX is(16)CRX=−10.8log10hRX2,for typesAandB,−20log10hRX2,for typeC,or(17)CRX=−10log10hRX3,forhRX≤3m,−20log10hRX3,forhRX≥3m,where hRX is the receiving antenna height in meters. The simulation curve of the IEEE802.16 path loss model is shown in Figure 12.Figure 12
Test results of the IEEE802.16 path loss model.Besides the path loss model, the temporal characteristics of the channel are also subject to the Rice distribution. The probability density function of the Rice distribution is(18)fr=rσ2exp−r2+rd22σ2I0rrdσ2,where rd is the peak amplitude of the signal, σ is the multipath amplitude, and I0 is the zero-order Bessel function. And the cumulative distribution function of the Rice distribution is defined as follows:(19)Pout1=1−Q2K0,21+K0PL802.16d,where Q⋅ is the Marcum Q function and K0 is the signal factor, which can be calculated by [35](20)K=10log10Fs+10log10Fh+10log10Fb+log10k0Dγ+8,where k0=10; γ=−0.5; when D=d, K=K0; Fs is the seasonal factor; Fh is the height factor; and Fb is the beamwidth factor, and the factors are defined as follows:(21)Fs=1.0,summerleaves,2.5,winterno leaves,(22)Fh=h30.46hin meters,(23)Fb=b17−0.62bin degrees.The loss rate of path dilution is calculated by the moment generating function of Rice distribution:(24)Pout2=Q2Kiφb+ψ,2K0bb+ψ−bb+ψexp−Kiψ+K0bb+ψI04KiK0ψbb+ψ,where Ki is the interference factor, b=SINRKi+1/K0+1 (signal-to-interference-plus-noise ratio, SINR), and ψ is the protection rate of the SINR.The failure rate of the uplink and downlink can be obtained by their respectivePout1 and Pout2 from the following equation:(25)PuporPdown=Pout1+Pout2−Pout1Pout2.The link failure rate between the two nodes is(26)Plink=1−1−Pup1−Pdown.In summary,(27)α=1−Plink.Assume that the distance between node 1 and node 2 of the WMAS network architecture is 500 m. The interference source of node 1 is 1200 m away from node 1, and the interference source of node 2 is 1000 m away from node 2. According to equations (13)–(27), α=99.9479%.


#### 4.2.2. The Calculation ofβ

The calculation ofβ can be equivalent to the calculation of the reliability of the master station system of SMSAS and WMAS. And the reliability of the master station system of SMSAS and WMAS can be analyzed by the full-probability formula.The existing SMSAS consists of a front-end machine, SCADA server, and GSM modem. The front-end machine and the SCADA server belong to the master station system of the traditional PDAS, and each consists of two parallel machines to achieve redundancy to ensure system reliability. The role of the GSM modem is to queue alarm messages and send them to the designated users in sequence via SMS. The reliability block diagram of SMSAS is shown in Figure13.Figure 13
Reliability block diagram of SMSAS.The proposed WMAS is composed of elastic compute service (ECS), relational database service (RDS), and web API in series. ECS and RDS have the computer cluster mechanism, which can be expanded flexibly according to the system demand. Under the premise of a parallel connection ofm servers, they can withstand the abnormal situation of m−1 servers. The combination of the two constitutes the master station system of VPC-PDAS. The web API runs on ECS. It can automatically extend the instance along with the ECS and interact with RDS through ECS. Therefore, the web API and VPC-PDAS master station system can be equivalent to a series relationship. The reliability block diagram of WMAS is shown in Figure 14.Figure 14
Reliability block diagram of WMAS.The reliability of the master station system can be represented by the availabilityR of the system [36, 37]:(28)R=MTBFMTBF+MTTR=μλ+μ,where MTBF is the mean time between failures, MTTR is the mean time to repair, λ is the failure rate, and μ is the repair rate. λ and μ can be estimated by (8760 hours a year)(29)λ=8760MTBF,(30)μ=8760MTTR.For the system with two different parts in series, the failure rate and repair rate can be expressed as(31)λs=λ1+λ2,(32)μs=λsμ1μ2λ1λ2+λ1μ1+λ2μ2.For the system withn (n>2) parts in series, after equivalent transformation, the failure rate and repair rate can be estimated as(33)λs=∑inλi,(34)μs=λs∑inλi/μi.For the system withn parallel connections of the same components, the failure rate and repair rate can be estimated as(35)λs=nλnMTTR8760n−1,(36)μs=∑inμi.According to the Performance Testing Service (PTS) [38] and Application Real-Time Monitoring Service (ARMS) [39] tests provided by Alibaba Cloud Computing Co., Ltd. (https://www.alibabacloud.com), the related reliability parameters of the front-end machine, SCADA server, RDS, ECS, web API, and GSM modem are shown in Table 3.Table 3
Device parameters.
Item
MTBF (h)
MTTR (h)
Front-end machine
42000
12
SCADA server
42000
12
GSM modem
20000
10
RDS
120000
8
ECS
120000
8
Web API
20000
10According to Figures13 and 14, Table 3, and equations (29)–(36) and letting m = 2, the failure rate and repair rate of WMAS and SMSAS can be calculated as follows:(37)λWMP=4.575×10−4,μWMP=1767.04,λSMS=0.43824,μSMS=875.9.R of WMAS and SMSAS can be calculated by substituting the above results into equation (28):(38)βWMP=RWMP=99.999974%,βSMS=RSMS=99.949992%.Finally, the reliability of SMSAS and WMAS can be obtained according to equations (7)–(12) and α, βSMS, and βWMP:(39)PWMAS=99.9971%,PSMSAS=98.8983%.On the premise of 8760 hours a year, the annual failure time of WMAS and SMSAS is(40)hWMAS=1−99.9971%×8760×60=15.24min,hSMSAS=1−98.8983%×8760×60=96.51h.The WMAS reliability is as high as 99.9971%, and the annual failure time is 15.24 minutes, which is about 380 times lower than 96.51 hours of SMSAS.In summary, WMAS is superior to SMSAS, and the performance difference between the two is shown in Table4.Table 4
WMAS vs. SMSAS.
Properties
WMAS
SMSAS
Multiples
Latency
172 ms
4.9 s
28
Annual failure time
15.24 min
96.51 h
380


## 4.1. Latency Comparison

### 4.1.1. Minimum Theoretical Value of SMS Transmission Latency

SMS is transmitted through the dedicated control channel (DCCH), which is a point-to-point bidirectional control channel, including the stand-alone dedicated control channel (SDCCH), the fast associated control channel (FACCH), and the slow associated control channel (SACCH). SMS is delivered in the SDCCH or SACCH; the SACCH is used when the channel is busy, and the SDCCH is used when the channel is idle. The idle mode of the mobile phone of users is for the majority of the usage time of the day, and the transmission delay of the data in the idle mode is lower than that in the busy mode. To make the comparison more representative, the transmission delay in the idle mode is analyzed. SDCCH structures in the idle mode can be divided into two types, including SDCCH/8 and SDCCH/4 [33], as shown in Figure 6, where D is the SDCCH, A is the SACCH, B is the broadcast control channel (BCCH), C is the cell broadcast channel (CBCH), N is empty, ABCD is all four burst pulses, and one N means that a single burst pulse is empty.Figure 6
Structure of the SDCCH.
(a)
(b)The maximum byte capacity of a short message is 140 bytes. During the transmission, it is finally changed into 251 bytes after layers of encapsulation. An SDCCH frame contains two 51 duplicate frames, namely, 51 time-division multiple access (TDMA) frames, and one TDMA frame duration is 4.615 ms. An SDCCH can carry up to 23 bytes of upper information, so 251/23 = 11 SDCCH frames are required for 251 bytes of data units from the upper layer.As shown in Figure6(a), the SDCCH is divided into eight subchannels, SDCCH0–SDCCH7, and the repetition period of the channel is 51 frames, so the shortest time to transmit 251 bytes on the SDCCH/8 structure is(1)11×51×4.615=2.6s.As shown in Figure6(b), the SDCCH is divided into four subchannels, SDCCH0–SDCCH4, and the repetition period of the channel is 102 frames, so the shortest time to transmit 251 bytes on the SDCCH/8 structure is(2)11×102×4.615=5.178s.In summary, a 14-byte short message takes at least 2.6 s or 5.178 s to be delivered through the SDCCH, and the congestion rate of the SDCCH and the waiting time of short message queuing in the short message service center (SMSC) are ignored.


### 4.1.2. Actual Measured Transmission Latency

To make a comparison between the proposed system and the SMSAS fairer, this paper uses web SMS for testing. The data source of the web SMS is the same as that of WMAS, from the VPC-PDAS. The SMS receiving module and the WMP computer client are installed on the same local computer connected to the mobile phone WiFi for receiving the alarm information transmitted from the cloud computer and recording the time when the alarm message is sent and the time of being received. The measured latency is the difference between the above two times.The test time is from 9:00 to 24:00, and an alarm message is generated and pushed every 9 minutes for a total of 100, and 10:00 to 14:00 and 20:00 to 23:00 are the peak time of the transmission network. The total time for each message transmitted to the mobile terminal is detected. The test is done continuously for 30 days. The specific time distribution is shown in Figures7 and 8.Figure 7
Test data of one day.Figure 8
Test data of 30 days. (a) SMSAS. (b) WMAS.
(a)
(b)Figure7 shows the time distribution of 100 tests in one day, and Figure 8 shows the time distribution of 3000 tests for 30 consecutive days. The ratio of the time distribution of the two is small, indicating that the test is reasonable and the test data are general. The detailed comparison between the actual test data of SMSAS and WMAS and the theoretical value of SMS transmission is shown in Figure 9.Figure 9
Detailed comparison between the actual test data of SMSAS and WMAS and the theoretical value of SMS transmission.As shown in Figure9, the actual test latency of WMAS is much smaller than the actual test latency and theoretical latency of SMSAS. The average latency of WMAS is 172 ms. Compared with the average latency of SMSAS of 4.9 s, the average latency is reduced by at least 28 times.


## 4.1.1. Minimum Theoretical Value of SMS Transmission Latency

SMS is transmitted through the dedicated control channel (DCCH), which is a point-to-point bidirectional control channel, including the stand-alone dedicated control channel (SDCCH), the fast associated control channel (FACCH), and the slow associated control channel (SACCH). SMS is delivered in the SDCCH or SACCH; the SACCH is used when the channel is busy, and the SDCCH is used when the channel is idle. The idle mode of the mobile phone of users is for the majority of the usage time of the day, and the transmission delay of the data in the idle mode is lower than that in the busy mode. To make the comparison more representative, the transmission delay in the idle mode is analyzed. SDCCH structures in the idle mode can be divided into two types, including SDCCH/8 and SDCCH/4 [33], as shown in Figure 6, where D is the SDCCH, A is the SACCH, B is the broadcast control channel (BCCH), C is the cell broadcast channel (CBCH), N is empty, ABCD is all four burst pulses, and one N means that a single burst pulse is empty.Figure 6
Structure of the SDCCH.
(a)
(b)The maximum byte capacity of a short message is 140 bytes. During the transmission, it is finally changed into 251 bytes after layers of encapsulation. An SDCCH frame contains two 51 duplicate frames, namely, 51 time-division multiple access (TDMA) frames, and one TDMA frame duration is 4.615 ms. An SDCCH can carry up to 23 bytes of upper information, so 251/23 = 11 SDCCH frames are required for 251 bytes of data units from the upper layer.As shown in Figure6(a), the SDCCH is divided into eight subchannels, SDCCH0–SDCCH7, and the repetition period of the channel is 51 frames, so the shortest time to transmit 251 bytes on the SDCCH/8 structure is(1)11×51×4.615=2.6s.As shown in Figure6(b), the SDCCH is divided into four subchannels, SDCCH0–SDCCH4, and the repetition period of the channel is 102 frames, so the shortest time to transmit 251 bytes on the SDCCH/8 structure is(2)11×102×4.615=5.178s.In summary, a 14-byte short message takes at least 2.6 s or 5.178 s to be delivered through the SDCCH, and the congestion rate of the SDCCH and the waiting time of short message queuing in the short message service center (SMSC) are ignored.


## 4.1.2. Actual Measured Transmission Latency

To make a comparison between the proposed system and the SMSAS fairer, this paper uses web SMS for testing. The data source of the web SMS is the same as that of WMAS, from the VPC-PDAS. The SMS receiving module and the WMP computer client are installed on the same local computer connected to the mobile phone WiFi for receiving the alarm information transmitted from the cloud computer and recording the time when the alarm message is sent and the time of being received. The measured latency is the difference between the above two times.The test time is from 9:00 to 24:00, and an alarm message is generated and pushed every 9 minutes for a total of 100, and 10:00 to 14:00 and 20:00 to 23:00 are the peak time of the transmission network. The total time for each message transmitted to the mobile terminal is detected. The test is done continuously for 30 days. The specific time distribution is shown in Figures7 and 8.Figure 7
Test data of one day.Figure 8
Test data of 30 days. (a) SMSAS. (b) WMAS.
(a)
(b)Figure7 shows the time distribution of 100 tests in one day, and Figure 8 shows the time distribution of 3000 tests for 30 consecutive days. The ratio of the time distribution of the two is small, indicating that the test is reasonable and the test data are general. The detailed comparison between the actual test data of SMSAS and WMAS and the theoretical value of SMS transmission is shown in Figure 9.Figure 9
Detailed comparison between the actual test data of SMSAS and WMAS and the theoretical value of SMS transmission.As shown in Figure9, the actual test latency of WMAS is much smaller than the actual test latency and theoretical latency of SMSAS. The average latency of WMAS is 172 ms. Compared with the average latency of SMSAS of 4.9 s, the average latency is reduced by at least 28 times.


## 4.2. Reliability Comparison

When the SMSAS sends an alarm message, the alarm message needs to be sent to the SMSC for queuing and finally sent to the specified user via the network. And WMAS is sent directly to the user who initiated the network request through the network without any intermediate process. For convenience, the simplified network structure of SMSAS and WMAS is shown in Figure10.Figure 10
Simplified network structure of SMSAS and WMAS.This paper uses the full-state enumeration method to analyze the reliability of the network structure. Take SMSAS as an example. The network structure of SMSAS has five actual nodes and one virtual node. The relationship between these nodes can be expressed by the following relation matrix:(3)010000101110010101011011010101001110,where “0” represents no channel between the two nodes and “1” means that communication between the two nodes is possible.When information is transmitted from the SMSAS to the mobile terminal (from node 1 to node 6), there are three cases of information transmission failures: node 1 forming an information island, node 6 forming an information island, and nodes 1 and 6 forming an information island, and the relationship matrix corresponds to the following equations, respectively:(4)00000000∗∗∗00∗0∗0∗0∗10∗∗0∗0∗0∗00∗∗∗0,(5)0∗0000∗0∗∗∗00∗0∗000∗∗0∗00∗0∗00000000,(6)00000000∗∗∗00∗0∗000∗∗0∗00∗0∗00000000,where ∗ can be “0” or “1.” Assuming that there are n kinds of information islands among nodes, the corresponding probability is Pi (i∈n). Suppose that the reliability of a single channel and a node is α and β, respectively. The reliability of the network structure of SMSAS and WMAS can be expressed as(7)P=1−∑i=1nPiβ.For the SMSAS network structure, withn=3, according to the matrices (4)–(6), P1, P2, and P3 are estimated as(8)P1=1−α∑i=07C8iα8−i1−αi,(9)P2=1−α3∑i=05C6iα6−i1−αi,(10)P3=1−α4∑i=05C5iα5−i1−αi.Similarly, for the WMAS network structure, withn=3, P1, P2, and P3 are estimated as(11)P1=P2=1−α3∑i=04C5iα5−i1−αi,(12)P3=1−α6∑i=02C2iα2−i1−αi.


### 4.2.1. The Calculation ofα

All undirected links in the network can be converted into two parallel and reverse-directed links, and the two links can also be considered independent variables, as shown in Figure11.Figure 11
Link conversion.As shown in Figure11, the reliability of a channel can be obtained by separately calculating the reliability of the uplink and downlink of the channel. To calculate the reliability of the uplink and downlink, this paper adopts the path loss model developed by the IEEE802.16 working group [34]. The IEEE802.16 working group divides the path loss model into three categories: A, B, and C, according to differences in the geographical environment. The specific model is as follows:(13)PL802.16d=20log104πdυ,d≤d0,20log104πdυ+10γlog10dd0+Cf+CRX,d>d0,where d is the actual distance between two nodes; d0=100m; υ is the wavelength in meters; and γ, Cf, and CRX are characterized as follows.The path loss exponentγ is a Gaussian random variable over the population of macrocells within each terrain category. It can be written as(14)γ=a−bhTx+chTx,10m≤hTx≤80m,where hTx is the base station antenna height in meters. The values of a, b, and c are shown in Table 2.Table 2
Values ofa, b, and c.
Model parameter
Terrain category
A
B
C
a
4.6
4.0
3.6
b
0.0075
0.0065
0.0050
c
12.6
17.1
20.0C
f is the data associated with the subcarrier frequency fc. And the value of Cf is(15)Cf=6log10fc2000.C
R
X is the data associated with the receiving antenna. And the value of CRX is(16)CRX=−10.8log10hRX2,for typesAandB,−20log10hRX2,for typeC,or(17)CRX=−10log10hRX3,forhRX≤3m,−20log10hRX3,forhRX≥3m,where hRX is the receiving antenna height in meters. The simulation curve of the IEEE802.16 path loss model is shown in Figure 12.Figure 12
Test results of the IEEE802.16 path loss model.Besides the path loss model, the temporal characteristics of the channel are also subject to the Rice distribution. The probability density function of the Rice distribution is(18)fr=rσ2exp−r2+rd22σ2I0rrdσ2,where rd is the peak amplitude of the signal, σ is the multipath amplitude, and I0 is the zero-order Bessel function. And the cumulative distribution function of the Rice distribution is defined as follows:(19)Pout1=1−Q2K0,21+K0PL802.16d,where Q⋅ is the Marcum Q function and K0 is the signal factor, which can be calculated by [35](20)K=10log10Fs+10log10Fh+10log10Fb+log10k0Dγ+8,where k0=10; γ=−0.5; when D=d, K=K0; Fs is the seasonal factor; Fh is the height factor; and Fb is the beamwidth factor, and the factors are defined as follows:(21)Fs=1.0,summerleaves,2.5,winterno leaves,(22)Fh=h30.46hin meters,(23)Fb=b17−0.62bin degrees.The loss rate of path dilution is calculated by the moment generating function of Rice distribution:(24)Pout2=Q2Kiφb+ψ,2K0bb+ψ−bb+ψexp−Kiψ+K0bb+ψI04KiK0ψbb+ψ,where Ki is the interference factor, b=SINRKi+1/K0+1 (signal-to-interference-plus-noise ratio, SINR), and ψ is the protection rate of the SINR.The failure rate of the uplink and downlink can be obtained by their respectivePout1 and Pout2 from the following equation:(25)PuporPdown=Pout1+Pout2−Pout1Pout2.The link failure rate between the two nodes is(26)Plink=1−1−Pup1−Pdown.In summary,(27)α=1−Plink.Assume that the distance between node 1 and node 2 of the WMAS network architecture is 500 m. The interference source of node 1 is 1200 m away from node 1, and the interference source of node 2 is 1000 m away from node 2. According to equations (13)–(27), α=99.9479%.


### 4.2.2. The Calculation ofβ

The calculation ofβ can be equivalent to the calculation of the reliability of the master station system of SMSAS and WMAS. And the reliability of the master station system of SMSAS and WMAS can be analyzed by the full-probability formula.The existing SMSAS consists of a front-end machine, SCADA server, and GSM modem. The front-end machine and the SCADA server belong to the master station system of the traditional PDAS, and each consists of two parallel machines to achieve redundancy to ensure system reliability. The role of the GSM modem is to queue alarm messages and send them to the designated users in sequence via SMS. The reliability block diagram of SMSAS is shown in Figure13.Figure 13
Reliability block diagram of SMSAS.The proposed WMAS is composed of elastic compute service (ECS), relational database service (RDS), and web API in series. ECS and RDS have the computer cluster mechanism, which can be expanded flexibly according to the system demand. Under the premise of a parallel connection ofm servers, they can withstand the abnormal situation of m−1 servers. The combination of the two constitutes the master station system of VPC-PDAS. The web API runs on ECS. It can automatically extend the instance along with the ECS and interact with RDS through ECS. Therefore, the web API and VPC-PDAS master station system can be equivalent to a series relationship. The reliability block diagram of WMAS is shown in Figure 14.Figure 14
Reliability block diagram of WMAS.The reliability of the master station system can be represented by the availabilityR of the system [36, 37]:(28)R=MTBFMTBF+MTTR=μλ+μ,where MTBF is the mean time between failures, MTTR is the mean time to repair, λ is the failure rate, and μ is the repair rate. λ and μ can be estimated by (8760 hours a year)(29)λ=8760MTBF,(30)μ=8760MTTR.For the system with two different parts in series, the failure rate and repair rate can be expressed as(31)λs=λ1+λ2,(32)μs=λsμ1μ2λ1λ2+λ1μ1+λ2μ2.For the system withn (n>2) parts in series, after equivalent transformation, the failure rate and repair rate can be estimated as(33)λs=∑inλi,(34)μs=λs∑inλi/μi.For the system withn parallel connections of the same components, the failure rate and repair rate can be estimated as(35)λs=nλnMTTR8760n−1,(36)μs=∑inμi.According to the Performance Testing Service (PTS) [38] and Application Real-Time Monitoring Service (ARMS) [39] tests provided by Alibaba Cloud Computing Co., Ltd. (https://www.alibabacloud.com), the related reliability parameters of the front-end machine, SCADA server, RDS, ECS, web API, and GSM modem are shown in Table 3.Table 3
Device parameters.
Item
MTBF (h)
MTTR (h)
Front-end machine
42000
12
SCADA server
42000
12
GSM modem
20000
10
RDS
120000
8
ECS
120000
8
Web API
20000
10According to Figures13 and 14, Table 3, and equations (29)–(36) and letting m = 2, the failure rate and repair rate of WMAS and SMSAS can be calculated as follows:(37)λWMP=4.575×10−4,μWMP=1767.04,λSMS=0.43824,μSMS=875.9.R of WMAS and SMSAS can be calculated by substituting the above results into equation (28):(38)βWMP=RWMP=99.999974%,βSMS=RSMS=99.949992%.Finally, the reliability of SMSAS and WMAS can be obtained according to equations (7)–(12) and α, βSMS, and βWMP:(39)PWMAS=99.9971%,PSMSAS=98.8983%.On the premise of 8760 hours a year, the annual failure time of WMAS and SMSAS is(40)hWMAS=1−99.9971%×8760×60=15.24min,hSMSAS=1−98.8983%×8760×60=96.51h.The WMAS reliability is as high as 99.9971%, and the annual failure time is 15.24 minutes, which is about 380 times lower than 96.51 hours of SMSAS.In summary, WMAS is superior to SMSAS, and the performance difference between the two is shown in Table4.Table 4
WMAS vs. SMSAS.
Properties
WMAS
SMSAS
Multiples
Latency
172 ms
4.9 s
28
Annual failure time
15.24 min
96.51 h
380


## 4.2.1. The Calculation ofα

All undirected links in the network can be converted into two parallel and reverse-directed links, and the two links can also be considered independent variables, as shown in Figure11.Figure 11
Link conversion.As shown in Figure11, the reliability of a channel can be obtained by separately calculating the reliability of the uplink and downlink of the channel. To calculate the reliability of the uplink and downlink, this paper adopts the path loss model developed by the IEEE802.16 working group [34]. The IEEE802.16 working group divides the path loss model into three categories: A, B, and C, according to differences in the geographical environment. The specific model is as follows:(13)PL802.16d=20log104πdυ,d≤d0,20log104πdυ+10γlog10dd0+Cf+CRX,d>d0,where d is the actual distance between two nodes; d0=100m; υ is the wavelength in meters; and γ, Cf, and CRX are characterized as follows.The path loss exponentγ is a Gaussian random variable over the population of macrocells within each terrain category. It can be written as(14)γ=a−bhTx+chTx,10m≤hTx≤80m,where hTx is the base station antenna height in meters. The values of a, b, and c are shown in Table 2.Table 2
Values ofa, b, and c.
Model parameter
Terrain category
A
B
C
a
4.6
4.0
3.6
b
0.0075
0.0065
0.0050
c
12.6
17.1
20.0C
f is the data associated with the subcarrier frequency fc. And the value of Cf is(15)Cf=6log10fc2000.C
R
X is the data associated with the receiving antenna. And the value of CRX is(16)CRX=−10.8log10hRX2,for typesAandB,−20log10hRX2,for typeC,or(17)CRX=−10log10hRX3,forhRX≤3m,−20log10hRX3,forhRX≥3m,where hRX is the receiving antenna height in meters. The simulation curve of the IEEE802.16 path loss model is shown in Figure 12.Figure 12
Test results of the IEEE802.16 path loss model.Besides the path loss model, the temporal characteristics of the channel are also subject to the Rice distribution. The probability density function of the Rice distribution is(18)fr=rσ2exp−r2+rd22σ2I0rrdσ2,where rd is the peak amplitude of the signal, σ is the multipath amplitude, and I0 is the zero-order Bessel function. And the cumulative distribution function of the Rice distribution is defined as follows:(19)Pout1=1−Q2K0,21+K0PL802.16d,where Q⋅ is the Marcum Q function and K0 is the signal factor, which can be calculated by [35](20)K=10log10Fs+10log10Fh+10log10Fb+log10k0Dγ+8,where k0=10; γ=−0.5; when D=d, K=K0; Fs is the seasonal factor; Fh is the height factor; and Fb is the beamwidth factor, and the factors are defined as follows:(21)Fs=1.0,summerleaves,2.5,winterno leaves,(22)Fh=h30.46hin meters,(23)Fb=b17−0.62bin degrees.The loss rate of path dilution is calculated by the moment generating function of Rice distribution:(24)Pout2=Q2Kiφb+ψ,2K0bb+ψ−bb+ψexp−Kiψ+K0bb+ψI04KiK0ψbb+ψ,where Ki is the interference factor, b=SINRKi+1/K0+1 (signal-to-interference-plus-noise ratio, SINR), and ψ is the protection rate of the SINR.The failure rate of the uplink and downlink can be obtained by their respectivePout1 and Pout2 from the following equation:(25)PuporPdown=Pout1+Pout2−Pout1Pout2.The link failure rate between the two nodes is(26)Plink=1−1−Pup1−Pdown.In summary,(27)α=1−Plink.Assume that the distance between node 1 and node 2 of the WMAS network architecture is 500 m. The interference source of node 1 is 1200 m away from node 1, and the interference source of node 2 is 1000 m away from node 2. According to equations (13)–(27), α=99.9479%.


## 4.2.2. The Calculation ofβ

The calculation ofβ can be equivalent to the calculation of the reliability of the master station system of SMSAS and WMAS. And the reliability of the master station system of SMSAS and WMAS can be analyzed by the full-probability formula.The existing SMSAS consists of a front-end machine, SCADA server, and GSM modem. The front-end machine and the SCADA server belong to the master station system of the traditional PDAS, and each consists of two parallel machines to achieve redundancy to ensure system reliability. The role of the GSM modem is to queue alarm messages and send them to the designated users in sequence via SMS. The reliability block diagram of SMSAS is shown in Figure13.Figure 13
Reliability block diagram of SMSAS.The proposed WMAS is composed of elastic compute service (ECS), relational database service (RDS), and web API in series. ECS and RDS have the computer cluster mechanism, which can be expanded flexibly according to the system demand. Under the premise of a parallel connection ofm servers, they can withstand the abnormal situation of m−1 servers. The combination of the two constitutes the master station system of VPC-PDAS. The web API runs on ECS. It can automatically extend the instance along with the ECS and interact with RDS through ECS. Therefore, the web API and VPC-PDAS master station system can be equivalent to a series relationship. The reliability block diagram of WMAS is shown in Figure 14.Figure 14
Reliability block diagram of WMAS.The reliability of the master station system can be represented by the availabilityR of the system [36, 37]:(28)R=MTBFMTBF+MTTR=μλ+μ,where MTBF is the mean time between failures, MTTR is the mean time to repair, λ is the failure rate, and μ is the repair rate. λ and μ can be estimated by (8760 hours a year)(29)λ=8760MTBF,(30)μ=8760MTTR.For the system with two different parts in series, the failure rate and repair rate can be expressed as(31)λs=λ1+λ2,(32)μs=λsμ1μ2λ1λ2+λ1μ1+λ2μ2.For the system withn (n>2) parts in series, after equivalent transformation, the failure rate and repair rate can be estimated as(33)λs=∑inλi,(34)μs=λs∑inλi/μi.For the system withn parallel connections of the same components, the failure rate and repair rate can be estimated as(35)λs=nλnMTTR8760n−1,(36)μs=∑inμi.According to the Performance Testing Service (PTS) [38] and Application Real-Time Monitoring Service (ARMS) [39] tests provided by Alibaba Cloud Computing Co., Ltd. (https://www.alibabacloud.com), the related reliability parameters of the front-end machine, SCADA server, RDS, ECS, web API, and GSM modem are shown in Table 3.Table 3
Device parameters.
Item
MTBF (h)
MTTR (h)
Front-end machine
42000
12
SCADA server
42000
12
GSM modem
20000
10
RDS
120000
8
ECS
120000
8
Web API
20000
10According to Figures13 and 14, Table 3, and equations (29)–(36) and letting m = 2, the failure rate and repair rate of WMAS and SMSAS can be calculated as follows:(37)λWMP=4.575×10−4,μWMP=1767.04,λSMS=0.43824,μSMS=875.9.R of WMAS and SMSAS can be calculated by substituting the above results into equation (28):(38)βWMP=RWMP=99.999974%,βSMS=RSMS=99.949992%.Finally, the reliability of SMSAS and WMAS can be obtained according to equations (7)–(12) and α, βSMS, and βWMP:(39)PWMAS=99.9971%,PSMSAS=98.8983%.On the premise of 8760 hours a year, the annual failure time of WMAS and SMSAS is(40)hWMAS=1−99.9971%×8760×60=15.24min,hSMSAS=1−98.8983%×8760×60=96.51h.The WMAS reliability is as high as 99.9971%, and the annual failure time is 15.24 minutes, which is about 380 times lower than 96.51 hours of SMSAS.In summary, WMAS is superior to SMSAS, and the performance difference between the two is shown in Table4.Table 4
WMAS vs. SMSAS.
Properties
WMAS
SMSAS
Multiples
Latency
172 ms
4.9 s
28
Annual failure time
15.24 min
96.51 h
380


## 5. Implementation and Running Effect of WMAS

The proposed system runs on Ali Cloud in China. The ECS configuration is Windows Server 2016 R2 standard, 4-core 16GB ROM, and the RDS configuration is Microsoft SQL Server 2008 R2, 4-core 8GB ROM, 100GB storage. The implementation of WMAS includes two parts: web API and alarm WMP. The specific implementation methods are as follows.


### 5.1. The Implementation of Web API

The implementation of the web API consists of the following steps:Step 1: using Visual Studio 2017 ASP.NET based on C#, the Http controller is created to realize the function of alarm data processing.Step 2: the SSL digital certificate issued by the international digital certificate authority (CA) is deployed on the dispatching VPC.Step 3: using Internet Information Services (IIS) to publish the web API on the network, the data transmission method of the web API is implemented as the Https protocol.Step 4: the Https-based web API URL is bound to the server domain name of the WeChat control background, and the SSLVPN remote secure access channel is established between the web API and the mobile device.Step 5: the ECS running the web API is bound to the server load balancer (SLB), the traffic is distributed to multiple ECS instances, the external service capability of the application system is expanded, and the usability of the application system is improved.


### 5.2. The Implementation of Alarm WMP

With the WeChat web developer tool version 1.02, the implementation of the alarm WMP includes the following steps:Step 1: apply for WeChat unique identification and recognition APPID on the official website of Tencent and bind this APPID to the WMP project.Step 2: determine the technical architecture of the alarm WMP, as detailed in Section3.Step 3: modularize the functionality of the alarm WMP, as detailed in Section3.Step 4: combine WXML + WXSS + JavaScript, write the code, and realize the function of each module.Step 5: after the program is compiled, scan the Quick Response Code preview with the mobile phone to make sure it can normally run on the mobile terminal.Step 6: after the functional test is completed without any error, submit the alarm WMP to Tencent for review and release. After passing the review, the alarm WMP can be used for regular search.


### 5.3. The Operation Effect of WMAS

WMAS has two function pages: user login page and alarm page.


#### 5.3.1. The User Login Page

To ensure the security of the power grid data, a user login function has been developed, as shown in Figure15.Figure 15
User login of the WMP.The user login page has the following characteristics:After entering the username and password and clicking login, the page initiates a network request for query validation to the web API. In the process of data transmission, the input password is hidden and encrypted by the MD5 mode in the background, which ensures the security of the user password.If the data returned by the web API show that the username and password are both correct, the username and password are stored in the cookies of the mobile phone, which avoids the problem that the user needs to input personal user information many times and prompts the user to input correctly and jump to the next function page.The specific effect of the above characteristics is shown in Figure16.Figure 16
Running effect of the login page.


#### 5.3.2. The Alarm Page

The alarm page is not allowed to be executed until the user login page has been verified successfully. In the beginning, the alarm page will initiate a query request for the latest alarm information to the web API through the SSLVPN. After receiving the request, the web API interacts with the RDS through ECS and returns the original alarm data to the alarm WMP. The alarm page will split and combine these original data and bind with the front end of the page. Finally, the alarm information will be displayed in realtime.WMAS can achieve the cross-platform operation, as shown in Figures17 and 18, respectively, which show the operation effects of WMAS running on the Apple IOS system and Google Android system.Figure 17
Alarm WMP running on IOS.Figure 18
Alarm WMP running on Android.As shown in Figures17 and 18, the alarm information has the following characteristics:The screened alarm information comes from the important breakers in the power grid. These breakers’ faults will cause certain economic losses to the local power grid.The alarm information is marked with an accurate time sequence, which is accurate to the second level. The dispatcher can know the specific time when the fault occurs and take corresponding measures in time.The alarm information distinguishes the state of the breakers by color. The tripping is red, and the closing is green. It avoids the dispatcher misreading the alarm information and brings unnecessary losses to the power grid.The alarm information is divided in the time scale. The border color of the alarm information in the day is blue and the border color for the rest of the time is gray, which improves the work efficiency of the dispatcher.The alarm information includes daily power recovery and daily power loss. Based on this, the dispatcher can not only know the economic loss and benefit brought by the breakers tripping and closing at a glance but also judge the influence degree of the breaker fault on the power grid and select the fault with the deepest influence degree to repair first.


## 5.1. The Implementation of Web API

The implementation of the web API consists of the following steps:Step 1: using Visual Studio 2017 ASP.NET based on C#, the Http controller is created to realize the function of alarm data processing.Step 2: the SSL digital certificate issued by the international digital certificate authority (CA) is deployed on the dispatching VPC.Step 3: using Internet Information Services (IIS) to publish the web API on the network, the data transmission method of the web API is implemented as the Https protocol.Step 4: the Https-based web API URL is bound to the server domain name of the WeChat control background, and the SSLVPN remote secure access channel is established between the web API and the mobile device.Step 5: the ECS running the web API is bound to the server load balancer (SLB), the traffic is distributed to multiple ECS instances, the external service capability of the application system is expanded, and the usability of the application system is improved.


## 5.2. The Implementation of Alarm WMP

With the WeChat web developer tool version 1.02, the implementation of the alarm WMP includes the following steps:Step 1: apply for WeChat unique identification and recognition APPID on the official website of Tencent and bind this APPID to the WMP project.Step 2: determine the technical architecture of the alarm WMP, as detailed in Section3.Step 3: modularize the functionality of the alarm WMP, as detailed in Section3.Step 4: combine WXML + WXSS + JavaScript, write the code, and realize the function of each module.Step 5: after the program is compiled, scan the Quick Response Code preview with the mobile phone to make sure it can normally run on the mobile terminal.Step 6: after the functional test is completed without any error, submit the alarm WMP to Tencent for review and release. After passing the review, the alarm WMP can be used for regular search.


## 5.3. The Operation Effect of WMAS

WMAS has two function pages: user login page and alarm page.


### 5.3.1. The User Login Page

To ensure the security of the power grid data, a user login function has been developed, as shown in Figure15.Figure 15
User login of the WMP.The user login page has the following characteristics:After entering the username and password and clicking login, the page initiates a network request for query validation to the web API. In the process of data transmission, the input password is hidden and encrypted by the MD5 mode in the background, which ensures the security of the user password.If the data returned by the web API show that the username and password are both correct, the username and password are stored in the cookies of the mobile phone, which avoids the problem that the user needs to input personal user information many times and prompts the user to input correctly and jump to the next function page.The specific effect of the above characteristics is shown in Figure16.Figure 16
Running effect of the login page.


### 5.3.2. The Alarm Page

The alarm page is not allowed to be executed until the user login page has been verified successfully. In the beginning, the alarm page will initiate a query request for the latest alarm information to the web API through the SSLVPN. After receiving the request, the web API interacts with the RDS through ECS and returns the original alarm data to the alarm WMP. The alarm page will split and combine these original data and bind with the front end of the page. Finally, the alarm information will be displayed in realtime.WMAS can achieve the cross-platform operation, as shown in Figures17 and 18, respectively, which show the operation effects of WMAS running on the Apple IOS system and Google Android system.Figure 17
Alarm WMP running on IOS.Figure 18
Alarm WMP running on Android.As shown in Figures17 and 18, the alarm information has the following characteristics:The screened alarm information comes from the important breakers in the power grid. These breakers’ faults will cause certain economic losses to the local power grid.The alarm information is marked with an accurate time sequence, which is accurate to the second level. The dispatcher can know the specific time when the fault occurs and take corresponding measures in time.The alarm information distinguishes the state of the breakers by color. The tripping is red, and the closing is green. It avoids the dispatcher misreading the alarm information and brings unnecessary losses to the power grid.The alarm information is divided in the time scale. The border color of the alarm information in the day is blue and the border color for the rest of the time is gray, which improves the work efficiency of the dispatcher.The alarm information includes daily power recovery and daily power loss. Based on this, the dispatcher can not only know the economic loss and benefit brought by the breakers tripping and closing at a glance but also judge the influence degree of the breaker fault on the power grid and select the fault with the deepest influence degree to repair first.


## 5.3.1. The User Login Page

To ensure the security of the power grid data, a user login function has been developed, as shown in Figure15.Figure 15
User login of the WMP.The user login page has the following characteristics:After entering the username and password and clicking login, the page initiates a network request for query validation to the web API. In the process of data transmission, the input password is hidden and encrypted by the MD5 mode in the background, which ensures the security of the user password.If the data returned by the web API show that the username and password are both correct, the username and password are stored in the cookies of the mobile phone, which avoids the problem that the user needs to input personal user information many times and prompts the user to input correctly and jump to the next function page.The specific effect of the above characteristics is shown in Figure16.Figure 16
Running effect of the login page.


## 5.3.2. The Alarm Page

The alarm page is not allowed to be executed until the user login page has been verified successfully. In the beginning, the alarm page will initiate a query request for the latest alarm information to the web API through the SSLVPN. After receiving the request, the web API interacts with the RDS through ECS and returns the original alarm data to the alarm WMP. The alarm page will split and combine these original data and bind with the front end of the page. Finally, the alarm information will be displayed in realtime.WMAS can achieve the cross-platform operation, as shown in Figures17 and 18, respectively, which show the operation effects of WMAS running on the Apple IOS system and Google Android system.Figure 17
Alarm WMP running on IOS.Figure 18
Alarm WMP running on Android.As shown in Figures17 and 18, the alarm information has the following characteristics:The screened alarm information comes from the important breakers in the power grid. These breakers’ faults will cause certain economic losses to the local power grid.The alarm information is marked with an accurate time sequence, which is accurate to the second level. The dispatcher can know the specific time when the fault occurs and take corresponding measures in time.The alarm information distinguishes the state of the breakers by color. The tripping is red, and the closing is green. It avoids the dispatcher misreading the alarm information and brings unnecessary losses to the power grid.The alarm information is divided in the time scale. The border color of the alarm information in the day is blue and the border color for the rest of the time is gray, which improves the work efficiency of the dispatcher.The alarm information includes daily power recovery and daily power loss. Based on this, the dispatcher can not only know the economic loss and benefit brought by the breakers tripping and closing at a glance but also judge the influence degree of the breaker fault on the power grid and select the fault with the deepest influence degree to repair first.


## 6. Conclusions

This paper presents a WeChat-based system of real-time monitoring and alarming for the power grid operation status under the virtual private cloud environment. First, a systematic model with components such as WMP, SSLVPN, and VPC is constructed. Then, the latency of the WMAS and SMSAS is tested by means of the stress test. Furthermore, the full-state enumeration method and the improved path loss model are used to calculate the reliability of the WMAS. And the results indicate that the proposed system is particularly excellent not only in terms of latency but also in terms of reliability. The proposed system meets the safety protection requirements of the power system in network security and data transmission reliability and has been implemented in the Lipu power system in Guangxi, China. More than one year of stable operation shows that the proposed system is safe, reliable, flexible, and convenient with a bright prospect for future applications.



---

*Source: 3186394-2020-03-07.xml*