Distributed Economic Dispatch Control Method with Frequency Regulator for Smart Grid under Time-Varying Directed Topology

: The paper studies a new distributed control method to solve the economic dispatch problem (EDP) under directed topology based on consensus protocol. Electrical equipment is closely related to frequency, and the frequency of each generator varies independently during operation. Therefore, it hinders the realization of economic dispatch. To solve the problem, we combine a frequency regulator with a consensus protocol, which eliminates the effect of frequency variation on the designed consensus algorithm. Meanwhile, considering the problem of excessive communication cost and low computational efﬁciency in large-scale power systems, an event-triggered mechanism is introduced into the designed algorithm. Furthermore, in order to overcome the unexpected loss of communication links, the time-varying topology mechanism is employed to develop the distributed economic dispatch (DED) algorithm to improve the robustness. Then, the stability of the above algorithm is proved by graph theory and convergence analysis. Finally, several simulations illustrate that our proposed methods are effective.


Introduction
With the emergence of the smart grid, people's power consumption has become more scientific and low consumption. How to solve the problem of power generation in power systems at low cost is an important topic of general concern in society. EDP is a conditional optimization problem, which mainly studies some dispatch methods to ensure reliable power supplies to users with the lowest generation cost [1]. At present, the economic dispatch methods of a smart grid are mainly divided into the centralized method and distributed method. The traditional centralized method requires a central processing unit to capture global resources for all generators and calculate large amounts of data [2,3], such as the Lagrange multiplier method and neural network Approach [4,5]. However, with the continuous expansion of power system scale, it leads to the over dispersion of power systems. In view of this situation, the centralized method has limitations so that the communication cost increases and the processing capacity decreases. Hence, a distributed algorithm is very suitable to solve EDP in the distributed power system [6], which does not need a centralized control center, and each generator only needs to obtain local information of adjacent generators to complete EDP.
In recent years, many DED methods have emerged. Generally distributed algorithms are designed based on consensus protocol [7]. Meanwhile, the solution of these methods Combined with the actual operating environment, the frequency will have a certain impact on the normal operation of the generator. However, some studies in the literature consider the change of frequency. Most algorithms add a frequency control term to the consensus protocol to balance the actual power of the generation and load [11]. This is a novel innovation, but it still has some aspects that are not considered enough. Inspired by the distributed algorithm in [11], in this paper, an event-triggered DED controlled algorithm with a frequency regulator under time-varying topology is proposed. The main innovations and improvements are summarized below: (1) Compared with [11], Ref. [11] considers that the frequency of each generator is always the same. However, in practice, the frequency of each generator may be different due to the uncertainty of frequency variation. Therefore, we introduce a frequency regulator into the consensus protocol to eliminate the impact of frequency change on the economic dispatching process, which is more suitable for the power generation process in the actual scenario, and ensure the balance of power supply and demand. (2) The existing work based on undirected topology [10,11,14,15] does not consider the case of communication disturbance or asynchronous communication; i.e., there is one-way communication between two generators. So, we use a row-stochastic and column-stochastic matrix to design an algorithm under directed topology to solve these problems. So, our algorithm has the characteristics of one-way communication.
(3) The paper adds an event-triggered mechanism to the algorithm, which makes up for the disadvantages of consuming too many communication resources and low computing efficiency in a large-scale power system. Therefore, the communication frequency of our algorithm is greatly reduced. (4) The communication fault proposed in [11] refers to the situation in which a generator cannot measure the frequency, but it does not consider the change of the actual topology caused by the communication fault. We consider that the topology may change at every moment due to line fault in this paper. Therefore, a new time-varying topology mechanism is added into the algorithm to increase the robustness of the entire power system, which makes the algorithm we designed more practical. Different from the design in [17,18], we design a mapping topology function in the consensus algorithm to indicate the topology at any time.
The structure of this paper is divided several parts: we describe some preliminaries in Section 2. Section 3 give a DED formulation and consensus protocol related to economic dispatch. Several DED control methods are proposed in Section 4 to solve EDP. In Section 5, we prove the convergence of the design algorithm through theoretical analysis. Several simulations are carried out in Section 6. Finally, a brief conslusion is provided in Section 7.

Preliminary
This section describes the correlation graph theory used in the paper, which is necessary to describe the communication network. In a smart grid, a directed topology G = (V, E) denotes the relationship between multiple generators, which is composed of To simplify the notation, it is assumed that there is no self-loop at any node, i.e., The in-neighbor and out-neighbor of each node are represented as a ji denote the out-degree and in-degree of each node, respectively. G is strongly connected if for each pair of v i , v j ∈ V, v i = v j , there are paths from v i to v j and from v j to v i .
The Laplacian matrix of a digraph is elucidated as Considering the time-varying topology, the communication topology G(k) changes with each iteration. Suppose the set of all possible topologies isG = {G 1 , n×n . E(k) represents the edge set of the topology at the k-th iteration. A δ(k) is the adjacency matrix in the k iteration corresponding to the current topology. The joint graph of G(k) is defined as ). G(k) is said to be uniformly jointly strongly connected if there exists a constant t > 0 such that G([k 0 , k 0 + t)) is strongly connected for any k 0 ≥ 0 [18]. The in-neighbor and out-neighbor of each node at the k-th iteration are represented as

Formulation of the EDP
EDP aims to minimize generating electricity i's total cost by rationalizing the power of generators. Therefore, EDP is a optimization problem with a constraint condition, so that minimizes the following objective function, where P i represents the output power of the i-th generator. P G = [P 1 , P 2 , . . . P N ] T ∈ R N + .C i (P i ) is the cost function. C(P G ) and P D represent the total cost and total power demand in the power system, respectively. P min i and P max i are defined as the minimum output power and the maximum output power of the i-th generator. (2) guarantees the balance of power supply and demand during the operation of the entire power system. By limiting the output of each generator by (3), we can ensure the normal operation of each generator. In most cases, C i (P i ) is generally a quadratic convex function, which is generally defined as where α i , β i and γ i denote the coefficients of each generator's cost function, respectively. To facilitate problem analysis, the following assumptions are provided.

Assumption 1.
The communication topology in this paper is a directed connected graph. The corresponding adjacency matrix is row-stochastic matrix A = [a ij ] n×n and column-stochastic matrix W = [w ij ] n×n , which satisfy A < 1, W < 1.

Assumption 2.
For generators with frequency regulators, the frequency of all generators can be monitored and initially run at a rated frequency f rated . The frequency of each generator can be different and vary periodically within the normal range.

Centralized Lagrangian Method
In order to solve EDP, the traditional centralized methods mainly rely on some global information in the power system and even require the parameter information of each generator. At present, the Lagrange multiplier method is the main centralized EDP method. Then, the Lagrangian function is defined as follows: where λ is both incremental cost and Lagrange multiplier. Therefore, λ * is the optimal incremental cost, which can be obtained by the Lagrange multiplier method.

Remark 1.
The centralized economic dispatch method requires some global resources of the entire power system and some detailed parameters of each generator. However, if there are too many generators in the power system, the method is not feasible. Hence, we introduce a basic distributed consensus protocol to solve distributed EDP.

Distributed Consensus Protocol
The necessary condition to realize economic dispatch in a power system is that each incremental cost has the same value. For the sake of overcoming the shortcomings of the centralized approach, a discrete-time DED consensus protocol under undirected topology is proposed as follows [11]. However, due to the different ability of each generator to obtain the state information of neighbor nodes, the bidirectional communication between distributed generator units may not be realized. Therefore, we will consider the DED under directed communication.
where λ i (k) denotes the incremental cost of the i-th generator at the k-th iteration. τ is a fixed step size. a ij represents the weight coefficient from generator j to generator i. Let λ(k) = [λ 1 (k), λ 2 (k), . . . λ N (k)], and (10) can be rewritten as where L a is a Laplacian matrix. Using (11), it is more convenient for us to deduce the convergence of the algorithm.

Lemma 1 ([11]
). (11) can converge to the following as: if and only if the communication topology is connected and satisfies where λ i (0) is the initial incremental cost of generator i. 1 = [1, 1, . . . 1] T . ρ(L a ) is the largest absolute value of the eigenvalue of L a .

DED Approach with Frequency Regulator
Based on (10), we propose a DED algorithm with a frequency regulator. Different from the algorithm proposed in [11], the frequency of each generator can be different and fluctuate periodically within the normal range. We add the frequency factor to the consensus protocol by introducing the objective attraction function [18] as follows where T * i (k) denotes a tatget attraction function, which helps λ(k) achieve consensus. In the power system, if all λ i (k) reach consensus under the action of consensus protocol, then From (15), we can obtain T * . Therefore, T * i (k) denotes the error between the optimal value and the current value. Furthermore, we can derive that T * i (k) = 0 when economic dispatch is complete. Therefore, our goal is to design a target attraction function T * i (k) so that our algorithm can reach consensus. Next, we designed a DED algotithm with a frequency regulator to achieve the goal.
where ∆λ i (k) is not only a frequency regulator but also a local frequency error. The frequency regulator can eliminate the effect of each generator frequency deviation because ∆ f i (k) quickly approaches zero under the action of the algorithm. µ and ε are the learning rates. σ is a proportional gain coefficient. N is the number of generators. The real-time discrete frequency of each generator is defined as f i (k). f i (k) changes periodically and stays the same for every period. From algotithm (16)- (18), λ i (k) can be calculated for each generator in each iteration. Then, P i (k) is obtained by (9). After a finite number of iterations, λ(k) converges to the same value. At the same time, the active power of each generator reaches the optimal value P * (k), and the total generation cost is also the minimum; that is, economic dispatch is completed. The algorithm mentioned is summarized in Algorithm 1.

Event-Triggered-Based DED Approach
With the increasing scale of the power system, the amount of resources for interaction between generators has increased dramatically, resulting in low computational efficiency, which may lead to communication congestion and even economic dispatch failure. To solve this problem, we introduce an event-triggered mechanism based on Algorithm 1.
In order to conveniently describe the event-triggered algorithm, a necessary introduction is given first. Event-triggered control means that information transmission is only allowed between generators after triggering conditions are satisfied, which effectively reduces the amount of computation, reduces the waste of communication bandwidth and improves the efficiency of economic dispatch. The notation specification is defined as follows: for ∀i, x i (k) denotes the variable transmitted by the i-th node in the communication topology at the k-th iteration.
denotes the transmission variable of the i-th node at event-triggered time instant k i t i . t i is the number of events triggered at the current time instant for the i-th node. E i (k, x i (k)) denotes the event-triggered function. Then, we define the event-triggered condition as , which represents the new event-triggered instant when the event-triggered condition is met. Moreover, the discrete time method naturally excludes zeno behavior [15].
Consider that the event-triggered mechanism is suitable for large power systems, we introduce leader-follower mode into the algorithm in order to avoid communication failures as much as possible. In this mode, leaders with a frequency regulator can measure the frequency, and followers without a frequency regulator have no frequency measurement ability. Therefore, we introduce a new event-triggered-based DED approach. Follower: Leader: where N L+ i represents the set of neighbor leader generators adjacent to leader generator i. ξ denotes the gain coefficient. y i (k) is an auxiliary variable. ∆P i (k) is the difference of active power between two iterations. A = [a ij ] n×n is a row-stochastic matrix and W = [w ij ] n×n is a column-stochastic matrix. Event-triggered condition: ) > 0, the event will be triggered. (20)-(27) that the leader generator can only receive messages from the neighbor leader and can send messages to any neighbor generator it points to. Meanwhile, the follower can communicate with any neighbor generator. Then, under the action of the consensus term, each generator i's incremental cost can be the same. The algorithm mentioned is summarized in Algorithm 2. Figure 1 shows the flow of Algorithm 2.

Remark 2. It can be seen from
Algorithm 2 Event-triggered based DED approach (Leader-Follower) Measure f i (k): the frequency of each generator at iteration k.

5:
for i = 1 : N do 6: if i is Leader then 7: The i-th generator receives Through (22)-(26), calculate the new value λ i (k). The

Robustness to Time-Varying Topology
At present, most related work generally considers that the communication topology is unchanged. However, in practical applications, the communication link may have uncertain faults, which may lead to changes of communication topology. Therefore, for the sake of solving the problem of imperfect communication, we design a robust DED consensus algorithm for time-varying topology based on the above algorithm, which is very necessary for the future smart power grid. Since the topology is time-varying, The mapping topology function is expressed as G , which represents the topology of the k-th iteration and its corresponding adjacency matrixes are

Assumption 4.
In the case of time-varying topology, A δ(k) < 1 and W δ(k) < 1 can be guaranteed for any A δ(k) and W δ(k) . Communication between leaders is always smooth.

Convergence Analysis
In this part, the convergence of the proposed algorithm is analyzed. First, the convergence of y i (k) and λ i (k) is proved under an event-triggered condition. Second, it is proved that the protocol can converge even considering the time-varying topology. To give the convergence analysis, we need the following lemmas.

Lemma 2 ([37]
). If the graph is connected, its Laplacian matrix is L a and the spectral radius ρ(L a ) satisfies ρ(L a ) < 2 τ , then Lemma 3. M n is the entire n-order matrix, let A ∈ M n , ρ(A) be the spectral radius, then Theorem 1. In a directed connected graph, let Ψ a = 1 − L a . As k → ∞, then k ∑ r Ψ a r can converge by adjusting L a so that Ψ a < 1.
Proof. We can observe that Ψ a , Ψ a 2 , Ψ a 3 , · · ·, Ψ a k is a geometric sequence. Therefore, we can use the geometric sequence summation formula to calculate.
So as k → ∞ and Ψ a < 1 , then Ψ a k = 0. We can conclude that then (37) converges to

Convergence in Time-Varying Topology
Considering the time-varying topology, according to (23), . Then, (23) can take the following form.
Next, we need to prove that )ϕ(r) converges. As mentioned above, there exists an ϕ max that makes ϕ(r) < ϕ max . Under such extreme conditions, if we can prove that the proposed algorithm can converge, then the algorithm must always converge in general. Therefore, we need to prove that According to Assumption 4, we can obtain W max < 1 and W min < 1. Using Lemma 3, (W min ) r are proved to be convergent. Since (51) can reach convergence under extreme conditions, then (51) must be convergent. Therefore, can also be proved to be convergent, which is omitted here. To sum up, (50) is proved to converge. According to Assumption 4, communication between leaders is always smooth; then, the connection between leader generators will not be interrupted in the process of timevarying topology. Therefore, the influence of topology change on the frequency regulator is negligible, which is equivalent to converging to 0 under a fixed topology. Combined with relevant conclusions of (48), we can ignore the value of the frequency regulator in the process of proving the convergence of (30). Let Ξ a δ(k) = 1 − τL a δ(k) , Ξ a δ(k) = 0. Since (50) converges, then (30) take the following form.
. The entries of e(k) have the same upper bound, and every entry of e max is the same. So, e(k) values have upper bounds e max for some norms, i.e., 0 ≤ e(k) ≤ e max . When k → ∞, let e(k) = e max and e(k) = 0, respectively. We can obtain Γ a (e max ) = Γ a (0) = 0, so Γ a (η) = 0. Therefore, (54) becomes The convergence of (55) is proved by mathematical induction.
We deduced that λ(n + 1) converges. Therefore, (55) converges so that it is deduced that (54) converges. It has been shown above that (54) converges, but consensus is not guaranteed. Next, we analyze the consensus of (54) on the basis of (55).

Simulation and Analysis
In this part, we conduct some simulations to verify the effectiveness of our algorithm. Frequency is variable in an electric power system, so we assume that the frequency changes periodically. According to the number of generators, we can divide them into four-generator systems and 10-generator systems. For a four-generator system, we study the economic dispatch algorithm with a frequency regulator under the circumstances of an event-triggered mechanism and the directed graph topology. Extending to 10-generator systems, we simulate economic dispatch algorithms with event-triggered mechanism under time-varying topology in leader-follower mode. Finally, the PI algorithm in [11] is compared with the algorithm we design to verify the superiority of our designed algorithm. Our parameters in the above algorithm are set as follows:τ = 1, ξ = 0.0001, µ = 0.1, γ = 0.00022, υ = 0.5, ε = 0.2, σ = 1.

Four-Generator System
We simulate a four-generator system, and Figure 2 shows the corresponding directed topology. The cost function coefficients and power limit for each generator in the system are listed in Table 1. Next, simulation experiments will be carried out. In this case, we add an event-triggered mechanism to the algorithm and we set the total power demand of the entire power system as 599 kw. Figures 3 and 4 illustrates the simulation results. From Figure 3a, we can see that the output of each generator remains stable whenever λ i (k) reaches consensus. P 1 is affected by the active power constraint and adopts the minimum power generation. The results in Figure 3b show the total cost of power generation in each iteration, and the total cost varies with the changing output power. Next, the frequency variation process for each generator is shown in Figure 3c, and the frequency varies within the normal range. Figure 3d shows the working process of each generator frequency regulator, and we can see that it goes to zero for a very short time after each change in frequency. Thus, the frequency regulator eliminates the influence of the frequency changes. Using the event-triggered mechanism's advantages, the iterative process of incremental cost for each generator is shown in Figure 4a. The incremental cost varies with frequency, and each generator transmits new information to its neighbor generators in the next iteration only if the event-triggered condition is met. Finally, the algorithm can achieve consensus. The iterative process of auxiliary variable y i (k) is shown in Figure 4b, and we can see that y i (k) also converges under the change in frequency. Figure 4c shows the event-triggered instant of each generator, i.e., {k i t i }, i = 1, 2, 3, 4. Moreover, the event-triggered statistics during iteration are listed in Table 2. We can see from Table 2 that the event-triggered mechanism improves the efficiency of calculation. Figure 4d shows the relationship between the power generation and total demand. It can be seen that the balance of supply and demand is achieved within the allowable range of error.

Ten-Generator System
In this part, we simulate a ten-generator system (N = 10). From Figure 5a, we obtain the corresponding directed topology G. The blue nodes are the leaders and the green nodes are the followers. The dotted line indicates the communication between leaders and the solid line indicates the communication between any two nodes.
In order to improve the robustness of topology, we add a time-varying topology mechanism to the event-triggered algorithm. In this case, the 10-generator system uses leader-follower mode, and only the leader-generator has a frequency regulator. From Figure 5b,c, all possible topology sets are set toG = {G 1 , G 2 }, and the time-varying topology G δ(k) ∈G switches between two fixed topologies G 1 and G 2 at each iteration. E 1 and E 2 represent the edge set of G 1 and G 2 , respectively. G δ(k) = (V, E(k)), G δ(k) ∈ ∼ G , which represents the topology of the k-th iteration. Its corresponding adjacency matrixs are A δ(k) and W δ(k) . G δ(k) is defined as follows.
In addition, we need to ensure that G(k) = (V, E 1 ∪ E 2 ) is uniformly jointly strongly connected. Then, we set the total power demand of the entire power system as 4085 KW. The cost function coefficients and power limit for each generator in the system are listed in Table 3. We can obtain the simulation results from Figures 6 and 7. Figure 6 is similar to the explanation of Figure 3; it shows the variable iteration in frequency variation. Figure 7a shows that our algorithm still achieves consensus under the time-varying topology and event-triggered mechanism. Figure 7b shows that the auxiliary variable y i (k) can still converge to a range in a time-varying topology. The information in Figure 7c about the event-triggered mechanism is summarized in Table 4. Figure 7d shows that the algorithm still balances supply and demand in the allowable range of error, reflecting the robustness of the algorithm.

Comparison Experiment
The purpose of this paper is to confirm the validity, correctness and superiority of our designed algorithm; we compare it with the PI algorithm mentioned in [11] from the perspective of event-triggered times, convergence speed and total power generation cost.
After introducing the event-triggered mechanism, from Figure 8a,b and Table 5, we can obtain that the number of iterations in this algorithm is significantly reduced, which reduces the consumption of communication resources compared with the PI algorithm. It can be observed from Figure 8c,d that the PI algorithm promotes the incremental cost to achieve consensus in 18 iterations, while the event-triggered algorithm only needs 12 iterations to achieve consensus. Therefore, the convergence speed of the event-triggered algorithm is higher than that of the PI algorithm. Figure 9 shows that the total power generation cost of the PI algorithm and event-triggered algorithm is almost the same. Under the same total power generation cost, according to the above analysis, the event-triggered algorithm we designed is obviously better than the PI algorithm.

Conclusions
In this paper, a novel DED control method is proposed to solve EDP under directed topology based on consensus protocol, which is suitable for a more general environment. The method introduces a frequency regulator into the consensus protocol to eliminate the influence of the frequency difference change of each generator. Moreover, considering large-scale power systems, we added an event-triggered mechanism to the method to decrease the communication resources. This method only needs to update the current state after meeting the triggered conditions, so it improves the efficiency of our calculation. In addition, the robustness of the algorithm is improved by introducing a time-varying topology mechanism. The mechanism uses the mapping topology function to carry out economic dispatch under the topology at any time. Finally, numerical experiments verify the validity of the method. Nevertheless, the method is not perfect. It is worth emphasizing that the algorithm in this paper also has limitations. For example, our frequency changes periodically. The frequency change period simulated in the experiment is 50 s. In addition, we need to meet a condition when we introduce the time-varying topology mechanism; that is, the topology we design must be a joint uniformly connected graph to meet the convergence of the algorithm. Thus, future works will focus on network attack, transmission losses, ramp rate limits for power generators and other practical operational constraints.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript:

Abbreviations EDP
Economic Dispatch Problem DED Distributed Economic Dispatch Nomenclature symbolic variable describe P i the output power of the i-th generator. C(P G ) total cost. P D total power demand. P min i the minimum output power of the i-th generator. P max i the maximum output power of the i-th generator.
the incremental cost of the i-th generator at the k-th iteration.
τ a fixed step size. a ij the weight coefficient from generator j to generator i. L a a Laplacian matrix. T * i (k) a target attraction function. ∆λ i (k) not only a frequency regulator but also a local frequency error. f i (k) the real-time discrete frequency of each generator. x i (k) the variable transmitted by the i-th node in the communication topology. x i (k) the transmission variable of the i-th node at event-triggered time instant k i t i . t i the number of event-triggered.