#### Abstract

This article investigates an annular directed distributed double optimal algorithm to manage many we-energy frameworks in energy management of energy Internet (EI). The we-energy (WE) is an integrated energy hub containing varied energy devices of different functions including multi-energy production, consumption, and conversion. On this basis, all WE models cooperate to search for a minimum value of an objective function. Energy management in EI has two main goals. On the one hand, it needs to attain the optimality of economy with influence about the fluctuation of distributed renewable energy and randomness of terminal users. On the other hand, the EI should protect the privacy of terminal users well. Besides, discovering optimality value in the oscillation near convergence point, EI also needs a decrease in communication frequency and refraining of Zeno behavior. Zeno behavior means some operation is triggered infinite times in finite times of iteration. For realizing these proposes, this literature establishes an EI system that transfers cyber information in an annular directed path. The algorithm in this EI system adopts a novel annular distributed double-control price guiding strategy. In addition, this algorithm employs other two methods including the alternating direction method of multipliers method and the Newton-downhill method to optimize economy and reach convergence, respectively. Meanwhile, that algorithm adopts a small positive constant to avoid Zeno behavior. The performance of that algorithm is demonstrated through simulation results. Moreover, the optimality, convergence analysis, and avoiding Zeno behaviors are strictly proved by convex optimization and the monotone-bounded convergence theorem.

#### 1. Introduction

Due to increasing concern about cosmopolitan environmental problems, the strategy of carbon emission reduction, and the utilization of environmentally friendly energy resources, the concept of energy internet (EI) [1] is developing at a marvelous speed in recent years. EI is a multi-energy system with a large number of advanced technology containing the theory of multiagent systems; the cyber communication and the physical energy transmission method [2]; the intelligent strategy of energy management; game and synergy theory about the multi-energy resource in a certain region; demand response between every energy units; optimal operation with various energy devices with different functions, among others. EI, a new pattern of energy system, devotes itself to satisfying terminal users’ various kinds of energy demand and enhancing the renewable energy’s utilization efficiency [3]. However, due to the fluctuation of renewable energy resources [4–6], the randomness of terminal users, and complex but strong coupling in various of energy, the optimal dispatch in EI is exceedingly difficult and the method about that is exceedingly unadvanced for complex multi-energy distributed systems and eagerly needed to be reinforced nowadays.

We can divide the recent research concerning optimal dispatch of EI into two categories approximately: one is the traditionally centralized optimal strategy, and the other is the newly developing distributed optimal strategy. There are several documents about the centralized optimal strategy. The work in [7] solved the energy management with a non-convex object, and [8] introduced a two-stage multi-objective optimal scheduling in EI. The centralized optimal strategy has high quality in many fields including optimal performance, speed of convergence, and conquering disturbance caused by energy generators and terminal users. So traditional single energy systems including traditional power systems generated by terminal users always adopt the centralized optimal strategy. However, the centralized optimal strategy needs a large-scale energy generator that naturally disperses renewable energy resources that could not build. Centralized EI also brings too much compute and control pressure to its central processing unit. What’s more, the communication frequency in centralized EI is too high, and local malfunctions in the centralized optimal strategy influence global systems strikingly. Besides, it is impossible for the centralized optimal strategy to protect users’ privacy because of its concentrated physical framework. Therefore, the centralized optimal strategy will be replaced by the distributed optimal strategy sooner or later [9]. The literature [10, 11] proposed non-iterative algorithms for the distributed solution of multiagent optimal dispatch problems. The distributed optimal strategy can greatly decrease the frequency of communication and reduce the impact of local malfunction on global systems. The distributed optimal strategy is plug and play, so that it is very easy for distributed EI to expand its scale. And the distributed optimal strategy can protect users’ privacy to a certain extent in the present researches. Most important of all, it is impossible for natural disperse renewable energy resources to build large-scale centralized energy generators, so the only way to utilize renewable energy is the distributed optimal strategy. All advantages above are greatly significant to EI and can only be satisfied by the distributed optimal strategy and not by the centralized optimal strategy. For the foregoing reasons, it is no wonder that concern in the study of EI transfers from the centralized optimal strategy to the distributed optimal strategy in recent years.

However, the difficulty of energy management in the distributed optimal strategy is much higher than that in the centralized optimal strategy on account of renewable energy resources’ fluctuation and terminal users’ randomness. Due to the long distance between energy producers and terminal users in the centralized optimal strategy, although it will strongly increase the cost of energy transmission, the fluctuation of renewable energy resources and the randomness of terminal users scarcely affect the EI system. But in the distributed optimal strategy, the distance between generators and terminal users may be very short, so if the fluctuation of renewable energy resources and the randomness of terminal users couple together, it will impact the stability of EI strongly. For solving the problem, various literatures use various strategies. The literature [6] revealed the disturbance caused by renewable energy resources’ fluctuation in power systems. The literature [12] presented an unsupervised algorithm to extract the EV charging loads non-intrusively from the smart meter data. The literature [13] optimized power trading by Stackelberg game. But methods below aimed at power systems, and the type of energy was only power. These methods cannot solve energy management of EI with strong coupling between different types of energy.

Generally, we resolve a big complex system to some small and single systems and study small systems respectively to study the big system which is hard to study directly. So, we used agents to study multiagents [12], and we used microgrids to study power systems [14]. But what can we use to study EI? Different people had different ideas. Swiss scholars proposed the energy hub [15], which resolves EI into some small unit for the first time, and interpreted that energy can transform into another kind of energy in EI firstly. Subsequently, Li.L proposed prosumer in [16] to move forward a new step about establishing a small unit, which explained basic energy unit in EI is not only an energy producer and an energy consumer. The prosumer makes much progress not only in coupling between generators and terminal users but also in cooperating among different energies [17]. Sun et al. summed up all models above and referenced the theory of multiagents [18] and proposed we-energy (WE) [19]. We-energy is a full-duplex, hole distributed without a center, intelligent and peer-to-peer energy unit in EI. Compared with other models, WE is most suitable for the current EI for the several reasons below. Firstly, the WE is a full-duplex model, while other models including energy hubs are half-duplex models. Secondly, the WE is equal to the hole network. In other words, the WE is completely a selfish and rational model. So, the decision of the WE is very hard to be influenced by other we-energies, which is very suitable for the distributed algorithms. Thirdly, the WE is a point-to-point model, but other models are point-to-plane models. The WE communicates to other Wes, while others communicate to the hole network. So, the WE is more suitable for the algorithm in this article. Because of these reasons, this study adopts the WE as a basic energy unit.

Since the distributed framework and the large-scale system of EI, the suitable method of energy management between WE is the distributed algorithm realized by multiagent. The literature [20] used the distributed algorithm to optimize residential WE and designed an operation method that maps the infeasible solutions into the feasible region. The literature [21] mixed the alternating direction method of multipliers into the distributed algorithm for the first time. The literature [22] converted synchronous communication into out of synchronous communication by event-triggered in the distributed algorithm. But the distributed algorithm in [21, 23] considered energy conversions as must-run energy load and flexible energy load, which made energy conversion could only supply all load in one type of energy demand. For terminal users, the energy that the producer generated and conversion devices transformed made no difference, so EI by no means differentiated load into must-run load and flexible load. In addition, the literature [21, 23] ignored Zeno behavior in the algorithm, which could increase iteration times closed to infinity value under some initial values.

Although the distributed optimal strategy and the distributed algorithm reduce communication frequency and protect users’ privacy in EI to a certain degree, the communication frequency’s reduction and privacy’s protection still need to be reinforced. Nowadays, the energy that terminal users need, generators produce, and energy transformers convert is becoming more and more random, varied, and unstable. Furthermore, time delay [22], controllability deficiency [24], and Zeno behavior that always consists in the Newton–Raphson algorithm [23] do serious harm to EI. What is most terrible is Zeno behavior, because it will increase times of iteration to a large value, even to a measureless value. Moreover, traditional researches about privacy protecting only protected privacy from unneighborly agents, but they did nothing about neighbor agents [25–27]. That method had disadvantages. On the one hand, network sparse caused by only-neighbor communication destroyed the controllability of EI due to the theory in [24]. On the other hand, some users were not willing to trust their neighbor agents. To solve these problems, this literature based on the alternating direction method of multipliers in EI [28], Newton–Raphson algorithm [23], and auction-based algorithm [29] proposes an annular directed distributed algorithm, which leads WEs to communicate in an annular route. Compared with traditional distributed optimization methods, the annular directed distributed algorithm can not only observably reduce communicating intensity but also protect all users’ data that cannot be acquired by other agents including neighbor agents. However, in conventional distributed optimization methods, some ratios, power output, or estimated prices have to be shared among neighbored agents so they cannot protect all data. In addition, this study establishes a small number to avoid Zeno behaviors about Newton-downhill factors which traditional researches do not consider. The contributions of this study are summarized as follows:(1)Reinforce the protection of users’ privacy. In the annular directed distributed algorithm, devices’ data can only be extracted by themselves. By the annular directed distributed algorithm, all we-energies only transfer a power-heat-gas energy flow to another we-energy. Besides, all devices inside the we-energy only transfer that power-heat-gas flow, too. The energy flow is the summation of previous energy manufacture, energy conversion, and encryption factors. Firstly, each energy device does not know where the energy flow begins (the start place is randomness and that of each time of iteration is different), so the energy device does not know the operating condition of each device. Secondly, the privacy of the started device is protected by encryption factors. When the energy flow starts, it will add several values to each type of energy. With this method, the second device cannot know the operating condition of the first device. However, traditional research cannot protect several types of data among neighbor agents [25–27]. In traditional researches, some ratios, power output, or estimated prices have to be shared among neighbored agents so they cannot protect all data.(2)Reduce the intensity of communication and change the information in communication from last time data to updated data. Firstly, the communication in the annular directed distributed algorithm is single-directed communicating and the communication in traditional researches [27] is non-directed. The non-directed communication means the EI needs to communicate in both ways. So, the intensity of single-directed communication is half of the non-directed communication. Secondly, communication in traditional research is one-to-many communication, while the communication in this article is one-to-one communication. There are several contributions to one-to-one communication. Firstly, the encryption of energy flow described hereinbefore needs that. Secondly, the data one-to-many communication transfers are the data in last time all above, but the data one-to-one communication transfers are the data that have already been updated by the new energy price in this time of iteration, so the information in one-to-one communication is newer than that in one-to-many communication.(3)Avoid abnormal energy conversion successfully. It is worth noting that the price guiding the alternating direction method of multipliers is unsuitable for the energy conversion because the price guiding always leads to the overshoot in energy conversion. Firstly, the cost functions of energy conversion devices are always linear but the cost functions of energy manufacture devices are always convex so too much energy will increase the energy-producing price but will not change the energy conversion price. Secondly, because the energy sold price need to be changed in the control center of the hole EI, a distributed we-energy cannot change the energy price even though too much energy changes to another type of energy. For the reasons, above one type of cheap energy will change all of themselves to another expensive energy even though the energy conversion may consume all this type of energy and produce too many other energies. For avoiding that, this study enlightened by the idea of mistest in reinforcement learning. The literature [30] proposed a mistesting method to solve the problem of energy conversion and use downhill factors to ensure the astringency of the algorithm.(4)Avoid Zeno behavior in the Newton-downhill method successfully. Zeno behavior means some operation is triggered infinite times in finite times of iteration. In this literature, Zero behavior means Newton-downhill factors are adjusted too many times in one time of iteration. Theoretically speaking, the Newton-downhill method will go converge sooner or later, so the Zeno behavior will never appear. However, in the realistic project, if the downhill factor changes too many times in one time of iteration, we will regard it as Zeno behavior. This article solved that issue.(5)Prove that the annular directed distributed algorithm holds asymptotic convergence when the Zeno coefficient reaches maximum value by the monotone-bounded convergence theorem. Meanwhile, optimal performance of the equilibrium point is certified by difference theorem and convex optimization. And by the theory of finite and infinite, avoiding Zeno behavior in certain accuracy is proved, too.

The rest of this study is organized as follows: Section 2 presents the WE model, energy device models, constraints of main features, and requirements about energy devices. Section 3 introduces some basic knowledge about graph theory; presents the annular directed distributed algorithm for the first time; and proves astringency, optimality, and avoiding Zeno behaviors of it. In Section 4, several simulation results are presented to prove the effectiveness of that. Section 5 concludes the study.

#### 2. The We and Device Models in EI

##### 2.1. System Modeling and Test Systems

The distributed energy producer includes distributed renewable generators, distributed renewable heat devices, distributed coal or oil combined heat and power devices, and equivalent distributed gas producers. There are two things worth noting: one is that there are no distributed fuel generators and distributed fuel heat devices because they are both more inefficiently than distributed combined heat and power devices. The other is that there are two kinds of combined heat and power devices in EI: one is the distributed coal or oil combined heat and power devices belonging to the distributed energy producer, which produces power and heat by coal or oil, and the other is the distributed gas combined heat and power devices belonging to the distributed energy conversion devices, which produces power and heat by gas. The distributed energy conversion devices include distributed power to gas devices, distributed electric boilers, and distributed gas combined heat and power devices. The distributed energy storage devices include distributed power storage devices, distributed heat storage devices, and distributed gas storage devices. The distributed terminal users and the distributed energy transform devices cannot be divided into smaller devices.

The distributed energy producer satisfies the constraints below:where is the serial number of WE. If there are WEs in EI, belongs to to . , , and are the total power, heat rate, and gas rate produced by the distributed energy producer devices in th WE, respectively. and are the power rate of the distributed renewable generators and the distributed coal or oil combined heat and power devices in th WE, respectively. and are the heat rate of DRHD and the distributed coal or oil combined heat and power devices in th WE. is the gas rate of the distributed gas producers in th WE.

The distributed energy conversion devices satisfy the constraints below:where , , and are the total power, heat rate, and gas rate exchanged by the distributed energy conversion devices in th WE, respectively—plus or minus of them represents the output or input. , , and are the exchanging power rate in the distributed gas combined heat and power devices, the distributed power to gas devices, and the distributed electric boiler in th WE, respectively. and are the exchanging heat rate in the distributed electric boiler and the distributed gas combined heat and power devices in WE, respectively. , , and are the exchanging gas rate in the distributed energy conversion devices, the distributed power to gas devices, and the distributed gas combined heat and power devices in th WE, respectively.

##### 2.2. WE Model

WE is a basic energy unit that can have devices all above. The model of WE in power-gas-heat EI is as follows:where , , and are power, heat, and gas, respectively. Vector and are energy flow in terminal side and network side—plus or minus and an absolute value of the element in vector represent the direction and rate of energy flow, respectively. Besides, the following constraints are limited to micro-power-system in WE:where is the power flow between th WE and others—plus or minus and the absolute value of it are the direction and rate of power flow, respectively. The following constraints in micro-heat-system and micro-gas-system in WE are similar to constraints above. All are changed into or correspondingly. Matrix represents energy flow’s proportion of allocation and efficiency of energy conversion. How to design matrix ? Different research has different points of view in it. Ref. [8] models matrix as the dot product of Hadamard matrices and efficiency matrices. But Ref. [8] prohibits circumflex in WE. The circumflex is harmful to smart grid, but may not be harmful to the distributed energy conversion devices in EI because the distributed energy conversion devices could never shorten out. Although circumflex will waste certain energy due to loss in energy conversion, because of a lot of start-stop constraints and ramping rate limits in the distributed energy conversion devices, circumflex is needed in energy management. So, this study models matrix as follows:where and are Hadamard matrices. An element in is or represent that there is or is not corresponding energy flowing from network side to terminal side. Oppositely, that in is or represents that there is or is not corresponding energy flowing from terminal side to network side. Elements in and are corresponding energy flow’s proportion of allocation and efficiency of corresponding energy conversion. For example, if an element in is ,

There will be proportion of energy from network side converting into energy in terminal side, and conversion efficiency is . So, is a positive number smaller than . Oppositely, if an element in is ,

There will be proportion of energy from terminal side converting into energy in network side, and conversion efficiency is . So, is a number larger than . It is worth nothing that, if equals to zero, will be meaningless. On this occasion, we stipulate as a small positive number in order to run the distributed algorithm. Constraints in ensure that could not influence precision of results. So, in power-gas-heat EI, the WE matrix is as follows:where SST is a solid-state transformer and EWC is corresponding energy without conversion. Energy flow in the network side satisfies the constraints below:where is the total of WEs.

##### 2.3. The Distributed Energy Producer Device Models and Cost Functions

###### 2.3.1. The Distributed Renewable Generators and the Distributed Renewable Heat Device Models

The distributed renewable generators include wind-driven generators and solar-driven generators. But DRHD only includes solar-driven heat devices. Wind and solar are free, and the operating cost of taking the advantage of renewable energy resources is such little that it can be ignored. Models and cost functions of the distributed renewable generators and DRHD are as follows:where wind and solar are kinds of renewable energy resources. is the operating cost function of corresponding device. is hours from to. and are the rate of power and heat. It is worth noting that energy management in this study is hourly dispatch, so all-time in this study is in hour units.

Constraints of the distributed renewable generators and DRHD are as below:where min and max are corresponding minimum rate and corresponding maximum rate of corresponding energy in corresponding WE.

###### 2.3.2. The Distributed Coal or Oil Combined Heat and Power Device Models

The distributed coal or oil combined heat and power devices adopt coal fuel to produce power and heat. Models and cost functions of the distributed renewable generators and DRHD are as follows:where and are power and heat rate of the distributed coal or oil combined heat and power devices generating, respectively, and is the thermal rate of coal the distributed coal or oil combined heat and power devices consuming. is the energy conversion of the distributed coal or oil combined heat and power devices. is the ratio of heat and power. It is worth noting that, coal does not belong to power-heat-gas network of EI. So, energy management cannot influence coal’s price and the production of coal. People cannot produce coal or oil, after all.where and are the price of heat and power obviously. The operating cost function of the distributed coal or oil combined heat and power devices iswhere , , , and are constants, and , and are positive constants. The distributed coal or oil combined heat and power devices satisfy the constraints below:where is the power ramping constrain of the distributed coal or oil combined heat and power devices. , , , , , and are constants.

###### 2.3.3. The Distributed Gas Producer Models

The operating cost function of the distributed gas producers iswhere , and are constants and is a positive constant. represents the rate of gas. The limit of the distributed gas producers iswhere and are lower and higher limits of the distributed gas producers, respectively.

##### 2.4. The Distributed Energy Conversion Device Models and Cost Functions

###### 2.4.1. The Distributed Power to Gas Devices and the Distributed Electric Boiler Models

The models and cost functions of the distributed power to gas devices are as follows:where is the energy conversion efficiency of the distributed power to gas devices. is a positive constant. The limit of the distributed power to gas devices iswhere is the start-stop constraint of the distributed power to gas devices, is the surplus power rate in the network of EI. The models, operating cost functions, and limits of the distributed electric boiler are similar to that of the distributed power to gas devices. We only need to replace gas with heat.

###### 2.4.2. The Distributed Gas Combined Heat and Power Device Models

The model and operating cost functions of the distributed gas combined heat and power devices are as follows:where and are the power and heat rates of the distributed gas combined heat and power devices generation, is the gas rate of coal of the distributed gas combined heat and power devices consumption, is the energy conversion of the distributed gas combined heat and power devices, and is the ratio of heat and power. The constraints of the distributed gas combined heat and power devices is: , which is similar to that in the distributed power to gas devices. The constraints of is similar to that in the distributed coal or oil combined heat and power devices.

##### 2.5. The Distributed Energy Storage Devices Models and Cost Functions

###### 2.5.1. The Distributed Energy, the Distributed Power Store Device, the Distributed Heat Storage Devices, and the Distributed Gas Storage Device Models

The distributed power storage devices have an optimal condition about reserve of stored power. If the stored power is less than optimal condition too much, it will harm batteries and other devices. If stored power is more than optimal condition too much, the stored power will loss too much. So, the optimal performance of the distributed power store device iswhere is the optimal function of the reserved power in the distributed power store device, is the stored power in time , is the optimal reserve power in the distributed power store device, and are constants, and is a negative constant. The cost function of the distributed power store device iswhere is a positive constant and is the power rate of the distributed power store device. If is positive, it expresses power output, vice versa. So, we can knowThe distributed power store device needs to satisfy the limits below:where and are the maximum limits of power input and output rate of the distributed power store device, and and are capacity minimum and maximum values, respectively.

The models, operating cost functions, and limits of the distributed heat storage devices and the distributed gas storage devices are similar to that of the distributed power store device. We only need to replace power with heat or gas.

The energy loss in the distributed energy transform devices is very loss, for convenience, so we ignored that.

##### 2.6. Energy Load Models

The must-run load and controllable load which traditional research including Ref. [20, 21] adopts may be unsuitable for EI because of several reasons that I proposed in the preceding part of this study. So, we only adopt , and to represent power heat and gas loads. If EI supplies less energy to WEs than which they need, the terminal users’ energy demand will not be satisfied. But if EI supplies more energy to WEs than which they need, it will waste a lot of energy. So, the operating cost of EL depends on the unbalance between energy supply and demand. The cost function of power EL is as follows:where and are two positive constants. The reason for dividing into and is that the harm of surplus and lack of power is different. The cost functions of heat and gas are similar to that of power. The only difference is the type of energy.

##### 2.7. Object Functions

This study focuses on the economical optimization by energy management in WEs and EI. So, the object function is used to co-planning all WEs to realize the maximize of the economy in (22):where is the economy function of each WE; is the serial number of each devices in WE; and are price of gas and coal; , , and are energy flow rate of power, heat, and gas, respectively. If they are positive, it means that the devices output the corresponding energy, vice versa. Of course, they can be zero. is consumption of coal, which is non-negative. is the operating cost function of devices.

#### 3. The Annular Directed Distributed Algorithm and Its Certifications

##### 3.1. Basic Knowledge of Graph Theory

The graph theory adopts to represent a graph. is a finite nonempty set of nodes in the graph. And the is the set of sides. The side means that there is a side between and . is the weighting neighbor matrix of the graph. The weighting neighbor matrix is used to express the relationship between nodes and sides. The diagonal elements in that are all zero constantly. If the non-diagonal element , . But if , . In the undirected graph, sides between nodes are not directed, so equals to . The paths between and consist of a lot of sides like , . If there is a path between and , we define that and are connected. If entire pairs of nodes are connected, we define that the graph is connected. If all elements in except diagonal elements are positive, the graph is complete.

##### 3.2. The Relationship between Graph Theory and EI

Traditional researches [19, 20] use an undirected connected graph to model EI, use nodes to model WE or other agents about energy microgrid, and use sides to model channels which can transfer information and energy because they think the undirected connected graph can not only control all WEs in EI due to the path between entire pairs of nodes but also protect users’ privacy data which could only be acquired by neighbor nodes. They may be right to some extent. Agents in the unconnected graph cannot communicate among all nodes and that in the complete graph cannot protect users’ privacy. But that model has some serious disadvantages. Firstly, agents’ privacy data can be acquired by neighbor agents, which cannot protect users’ privacy entirely. Secondly, only-neighbor communicating causes a lot of trouble for the distributed algorithm in comparison with that in the complete graph. As for solving this problem, some researches pursue the consensus of tiny growth rate about voltage, air pressure in gas pipeline, and flow of hot water [29]. Although the consensus makes the distributed algorithms easily, it may not be the most optimal method for energy management. Thirdly, if an agent is strict with privacy and unwilling to communicate with other agents, the only way is to segment it from the whole system of EI. That agent will be operated in island mode and other agents will be operated in grid-connected mode, which is very bad for unifying dispatch of EI. Fourthly, only-neighbor energy transformation leads to a lot of energy loss and operating costs. Information has privacy, but energy flow does not have, after all! Last but not least, the connected but most complete graph is not well distributed in compactness, which is very bad for controllability of EI in accordance with the theory [24] proposed.

For solving these problems, this study proposed a new algorithm named the annular directed distributed algorithm. In the annular directed distributed algorithm, the path of information and energy is separate. The information path is a directed annular path, which is shown in Figure 1 and the hole energy path constitutes an undirected complete graph. After ensuring all devices’ operating conditions, how to transmit corresponding energy from the supply side to the demand side will be an elementary math problem that does not need algorithms. So, the most significant problem of energy management in the annular directed distributed algorithm is how to ensure devices’ optimal operating condition in the information side.

##### 3.3. Main Algorithm

The proposed management in the annular directed distributed algorithm is to ensure devices’ optimal operating condition in the information side. The main algorithm is shown in Table 1. The method in step 12 is:

If we want to change the type of energy to the type of energy, the energy input will be updated by the method that:where is the input of energy (the starting value of is initialized by step 3), is the number of iteration times, is the efficiency of energy conversion, and and are the energy prices of energy and . What is noteworthy is that if a device can change one type of energy to two or more types of energies, the price of output energies is the weighted average of all output energies, and weighted factors are the rate ratio of that energy to hole output energies. is the energy conversion price from energy to energy , is a downhill factor whose effect is to adjust devices’ operating condition in case of divergence of the annular directed distributed algorithm. does not change between different types of the distributed energy conversion devices, the starting value in each iteration of is , and the updating conditions and methods of that will be introduced below.

The method in step 14 is as follows:

where , , and are the power, heat, and gas which the energy management supplied to energy load in th WE, respectively. But they may not be equal to , , and . So, we should adjust energy prices. We use cost functions of ELs as subgradient functions to adjust the energy price. We adjust power price like Figure 2. in Figure 2 is a small positive constant, which may be different with different types of energy. By the way, the precision of and is no possibility infinite in practical engineering, so if they are very less theoretically, we regard them as zero. is another Newton-downhill factor about avoiding overshoot, if one type of energy supply-demand mismatch changes symbol, .

The method to adjust the price of gas and heat is similar to that of power, so we only need to change the energy type. After price adjustment, we should inspect the astringency of the algorithm. Whichever supply-demand mismatching in all types of energy absolute value in times of iteration is more than that in times of iteration, or supply-demand mismatching in all types of energy value changes symbol, the result in step 14 must be invalid. The algorithm will return step 12 or step 3, respectively, and energy management will amend downhill factor or to half of quondam value and repeat processes above until all energy supply-demand mismatching absolute value in times of iteration is no more than that in times of iteration. Besides, the value of or in times of iteration should not be retained into times of iteration. It will initialize into again in that. What is always ignored by traditional research but is very significant to energy management is there is a problem of Zeno behavior. Zeno behaviors mean some operation is triggered infinite times in finite times of iteration. In the annular directed distributed algorithm, Zeno behaviors are that the frequency of that or change is too high in one time of iteration.

It is worth noting that, because accuracy in down-to-earth engineering is limited, if the energy supply-demand mismatch is very less, we can regard energy supply-demand balance as achieved and stop algorithm. Besides, if we do not stop the algorithm in that circumstance, the algorithm result may be choppy near the exact value due to the energy mismatch is less than that the small positive constant adjusted.

Four things need to be added. Firstly, after one time of iteration, the sequence of WEs should be changed. The th WE will be the th WE, and the first WE will be the last WE. We should transmit all information from the old first WE to the new first WE before iteration. The reason for that is too much control and computing load is at the last WE. Changing the sequence can relieve the load of the last WE. Besides, it can also increase the precision and universality of algorithm results. Secondly, all initialized energy flow and energy load flow is needed to be initialized over and over again in each iteration. The annular directed distributed algorithm has a great advantage in which it can protect each user’s privacy much better than traditional EI or traditional multiagent systems [25–27].

Although preceding researchers can protect users’ privacy which cannot be searched by all agents, neighbor agents still can access their private data. But in the annular directed distributed algorithm, all agents can only access total before themselves. However, the privacy of the first agent cannot be protected by this method, hence we use fictitious initial energy flows to protect it. For reinforcing the confidentiality of privacy data, initial energy flows should be changed each iteration. Thirdly, privacy protecting is needed not only among different WEs, but also inside WEs. The information inside WEs transmitted in one directed line whose direction is identical to the direction of the information path between WEs. Fourthly, although the annular information path has numerous advantages, it is exceeding sensitive to malfunctions. For handling this issue, if a device in one WE is broken down, the energy load in that WE will operate by island mode and other WEs will operate by a mode combined to the grid as normal. Finally, in the annular directed distributed algorithm, the information path is different from the energy transmission path. The energy transmission path is independent of privacy protecting, so all devices can transmit energy to others. After realizing a balance between energy supply and energy demand, how to transmit energy in the shortest way is an easy problem which does not need complex algorithms, so this study does not discuss energy transmission path. It is worth noting that the optimization in this article is distributed. The principle is to adjust energy price to change the energy mismatch. If the adjust of energy price is overshoot to the optimization valve, the algorithm will be oscillation or divergency and the energy supply-demand balance will never be reached. So, we should adopt the Newton-downhill method to avoid the overshoot of energy price.

We list the data exchange and privacy protection that is required by the proposed distributed algorithm and conventional distributed methods in Tables 2 and 3 (✔ for entirely exchanging, ✖ for not exchanging, ● for cryptographically exchanging) (✔ for protecting, ✖ for not protecting).

From that two tables you can know that the proposed algorithm can protect the data of power-heat-gas output or input conditions of each device better. It is worth noting that, all manufactures of one type of energy are commercial competitors, so are all we-energies. So, it is unreasonable for conventional distributed methods to regard some energy manufactures and some we-energies as neighbor agents and exchange data among them. The data cryptographically exchanging method in this article is a better method.

#### 4. Testification of Convergence Analysis, Optimality, and Avoiding Zeno Behaviors

The convergence of the algorithm and the balance between energy supply and energy demand are proved below.

Firstly, we establish an assumption that the operating condition of the distributed energy conversion devices in times of the iteration is equal to those in times of the iteration. Under that circumstance, all energy supply-demand is decided by formula (27). We discuss power supply-demand as an example. We can calculate power input or output in each of the distributed energy producer and the distributed energy store devices by solving the partial differential equation below.And we can disassemble by:

So, we can transform (28) into

Due to the non-convex of , is a decreasing function. If power is excess in EI, the price of that will decrease. So, the solution of (32) will be less, vice versa. Moreover, because of the downhill factor , if overshoot will never appear, will reduce until overshoot vanishes. And the change of only alters the adjusting extent of power price but does nothing about adjusting the direction of that. So does not affect the monotonicity of power price. It is worth noting that the monotonicity of power price aims at power price when adjusting of finishes. The power price of the overshoot systems needs to be abandoned so it is meaningless to energy management. Above all, we can draw a conclusion in line with mathematical induction that under the assumption that the operating condition of the distributed energy conversion devices in times of the iteration is equal to that in times of the iteration, the power price, which is one of the results of the algorithm, is monotone. However, without the assumption, is the power price monotone? The answer is right. A contradiction method is used to prove it.

First of all, we set up an assumption that the power price is not monotone. So, step 12 to step 14 will be an endless loop and will be halved over and over again. Hence,

So, the operating condition of the distributed energy conversion devices in times of the iteration is equal to that in times of the iteration. On the basis of the conclusions mentioned above, the algorithm is monotone, which is in contradiction with the assumption at the beginning of the contradiction method. So, we can prove that the power price is monotone. It is worth noting that the proof process does not contain the circumstance that when the power supply-demand mismatch tends to a very small value. If that mismatch is very small, we will deem that the power supply-demand is balanced and we will regard it and as zero in practical engineering. Due to the finite precision of measurement and operation in practice, it is useless to discuss the small power supply-demand mismatch.

Because is small, power supply-demand mismatch cannot change direction without going through a small value. And due to the reason above, if that is small, we will regard as so the power price will not update. So, the power price is unilateral bounded and the bound is the value when that mismatch is exceedingly small.

In accordance with the monotone-bounded convergence theorem and conclusions all above, we can prove that the power price is convergence. We can figure out the value of power price when it is convergence by the way that:

So, , the price of power will converge to a value that can make the power supply-demand balance. Similarly, the price of heat and gas will converge to a value that can reach the heat or gas supply-demand balance, too. The proving process of them are analogical to that of power, and we only need to change the types of energy. To sum up, after numerous times of iteration, all types of energy prices are converged and all kinds of energy are balanced between energy supply and energy demand. EI is stabilized.

The optimality of the convergence point in the annular directed distributed algorithm is proved below.

Similar to convergence proving, the attesting of optimality in energy management needs to prove optimality about power systems without energy conversion first.

Because is a convex function, is an increasing function. Step 11 in the annular directed distributed algorithm requires all power-producing devices to choose operating conditions when . At the convergence point, power supply-demand balance is satisfied. We assume another operating condition of EI as device produce power less than its power-producing in the annular directed distributed algorithm. For maintaining power supply-demand balance, device will produce power more. Cost decrease in is . is backward difference gradient in the convergence point of device . Analogically, cost decrease in is . is forward difference gradient in the convergence point of device . Because all are convex functions, . So, the convergence point is optimal for power without energy conversion. By the same token, the convergence point is optimal for heat and gas without energy conversion. And we should prove optimality among energy conversion.

Because is a very small constant, energy price in a large number of iteration only changes a little. Hence, the speed of energy price changing is much lower than that of energy conversion changing so that we can ignore the change of energy price when we study energy conversion. If is more than , due to (28), there is more and more energy that changes from to until is equal to . Thereafter, is equal to though the hole iteration. Whenever energy price changes a little, energy conversion will change at a far high speed to reach equality between and and goes along with slowly energy price changing. That equality is still satisfied until convergence point. By the way, because of the difference between that two speeds, frequency about adjusting of is much less than that of . So, Zeno behavior never happens in . However, the Zeno behavior never happens in , either. And the reason for it will be described in this literature, too. We assume another operating condition of EI as energy transforms energy less than its energy conversion in the annular directed distributed algorithm. For maintaining power supply-demand balance, energy management should produce energy less and produce energy more. The cost decrease in producing and transforming in is . And the cost increase in producing in is . and are difference gradients. Because all are convex functions, . So , energy conversion in the convergence point is optimal. In addition, equal relations mentioned above do not consider the influence of constraint. So, it is no wonder that in reality EI project,

To sum up, the convergence point in the annular directed distributed algorithm has optimality.

Avoiding Zeno behavior of the annular directed distributed algorithm is proved below:

On account of the reason in the preceding part of this literature, Zeno behavior never happens in . But Zeno behavior in still needs analysis.

If overshoot happens, energy overshoot and energy mismatch in the last time of iteration are all finite for the reason of if they are infinitely small we will regard them as zero and energy supply-demand are reached. (Both infinitely small and infinitely great are all infinite.) The adjusting of energy price can be calculated through linear or quadratic functions (all functions in this literature are linear or quadratic) by four fundamental rules, gradient rules, and inverse function rules from finite values (energy overshoot and energy mismatch in last time of iteration). Hence, they are finite, and so adjusting times of in one or finite times of iteration is finite, thus Zeno behavior does not happen in or .

To sum up, the annular directed distributed algorithm is not only optimal but also convergence. In addition, Zeno behavior never occurs in it.

#### 5. Simulation Results

The framework of the EI system used to test the annular directed distributed algorithm containing 5 WEs and data of devices all above are exhibited in Appendix. In this article, if all the types of energy mismatches are less than , we think of the balance of energy-producing and energy-consuming as achieved and regard as zero. After 42 times of iteration, that balance is reached. The simulation results are discoursed below

Figures 3–5 are prices of power, heat, and gas. Figures 6–8 are supply-demand mismatches of power, heat, and gas. The Zeno coefficient is times of adjusting. It shows that after 42 times of the iteration, when the Zeno coefficient is 2, power, heat, and gas mismatch are all lower than . At this moment *t*, the power mismatch is less. The heat mismatch is more. And the gas mismatch is near zero in experimental precision. Comparing with traditional distributed algorithm 28 which needs hundreds of times to reach energy supply-demand balance, the annular directed distributed algorithm is exceedingly quick. EI system should fix the prices of power heat and gas as ￠ per , ￠ per , and ￠ per . (Due to accuracy of USA dollars, retain prices to integral multiples.) Figures 9 and 10 are times of and adjusting in each time of iteration. Times of those are no more than twice as they show. So, Zeno behavior does not appear. 11 and 12 are the power-heat-gas mismatch in 100 times of , and Figures 13–15 are the power-heat-gas mismatch in 0.01 times of . They show that if the value of is too large, the algorithm will vibrate seriously. If the value of is too small, the algorithm will converge in a very slow speed. So, the algorithm in this article is very sensitive to the value of . To this end, the plug and play performance of the proposed distributed method is low because if the EI framework and the energy load changes largely, it is very hard for us to adjust . What's more, the proposed method ignores energy transmitting cost so some areas which are hard to transmit energy are unsuitable for the proposed method. However, some areas require large demand of privacy protecting, so they must adopt the proposed method.

EI is a new energy system in scientists’ conceive. Although EI has got large concern among researchers, there is not an unabridged EI system with a high permeability of renewable energy resources, a large scale of physical system, and a highly interconnected network among different kinds of energy nowadays because it has just been proposed. A lot of cases in articles which are imagined by authors may be absurd and unreasonable in actuality. The only thing we can know is the energy demand. We summarize various energy demands in the world in Table 4 and analyze if they are fit for the proposed algorithm (✔ for fit, ✖ for unfit). Because there are too many kinds of energy demand in the whole world, our work may be incomplete.

A1 is suitable for the proposed distributed method because the business competition in urban is sharp and the privacy protection demand is large. A2 is unsuitable for the proposed method because the energy load is changeable which cause great trouble of . A3 is unsuitable for the both traditional and proposed method because the heat and gas transmitting is hard in that area. They need another method about heat and gas transmitting. A4 is suitable for the proposed method because the privacy protecting in that area is important due to political factors. A5 is unsuitable for the proposed method because the privacy protecting in that area is not important. A6 is suitable for the proposed method because the change of that area is very slow and the is easy to choose. A7 is suitable for the proposed method because the business competition in that area is serious so the privacy protecting is important. A8 is suitable for the proposed method because the change of that area is very slow so the is easy to choose. To sum up, the proposed method is suitable for some cases with high demand of privacy protecting and some cases which change slowly. However, it is unsuitable for some cases with low demand of privacy protecting and some cases which change quickly.

#### 6. Conclusions

Based on the traditional distributed and the alternating direction method of multipliers algorithm in energy market, this article proposed a new communicating and optimizing algorithm of energy management EI. EI in this algorithm communicates information in an annular way, which can not only greatly reduce communicating times, but also can protect the privacy data of all agents that can only be searched by itself. Compared with previous privacy protection in multiagent systems in which privacy data are transmitted to neighbor agents, privacy in this article is protected much more strongly. In addition, this article uses the subgradient method to quicken the annular directed distributed algorithm and solve the issue of astringency in energy transforming. Simulation results and theoretical identification containing the monotone-bounded convergence theorem, theory of limit, and contradiction have demonstrated the effectiveness of the proposed algorithm (see Table 5).

#### Appendix

Figures 16 and 17 are structure of we-energy 1 and all others we-energy. Figure 18 is EI in simulation test platform of this article. CCWE is the control center of WE.

All data of the simulation test platform are in the chart

The price of coal or oil is ￠ per . We initialize the prize of power, heat, and gas to ￠ per is for power and heat and for gas.

#### Data Availability

The authors confirm that all relevant data are included in the article.

#### Conflicts of Interest

The authors declare that they have no conflicts of interest.