A Novel Power Market Mechanism Based on Blockchain for Electric Vehicle Charging Stations

: This work presents a novel blockchain-based energy trading mechanism for electric vehicles consisting of day-ahead and real-time markets. In the day-ahead market, electric vehicle users submit their bidding price to participate in the double auction mechanism. Subsequently, the smart match mechanism will be conducted by the charging system operator, to meet both personal interests and social benefits. After clearing the trading result, the charging system operator uploads the trading contract made in the day-ahead market to the blockchain. In the real-time market, the charging system operator checks the trading status and submits the updated trading results to the blockchain. This mechanism encourages participants in the double auction to pursue higher interests, in addition to rationally utilize the energy unmatched in the auction and to achieve the improvement of social welfare. Case studies are used to demonstrate the effectiveness of the proposed model. For buyers and sellers who successfully participate in the day-ahead market, the total profit increase for buyer and seller are 22.79% and 53.54%, respectively, as compared to without energy trading. With consideration of social welfare in the smart match mechanism, the peak load reduces from 182 to 146.5 kW, which is a 19.5% improvement. Charging Stations.


Introduction
Several countries have maintained an optimistic attitude towards electric vehicles (EVs) in recent years to reduce air pollution and to make traveling affordable [1]. In China, the government has planned for the development of EV industry, aiming for 5 million EVs by 2020, with more than 4.8 million decentralized charging stations added [2]. In the USA, it is foreseen that the power load curve will rise significantly (about 18%) under the large-scale access of EV [3]. However, there are still some deficiencies in the development of EV technology in, such as charging facilities, battery capacity, charging time, and other technical problems [4,5].
At present, with the development of charging and discharging technology, the electricity exchange problem between EVs and the power grid, or among EVs, has attracted public attention. The charging and discharging behavior of EVs has a great impact on the power system stability and power market operation. For example, during the peak period of charging, the load curve shows a sharp peak, which aggravates power imbalance, and further affects the market electricity price. The development of charging technology and energy storage technology lays a foundation for the achievement of vehicle to grid (V2G) [6][7][8][9] and vehicle to vehicle (V2V) [10,11]. Reference [11] shows that the electrical energy storage will generate a higher profit if it is cycled more frequently (hence, a higher lifetime electricity output) although the lifetime is reduced due to degradation. Many topics are also carried out on the V2G and V2V, some of which have improved the transaction rules [12], discussed behavior planning from the perspective of EV owners [13,14], and considered the economic planning from the perspective of aggregators [15][16][17]. However, these methods cannot change the traditional centralized management pattern and do not give EV owners sufficient autonomy. Usually in these methods, EV owners only have the right to decide whether to participate in the charging process, but they do not reflect their specific needs, such as price sensitivity, charging urgency, and so on. In the transaction model proposed in this paper, the profit of EV owners will be fully considered and reflected in their bidding price.
Therefore, the effective management of EV owners' charging behavior not only can avoid the sharp load curve, but also improve transaction benefits and social welfare. This can reduce load peak. As an important topic to guide consumers' behavior, the minimization of price is discussed considering different aspects, such as the randomness of consumers' behavior [18,19], the form of cooperation or non-cooperation game [20][21][22], the load dispatch in smart building, including EVs, photovoltaic and controllable air conditioner loads [23,24], and so on. By relating all the cost and benefits with common parameters such as the number of charging piles, [25,26] offer a practical solution for the planning of the station size, and the solution balances the requirements between the customers and economic efficiency. In addition, the policy which encourages the discharging behavior can also reduce negative impact on the power system. Appropriate encouragement strategies for sellers can improve the situation that demand exceeds supply and can stimulate the competitiveness of the market. Proof of work about energy contribution, proposed in [27], is an important index of subsidy distribution for sellers. According to the above references, the charging and discharging behavior of EVs is characterized by greater uncertainty, and proper guidance and planning may bring positive impact to the grid. In a Delaware EV project reviewed in [28], an EV aggregator acts as an intermediary firm between PJM and flexibility service for EVs. This aggregator sells a certain amount of capacity to the grid operator and bids this in the hourly auction for frequency regulation and for the available power capacity. Such a distributed structure is comprehensive and worth considering. In addition, the establishment of a reliable communication network can also facilitate transactions between EVs [29,30].
With the reform of the power system [31], the energy transaction of the distribution network has become a new direction of development. In addition to the EV energy transaction, other forms of energy transaction are also considered in [32,33]. However, privacy and anonymity are a difficult problem in distributed transactions. This paper takes this into account and uses blockchain technology to encrypt information of users. The development of smart meters [34], low power wide area network [35], dynamic wireless charging [36], and other technologies of Internet of Things have made distributed transaction technologies such as blockchain possible. After the boom of bitcoin in recent years, the concept of blockchain has gradually penetrated into different fields. In the power system, blockchain generally appears together with the P2P transaction. Reference [37] also explains the importance of blockchain in P2P transaction. Getting rid of shackles from the traditional mode, the power system with blockchain can manage distributed energy more effectively. For example, credit bank [27], EV [38,39], demurrage mechanism [40], or demand side management [41] are added to the framework of blockchain, all of which have a positive impact on the distributed management of the power system. Blockchain also enriches the transaction forms of the power market, such as double auction [42], peer-topeer (P2P) [43], energy transaction for multi-microgrids and internal microgrid [44], etc. Meanwhile, smart contracts have been applied in the power system, because of its fairness, low-cost, and efficiency. To ensure the safety of the transaction, smart contracts were introduced into the energy exchange of EV in [45]. These studies show that blockchain changes the original centralized management of systems and avoids the risk of attack on central institutions. In the studies reviewed in [46], P2P trading is an important example of blockchain in the energy exchange. According to research proposed there, some homelevel objects, including EV and other smart facilities, will participate in a distributed transaction. However, distributed transactions generally take place in small communities or microgrids, but how to integrate with the grid is also a key point. This paper will discuss the interaction between EV and grid.
Because the system does not require an authoritative third party after using blockchain, there is a potential danger in the security. For an information leakage problem, [47] improved the confidentiality mechanism in the blockchain. For collusion behavior, [48] proposed a blockchain-based coordination platform via Ethereum, to alleviate the harm caused by this behavior to some extent.
The simple double auction model and smart match model were proposed in [49]. Compared with the previous work, this paper proposes a more comprehensive double auction model, and adds the transfer strategy of charge and discharge behavior to the smart match. Moreover, this paper will also introduce the combination of blockchain and trading mechanism in detail. Due to blockchain technology, transaction data is in public. Therefore, participants can receive more current or historical information from the blockchain, which is helpful for participants to make decisions for more revenue. In the framework proposed in this paper, EV owners will evaluate their own interests to make a quotation and decide to take part in the double auction or not. EV owners will select to sign smart contracts and schedule their charging strategies based on considering operation cost, satisfaction of EV users, and social welfare. Blockchain is used to combine with the auction mechanism in this paper. On one hand, the inclusion of blockchain guarantees the security of transactions after the removal of third-party notarization. On the other hand, the auction mechanism increases the competition in the electricity market and avoids the vicious bidding. At the same time, the proposed mechanism allows EVs owners to choose an optimal price to enter the market based on their own characteristics (such as price sensitivity and charging urgency), to have a greater variety of choices.
The contributions of this paper are summarized as follows: (1) This paper proposes a novel double auction mechanism in the day-ahead market (DAM), where EV owners fully consider both the bidding price and quantity of energy involved. This mechanism greatly promotes the energy exchange between buyers and sellers. (2) The charging system operator (CSO) satisfies the EVs' demand in DAM and the realtime market (RTM). In DAM, CSO will sign a smart contract with those who unsuccessfully match in the double auction, optimizing revenue, social benefits, and participant satisfaction. In RTM, CSO will check the trading status and record cheated behavior in blockchain. (3) Blockchain-based energy trading is proposed to ensure fairness and validity in trading and prevent swindling act.
The rest of this paper is organized as follows. Section 2 introduces the framework of trading mechanism. Double auction mechanism and smart match mechanism are introduced in Sections 3 and 4, respectively. In Section 5, the case study is conducted to illustrate the effectiveness of the proposed model. Conclusion and future work are drawn in Section 6. The derivation of optimal bidding strategy function and proof of bidding price are presented in the Appendices A and B, respectively.

Charging Token Based on Blockchain
For the proposed energy trading, an exclusive token named Charging Token will be circulated to ensure trading security by using blockchain technology. Charging Token is applied in EVs' trading and obtained in two ways, namely, selling energy and cashing with CSO.
The mechanism of Charging Token is partly similar to Bitcoin, which is embodied in the token storage and transmission technology, the construction and encryption method of electronic wallets. The system will create hash value for the username and wallet address to ensure security of trading when a participant enters into the market successfully. After every trading is completed in RTM, the value of Charging Token of all participants will be updated and recorded in blockchain.

Charging Token Based on Blockchain
In RTM, contract violation is taken into consideration. EVs affected by violation are those that have been matched successfully in the DAM but are affected by the defaulters in RTM. These people have successfully matched with other participants in the DAM and uploaded the transaction content to the blockchain. However, other participants may violate in RTM, which will affect their trading behavior. For those affected by violation, the mechanism necessarily ensures that their economical loss is reduced to a relatively low level or even zero. For those violating the contract, the punishment will be conducted, which effectively prevents some participants from profiting by deliberately violating the contract.
With the above considerations, EV users who are willing to trade, need to hand in an entrance fee when they enter the day-ahead part. The entrance fee, which is a form of deposit, is fixed for the duration of an EV's whole trading process, unless this EV owner breaks the contract.
When contract violation occurs, the compensation money will be obtained directly from the defaulter's entrance fee and will be transferred to the electronic wallet of affected EV or CSO. EVs affected by violation will trade with CSO in RTM.

Trading Process
The trading process includes DAM and RTM. DAM is cleared by the double auction mechanism among EVs and smart match mechanism between CSO and EVs. The EVs that fail to match in DAM needed to enter RTM and trade with CSO at the RTM clearing price (RTM-CP). For buyers, RTM-CP is generally higher than DAM's clearing price. For sellers, RTM-CP is generally below the DAM's clearing price. The framework of the whole trading process is depicted in Figure 1.
(a) In the double auction mechanism, EVs that are willing to take part in energy trading hand in an entrance fee and submit their bidding information, including trading role (buyer or seller), bidding quantity and price, and their trading time. It is worth noting that, when multiple participants offer the same bidding price, the credit degree is used as a secondary indicator to analyze the ranking sequence of participants in the auction. After clearing results, the EVs that fail to match, will go to the next step. (b) In the smart match mechanism between CSO and EVs, CSO dispatches the EVs that are willing to trade but fail to match. In this step, the objective is to minimize the operation cost of CSO and maximize the satisfaction of EVs and social welfare. The EVs that fail to match will go to RTM. CSO will submit all the trading contract made in DAM to blockchain before 6 h in the beginning of RTM. (c) In RTM, in every hour, CSO will check the status of trading based on the contract made in DAM and record the trading result in blockchain. CSO is responsible for satisfying the demand of EVs in the charging station. If there is a contract violation, the compensation and punishment mechanism will be conducted automatically. It should be pointed out that violators not only need to submit the penalty, but also their credit degree will be reduced and uploaded to the blockchain, which is very unfavorable in the subsequent transactions. If EV users trade successfully in RTM, the entrance fee will be returned to them. After trading in RTM, the trading record will be updated in blockchain. EV users can get information and cash with CSO.
When the blockchain technology is combined with the power system, the system will present a decentralized structure, avoiding the security risk brought by the centralized structure. Some security vulnerabilities are unavoidable in blockchain, so the system needs to face attacks against these vulnerabilities. Fortunately, blockchain has a decentralized structure. When a node is attacked, the system is not severely affected. In addition, blockchain can be used to protect the information of users. In addition, blockchain uses cryptography and other security tools to design different data information storage and processing methods. Blockchain also has traceability and non-tampering, so the information uploaded to blockchain is almost impossible to modify. These security features can guarantee the private data will not be disclosed.

Optimal Bidding Strategy in Double Auction Mechanism
When EV owners are willing to participate in electricity trading at a certain time, they must choose the role to play in the trading, i.e., buyer or seller. Auctions, including double auction, are generally an incomplete information game for participants. In other words, the participants do not have all the characteristics, and payment functions, etc., about other participants, and the uncertainty can be represented by probability distribution mathematically. Figure 2 is the schematic diagram of double auction in this mechanism. As shown in Figure 2, when buyer r and buyer s make the same bidding price, their ranking sequence will take into account their credit degree. The credit degree takes into account the number of violations in previous transactions. When an EV violates the transaction content in blockchain, CSO has the right to upload the content that records EV's reduction of credit degree to blockchain. Bidding strategy is vital in the double auction. The optimal bidding strategy is as follows. Secondary indicator (credit degree) will be compared to analyze the ranking sequence in these circumstances Figure 2. Double auction mechanism.

Optimal Bidding Strategy for Buyer
Firstly, buyer i has an evaluation price of electricity which include three situations, that is, full trading, partial trading, and unsuccessful trading. In other words, the higher rank expectation is, the more advantage the buyer i has in double auction. i m and i n can be solved by the following equations: After determining i m and i n , the buyer i will determine the probability of its matching state. Set a as the auction breakpoint and o as the value of the breakpoint a on the x axis. It can be seen in Figure 2, when i n is less than o , the buyer i will match successfully in the double auction mechanism, and when i m is greater than o , the buyer i will fail to match. In other cases, buyers can only get less electricity than what they bid for. Therefore, the probability of the above three cases can be expressed as ( ) where represents the expected ratio of buyer i's successfullymatched quantity to their whole demand, when i m is less than o and i n is greater than o .
According to the above planning problem for buyers, set the bidding strategy func- , and the latter transforms the original function into the following expression: The simplified planning problem is similar to the form in Reference [50]. Through the derivation reported in Reference [50], the expression of the optimal bidding strategy function can be obtained and is given as below: Appendices A and B shows the derivation of optimal bidding strategy function and provides the proof that the optimal bidding strategy function above to maximize earnings of buyer i, i.e., the optimal solution to the planning problem.

Optimal Bidding Strategy for Seller
The optimal bidding strategy from the seller's perspective is similar to that of the buyer.
The rank expectation of seller j (denoted as j p and j q ) is expressed as follows: The planning problem that seller j should offer his bidding is mathematically described as follows: It should be noted that the boundary condition is , max After buyers and sellers submit their bidding information, the trading price is cleared and set as the mean value of the bidding price of the seller and buyer to have a successful match [51].

Smart Match Mechanism
After double auction among EVs, some participants achieved their purpose (buying or selling electricity) and left DAM. The remaining participants are at a deadlock because their bidding prices cannot be matched. The transaction cannot proceed unless the remaining participants compromise their bidding price or other trading policies are provided. It was pointed out that a detailed correlation between blockchain, power market mechanism, EV charging stations, sustainability, social responsibility, corporate governance, and business performance is essential for smart cities development to enhance quality of life [52][53][54]. Therefore, in the smart match mechanism, CSO has the right to manage the charge and discharge strategy, conduct the shift strategy among these unmatched EVs in the double auction mechanism, and aim to pursue higher personal gains as well as social welfare.
In the shift strategy, CSO offers a price that may be higher than RTM-CP in the double auction mechanism to the unmatched seller and a price that may be lower than RTM-CP in the double auction mechanism to the unmatched buyer. However, participants in the smart match will not be able to control their charge and discharge time. Through buying energy from unmatched sellers and selling energy to unmatched buyers, CSO dispatches unmatched EVs' charge and discharge strategy. In other words, CSO changes buyers' charge and sellers' discharge behavior to meet their demand according to their parking time in the charging station. Figure 3 shows the shift strategy. Considering the behavior of EV users, as an example, the EV parking time is set as 8 h, and charging and discharging behavior will be managed in 8 h.

Objective Function
The optimization problem of CSO consists of three components, i.e., operational cost, satisfaction of EV, and social welfare. Operational cost includes the net cost of buying energy from unmatched sellers and selling energy to unmatched buyers: CSO also considers the satisfaction of EV users, including the cost of trading with CSO in RTM and the difference of contract price and original bidding price of unmatched EVs. Mean and variance are considered to evaluate the price difference: In addition to satisfying the EVs' demand, CSO also has social welfare to minimize the power unbalance of the system. CSO should consider the forecasted demand of suburban system in DAM.  denotes the market shares of charging station: Net power in charging station is denoted as follows:

Constraints
(a) Physical constraints: b b,ori s s.ori , , , In the shift strategy, the shift time is limited, to avoid the charge and discharge strategy too scattered: Constraint (19) is utilized to ensure the same energy charged or discharged as the original plan in the parking time after the shift strategy. Considering the behavior of EV users, the EV parking time is set as 8 h, hence the dispatch time is decomposed into three parts.
(b) Trading constraints: Constraint (20) shows the relationship between the transferred power and the transferred state and the shift energy is limited to zero when the shift status is zero at time slot t. M is a big positive number.
Constraints (21) and (22) show that when CSO does not sign contract with EVs, the price offered by CSO and shift status will be set as zero.
b,sh sh s,sh sh , max , max Constraint (23) sets the charge and discharge rate per hour below the maximum.
b,ori s,ori , , Constraint (24) gives the relationship between contract formation status and initial charge (or discharge) state.
Constraint (25) indicates that the shift strategy cannot transfer the service within the time, in which trading happened between EVs.
To reduce computational complexity, the absolute value in Equation (16) is replaced by auxiliary variables 1 t  and 2 t  : The social welfare function is transformed into Equation (28) as shown below:

Results and Discussion
The effectiveness and validity of the proposed model are proved by utilizing the EV data obtained from [55]. 140 EV buyers and 100 EV sellers are chosen to take part in the double auction mechanism. The data of 240 participants will be shown partly in Appendix C. After the double auction mechanism, the EVs that do not match successfully will participate in the smart match process automatically. The trading result is cleared by CSO. The constant parameters used in the experiment are shown in Table 1.  Three cases will be considered. Case 1 is to demonstrate the effectiveness of the double auction mechanism. Case 2 focuses on the significance of the smart match conducted by CSO. Case 3 is utilized to show the blockchain interface. Case 1 and Case 2 are conducted on a Windows 10 64-bit personal computer with Intel Core i5-6500 3.2 GHz CPU and 8 GB of RAM using MATLAB 2016b with YALMIP and Gurobi. Case 3 is conducted by Python 3.8 and Postman.

Double Auction Mechanism
In Case 1, it is assumed that the price of electricity has a standard normal distribution and the mean value is set as 0.2 $/kWh. The charging price and discharging price in RTM are set as 0.25 and 0.15 $/kWh, respectively. After EV users submit their bidding price, the double auction mechanism is cleared by CSO. In Figure 4, the bidding price of all participants at hour 5 is ranked by price and the left part of intersection is regarded as a successful match. For the rest, buyer and seller fail to close the deal.
According to price ranking in Figure 4,

Smart Match Mechanism
In Case 2, CSO optimizes the shift strategy, considering the satisfaction of EV users and social welfare, which are both introduced detailly in Section 4. For the satisfaction of EV users, CSO will select some of the unsuccessful matching EVs to sign the contract and minimize the deviation between the bidding price and contract price. For the social welfare, CSO will manage the charging and discharging time of EVs, adjust the net power of the charging station, and make the integrated load smooth, considering forecasted load of the distribution system and market shares of the charging station. As an organization that pursues profits, the CSO has an appropriate incentive to pursue higher benefits out of the consideration of benefits, such as benefits obtained by improving the balance of the load curve.
The suburban load curve is shown in Figure 5 [56]. Figure 6 shows the effectiveness of the shift strategy from the perspective of a CSO. In this case, the market share of selected CSO is set to 5%, which is reflected in the order of magnitude of Figures 5 and 6. In Figure  6, it can be easily found that the total power consumption (including urban power consumption and EV power consumption) is effectively adjusted to a flatter level after the implementation of the transfer strategy. Especially in the 16th-24th hours, the effect is obvious. In the 20th and 21st hours, the peak power consumption of the whole day will be greatly weakened, and this part of the power consumption will be transferred to 23rd and 24th hours. The shift strategy can alleviate the load peak effectively by reducing the quantity from 182 to 146.5 kW, which is a 19.5% improvement. It will help reduce the pressure on the power distribution operation.

Analysis of Global Indicators in Cases 1 and 2
The day-ahead market consists of Cases 1 and 2. Firstly, the global situation of the double auction in Case 1 is analyzed. Tables 2 and 3 show the result of the buyer and seller in the double auction with a different bidding price strategy. The former is under the optimized bidding method proposed in this paper, and the latter is under the original bidding method in [50]. For buyers who successfully participate in DAM, the profit is defined as cost reduction obtained by cost with trading minus cost without trading. For sellers who successfully participate in DAM, the profit is defined as a revenue enhancement obtained by revenue with trading minus revenue without trading: Through the comparison of Tables 2 and 3, it can be found that the optimal bidding method proposed in this paper will greatly promote the matching between buyers and sellers, in which the number of transactions increases from 24 to 119, and the total profit increases from $ 6.48 to $ 32.44. This is because the optimal bidding price proposed in this paper considers rank expectation, including value price and bidding quantity. On the contrary, the original bidding price only considers the value price, so the bidding price with original method cannot match precisely. Therefore, participants with the optimal strategy are more likely to match successfully in the double auction than those with the original strategy.  Table 4 shows the result of the buyer and seller in the smart match mechanism. After the double auction mechanism and smart match mechanism, both buyer and seller will obtain profit, which is detailed in Table 5. Table 4 shows the global information in the smart match. It can be seen that participants will get more profits in the smart match than in the double auction. The mean of profit in the smart match is $ 0.496, which is significantly higher than $ 0.273 in the double auction. However, according to the smart match mechanism, their charging and discharging behavior will be managed and their bidding time will be shifted to another time. Table 5 shows the trading information of the whole process in the day-ahead market, which includes the double auction and smart match. Some EVs cannot complete the transaction in the day-ahead market due to over valuation or malicious bidding, so they need to enter the real-time market and accept the real-time price. Therefore, the trading mechanism can also avoid the malicious bidding to a certain extent. In the 5th hour, for example, Buyer 30 enters DAM with a very low bidding price, which can be seen as a malicious bidding. Obviously, this bidding will not be accepted in the double auction, because no seller is willing to accept such a low price as shown in Figure 4. Similarly, it will not be accepted by the CSO in the smart match, because CSO can select participants with better bidding from the 5th hour and nearby hours.  Figure 7 describes the mean value of profit of buyers and sellers in the double auction mechanism and the whole trading process. In Figure 7a, the number of buyers is 140 and the number of sellers changes from 100 to 170. In Figure 7b, the number of sellers is 140 and the number of buyers changes from 100 to 170. For each situation, the number of participants changes. Because the evaluation of electricity is in random normal form, when the number of buyers or sellers changes, the evaluation of electricity changes. The bidding strategy will change based on the evaluation, leading to different trading results. From Figure 7, it can be seen that mean value of profit in the double auction is changed from $ 0.25 to $ 0.4, and mean value of profit in trading is changed from $ 0.47 to $ 0.7. Participants can always gain profits from the trading mechanism.

Application of Blockchain
Python is used to build a blockchain and interact information by software Postman to simulate the process of trading.
First, buyers and sellers participating in the day-ahead market need to upload and publish their own information, including electricity quantity, price, and entry time. Their user names are kept confidential with hash values, and other information is always open. The username of Buyer 125 is converted to hash value "81ef01a9fed5a1f0cc89ea14730f061570cb79 5474163307725f07f6a5e5b20e", which prevents personal information from being leaked. In addition, the hash value of the previous block, proof of work, and timestamp is also included in the block. These indicators ensure the normal continuation of the blockchain.
After receiving the personal information uploaded by participants, miners will use a cryptographic hash algorithm to solve the hash value. The first miner who figures out the correct hash will get the right to validate the transaction into blocks and records it on the blockchain. The miner will then receive some tokens as a reward.
The double auction and smart match will generate some matching information, such as buyer i matches seller j, buyer k matches CSO, and so on. After the matching result is uploaded to the blockchain, as the final clear result and requirements for participants to trade according to the block. Punishment is necessary for those who violate the block. Blockchain is open and transparent. Therefore, even without third-party supervision, the security of the trading process is guaranteed. This mechanism can improve the security of transactions between EVs. Various business models needed to be considered [57].

Conclusions
This paper presents a novel electricity trading mechanism for EV charging stations, mainly including double auction, smart match, and blockchain mechanism. A total of 140 EVs are selected as buyers and 100 EVs as sellers, to simulate a charging station model and consider the interaction with the power grid utilizing suburban load in the distribution system. From the perspective of personal interest, the number of successful transactions increases from 24 to 119 and the total return increases from $ 6.48 to $ 32.44 after the rank expectation proposed is considered. Due to the introduction of rank expectation, participants can understand more clearly about other participants in the auction and make more accurate judgments, resulting in a significant increase in the number of successful transactions. Smart match mechanism reduces the impact on the power grid by scheduling the charging and discharging behavior of EVs with consideration of satisfaction of EV users. Simulations demonstrate the effectiveness of the proposed model. EV users can benefit from the double auction mechanism and smart match mechanism. From the perspective of social welfare, the peak load reduces from 182 to 146.5 kW, which is a 19.5% improvement after executing the smart match. This is because social welfare, referred to in this paper as the fluctuating level of load, is taken fully into account. To sum up, the trading mechanism can not only absorb nearby energy, but also has a positive impact on the grid stability. A number of issues in the electric vehicle industry have to be considered, such as policy implementation, technology innovation, and the whole supply chain. This work will be considered in the near future.

Conflicts of Interest
, and the bidding function is expressed as: Then according to the first order optimal condition, the derivative of the objective function with respect to i b is equal to 0 at the maximum. Hence: , the following equation can be obtained: The boundary condition is (0) 0   . By integrating both sides of Equation (A4) from After simplification, the optimal bidding strategy function is expressed as:

Appendix B
In Appendix A, the derivative of the objective function is proved to be 0 when bid- However, the second-order sufficient condition has not yet been proved, so it is not known whether is a maximum, a minimum, or even not an extremum. Hence, the following is proved for its second order sufficient condition.
The derivative of optimal bidding strategy function is: