## 4 Applying the Resource Supply Model to a Smart Grid Environment
### Design of ECDCA in the Smart Grid (SG) Environment  
The smart grid is a modern electric power control system. It uses automated control and modern communication to improve the efficiency of power distribution and makes the electric grid safer. In the smart grid, communication between users and the central power station is very important and fundamental. The monitoring and communication in a traditional electric power distribution system have been achieved in some areas; however, they are implemented through a wired network, which requires expensive communication cables and regular maintenance. As a result, this technology has not been widely implemented, due to the high cost [32]. Hence, it is important to develop a cost-effective electric power distribution system based on wireless monitoring and, thereby, allow the system to improve the efficiency by optimizing the power distribution. The main motivation for using the ZigBee network in our work comes from the following analysis. ZigBee is a wireless network standard, which is designed for sensors and control devices. The requirements of sensors and controls are low latency and low energy consumption. Compared with the protocol enter times for Wi-Fi (3 s) and Bluetooth (3-10 s), the ZigBee protocol node enter time is only 15 ms. ZigBee node can work for 6-24 months with two AA batteries. However, Bluetooth can only work for several weeks, and Wi-Fi can only work for several hours. Because the ZigBee protocol is designed for small data transmission, it does not need a high bandwidth. The physical layer of ZigBee uses a direct sequence, so that the analogous circuitry is simple and tolerant. The implementation is cheap. The media access control (MAC) layer does not need large amounts of ROM or RAM. The main requirement of MAC is that is designed to handle a large numbers of devices. The network layer is designed to allow the network to grow spatially, and the layer can handle very large amounts (maximum 65,535) of nodes in a low latency [33]. Usually, there are three kinds of equipment. These are the coordinator, router and end device. In this project, one coordinator and several end devices form a network representing electricity consumption place. The smart grid usually contains three major subparts, and in each subpart, power generation, power delivery and power utilization are done. We use the ZigBee network to collect electric power data and receive the feedback command to change the actual power provision of an electric device. The ZigBee device includes a coordinator and end devices. Several end devices and one coordinator form a ZigBee network to simulate electric power consumption in a particular area, such as in one house or in one room. Several ZigBee networks can be connected together to simulate electric power consumption in a particular region. In Figure 8, different end devices simulate different kinds of electric power consumption of electric devices, and the data will be transmitted to the coordinator through the ZigBee network. After the coordinator receives the data, it will upload the data to the computer through USB, which will be  
Figure 7: The diagram for background settings. published to the DRSM. Then, the DRSM will calculate the data and give feedback to the coordinator. The feedback message will be finally sent to end devices through the ZigBee network by the coordinator. In Figure 8, the electric devices are connected to the ZigBee devices using some particular sensors. These sensors are used to measure the actual electric power of electric devices, and these ZigBee devices that are connected to the electric devices are called end devices. A coordinator creates a ZigBee network. The end devices can join the ZigBee network and, thus, send data to the coordinator and receive data from the coordinator through the ZigBee network. The coordinator is connected to a computer using USB, and the computer is connected to the DRSM through the web service.