Optimal Game-Based Energy Management with Renewable Energy for Secure Electric Vehicles Charging in Internet of Things

,e integration of smart grid and Internet of ,ings (IoT) has been facilitated with the proliferation of electric vehicles (EVs). However, due to EVs’ random mobility and different interests of energy demand, there exists a significant challenge to optimally schedule energy supply in IoT. In this paper, we propose a secure game theoretic scheme for charging EVs supplied by mobile charging stations (MCSs) in IoT, considering the dynamic renewable energy source. Firstly, the charging system composed of MCSs is developed to implement the charging service. Secondly, when the secure charging scheme of EV users is designed, the utility function of each entity in the charging system is formulated to express the trading relationship between EV users andMCSs. Moreover, with consideration of the competition and cooperation, we propose a Stackelberg game framework with sub-noncooperative optimization. ,irdly, the existence and uniqueness of both Stackelberg equilibrium (SE) and Nash equilibrium (NE) are theoretically analyzed and proved.,rough the presented distributed energy scheduling algorithm, we can achieve the optimal solution. Finally, numerical results demonstrate the effectiveness and efficiency of our proposal through comparison with other existing schemes.


Introduction
More and more attention is paid to Internet of ings (IoT), which can connect physical devices, vehicles, and other items to the Internet without human intervention [1]. e wireless communication technology in IoT has a great potential to facilitate the integration of electric vehicles (EVs) and charging stations in the smart grid. A large number of sensors deployed in IoT continuously collect the real-time data to improve the applications of automatic equipments and ensure the quality of experience (QoE) [2]. Meanwhile, IoT is envisioned to control and coordinate the balance of energy demand and supply in the smart grid. Especially, besides coordinating the large number of EVs, mobile phones, and computers, empowered with the advanced wireless technology, IoT has emerged as an innovative method to support and improve the applications of renewable energy [3,4].
EVs play a significant role on the transportation in IoT [5]. With consideration of EVs' limited capacity, they have to charge their batteries frequently, which bring about the unfavorable effect on the applications of EVs [6]. Fortunately, fixed charging stations (FCSs) can solve the charging problem in a convenient way. Since the advent of FCSs, the fast and efficiently optimal scheduling strategies have been studied and applied for charging EVs [7][8][9]. However, the charging time of EVs always exceeds one hour by the current charging technology. For example, the charging time of Bayerische Motoren Werke (BMW) i3 is about 4 hours at least. us, when EVs arrive at an overload FCS, they have to wait for a long time to be served due to the large amount of energy demand, including the time spent in the driving route. Besides, a potential shortcoming for charging EVs is the high fast-charging requirement to improve the number of supplying EVs per hour [6,8]. ough energy operators supply the fastcharging service to EV users, the high payment in designing the charging stations is nonnegligible.
anks to the design of the mobile charging station (MCS), it is conceptualized as the combination of communication technology and underlay charging service [10,11]. Compared with FCS, MCS can easily supply the charging energy to EV users in a less waiting time. Especially, combining with IoT, it is helpful for EV users to buy energy more conveniently from MCS than FCS. It mainly brings about the following four advantages [12][13][14]: (i) within the coverage of IoT, it allows EV users and MCSs to exchange information and make the charging decision in advance. EVs close to road side units (RSUs) can transmit the information to the others far away, including MCS operators and the other EV users. us, MCS operators can make the charging decisions to reduce the charging time for EV users before they arrive at MCS. (ii) e charging service can be easily supplied to EV users in the charging peak time from MCS. Due to the information shared with each other in IoT, MCS can communicate with EV users in real time to mitigate the queue backlog for charging. (iii) Based on MCS's random mobility, EV users need not pay much attention to the state of charge (SoC) in batteries. For example, assuming that the amount of energy in EV's batteries is not enough to arrive at MCS, the performance of MCS's random mobility guarantees and supports its long-distance driving to charge EVs with low SoC.
In practice, various factors related to both EV users and energy supply in MCSs will heavily affect their profits, respectively, e.g., different interests of energy supply in renewable energy (RE) and traditional energy (TE), and limited energy supply.
ough EVs powered by electricity have different requirements in the kind of energy, it allows EVs to be charged by RE and TE simultaneously [12,15,16]. Such energy trading not only reduces the charging burden in MCSs but also improves EV users' QoE [17,18]. In the current works, many different approaches have been reported to improve the efficiency of energy charging and reduce the gas emission [19][20][21]. However, it is still challenging to provide the secure charging service to EV users in IoT. Firstly, most of them neglect the security of energy charging or supply, though it considers the failure or uncertainty of energy transmission in the smart grid. ough there exists the information asymmetry to protect the security of EV users in the contract-based approaches, the deficiencies restrict the applications of the contract-based mechanism, e.g., it is very complex to prove the existence of the contract item based on the individual rationality and incentive compatible [9]. In addition, the dynamic supply of RE also makes a significant impact on the energy scheduling of energy supply operators for EV users. For example, the amount of RE supply is variable everyday or even per hour, for which energy supply operators have to design the optimal charging decision in real time. Indeed, the mixed energy supply from RE and TE can be considered since there are different performances in each other. erefore, it is of importance to charge EV users, while considering the performance and security of energy [22][23][24]. It motives us to take the further research to study the randomness of MCS's energy supply as well as the security and stability of energy charging. It also opens the new opportunities for the energy management of MCSs in real time.
In this paper, we exploit the dynamic optimal energy management in IoT, where an incentive game-theoretical scheme is proposed to support the secure energy supply. First of all, by deploying the wireless communication, we develop a two-sided network system in IoT. In this system, EV users can exchange the information with MCSs, which can be charged with enough energy from MCS in real time. Secondly, considering the security of energy charging, an evaluation mechanism is analyzed and discussed. Given both RE and TE, we model the interplay among EV users, renewable energy operators (REOs), and traditional energy operators (TEOs). irdly, by jointly maximizing their own profits, this charging problem is formulated as an optimization problem. Afterwards, we present a two-stage Stackelberg game scheme with a sub-noncooperative mechanism while its existence and uniqueness are proved. Finally, numerical results demonstrate that EV users can obtain higher utility through our proposal, while maximizing the profits of MCS, e.g., the value of EV users' utilities can be improved no less than 20%, compared with the existing approaches.
We summarize the contributions of this work as follows.
(1) We design the network model in IoT where multiple EV users and MCSs are covered, and then, they can exchange information with each other in real time. Given RE and TE in MCSs, the utility function of EV users, REOs, and TEOs is developed based on the trading relationship among them, respectively. Moreover, considering the security of energy supply, the evaluation mechanism is analyzed and discussed.
(2) In order to maximize their profits, an optimization problem is formulated to decide the optimal charging strategy. Based on the competition and selfishness of REOs and TEOs, we propose a twostage Stackelberg game scheme with sub-noncooperative mechanism. As the leader in the game, both REOs and TEOs offer the energy price to each EV user. en, EV users as the followers decide the mixture of the energy supply from MCSs.
(3) To solve this optimization problem, we adopt the backward induction to analyze and study the Stackelberg equilibrium (SE) while the Nash equilibrium (NE) point is discussed. We further prove the existence and uniqueness of SE in this proposed game scheme. en, we present a dynamic distributed energy scheduling algorithm to simplify this complexity in achieving the solution. At last, numerical results demonstrate that EV users can obtain higher utility through our proposal, while maximizing the profits of MCS.
e remainder of the work is organized as follows. Section 2 presents a brief overview of the related work. e system model is developed in Section 3. en, the gametheoretical optimization is analyzed in Section 4. e case study and related analysis are shown in Section 5. Finally, conclusions are provided in Section 6.

Wireless Communication Technology.
Several previous works have studied EVs' charging problem through the wireless communication framework. Based on both the wireless aggregators and RSUs, Kaur et al.,in [19], studied the scheduling problem related to EVs' discharging and charging, in order to smooth the energy burden. Considering the effect of EV's mobility on the driving scheduling, Aljeri et al., in [21], proposed the lane prediction scheme to reduce the energy consumption based on RSUs. Liu et al., in [25], studied how to decide the EV route planning and satisfy EV users' dynamic demand based on the software defined network. Zhou et al.,in [26], proposed an interactive approach based on the combined optimization problem of dynamic spectrum allocation and EV scheduling in the vehicle-to-grid communication. Su et al.,in [27], modeled the interaction between the energy-constrained devices and unmanned aerial vehicles and presented the multiple-stage dynamic bipartite matching strategy in IoT. Sun et al., in [28], studied how to improve the energy utilization efficiency, through coordinating the traffic network and power distribution network. Ferdowsi et al., in [29], designed the safe controller to protect the autonomous connected vehicles' network being attacked physically. Cui et al., in [30], studied the mobility, low latency, and location awareness in the vehicular ad-hoc network based on the fog computing. Ye et al., in [31], introduced the new line model to maximize the throughput of the wireless powered IoT networks. However, few of them consider the security problems with the energy charging in IoT, where the reputation performance of the charging station cannot be known in the charging service.

EV Charging Scheduling.
As an important energy storage equipment, Houbbadi et al., in [32], introduced an all-night charging strategy to minimize the battery aging cost and enhance EV's driving distance. Considering the random arrival of EV users' charging load, Ahmad et al., in [33], proposed the dynamic scheduling framework. Vaidya et al., in [34], designed a smart EV charging management system to reduce the charging load and energy congestion when a large amount of EV needed to be charged. Alinia et al., in [35], presented the online scheduling of EVs in an adaptive charging network, given the local and global peak constraints. Fang et al., in [36], proposed the pricing scheme with consideration of the dynamic pricing, demand, and environment factors, based on the designed Markov decision process. Lee et al., in [37], exploited the pricing strategy based on the Stackelberg game scheme, considering the competition among multiple charging stations with the renewable energy generator. In order to supply convenient charging service, Zhang et al., in [38], designed a contracttheoretic charging scheme without EV users' complete information. However, few of them take the interests of EV users and the security of energy charging into account in real time, though the optimal energy management can be obtained. e strength of the above approaches is to decide the optimal energy management with the minimum charging cost or the maximum profits. In addition, many of them consider RE supply to smooth the load in peak time.
rough the integration of RE, the charging cost can be reduced with the low investment. However, there are some deficiencies as follows: (i) the above methods cannot be properly used in the dynamic choice of the energy supply from MCS, simultaneously given RE and TE supply. (ii) ey neglect the security of charging or recharging which can disclose the private information of EV users, when EVs arrive at MCSs. erefore, different from previous works, we focus on the protection of EV users' private information as well as the security of charging service from MCSs in IoT. Especially, considering the variable RE supply, it is essential for MCS operators to study and determine the optimal incentive charging strategy.

System Model
is section firstly presents the network model of charging service in IoT.
en, the charging problem in MCSs is discussed and studied, including the utility function and game model. For easy reading, we provide Table 1 as a list of notations which we shall define in this paper. Figure 1, we suppose that EVs with wireless sensors can exchange information, which can help them make the optimal driving route besides RSUs deployed in IoT. Charging station management (CSM) can supply RE and TE from MCS, such as the thermal generation (TG), wind generation (WG), and photovoltaic (PV). In order to supply convenient energy charging service, CSM can charge EVs with low SoC by MCSs in time. Meanwhile, it is assumed that both REOs and TEOs can manage how to supply RE and TE in MCSs, respectively, e.g., the energy price and the amount of charging energy. At time slot t, we consider this charging system consisting of one MCS and a set of EV users to be charged, i.e., I(t) � 1, . . . , I(t) { }.

Security Model of EV Charging.
Malicious charging services of MCS will seriously threaten EV users' security and privacy through various information exploitation, such as EV user's personal information, charging preference, and driving records [29]. Considering the information exploitation and disturbance, each EV user would like to choose and buy the energy from the MCS with better protection of their security [39,40]. us, before being charged, EV users have to ensure the choice of MCS, and then, they decide the optimal driving route to that MCS. Here, we suppose that the security mechanism of MCS can be decided through the number of EV users charged recently by itself. According to [41][42][43], the charging time of each EV is smaller than the time duration, e.g., the charging time is twenty minutes while the time duration is one hour. en, the MCS's reputation can be designed as follows [44]: where λ i (t) denotes EV user i's reverse serial number in the total queue backlog based on the number of EV users' charging requests at time slot t and n denotes the interesting parameter of EV users. Moreover, we develop the evaluation function for each MCS as the security scheme of EV users. We have where δ i denotes the preset parameter, Ψ i (t) is the waiting time for each EV to be charged from MCS at time slot t, a binary variable ϑ i (t) is introduced to describe each EV user's choice at time slot t, μ i is a constant parameter to implement the elastic charging decision of each EV user, satisfying , ϑ i (t) � 1 represents EV user i will be charged by MCS at time slot t, and otherwise, ϑ i (t) � 0, e.g., where α i threshold is the threshold value to determine whether EV user i will buy the energy from MCS at time slot t.

Utility Function of EV Users.
As mentioned above, EV users usually focus on the amount of energy and its price which play a significant effect on EV users' profits. us, in order to study how EV users make the charging strategy, we design the utility function based on two parts. e first one represents EV user's satisfaction of charging service. e Table 1: Parameters in the game model.

Notation
Description Set of EV users to be charged by MCS, EV user i's fixed energy supply in MCS D re i (t) Renewable energy supplied to EV user i from MCS D tr i (t) Traditional energy supplied to EV user i from MCS p re (t) Price of renewable energy offered by REOs p tr (t) Price of traditional energy offered by TEOs EV user i's reverse serial number in the total queue backlog ε re and ε tr Adjustment parameters

RSU
where F ev,i (t) is EV user i's satisfaction of charging and R re (D re (t)) and R tr (D tr (t)) denote the payment for RE supply D re (t) and TE supply D tr (t) at time slot t, respectively. Furthermore, the EV user can obtain higher satisfaction with less amount of energy, once EV is charged with enough energy from MCS. In this case, we also take the secure factor of charging service into account. We have where E i (t) denotes EV user i's fixed energy supply from MCS and D re i (t) and D tr i (t) denote the amount of EV user i's charging RE and TE, respectively. Both ω 1 and ω 2 are the influence coefficients of charging energy, satisfying Due to the limited capacity in battery, the total amount of energy from MCS is restrained with a proper upper limit value. us, Here, D i (t) denotes the total charging energy. θ i is the dividing percentage of charging energy in D i (t), satisfying 0 ≤ θ i ≤ 1. en, (5) can be rewritten as At the same time, each EV user should pay for the charging energy at the price offered by MCS. It is worth noting that the price of RE is larger than that of TE since the larger investment in RE is larger than that in TE [45]. We define the cost function for these two kinds of charging energy as follows: where p re (t) and p tr (t) denote the energy price of RE and TE, respectively. Substituting (6)- (8) to (4), it can be rewritten as where θ � θ i | ∀i ∈ I(t) is the multidimensional state vector of dividing percentage for EV users.
In order to maximize EV users' profits, an optimization problem with multiple constraints is formulated as follows: Besides, it is worth noting that EV users prefer RE to TE from MCS, considering the performance of different energy, namely, 0 ≤ ω 1 < ω 2 < 1 in (5).

Utility Function of Charging Renewable Energy.
Driven by more profits, MCS can improve its interests while paying for the fixed cost in energy generation. Due to popularization of the application RE, many incentive plans are made to sell the energy, e.g., the subsidy of buying RE.
us, the utility function of charging RE can be expressed as where F re (p re (t), p tr (t)) is the subsidy function for selling RE and C re (D re (t)) is the investment function for RE generation. According to [6,8], we define that where ε re denotes the adjustment parameter related to the difference between p re (t) and p tr (t). a 1 and b 1 denote the varied velocity of the investment function and the fixed payment, respectively. Substituting (7) and (12) and (13) into (11), we have Mathematical Problems in Engineering π re θ, p re (t), p tr (t) � Similarly, we formulate this charging problem as the following optimization problem, by solving which the optimal charging strategy can be obtained:

Utility Function of Charging Traditional Energy.
Compared with RE, there are many differences in TE, such as the lower investment of energy generation, the lower price, and the larger amount of gas emission. us, through selling TE to EV users, the utility function of charging EVs can be developed as the following expression: where F tr (p re (t), p tr (t)) denotes the subsidy function for selling TE and C tr (D tr (t)) is the investment function for TE generation, which can be defined by where ε tr denotes the adjustment parameter. a 2 and b 2 denote the varied velocity of the investment function and the fixed capital investment, respectively. Substituting (8) and (20) and (21) into (19), we have π tr θ, p re (t), p tr (t) � Similarly, in order to make the optimal charging decision strategy, this problem with the corresponding constraints can be formulated as follows: s.t. (16), (17),

Noncooperative Game Scheme Model.
Considering the interactions among EV users, REOs, and TEOs, we study how to make the optimal charging strategy with the maximum profits for each entity. Here, each profit-driven entity in this charging system aims to maximize its own profits due to the selfishness, while neglecting the others' charging strategy. Moreover, due to the rationality, it motives them to exploit and make the optimal decision with the maximum profits. us, a Stackelberg game is developed to study how to decide the optimal strategy, as shown in Figure 2.
In this game, there are three players including EV users, REOs, and TEOs. Both REOs and TEOs as the leaders offer the energy price to EV users, which are the followers. Here, a two-stage Stackelberg game scheme is formulated to study this charging problem. e detail statement is given as follows: (1) In stage I, based on the competitive relationship between TEOs and REOs, a sub-noncooperative game scheme is designed. en, in order to obtain the maximum profits, we decide the renewable energy price p re (t) and the traditional energy price p tr (t) at each time slot, respectively.
(2) In stage II, based on the energy price offered by TEOs and REOs, EV users study how to ensure the optimal amount of energy.
e charging problem in the proposed two-stage gametheoretical scheme can be solved with the optimal solutions, in which SE can be searched. In this case, once the pricing strategy is decided, they will not tend to change their own decisions.

Game-Theoretical Optimization Analysis
In this section, we study and discuss how to decide the optimal strategy based on the proposed game-theoretical scheme. Here, we use a backward induction approach to obtain SE, through which it also proves its existence and uniqueness. At last, in order to simplify the computation, an iterative search algorithm is presented to obtain the optimal solution.

Optimal Charging Strategy for EV Users in Stage II.
Combining (4) and (7) and (8), we can know that the amount of energy supply in RE and TE plays an important role on the utility of EV users. us, given the energy price, we can decide the energy allocation strategy in the proposed Stackelberg game scheme. e specific approach is stated in detail as follows.

Theorem 1.
e optimal dynamic charging strategy of EV users on the dividing percentage θ i (∀i ∈ I(t)) exists, given the energy prices at each time slot, such as p re (t) and p tr (t).
Proof. See Appendix A. erefore, based on eorem 1, the optimal charging strategy of EV users is expressed as where, in order to simplify the equation in (25), we employ the following notions shown as Υ � B i (t)/ ((p re (t) − p tr (t))

Energy Pricing Decision-Making in Stage I.
In stage I, due to the competitive relationship between REOs and TEOs, the energy pricing strategy of each one will affect the others' decisions. us, it is of necessity to study how to make the optimal pricing strategy for both REOs and TEOs based on the proposed sub-noncooperative game scheme.

Optimal Pricing Strategy for REOs.
Based on the decision of the optimal strategy obtained in stage II, REOs determine how to maximize their profits through solving the optimization problem in (15)- (18). Since the pricing strategy is rational and independent with each other, the best response function can be defined and used to obtain the solutions. Once TEOs offer the energy price p tr (t) to EV users, REOs make the responding pricing plans through the best response function B(p tr (t)) defined as follows: Substituting (26) into (15), it can be rewritten as  Mathematical Problems in Engineering π re p re (t) � Once NE is decided based on the proposed game scheme, no player intends to choose the other strategies in this charging system. In order to prove the existence and uniqueness of NE points, we have the following theorems through which the computation can be simplified.
Theorem 2 (existence). A NE exists in the sub-noncooperative game scheme for REOs at each time slot, satisfying (p re (t) + p tr (t))/2 ≤ a 1 ≤ p re (t).
Proof See Appendix B.
According to eorem 2, the optimal price p re (t) offered by REOs can be achieved as follows: Furthermore, we analyze and discuss the uniqueness of NE in the sub-noncooperative game scheme in eorem 3, and hence, the optimal pricing strategy is unique.

Theorem 3 (uniqueness). e sub-noncooperative game has a unique NE for REOs, if and only if
Proof: See Appendix C.

Optimal Pricing Strategy for TEOs.
With consideration of REOs' pricing strategy, TEOs have to study how to determine their own optimal pricing strategy. Due to the competitive relationship between them, the best response function can be formulated to decide TEOs' energy price as follows: Substituting (29) into (19), we have π tr p tr (t) � Similarly, based on the above approach, we firstly prove their existence and uniqueness of NE points for TEOs through the following theorems.
Theorem 4 (existence). Given the optimal energy price p * re (t), NE exists in the sub-noncooperative game scheme for TEOs when the following condition is satisfied: Proof. See Appendix D. According to eorem 4, the optimal price p tr (t) offered by TEOs can be achieved as follows.
Based on the constraints in (31), it can be rewritten as 8 Mathematical Problems in Engineering us, when zπ tr (p tr (t))}/zp tr (t) � 0, we can obtain the optimal solution p * tr (t) as follows: Furthermore, we analyze and discuss the uniqueness of NE in the sub-noncooperative game scheme in eorem 4, and hence, the optimal pricing strategy is unique. □ Theorem 5 (uniqueness). In the sub-noncooperative game scheme, there is a unique NE for TEOs.
Proof. See Appendix E.
In addition, based on the analysis from stage I to stage II, we obtain the optimal solutions based on the proposed game-theoretical scheme in the charging system. Due to the discussion in each stage, we can know that U(θ * i ) > U(θ * i ) for a random θ * i in stage I, satisfying ∀i ∈ I(t). For random p * re (t) and p * tr (t), it holds that π re (p * re (t)) > π re (p * re (t)) and π tr (p * tr (t)) > π tr (p * tr (t)). Here, θ * i , p * re (t), and p * tr (t) denote the random value except θ * i , p * re (t), and p * tr (t). erefore, it proves the uniqueness of SE which matches its existence in (25), (28), and (33).

Distributed Energy Scheduling Algorithm.
In the above section, we derive the optimal solutions of the optimization problem using a game-theoretical framework, while proving their existence and uniqueness. Moreover, in order to determine the amount of power supply from MCS with its responding price, we present a distributed energy scheduling algorithm to search for SE. In this algorithm, we also take the security of MCS's charging service into account based on (2), which is shown by Algorithm 1 in detail. In Algorithm 1, μ re and μ tr are used to adjust the value of variation, respectively. Moreover, we induce the convergence criteria ( to obtain the precise solutions. Here, both ϱ 1 and ϱ 2 denote the very small threshold values, e.g., ϱ 1 � 10 − 4 and ϱ 2 � 10 − 4 .

Numerical Example
In this section, we firstly introduce the simulation scenario and then demonstrate simulation results to verify the performance of the proposed strategy in this paper.

Simulation Scenario.
According to [30,31], we simulate the wireless communication scheme in IoT, including the information exchange among EV users. We assume that the time duration is one hour and investigate the number of EVs charged by MCS from 9:00 a.m to 17:00 p.m, i.e., t ∈ 1, . . . , 8 { }. In order to evaluate the performance of our proposed charging strategy, we suppose that a number of EV users are supplied by MCS during a certain peak hour.
Moreover, according to Shin et al. [17], the price of RE is initially set as 2 cents/kWh over the market energy price, while the price of TE is 5 cents/kWh. e average fixed energy in batteries is equal to 15 kWh. e rest parameters in the game model are listed in Table 2 as follows.

Simulation
Results. Based on the parameters set above, we investigate the relationship between the influence coefficient and the dividing percentage of the charging energy from MCS. In general, MCS supplies enough amount of energy to each EV user, while it often brings about the loss of energy in the energy transmission, considering the aging of infrastructures in MCS. Here, we design the function of energy supply from MCS as E i (t) � ζE i (t) � (1 − ξ)E i (t), in which ξ denotes the failure rate of energy transmission, E i (t) is the energy supply obtained by EVs, and E i (t) is the total energy supply for EV user i from MCS. From the results in Figure 3, we can know that the dividing percentage is decreasing with the increase of ω 1 . e result also shows that it increases with the increase of ω 2 , while it decreases with the increase of ζ. Here, we can obtain the illustration that the energy demand of each EV user can be satisfied with the energy loss in transmission, through adjusting the kind of energy supply in MCS.
At the same time, following the study in Figure 3, we discuss how the influence coefficient affects the dividing percentage of the charging energy from MCS in this proposed game scheme. In Figure 4, we can know that the dividing percentage of the charging energy is increasing with the increase of ω 2 , given the RE price and ω 1 . However, it decreases with the increase of ω 1 when it decreases with the increase of the RE price. From Figure 4, it also implies that the variable RE price affects the dividing percentage more seriously than the influence coefficient ω 1 in that. It demonstrates that the energy price can affect the energy allocation decision.
en, combining the above study, we investigate the relationship among the TR price, the utility of EV users, and the influence coefficients in Figures 5 and 6, respectively. Figure 5 shows that the TR price is decreasing with the influence coefficient ω 2 , while it increases with the increase of ω 1 and the RE price. Moreover, Figure 6 shows that the utility of EV users is reduced with the increase ω 2 , while it increases with the increase of ω 1 and the RE price. Based on the results in Figure 4 and the fixed energy demand, it implies that EV users buy much more TR and obtains the high utility through adjusting the dividing percentage when the RE price is increasing.
Similarly, Figure 7 shows that the dividing percentage of the charging energy is decreasing with the increase of ω 1 , given ω 2 and TR price. Here, Figure 7 also implies that the dividing percentage of the charging energy is increasing with the increase of ω 2 and the TR price, respectively. At the same time, from the results in Figure 8, we can know that the utility of EV users can be improved with the increase of ω 1 . EV users obtain the high utility through improving the TR price, while the utility of EV users is decreasing with the increase of ω 2 . us, we can know that the optimal allocation Mathematical Problems in Engineering of charging energy can be decided and changed through adjusting both ω 2 and TR price, namely, EV users can adjust the optimal strategy to obtain more profits in real time, although the TR price is improved.
Based on the results in Figures 8 and 9 shows that how the battery capacity of EV users affects their own utility. In Figure 9, we can know that the utility of EV users is decreasing with the increase of their battery capacity, given ω 1 (1) Initialization: Set the number of EV users to be charged by MCS I(t), E i (t), ω 1 , ω 2 , ∀i ∈ I(t). At the same time, both the initial energy price p re (t) and p tr (t) are randomly offered to EV users based on their own constraints, respectively. (2) Repeat (3) Calculate the initial θ i based on (25). (4) for i � 0: 1: for k � 0: 1: K max do (8) Based on TEOs' initial energy price, REOs will update their energy price as follows.
end if (24) Calculate θ m i based on (25). (25) if θ m i �� θ m− 1 i then (26) Break the loop. (27) end if (28) end for (29) end for (30) end for (31) Output: θ * i , while both p * re (t) and p * tr (t) can be achieved.    and ω 2 . At the same time, we can also know that they can obtain the low utility in the case that it brings about the failure of energy transmission. However, it can be improved through adjusting the influence coefficient ω 1 , given the fixed ω 2 . It obviously encourages MCS operators to supply more energy based on the optimal supply decision in the energy charging service system.
In Figure 10, it shows the comparison of our proposal with four different approaches. In the proposed scheme, we can see that the utility of EV users is better than that in other approaches. In the RE scheme, it means that EV users can only be charged by RE, when the optimal charging strategy is decided through the similar approach in this paper. In the TR scheme, it means that EV users can only be charged by TR, when the satisfaction of EV users will be affected due to the gas emission of TR. On the contrary, EV users can only be charged by TE supply in TEO, when the optimal charging strategy is       decided through the similar approach. In the random allocation scheme, it means that EV users can be charged with random kind of energy at each time slot, simultaneously given RE and TE supply. In the uniform allocation scheme, the amount of energy supply from MCS will be distributed based on the price of TE and RE, respectively, i.e., θ i � p re (t)/(p re (t) + p tr (t)). From Figure 10, we can know that the upper value of EV users' utility is about 510, while its lower value is about 120 based on our proposed scheme. From the results in Figure 10, it obviously shows that the proposed scheme outperforms other four different charging schemes. Moreover, though the utility of EV users is decreasing with the increase of ω 2 , EV users can obtain the higher utility based on the proposed scheme than that in the other four charging schemes.

Conclusion
In this paper, we have proposed the dynamic security charging approach to make the optimal decisions for MCSs based on the game theory in IoT. Given both RE and TE supply from MCS, an optimization problem is formulated to maximize the profits of each entity in this charging system, composed of EV users, REOs, and TEOs. With consideration of the competition and cooperation between REOs and TEOs, a Stackelberg game framework with sub-noncooperative optimization is presented to obtain the optimal strategy. Further, both the existence and uniqueness of both SE and NE are theoretically analyzed and proved. In order to simplify the computation, we propose a distributed energy scheduling algorithm to achieve the optimal solutions. Simulation results validate the effectiveness of our proposal.
For future work, we plan to study the performance when EV users form the social community to make interactions for energy charging. Further, the virtual queues and variables of charging behavior will be analyzed based on the Lyapunov optimization theory, e.g., the virtual queue associated with the energy demand and supply from MCS, given the multiple kinds of energy source.

A. Proof of Theorem 1
Proof: Firstly, assuming that EV user i is charged by MCS, we take the first derivation of U(θ) with respect to θ i , i.e., Taking the second derivative of U(θ) with respect to θ i , we have Here, based on (A.2), it implies that the first derivation of U(θ) strictly decreases on θ i . In order to prove the conclusion in eorem 1, we will take two different cases into account based on p re (t) and p tr (t) in (A.1).
Case 1: the difference between p re (t) and p tr (t) is larger or equal to From the results in (A.3), it means that the utility function U(θ) is a decreasing function with θ i . us, once the energy price is offered at each time slot, the optimal strategy of EV users exists with the maximum profits, denoted by Case 2: the difference between p re (t) and p tr (t) is constrained with a minimum limit And, Combining (A.5) and (A.6), we can know that the utility function U(θ) gradually increases with θ i at first, and then, it is continuously decreasing with θ i . It implies that U(θ) is a strictly concave function, which completes the proof in eorem 1. us, the optimal dividing percentage can be obtained by zU(θ)/zθ i � 0. We have Case 3: the difference between p re (t) and p tr (t) is constrained with a minimum limit 0 and a maximum limit Similarly, we have which imposes that the utility function U(θ) is increasing on θ i . It also proves that the optimal charging strategy for EV users exists, denoted by erefore, we can know that the optimal charging strategy of EV users exists at each time slot, while completing the proof in eorem 1.

B. Proof of Theorem 2
Proof: According to Fudenberg and Tirole [46], the energy price strategy for REOs in this sub-noncooperative game scheme is a nonempty, convex, and compact subset. From (15)-(18), we can know that π re (p re (t)) is obviously Mathematical Problems in Engineering 13 continuous in θ i . us, we take the second derivative of π re (p re (t)) with respect to p re (t) as follows: Based on the constraints in eorem 2, it means that the second derivative of π re (p re (t)) is always less than 0. It also imposes that zπ re (p re (t))/zp re (t) is decreasing on p re (t) shown in (B.1).
us, we can know that π re (p re (t)) is a concave function on p re (t), through which we prove the conclusions in eorem 2.

C. Proof of Theorem 3
Proof: Based on eorem 1, we obtain the optimal price p * re (t), satisfying the best response function shown in (26). us, we only need to prove that B(p * tr (t)) is a standard function if the following constraints are simultaneously satisfied.
(2) Monotonicity: in order to prove monotonicity, we take the first derivative of B(p tr (t)) with respect to p tr (t). en, we use the backward method to solve this problem. Assuming that it satisfies the monotonicity, we have erefore, if inequality (C.1) is effective, it can be used to prove the monotonicity.

(C.2)
Moreover, due to constraints in eorems 2 and 3, we have (p re (t) − p tr (t))/2 < a 1 and ω 1 < ω 2 . It also holds that en, based on (C.2) and (C.3), we have which means that zB(p tr (t))/zp tr (t) is larger than 0. It also implies that B(p tr (t)) is increasing with p tr (t). us, the monotonicity is proved. Scalability: similarly, we adopt the above method to prove the scalability. Comparing βB(p tr (t)) > 0 with B(βp tr (t)) > 0, we have 14 Mathematical Problems in Engineering Here, based on the constraints on β, we define that en, the first derivative of f(β) with respect to β is expressed as (C.7) It means that f(β) is increasing on β. Since β > 1, we obtain the following results from inequality (C.5): which proves the scalability. As a result, we complete the proof in eorem 3, which holds that best response function (26) is a standard function.

D. Proof of Theorem 4
Proof: Based on the proof in eorem 3, it means that π tr (p tr (t)) is obviously continuous on θ i . Driven by more profits, TEOs aim to offer higher price to EV users which implies that 0 < a 2 < p tr (t) in (24). en, taking the second derivative of π tr (p tr (t))} with respect to p tr (t), we have z 2 π tr p tr (t) zp 2 tr (t) � − B i (t) p re (t) − a 2 p re (t) − p tr (t) 3 < 0. (D.1) It means that the first derivative of π tr (p tr (t)) is decreasing on p tr (t), which holds that π tr (p tr (t)) is a concave function on p tr (t). Similar to the above method, eorem 4 is proved.
(1) Positivity: based on (32) and (33), we have (E.1) According to the constraints in (31), we have en, we can know that B(p re (t)) > 0, and the positivity is proved.
(2) Monotonicity: in order to prove the monotonicity, we take the first derivative of B(p re (t)) with respect to p re (t), and then, we have zB p re (t) zp re (t) Based on (31) and (33), we can know that