Cooperative Coverage Based Lifetime Prolongation for Microgrid Monitoring WSN in Smart Grid

To take full advantage of the flexibility of access and disconnection from smart grid, organizing distributed renewable energy resources in form of microgrid becomes one solution of energy replenishment in smart grid. A large amount of accurate and comprehensive information data are needed to be monitored by a variety of different types of sensors to guarantee the effective operation of this kind of microgrid. Energy consumption of microgrid monitoring WSN consequently becomes an issue. This paper presents a novel lifetime prolongation algorithm based on cooperative coverage of different types of sensors. Firstly, according to the requirements of monitoring business, the construction of cooperative coverage sets and connected monitoring WSN are discussed. Secondly, energy consumption is analyzed based on cooperative coverage. Finally, the cooperative coverage based lifetime prolongation algorithm (CC-LP) is proposed. Both the energy consumption balancing inside the cooperative coverage set and the switching scheduling between cooperative coverage sets are discussed. Then we draw into an improved ant colony optimization algorithm to calculate the switching scheduling. Simulation results show that this novel algorithm can effectively prolong the lifetime of monitoring WSN, especially in the monitoring area with a large deployed density of different types of sensors.


Introduction
Due to the growing consumption of energy and natural resources, distributed renewable energy resources gradually draw people's attention [1][2]. To take full advantage of the flexibility of access and disconnection from the power grid, organizing distributed renewable energy resources in form of microgrid as one solution of energy replenishment becomes a focusing issue in smart grid [3][4][5]. However, the inherent randomness and intermittence of energy supplement which are brought by the changes of status and environment of renewable energy resources may trouble microgrid operators to realize effective control and management of the distributed renewable energy resources, which may have an impact on the stability of the smart grid [6]. Therefore, it is necessary to monitor the devices, networks, resources and the environment in the microgrid for scientific decision-making and efficient operation management. In order to obtain a large number of accurate and comprehensive information data about voltage, current, phase angle, temperature, humidity, frequency and others, a variety of the different corresponding types of sensors need to be deployed [7][8][9][10]. At present, sensors are gradually integrated and miniaturized, and most of them are battery powered and their capacity of energy is limited.
For microgrid monitoring business, a variety types of data is required to work together to complete the relevant data analysis. The monitoring data like voltage, current, phase angle of some pivot points of microgrid should be analyzed together to get the information about power distribution and power loss for well managing and controlling the usage of renewable energy *Correspondence: buptssj@bupt.edu.cn State Key Laboratory of Networking and Switching Technology, Beijing University of Posts and Telecommunications, Beijing, China, Full list of author information is available at the end of the article resources. In addition, temperature, humidity, frequency, smoke density and other environmental information data should be analyzed together to detect the probability and type of fault for quickly and effectively responding fault and well maintaining the microgrid. Therefore, the traditional coverage method can't well meet the different monitoring requirements of different target points in the microgrid. Moreover, energy consumption minimization and lifetime prolongation of the wireless sensor network (WSN) is another major problem when a huge and comprehensive data are required according to the different monitoring requirements.
To solve the problem, the WSN for microgrid monitoring may not be organized according to the type of sensor again, but organized according to the type of monitoring business, which means all types of sensors involved by one single monitoring business should cooperate with each other to complete the monitoring business. These different types of sensors form a cooperative coverage set, the number of sensors in the cooperative coverage set is as small as possible, but only if the requirement of data collection has been achieved. The reduction of the number of sensors may destroy the connectivity of the network, but the coverage set can complete data forwarding through the cooperation between different types of sensors.
Sensors are usually deployed redundantly in the WSN, and it is not necessary to activate all sensors at the same time, otherwise a waste of energy will be caused. Part of the sensors are slept, and the remaining sensors are organized to form coverage sets to perform the monitoring business. When the energy of these sensors is consumed to a certain threshold, the sensors that are slept are switched to continue to perform business. Meanwhile, the energy of the sensors in the coverage set reduces gradually, especially the head sensor responsible for external communication transmits a large amount of data, its energy is consumed a lot, so it is necessary to change the route of the coverage set. By dynamically changing the head sensors, the energy balance in the coverage set is maintained, and the energy of some key sensors is saved, thereby reducing the lifetime of the WSN.
Obviously, more comprehensive raw data will be acquired for one single monitoring business based on cooperation of different types of sensors. So the corresponding decision-making of microgrid operation center may be more conveniently made, and effectiveness and efficiency of the monitoring business may consequently get great improvement. In addition, it means more potential choices of data forwarding for one single sensor and more reasonable communication process for monitoring WSN. Moreover, energy consumption control of monitoring WSN has more possibility for improvement.
Based on the above analysis about sensors cooperation in microgrid monitoring, we mainly study the following problems in this paper: 1) How to construct connected monitoring WSN based on cooperation of different types of sensors to meet the monitoring requirements in microgrid. 2) How to prolong the lifetime of WSN based on cooperation of different types of sensors.
To solve the two problems, the main points are the coverage of all monitoring target points and the energy consumption of sensors. A generalized reservation coverage scheduling algorithm is proposed in the literature [11]. It divides the whole WSN into several sensor sets, and each set can meet the general coverage requirement and work in turns to prolong the lifetime of WSN by scheduling these sets. The k-coverage methods are analyzed in literature [12][13], this deployment and working mechanism of sensors explains the redundant coverage of sensors for guaranteeing the quality of monitoring data and indicates more possibility of coverage and energy consumption scheduling for monitoring WSNs. Liu et al. [14] proposes a quasi-grid based cooperative coverage algorithm to reduce the number of active nodes and prolong the lifetime. Song et al. [15] proposes a coverage-aware unequal clustering protocol with load separation for ambient assisted living applications based on WSNs to achieve better performance and balance energy consumption for prolonging network lifetime. Xu et al. [16] widely discusses the energy consumption saving on the privacypreserving data aggregation in WSNs by reducing communication overhead and energy expenditure of sensors. Li et al. [17] proposes a data compression algorithm to enhance the lifetime of sensors in sea route monitoring system. Cao [18] divides working time of sensors into some short time periods and achieves lifetime prolongation by scheduling these working time periods. Bao [19] prolong the lifetime of WSNs by balancing the energy consumption inside the group of sensors and scheduling the working time among different groups of sensors. Afshari et al. [20] proposes a cooperative fault-tolerant control (CFTC) algorithm to address the problem of multiple actuator faults in autonomous AC microgrids. Two new distributed fault tolerant control algorithms for the restoration of voltage and frequency in autonomous inverter-interfaced AC microgrids are proposed in the literature [21]. Dehkordi et al. [22] proposes a novel distributed noise-resilient secondary control for voltage and frequency restoration of islanded microgrid inverter-based distributed generations (DGs) with an additive type of noise. Raeispour [23] proposes a distributed cooperative control protocol for inverter-based islanded microgrids. Although all of the above research does not involve the cooperation of different types of sensors, the effective methods and ideas should be used as references.
Therefore, cooperation mechanism of different types of sensors for microgrid monitoring is introduced in this paper. Based on the cooperative of different types of sensors, the cooperative coverage set is firstly discussed to construct the connected monitoring WSN. Secondly, cooperative coverage based lifetime prolongation algorithm for microgrid monitoring WSN is proposed. In the algorithm, energy consumption balancing inside the cooperative coverage set and the working time switching scheduling between cooperative coverage sets are discussed. Finally, in order to calculate the switching scheduling between cooperative coverage sets, we draw into an improved ant colony optimization algorithm. The main technical contributions are summarized as follows: (1) A cooperative coverage based WSN for microgird monitoring is proposed. In our model, sensors of one cooperative coverage set are simultaneously in work state to complete the monitoring business. We construct cooperative coverage based microgrid monitoring WSN by connecting a group of cooperative coverage sets that can combine to cover all the target points of the monitoring business with some communication sensors.
(2) A cooperative coverage based lifetime prolongation algorithm for microgrid monitoring WSN is proposed. What's more, we draw into an improved ant colony optimization algorithm to calculate the switching scheduling between cooperative coverage sets. Simulation results show that this novel algorithm can effective prolong the lifetime of monitoring WSN with high time efficiency, especially in the monitoring area with large deployed density of different types of sensors.
The rest of this paper is organized as follows. In Section II, cooperative coverage based WSN for microgrid monitoring is introduced. In Section III, cooperative coverage set of different types of sensors is studied. The cooperative coverage based lifetime prolongation (CC-LP) algorithm for microgrid monitoring WSN is proposed in Section IV. Simulation results are analyzed in section V. Section VI draws the conclusion.

Methods
In this section, the cooperative coverage based WSN for distributed renewable energy resources oriented microgrid monitoring is discussed. According to the requirements of monitoring business, different types of sensors are organized. They cooperate with each other to complete the corresponding monitoring tasks.

Network Structure
The distributed renewable energy resources oriented microgrid monitoring WSN based on cooperative coverage mainly involves charging stations, solar devices, wind turbines, energy storage devices, microgrid operation data center and different corresponding types of sensors. For the device status, microgrid page 3 of 12 operators utilize voltage, current and phase sensors to monitor the operating status and load information of these distributed power devices in real time. Meanwhile, different types of sensors are deployed for specific devices, for example, the wind speed sensor and the direction sensor are used to evaluate the operating status of the wind turbine; the light sensor and the temperature sensor are deployed to collect the light and temperature data around the solar station. For environmental information，smoke sensors, temperature and humidity sensors and others need to be deployed to obtain a large number of accurate and comprehensive information data. In general, these sensors are mainly used to monitor the status information of the relevant devices and the environmental information, such as voltage, current, phase angle, temperature, humidity, frequency, and so on.
As is shown in Figure 1, different types of sensors are deployed to monitoring the devices in the microgrid to complete the monitoring business according to the corresponding requirements. Each type of sensor covers a fixed size monitoring area which is expressed by the corresponding circle with different type of dotted line.
The deployment of sensors need to consider not only the Euclidean distance between the device and the sensor, but also the electrical topology of the device. If there are bifurcations on electrical wires, the phase in every branch need to be acquired. In order to ensure the comprehensiveness of the collected data and the fault tolerance of the network in the monitoring network, we adopted a redundant deployment scheme. In this scheme, redundant sensors guarantee that the phase of each branch can be monitored based on the electrical topology. Monitoring data can be sent to the access point and data center by the data cooperative communications among different types of sensors.
Each sensor covers at least one monitoring target point. And each monitoring target point may be covered by at least one sensor because of the existing of different types of sensors. It is feasible to select part of sensors in the monitoring area to complete the monitoring business. Thus, it is unnecessary for each sensor to be in work state, which indicates the possibility of pursuing energy consumption minimization and lifetime prolongation while the monitoring business is ensured.

Cooperative Coverage
In the microgrid monitoring WSN, cooperative coverage of different types of sensors mainly contains two meanings. The first one is cooperative coverage with regard to monitoring target points, which is the cooperation between sensors of the same type. We call it the first type of cooperative coverage. The other one is cooperative coverage with regard to data communication, which is the cooperation between sensors of the different types. We call it the second type of cooperative coverage.
In order to guarantee the data integrity of monitoring business, at least one sensor is needed to be deployed for each monitoring target point to monitor its data change in principle. But each single sensor has a clear monitoring coverage range. If one monitoring target point is covered by two or more than two sensors of the same type at the same time, activating one of these sensors is theoretically enough to complete the data acquisition of this monitoring target point. Thus, sensors of the same type can cooperate together and select sensors as few as possible to complete the monitoring tasks according to the monitoring requirements, which we call the first type of cooperative coverage.
We denote ( , ) The first type of cooperative coverage will obviously reduce the number of single type of sensors that needs to be activated. However, it may destroy the connectivity of the initial deployment network, so that parts of sensors may be in an isolated state. It is necessary to select some other types of sensors to complete the data forwarding based on the first type of cooperative coverage. Thus, the second type of cooperative coverage is needed.
If different types of sensors can cooperate and communicate with each other as long as they are within their communication range. Then, it is unnecessary to consider the connectivity and activate other sensors of the same type to complete the data forwarding during the decision-making process of the first type of cooperative coverage. Once there is another type of sensor selected according to the first type of cooperative coverage within the communication range, the data forwarding can be completed. Therefore, the connectivity and communication of monitoring WSN is completed via the cooperation of different types of sensors, which we call the second type of cooperative coverage.
page 4 of 12 The number of activated sensors of whole monitoring WSN is reduced, resulting in saving unnecessary consumed energy of sensors. For instance, sensor 2 can forward data of sensor 1 to the data center, and it is not necessary to activate other type C sensors as long as sensor 2 has enough energy. Obviously, sensor 2 must be activated according to the requirements of monitoring business. The number of activated sensors is reduced.
With the two types of cooperative coverage, sensors which are in the working state can be divided into three categories: sensors that only undertake communication tasks, sensors that only undertake monitoring tasks and sensors that undertake both of communication and monitoring tasks. We call them communication sensor, monitoring sensor and dual-function sensor, respectively. In Figure 1, sensors 2, 4, 5, 8, 10, 12, 13 and 14 are the dual-function sensors. Sensors 1, 7, 9, 11 and 15 are the monitoring sensors. Sensors 3 and 6 are the communication sensors. Obviously, communication sensors only play the role of connecting the other sensors to form a connected monitoring WSN. The monitoring data are sensed by the monitoring sensors and dual-function sensors, both of them can cover all the monitoring target points. The three types of sensor roles may be mutually transformed over time because the sensor selection will change as the energy consumption of sensors change over time.

Energy Consumption of Single Sensor
The working sensor needs to monitor the status of target point and communicate with other sensors in WSN. Since the energy consumption of sensing data is much smaller than energy consumption of communications, only energy consumption of communications is considered in this paper. Energy consumption for communications can be divided into energy consumption of receiving data and energy consumption of transmitting data. According to the first-order wireless communication energy consumption model, we calculate the energy consumption of receiving one monitoring data and energy consumption of transmitting one monitoring data as , t rd amp r rd e e e e e = + = , respectively. rd e is energy consumed by radio devices, amp e is energy consumed by power amplifier, which is related to the communication distance between two sensors. For receiving data and transmitting data, rd e is same.
We denote k and 0 k as the number of monitoring data received by one single sensor and the number of monitoring data sensed by one single sensor during one time period, respectively. Thus, from the perspective of cooperative coverage, energy consumption of dual-function sensor i s in time period t is calculated as Similarly, energy consumption of communication sensor and that of monitoring sensor in time period t are respectively calculated as Then, we can calculate the energy consumption of sensors, and select the appropriate sensors to be activated and organized for the lifetime prolongation of monitoring WSN.

Communication technologise
In the cooperative coverage based microgrid monitoring WSN, sensors communicate among themselves and the access points. The access points communicate with the remote data processing and control center which store the monitoring data and send the control messages. We mainly use ZigBee technology to enable communication among sensors, as it is widely used in low-power networks. In addition, most types of sensors, which are available in smart grid monitoring market, use ZigBee for communication. ZigBee and other short-range radio technologies are supported by sensors communicating with access points. The access points send monitoring data to the remote data processing and control center through WLAN, wireless cellular network or high-speed wired network technologies. Similarly, the control messages are forwarded to the corresponding sensors by access points.
Due to the changing energy consumption of different roles of sensors and the different business requirements, we need to select appropriate sensors to construct connected microgrid monitoring WSN, so that the effective cooperative coverage can be actually realized. In next section, the cooperative coverage set is discussed, and we adopt it as the basic element to construct the connected microgrid monitoring WSN based on cooperative coverage.

Construction of Cooperative Coverage Based
Monitoring WSN In this section, the cooperative coverage set is discussed. Sensors of one cooperative coverage set are simultaneously in work state to complete the monitoring business. Then, cooperative coverage based microgrid monitoring WSN is constructed by connecting a group of cooperative coverage sets that can combine to cover all the target points of the monitoring business with some communication sensors.

Coverage Cooperative Set
At a specific moment, the cooperative coverage based monitoring WSN will be split into several disconnected groups if we remove all communication sensors, and each group can be called a cooperative coverage set. The composition of each cooperative coverage set and number of the cooperative coverage sets depend on the monitoring requirements and the initial deployment distribution of sensors in the corresponding microgrid monitoring area. For instance, sensors 1 and 2, sensors 4 and 5, sensors 10, 11 and 12, sensors 13, 14 and 15 compose a cooperative coverage set, respectively.
We denote Because sensor joins the cooperative coverage set one by one, there may be a phenomenon that all target points of one sensor may be covered by other same type of sensors in the cooperative coverage set. If the cooperative coverage set is still connected after removing this sensor, then we call this sensor a redundant sensor of this cooperative coverage set. We call the cooperative coverage set without any redundant sensor a minimum cooperative coverage set. Generally, we need to construct the minimum cooperative coverage set for saving energy.

Connected Monitoring WSN Construction
The cooperative coverage set can meet the data monitoring requirements of all target points with the sensors as few as possible, but these sensors may not be connected. The monitoring data may not be forwarded to the remote microgrid data center. Therefore, we need to further select some communication sensors to construct a connected monitoring WSN based on cooperative coverage. The hierarchical clustering method is adopted.
All sensors in a cooperative coverage set are connected, thus, we can consider the cooperative coverage set as an entire communication group. The distance of two communication groups is denoted as the shortest one among the distances from sensor in one group to sensor in the other group. The two communication groups with the shortest distance are selected after calculating all distances of any two groups. Then, sensors that can connect the two communication groups are selected, while making sure that the number of these sensors is as few as possible. Then, these two communication groups and the selected communication sensors are merged into a new communication group.
In the process of merging communication groups, it is important to ensure that the number of communication sensors in the selected communication group is the minimum. Then we calculate the shortest distance by network hop counts and build the set of candidate paths with the least hops. After that, if the boundary of a communication group is obvious, a remote node will be chosen, otherwise we choose the communication node with the largest residual energy. In the process of node communication, if there are multiple paths and the residual energy of the current communication node is enough, the subgroups will be adjusted according to the energy consumption. If the residual energy of the current communication node is insufficient, the communication node will be changed dynamically according to the residual energy.
The above process is repeated until a group of cooperative coverage sets of monitoring business

Energy Consumption of Monitoring WSN
Sensors in a cooperative coverage set are in work state at the same time. If one sensor fails due to energy exhaustion, the corresponding area would become a monitoring blind area, resulting in failure of the entire cooperative coverage set. There is a Barrel Effect for lifetime of cooperative coverage set. Therefore, energy consumption is another important factor except monitoring coverage and connectivity when we construct the cooperative coverage set.
We assume that the number of monitoring data sensed by one single sensor during one time period is a fixed value. Then, the total number of monitoring data sensed by the cooperative coverage set during one time period is known. We assume that the communication route within the cooperative coverage set does not change during one time period. Thus, energy consumption of each sensor during one time period can be calculated.
We denote , The energy consumption of monitoring sensor is still calculated according to the formula (3).
We call the sensor that forward data to communication sensor out of the cooperative coverage set the head sensor. According to the formula (5), energy consumption of head sensor is the most. Dual-function sensors near the head sensor have the relatively more energy consumption. Energy consumption of the monitoring sensor is the least. Thus, energy consumption of sensors in cooperative coverage set is closely related to the communication route of sensors. The more times data are forwarded, the more energy is consumed by the cooperative coverage set.
To balance the energy consumption, communication route inside the cooperative coverage set needs to be adjusted over time, which mainly involves the head sensor. If the energy of the whole cooperative coverage set can't support the monitoring tasks, another new cooperative coverage set need to be constructed to replace the current one, which may be called cooperative coverage set switching. Both of the two ways may change the selection of communication sensors. The specific methods of adjusting communication route and switching cooperative coverage set are discussed in the next section.
Energy consumption of communication sensor during one time period would keep constant if the cooperative coverage set that it connected and the direction of data forwarding keep unchanged. According to the formula (2), it can be easily calculated. Then, the energy consumption of the current monitoring WSN can be calculated.
To play the greatest advantage of cooperative coverage set, we need to prolong its working time as much as possible and further prolong the lifetime of whole microgrid monitoring WSN based on cooperative coverage according to the actual energy consumption. We focus on this issue in the next section.

Cooperative Coverage Based Lifetime Prolongation
Algorithm In this section, the CC-LP algorithm is proposed. Both the energy consumption balancing inside the cooperative coverage set and the switching scheduling between cooperative coverage sets are discussed. Then we draw into an improved ant colony optimization algorithm to calculate the switching scheduling.

Energy Consumption Balancing inside the Cooperative Coverage set
Cooperative coverage set reduces the number of sensors that is simultaneously in work state and makes good use of the redundant deployment of the different types of sensors, but the tasks of some key sensors may be inevitably increased, which may lead to extra energy consumption of these sensors to the disadvantage of the continuous work of the cooperative coverage set. Thus, balancing the energy consumption of sensors inside the cooperative coverage set is needed.
We denote , According to formula (3) and (5) Changing a new head sensor lead to the network topology in the cooperative coverage set being rebuilt. According to the ZigBee technology, extra routing update messages need to be sent to rebuild the network, resulting in additional energy consumption. However, considering the position and composition of sensors in the cooperative coverage set, the head sensor may be not change if there are no alternative sensors. Even if the head sensor changes, on the one hand, the head sensor was changed only in the cooperative coverage set, thus messages are mainly delivered by sensors inside the set and there is no other communication sensor to be activated. On the other hand, the number of sensors in one cooperative coverage set and routing update messages is relatively small, so the extra energy consumption of delivering routing update messages is less than the energy consumption of transmitting monitoring data, and has a weak effect on the overall performance of our algorithm.
For a given head sensor, the communication route optimization can be transformed to how to find the maximum value of minimum residual energy , where E is the energy bottleneck of l CCS .
After one time period, the residual energy of i s can be calculated as page 7 of 12 Then, , i t w E + will be calculated by repeating the formula (8) w times, and the energy consumption balancing inside the cooperative coverage set is achieved.

Switching Scheduling between Cooperative Coverage Sets
Moreover, when a cooperative coverage set fails due to the energy exhaustion or it needs to stop working due to the switching scheduling for lifetime prolongation, a new cooperative coverage set is needed to be constructed to complete the monitoring tasks instead. Then, some sensors may need to be activated from the sleep state and some other sensors need to sleep again, which inevitably lead to extra energy consumption of these sensors too. Frequent switching between different cooperative coverage sets may not necessarily enable the lifetime prolongation of microgrid monitoring WSN. Therefore, selecting appropriate cooperative coverage set and switching at the appropriate time are also needed.
There may be more than one cooperative coverage set that can complete the monitoring tasks. For reducing the switching times, we sort all these cooperative coverage sets according to their minimum residual energy of sensor in descending order. Then we select the switching candidate cooperative coverage set in order.
Moreover, one sensor may be selected by different cooperative coverage sets at different time period. Then its energy consumption of the previous switching round definitely affect the working time of the next switching round. Thus, we set another energy threshold p to determine the appropriate switching timing of current cooperative coverage set in some cases, which means the formula (7)

Energy Consumption Balancing inside the Cooperative Coverage set
In this subsection, the CC-LP algorithm based on improved ant colony optimization is proposed to calculate the best cooperative coverage set switch sequence. Compared with the common ant colony optimization algorithm, we have made some improvements in our algorithm. The improvement schemes of our algorithm are as follows.
(1) To select the next cooperative coverage set, we propose a probability formula based on pheromone, residual energy and switch energy consumption of coverage set.
(2) If we use the common ACO algorithm, the same cooperative coverage set will not be repeatedly selected. But in our model, when the cooperative coverage set has sufficient energy, the same cooperative coverage set should be repeatedly selected to avoid frequent switching and cause excessive energy consumption. Therefore, we optimized the pheromone update method in our improved ant colony optimization algorithm, expanded the selectable path, and searched for more solution space.
We denote the number of ants as M and the number of cooperative coverage sets as n. Each ant has a tabu table that records the cooperative coverage sets whose residual energy is not enough, these cooperative coverage sets cannot be selected. Firstly, we randomly place all ants on cooperative coverage sets, In formula (13), k is the ID of ants and k Tabu is the tabu table of ant k. We denote ij τ as the pheromone of i CCS to j CCS . Furthermore, j L is the residual energy, and formula (12) describes the calculation of j L : In formula (14) What's more, in formula (13), α is a heuristic factor, which reflects the relative importance of the pheromone. The larger α is, the more likely the ant are to select the previous path, and the less the randomness of the ant colony search. β and γ respectively reflect the relative importance of residual energy and switch energy consumption when an ant selects next cooperative coverage set. The larger β and γ are, the more likely the ant fall into the local optimum.
These three parameters are very important parameters in the algorithm, and the selection method will affect the global convergence and calculating efficiency of the ant colony algorithm. Meanwhile, the functions of the parameters in the ant colony algorithm are closely related. If these parameters are not configured properly, the solution speed will be very slow and the lifetime of the network will be dissatisfied.
After all ants select the coverage set through formula (13) and run to the end, we only perform global pheromone update on the best path. On the one hand, it allows the ants to find a better path based on the residual concentration of pheromone on the path. On the other hand, it allows the ants to search for optimal solution at a faster speed and promotes the convergence of the algorithm. In our model, in order to maximize the lifetime of a network, the network may select In formula (16) and formula (17), we denote Q as the sum of pheromone for an ant. best L is the length of the best path and RHQ is the attenuation rate of pheromone. We denote i C as the number of select the same i CCS continuously. When an ant selects the same i CCS in the next iteration, i C ensures that the incremental value of the pheromone is inversely proportional to the number of select times to avoid premature convergence. In our algorithm, the number of iteration N is set. In each iteration, there will be M ants searching the switching path according formula (13) at the same time. The search process of each any is the switching sequence of the coverage sets until it cannot find a set of sensors that can meet the requirements of monitoring business. When the search process ends, the life of the monitoring WSN also ends. The complexity of the algorithm is related to the number of cooperative coverage sets constructed. However, it is hard to obtain an accurate function mapping of the number of sensors and the number of corresponding cooperative coverage sets, because the location and number of sensors in the monitoring WSN are random and the network model is complicated. We assume the number of constructed coverage sets is C, then the complexity of CC-LP-IACO is = ( × 2 × ). The algorithm is shown in Algorithm 1. Randomly select an initial set 10: while not all CCS ∈ 11: Calculate the probability of each set according formula (13) 12: Used roulette algorithm to select next set by the probability 13: for l = 0 → num(CCS) do 14: if the minimum lifetime of sensors in set min( , / , ) ≤ 0 then 15: .

Simulation Results and discussion
In this section, the performance of our proposed CC-LP algorithm is evaluated. There are 3 types of sensors in the simulated monitoring WSN. Their coverage ranges are 10m, 15m and 20m, respectively. The number of each type of sensors is same. Each type of sensor needs to monitor 10 target points that are randomly scattered in 100*100 m 2 area. There is one access point in the center of the area. Our simulation was programmed by python3.6 and was run on the computer with i5-7300HQ CPU @ 2.50GHz and 8 GB of RAM.
In this paper, the energy consumption of node sending and receiving data is the same as the energy consumption model of wireless sensor network in literature [24], which is a first-order wireless communication model. Each resource node generates a certain number of data packets in each time period. The size of the data packet is 100 Byte, and the initial energy of the sensor node is 0.05J. The parameter settings are shown in Table 1. In the design of our CC-LP, the value of p is the factor that will actually affect the performance of lifetime prolongation. Firstly, 60, 80, 100,120 and 150 sensors are deployed in the area, and simulations are carried out under these four sensor densities to determine the optimal value of p. Secondly, in order to optimize the CC-LP algorithm, we compare the influence of α, β and γ to the network and the performance of different number of nodes. Thirdly, to further evaluate performance of fault detection, we compare CC-LP with the greedy algorithm and LP-based heuristic proposed in literature [18]. The greedy algorithm switches the cooperative coverage that can meet the requirement of monitor business and own the most residual energy, regardless of the switch consumption to the next switch round. LP-based heuristic selects nodes to be added to the coverage set by transform the selection process to integer programming while spending a time period. To ensure statistical validity, the data used in the simulation results analysis are averaged and all simulation experiments are repeated 100 times.    Figure 3 shows that the lifetime of monitoring WSN increases as the value of p increases. The larger the value of p is, the more frequent switching operations of cooperative coverage sets happen, which results in more optimized energy consumption of sensors and more working time periods of whole monitoring WSN. The threshold p determines the switch timing of the coverage set selected in the last switch. When the energy of the half of the sensors in the coverage set is less than , the coverage set that is currently working must be switched. While the value of p is too small, the energy of some key sensor nodes in the coverage set will be consumed early, so that the page 10 of 12 monitoring business can not be completed. Although there are many other sensor nodes in WSN, and the energy of these sensors is still rich, they can not form a cooperative coverage set to meet the requirements of the monitoring business. While the value of p is larger, the energy consumption of each coverage concentrated can be better uniformed, thereby extending the lifetime of the entire monitoring WSN. However, in some cases the larger value of p does not necessarily mean the better performance of CC-LP algorithm because the activating and sleeping operations of sensor result in extra energy consumption of sensor. As is shown in Figure 3 and Figure 4, number of cooperative coverage set switching keeps rapidly increasing but lifetime of monitoring WSN keeps slowly increasing as p increases and p≥0.7. Moreover, the frequent switching is not conducive to the stability of the monitoring system. Therefore, we consider 0.7 as the optimized value of p in our CC-LP algorithm.  Figure 5 shows the influence of three parameters α, β and γ to the lifetime of the network. Based on literature [25][26], we select a number of appropriate parameter values. These three parameters can effectively affect the final convergence result of our algorithm. The larger of the value of alpha, beta and gamma, the greater the amount of calculation and the longer the calculation time in our simulation. Moreover, it is the relative value of these three parameters that mainly affects the performance of the algorithm. We choose the range of α, β and γ is [0-5.0] and their interval is 0.5. Figure 5 depicts that when α is too small or α is too large, the performance of CC-LP algorithm will be dissatisfied. When α is too large, the algorithm completely relies on the guidance of pheromone to search, which leads to the strong positive feedback and premature convergence. When α is too small, the algorithm relies too much on the energy and switching cost of the cooperative coverage set. It is difficult to find the optimal solution by continuously selecting the cover set with better energy and switching cost at local time. Therefore, when α ∈ [1.3,3.5] , the performance of CC-LP algorithm is satisfactory and the lifetime of the monitoring WSN is longer.
Meanwhile, figure 5 also depicts that β, ∈ [2.0, 4.0] is satisfactory. Because when β and γ are too small, ant colony falls into random search and the lifetime of the network will not increase with the number of cooperative coverage set switch. And when β and γ are too large, although the lifetime is satisfactory, the convergence performance will be not good.
Then, we combine the value of p and the three different parameters α, β, γ to further analyze the impact of p and α, β, γ on the lifetime of the monitoring WSN. Figure6 further validates the data of figure3, the lifetime of monitoring WSN increases as the value of p increases, but when the value of p > 0.7, the increase in the lifetime is limited, and the number of cooperative coverage switching increases rapidly. Besides, Figure6 shows that when α, β, γ = 2.0 at the same time, the lifetime of monitoring WSN is significantly higher than when one of them is equal to 5.0. This indicates that if the weight of a factor is too large, the convergence performance of the colony becomes worse, and an optimal solution can not be obtained. What's more, when α is equal to 5.0, the lifetime of monitoring WSN is obviously lower than when the weight of one of β, γ is too large, which is in line with the trend shown in figure5. In the end, we compare the performance of our CC-LP algorithm with greedy algorithm and LP-based heuristic algorithm. Figure 7 shows the lifetime of monitoring WSN in p=0.7, α=2, β=3, γ=3. As is shown in figure 7, the lifetime of monitoring WSN of CC-LP is the most of the three. The CC-LP algorithm can effectively balance the energy of the sensors in the WSN, avoiding the excessive consumption of the energy of some key sensors, and thus prolonging the life of monitoring WSN. The other two algorithms consume the energy of some sensors without considering the impact on the working time of next switch round, so that it cannot form a connected network. With the increasing of the number of sensors, CC-LP algorithm has a 15%-20% improvement over greedy algorithm at each value of sensor density. And the differences of performance keep increasing because the selection of cooperative coverage sets can be more flexible in greater scope and energy of each sensor can be more effectively used.  Figure 8 shows that the number of cooperative coverage set switching of CC-LP is also the least of the three when p=0.7, α=2, β=3, γ=3, and it does not rapidly increase as the number of sensors increase. Thus, simulation results show that our CC-LP algorithm can effective prolong the lifetime of monitoring WSN with high time efficiency, especially in the monitoring area with large deployed density of different types of sensors.
In this paper, it is assumed that the sensors are scattered in the regular area. Actually, the monitoring area of WSN is irregular in microgrid. However, efficiency of cooperative coverage is figured out, and simulation results show that our CC-LP can be used as a reference in microgrid monitoring WSN.

Conclusion
Energy consumption is one of the important issues of the distributed renewable energy resources oriented microgrid monitoring WSN in smart grid. This paper presents a novel cooperative coverage based lifetime prolongation algorithm (CC-LP) for microgrid monitoring WSN. We describe the working mechanism of cooperative coverage of different types of sensors in detail. According to the requirements of monitoring business, constructions of the cooperative coverage sets and the connected monitoring WSN are discussed, respectively. Based on cooperative coverage, we analyze energy consumption of single sensor of monitoring WSN. We discuss the energy consumption balancing inside the cooperative coverage set and the switching scheduling between cooperative coverage sets, and then propose the CC-LP algorithm based on improved ant colony optimization to the switching sequence of cooperative coverage set. In the simulation, we adjusted various value of parameters to get better convergence performance of our algorithm. By compared with two other algorithm, simulation results show that this novel algorithm can effectively prolong the lifetime of monitoring WSN with high time efficiency, especially in the monitoring area with large deployed density of different types of sensors.
Abbreviations WSN: wireless sensor network; DG: distributed generation; WLAN: Wireless Local Area Network; ACO: ant colony optimization; LP: Linear programming

Availability of data and materials
The datasets used and analysed during the current study are available from the corresponding author on reasonable request.  Figure. 2 Hierarchical clustering based construction method of connected monitoring WSN. As shown in this figure, it provides the method of how to connect different communication groups to construct a connected monitoring WSN. Figure. 3 Lifetime of monitoring WSN with the change of p for five sensor densities. This figure shows the lifetime of monitoring WSN from the value of p varies for five different sensor densities. Figure. 4 Number of cooperative coverage set switching with the change of p for five sensor densities. This figure shows the number of cooperative coverage set switching from the value of p varies for five different sensor densities. Figure. 5 Lifetime of monitoring WSN with the change of α, β, γ. This figure depicts the influence of three parameters α, β and γ to the lifetime of the monitoring network. Figure. 6 Lifetime of monitoring WSN with the change of the combination of p and α, β, γ. This figure shows the lifetime of monitoring WSN with the change of p for four different combination of parameters of α, β, γ. Figure. 7 Lifetime of monitoring WSN for three algorithms. This figure depicts the comparsion of lifetime of monitoring WSN for three algorithm, Greedy, LPbased, CC-LP-IACO with p=0.7, α=2, β=3, γ=3. Figure. 8 Number of cooperative coverage set switching for three algorithm. This figure describes the comparsion of number of cooperative coverage set switching for three algorithm, Greedy, LP-based, CC-LP-IACO with p=0.7, α=2, β=3, γ=3.