## 4 Applying the Resource Supply Model to a Smart Grid Environment
### Design of Charging Request of PHEVs in the Smart Grid (SG) Environment  
The wireless communication technologies are enabled for SG [23]. Multiple supporting communications technologies are local area networking, mobile broadband communications and the cellular network. SG highly relies on these robust and secure communication methods. Using a mobile platform can be a suitable choice to add mobility to SG. [PERSON] _et al._[24] have also investigated a web service based on SG models. They stress three requirements for integrating web services into a smart grid. These are the end-user feedback, automated decentralized control of distributed and demand response and control of the grid stability and islanding operation. [PERSON] _et.al._[25] use the sensor web services to manage the charging of plug-in hybrid electric vehicles (PHEVs). Their study shows that continuous and uncontrolled charging increase of the load during peak hours, while off-peak charging provides the most promising results. However, off-peak charging will not be always successful, as the public charging stations in shopping malls or at business centres are not always available. In [26], the authors have proposed a prediction-based PHEV charging for a smart grid,  
Figure 3: Whole structure of the smart grid scenario. employing a special real-time price setting system. The time period of charging is determined by communications with the smart grid in order to decrease consumer expenses. Currently, the two protocols that can be used for web services are SOAP and RESTfull. Their relative performances have been investigated in [27]. RESTfull was firstly investigated by [PERSON] [6]. The efficiency and power consumption of web services using RESTfull have been shown to be more efficient than SOAP. However SOAP is widely used in web services and is shown to have better compatibility with other applications than RESTfull [28, 29]. Based on these investigations, we were convinced to use SOAP. The integrated structure inside the orange square of Figure 3 is designed for our work. We consider a variety of electric vehicles that need to be charged in the selected electrical station. The electricity purchase decision is made with the assistance of SG-CPS after taking into account some occurrence of electricity shortfalls and the cost of grid electricity. The cloud represents the registry that withholds some information, which has not been decided yet. Whenever doable, the location of the charging station also plays a role in making optimal selections of a charging station. In Figure 3, charging request of plug-in hybrid electric vehicles (CR-PHEV) through the web service are shown in the left orange block. Below is the detailed scenario for our design of CR-PHEVs. When the owner of the electric vehicle wants to charge his car, he can use an app on his Android smart phone to ask for a vehicle charging schedule. The main scenario is that the owner uses his smart phone to send a request to the registry, and then with the feedback from the registry, the client sends the request to the connection layer of the management system. In reality, the location of the car owner is also a factor for SG to make its decision. In our further research, the Google Map positioning system will be included for providing current location information to the management system. A resource list is temporally defined as XML files that contain information of electricity charging stations and other necessary information. The resources can be registered at RODM; thus, the charging places are at the access layer, and the charging requests and scheduling are at the service layer of our whole system. Then, the electricity charging stations may hold their own RSDT and some run-time data of RIN. Table 4 and Table 5 specify a simple example of an electricity charging stations. Figure 4 illustrates the design of the CR-PHEV through the web service. There is a customer manager module that contains relevant personal information of users, such as the user ID, account number and account balance.