Renewable Energy Power Generation Estimation Using Consensus Algorithm

At the small consumer level, Photo Voltaic (PV) panel based grid tied systems are the most common form of Distributed Energy Resources (DER). Unlike wind which is suitable for only selected locations, PV panels can generate electricity almost anywhere. Pakistan is currently one of the most energy deficient countries in the world. In order to mitigate this shortage the Government has recently announced a policy of net-metering for residential consumers. After wide spread adoption of DERs, one of the issues that will be faced by load management centers would be accurate estimate of the amount of electricity being injected in the grid at any given time through these DERs. This becomes a critical issue once the penetration of DER increases beyond a certain limit. Grid stability and management of harmonics becomes an important consideration where electricity is being injected at the distribution level and through solid state controllers instead of rotating machinery. This paper presents a solution using graph theoretic methods for the estimation of total electricity being injected in the grid in a wide spread geographical area. An agent based consensus approach for distributed computation is being used to provide an estimate under varying generation conditions.


Introduction
With rapidly decreasing cost of residential PV systems, there has been a rapid increase in the number of households that have shifted to a grid tied PV system. According to Solar Energy Industries Association (SEIA), the residential solar grew by 51% in 2014 compared to 2013 in the United States.
[1]. The total installed capacity of residential solar crossed the 1GW barrier in 2014 [1]. We see similar trends in most of the other developing countries as well. The Government owned utility (WAPDA) in Pakistan has not been able to add new generation to keep pace with the increase in demand resulting in massive load shedding throughout the country. The Government approved the policy of net metering in 2015 and it is expected that in the next couple of years a large number of households will shift to grid tied systems. The benefits to consumers and the environment are well known. However since DERs are installed at the distribution level of a power network, it can cause a number of issues related to power quality and reliability (PQR) for the end consumer. For Example, in order to properly maintain voltages at the distribution level according to IEEE C84.1 standard [2], which states that for a 120V line voltage a maximum fluctuation of +-5% at the service entrance is allowed and up to 8.5% is permissible under special circumstances for short duration of time. In order to maintain such voltages, the location of the Distributed Generators (DGs) and the maximum current injected in the grid become very important. DGs placed very close to the Load Tap Changing (LTC) distribution transformer with line drop compensation will not be able to accurately measure feeder loading, resulting in over voltage at the far end of the feeder [3]. In addition, the various effects on the grid due to DGs increase as the percentage of power injected in the grid increases compared to the maximum current carrying capacity of the feeder. In [4] the authors have shown that the customers close to the distribution transformer were able to inject 100% of their generated power in the grid without causing any PQR issues, whereas the customers at the end of the feeder were able to inject just 35% of their generated power before the limits for PQR were exceeded. Injection of harmonics due to solid state inverters is another issue that needs to be considered. The IEEE 519-1992 [5] standard specifies the maximum amount of harmonics that can be injected before overheating of system equipment occurs. A maximum of 5% Total Harmonic Distortion (THD) and 3% individual harmonic distortion is allowed. In [6] the authors have investigated the maximum percentage of feeder capacity that can be used for DG before the limits of IEEE 519-1992 are exceeded. They have performed calculations for zero and positive sequence harmonics. In their paper it has been shown that for long length feeders of around 10 miles, the allowable limit drops to just 49% of the maximum capacity of the feeder before the 3% individual harmonic limit is exceeded. In addition to the above mentioned issues, DG can cause voltage flicker and can have an impact on the short circuit currents of the feeder [3]. Keeping in view these problems, it is imperative for the load management centers to have an accurate estimate of the amount of power being injected by these DERs. Since DERs are inherently distributed over a wide geographical area, a central controller is not ideally suited for such conditions. Instead a Multi agent distributed control approach can yield much better and faster results. The distributed technique should also have the ability to cope with rapid changes in the DG topology which can occur due to weather changes or a resource going offline due to some fault conditions. Load management centers typically estimate the power demand and generation on a 15 to 30 minute interval basis. The distributed technique should be fast enough to provide an estimate of the total power every 15 minutes even under changing network conditions. Consensus based graph theoretic methods provide an ideal mathematical foundation to solve such type of distributed networks. Each DG is modeled as an agent with the ability to communicate with other agents in its neighborhood. The advantage of this approach is that each DER just has to communicate in a small geographical area instead of communicating with a central controlled located many miles away. An introduction to graph theory is presented in the section II. A model of the DER has been developed in Matlab and presented in section III. Section IV presents the results of applying the consensus algorithm on the network. Section V concludes the paper showing consensus algorithm to be an effective technique for distributed generation estimation.

Graph theory
A graph is used to model the DER network. Let denote a graph such that = (V, E, A) where V is the set of elements called vertices or nodes, E is the set of pairs of distinct nodes called edges and A = [ ]∈ is the Adjacency matrix. A directed graph has edges with a direction associated with each edge. An undirected graph has no edge directions. The neighborhood ⊆ V of the vertex is the set { ∈ V | E}, that is the set of all vertices that are adjacent to . If it follows that as the edge set in an undirected graph consists of unordered pairs. A graph is connected if for every pair of vertices in V ( ), there is path that has them as its end vertices. Different types of matrices can be associated with graphs which represent different properties of the underlying graphs. The three most important matrices associated with graphs are ( ), A( ) and L( ), where ( ) is the degree matrix i.e a matrix with diagonal entries containing the vertex degrees on the diagonal and remaining entries as 0. The adjacency matrix A ( ) is a symmetric matrix encoding of the adjacency relationships in the graph such that From the definition above it can be inferred that the rows of the Laplacian sum to zero for all types of graphs.

Consensus algorithm
Let (k) be the state of the node i. For a discrete time system the next state (k+1) is given by the equation When the adjacency is symmetric the equation can be written as Then we can write ( ) ( )

It has been proven that the above equation would converge if A is a Stochastic Indecomposable and
Aperiodic matrix (SIA matrix) which has a rank of 1 [7]. The matrix A would be SIA if and only if there exists a spanning tree in the underlying graph of the network.

* ( ) ( )+
That is all nodes reach a single value within a specified time. Therefore so long as there is a spanning tree in the graph we can be sure that a consensus value will be reached.

Estimation of total power using consensus algorithm
A survey of the literature shows that so far graph theory has not been applied in total distributed power generation estimation. In [9] the authors have applied graph theory to solve the economic dispatch problem effectively. In this paper we have used the consensus value reached by the nodes to calculate the total power. This has been achieved by observing that the consensus value reached by the nodes is the average of the initial values of the nodes [10]. Hence if there are n nodes with as the initial power being produced by each DER and the consensus power value is reached after some time (assumption is that the consensus is reached within a 15 minute interval) then total power is given by The same process can be repeated again with new initial values after 15 minutes to get a new estimate.
The interval is small enough that no significant change in power production would occur in that interval from initial values. Taken over a large number of nodes the estimate would be fairly accurate for load dispatch centers. Consensus based algorithm has been implemented in Matlab code. Two different networks have been simulated in Matlab. Fig 1 shows an implementation of 8 nodes representing 8 DERs. The graph is well connected and the edges between the nodes show communication links between the DERs. In figure 2, another topology consisting of 10 nodes has been implemented where node 9 and node 10 have been added to the existing network and node 10 is connected to just node 9 only. This has been done to indicate isolated DERs which communicate with just one other DER in the network.

Modeling in matlab
The initial values of the DERs have been taken as 10KW, 5KW, 5KW, 12KW, 1KW, 15KW, 20KW, 4KW each. Two additional nodes 9 and 10 have been added later with power of 10KW and 7KW each. Simulation time has been set at 20 seconds. Figure 3 shows the results of consensus algorithm with 8 DERs. It can be seen that within 20 seconds or less the nodes achieves consensus and all nodes acquire the final value of 9 KW. The 9KW is the average of the all initial values of the nodes. In Figure 4 the simulation results of consensus algorithm are shown with the additional nodes (DERs) which are more isolated from the network. As can be seen from the results that consensus is again achieved within 20 seconds and the consensus value if 8.9 KW which is the initial value average of all DERs including node 9 and 10.
In the simulations a time invariant topology has been assumed to simplify the design, however the consensus algorithm is extremely robust and so long as a node is connected to just one other node with the network, consensus is achieved rapidly. Even in case with intermittent communication links and delayed update of values of some of the nodes, consensus can be reached but the mathematical formulation of those conditions is more complex and has not been simulated in this paper.

Summary
As we can see from the simulation results in Matlab, that consensus has been achieved using the standard consensus algorithm. The consensus values are 8.9KW for the 8 nodes network and around 9KW for the 10 nodes network. One of the underlying assumptions in this paper is that the number of nodes representing a DER would be known. Using this knowledge it is a simple process of multiplying the number of nodes with the average consensus value to get an accurate estimate of the total power being injected in the system at any given time interval. In scenario 1 with 8 nodes the total power comes to 72 KWs and in scenario 2 with two additional nodes the total power calculated is 89 KWs. These results can be verified by observing the initial values of the DERs. As, can be seen from the initial values of the power being injected by the DERs, that the algorithm accurately calculates the total power being generated at any given time. The simulation results show that the consensus algorithm is a very power technique to estimate the total power injected in the grid without any central controller.

Assumptions
 The underlying graph of the DERs should have a spanning tree.  All DERs are able to periodically update their values and share with their neighbors.  All links are operational within certain time bound intervals.  An unconnected DER will not be included in the total power estimation.  No DER is stuck at any given value. In such a case, the algorithm would fail to give the correct value and all nodes would asymptotically acquire the value of the stuck node.  All nodes are cooperating, and there is no hostile node, remaining stuck at one value or injecting wrong values in the network.

Conclusion
This paper has explored the use of consensus algorithm to evaluate the total power injected in the grid through DERs. The method has been simulated with 10 DERs and random communication links between them. It has been shown that the total power is calculated very quickly and accurately. Consensus is achieved in less than 20 seconds. The method is extremely robust and can be scaled to any number of DERs distributed over a large country or a geographical area. The algorithm works without a central controller and the nearest DER to a load management center can convey the total power injected. This reduces the cost of expensive long distance communication links and the links will get progressively shorter as the density of DERs increase in a country or a locality. In our future work we plan to model network with a time varying topology and randomly delayed updates. This will more accurately reflect the real world scenario of nodes going down or not being updated due to some fault in the communication network. In our future work we also plan to increase the number of node to more than a thousand and see if consensus can be reached within a specified time frame needed by the load management centers.