# Communication Protocol Design for IoT-Enabled Energy Management in a Smart Microgrid
## 2 System Model  
We consider a smart microgrid, composed of \(K\) number of houses equipped with solar panels, smart switches and HEMSs. The HEMSs include the functionality of scheduling the household appliances based on renewable generation in the microgrid. Given that a household may have excess generation or an energy deficit at certain points of time, they can exchange the energy among each other through local energy trading. To enable energy sharing, these HEMSs communicate with each other to identify the difference between supply and demand in each of the houses. The effectiveness of energy trading operations largely depends on how accurately the generation and consumption information can be decoded by the HEMSs. The following example will show how the errors in the communication channel can lead to a failure in energy trading operation. _Motivating Example:_  
Here, we present an example of a smart microgrid with five houses equipped with HEMSs. Let us consider that House 1 and House 2 have an excess energy of 0.3 kW and 0.7 kW, respectively, at a certain time point. On the other hand, Houses 3, 4 and 5 are in a deficit of 0.15 kW, 0.65 kW and 0.1 kW, respectively, at the same time point. With no errors in the communication channel in an ideal scenario, the EMS optimises energy trading decisions as 0.15 kW power from House 1 to House 3, 0.65 kW power from House 2 to House 4 and 0.1 kW power from either House 1 or 2 to House 5. The remaining excess energy will be sold to the power utility. Now, when the communication channel has errors, the EMS obtains an inaccurate estimation of excess energy from Houses 1 and 2 as 0.2 kW and 0.35 kW, respectively. On the other hand, there are also errors in the estimated demand values for Houses 3, 4 and 5 as 0.2 kW, 0.45 kW and 0.05 kW, respectively. Now, the EMS will make non-optimal trading decisions, delivering 0.2 kW from House 1 to House 3 and 0.35 kW from House 2 to House 4, thus leaving House 4 and House 5 in a deficit of 0.3 kW and 0.1 kW, respectively, which the houses will need to draw from the main power grid. However, Houses 1 and 2 had some excess energy which has to be supplied to the main grid now. Thus, the energy trading operation is not effective. Thus, we need to develop an efficient and reliable communication scheme, which can manage communication channel errors more effectively, by adding multiple communication channels. In the aforementioned microgrid, we consider that the HEMSs coordinate the energy sharing operation in a distributed manner. This is due to the fact that incorporating a central controller will need a huge amount of information to be exchanged between the HEMSs and the central controller. Moreover, there remains the risk of single-point failure in such a system. However, enabling HEMSs to directly communicate with each other will allow the HEMSs to retrieve some information about each other without waiting for transmission from the central controller or gateways in IoT systems. As a result, in this paper, we consider the utilisation of overheard information from nearby HEMSs to improve information exchange reliability. That is, the IoT-enabled HEMSs can act as communication relay nodes that can forward overheard information to other HEMSs and can hence create multiple communication pathways. The aforementioned system model is illustrated in Figure 1.  
The new scheme enables all these HEMSs in the microgrid to communicate with each other without involving the central controller. At the beginning, users with odd-indexed HEMSs will transmit, whereas, the even-indexed HEMSs will act as relay nodes. Then, the even-indexed and odd-indexed HEMSs will switch their roles between transmitters and relays. The relay HEMSs receive the sum of signals from neighbouring HEMSs and forward to these HEMSs so that they can cancel self-interference to extract new signals from other HEMSs. If a HEMS receives signals from two relay HEMSs, it cancels out the common information between these two signals and extracts the new messages.