# Hybrid Energy Routing Approach for Energy Internet
## 2 Implementation of Energy Internet with Energy Routers
### Structure of Energy Internet with Energy Routers:  
As illustrated in Figure 1, the proposed energy router-based EI in this paper consists of different passive consumers (e.g., smart homes, industrial users, buildings, EVs), distributed power generation units such as solar and wind power, distributed energy storage units, and active consumers referred to as prosumers. As mentioned earlier, a prosumer is a consumer equipped with DREs (such as solar panels, wind turbines) to generate and consume electricity. In this work, the prosumer is represented by a smart home equipped with solar panels, such as in [34]. In the SG, prosumers trade their surplus energy with the utility grid for a small feed-in-tariff rate, which is not the only trading option in the EI. As mentioned earlier, the EI is a peer-to-peer energy sharing system that enables passive consumers equipped with distributed energy sources to trade directly and share energy with each other without the interaction of the utility grid. This creates some benefits for prosumers, consumers and the utility grid. All these elements are connected to a net structure using power lines and energy routers.  
In our system, we consider that the grid used is a three-phase electrical grid characterized by the composed voltage \(V=400\) v, and the frequency of \(50\) Hz. The apparent power requested by the consumer is:  
\[S_{Apparent}=\sqrt{P^{2}+Q^{2}} \tag{1}\]  
where \(P\) represents the active power (\(P=\sqrt{3}\times V\times I\times cos(\phi)\)) and \(Q\) is the reactive power (\(Q=\sqrt{3}\times V\times I\times sin(\phi)\)) with \(I,cos(\phi)\) represents the line current and the power factor, respectively. In general \(cos(\phi)>0.95\), and as a result, the reactive power becomes negligible, and the apparent power is approximately equal to the active power (\(S_{Apparent}\simeq P\)).  
Figure 1: Example structure of the proposed Energy Internet.  
The producer produces power that is an active power since the energy router (converters) do not inject reactive power into the grid.  
In the aim of creating an efficient, scheduled, stable and controlled peer-to-peer energy trading market, we propose a centralized peer-to-peer energy trading architecture that contains a principal actor, named the broker. This broker manages the energy market and adjusts to balance the supply and demand in the energy system by satisfying consumers requests without the need of adding new energy generation units. The broker's role will be discussed in detail in the following section.  
Using graph theory, the proposed EI is modeled as a weighted graph \(G=\{V,E,W\}\) as shown in Figure 2.  
* Energy routers are represented by a set of vertices \(V=\{v_{1},v_{2},\ldots,v_{n}\}\);
* Power lines used for connecting energy routers are represented by a set of edges \(E=\{e_{ij},\ldots\}\), where \(e_{ij}\) is the power line that connects router \(v_{i}\) to router \(v_{j}\);
* \(W\) describes the adjacency matrix of the network \(W=(w_{ij})_{n\times n}\), which reflects the network topology with the weights of both ERs and power lines of EI as shown in Equation (2).  
\[w_{ij}=\begin{cases}w_{e_{ij}}&e_{ij}\in E\\ w_{v_{i}}&i=j\\ \infty&e_{ij}\
otin E\end{cases} \tag{2}\]  
where \(w_{e_{ij}}\) is the weight of the edge \(e_{ij}\), which represents the power loss of the power line that connects routers \(v_{i}\) and \(v_{j}\). While \(w_{v_{i}}\) is the weight of ER \(v_{i}\), which represents its power loss. Both weights of power lines and energy routers are determined by Equations (15), (18) and (19) as shown in Section 5.