Blockchain-Based Intelligent Charging Station Management System Platform

A smart electric vehicle (EV) charging station energy management system (CSMS) based on blockchain technology, which aims to protect privacy of EV users, ensure fairness of power transactions, and meet charging demands for large numbers of EVs, is proposed in this study. EV charging pile is designed as a local blockchain distributed ledger node, which operates synchronously with blockchain system and blockchain distributed ledger in cloud server. This paper integrates CSMS through smart contracts, providing EV users that ability to conduct power transactions and perform optimal charging and discharging control in real-time. The distributed ledger is in charge of recording all the EV charging and discharging data to maintain fairness of power transactions, protects data from being maliciously tampered, and enables the EV user to monitor status of the EV participating in power transactions and dispatching. The intelligent CSMS consists of an artificial intelligence (AI) module, centralized optimal scheduling module, and decentralized optimal control module. The AI module is responsible for forecasting renewable energy generation and load consumption. There is a two-layer architecture consisting of centralized and decentralized optimal control modules; the upper layer performs optimal charging and discharging scheduling of the entire EV charging station at time 15-min time segments, the bottom layer performs distributed optimal scheduling control in each EV charging pile at 5 min time interval. Proposed system in this paper can deal with feeder congestion and real-time power supply and grid demand imbalance, which are caused by high numbers of EVs.

once it being chained, which ensures data on the blockchain 97 is fair, impartial and open. Using the blockchain technology 98 in green power sharing network can quickly and accurately 99 record power resource footprints and transaction data. The 100 blockchain distributed ledger is used to record user's renew-101 able energy power generation and load consumption, then 102 smart contract is able to perform cash flow settlement based 103 on this information. 104 The framework of this paper is as follows. First, related 105 technologies proposed in the existing literature is analyzed 106 and discussed in Section II, and then Section III presents the 107 system architecture and the operation processes proposed in 108 this paper. The objective functions and constraints of cen-109 tralized charging station energy management system (CSMS) 110 and decentralized EMS is elaborated in Section IV, followed 111 by the discussion of research results in Section V. Finally, the 112 conclusion and future prospects are given in Section VI. 113 In this paper, ''charging pile'' is used to describe the EV 114 charging equipment and ''charging station'' is used to express 115 the place which has installed plural charging piles. 117 The existing papers on optimal charging and discharging 118 scheduling of EV charging station [8], [9], [10], [11], [12], 119 [13], [14], [15], [16], [17], [18], [19], [ [8], [9], [10], [11], [12], [13], 123 [14], [15], [16], [17], [18], [19], [20], [21] is minimization of 124 operation cost through considering charging demands of EV 125 users, PV power generation, and building load consumption 126 for optimal EV charging and discharging scheduling. The 127 disadvantage of centralized architecture is long computing 128 time, such that it may not able to satisfy conditions of optimal 129 control where frequency of scheduling control has increased 130 or number of EV charging pile has soared. 131 In addition, many centralized architectures also consider 132 power transaction, and regard EVs as a decentralized power 133 resource. The EV charging station operator acts as an aggre-134 gator, integrates EVs to participate in DR bidding and ancil-135 lary services, and conducts bidirectional charging and dis-136 charging power transactions of EVs in charging station. How-137 ever, complicated and large-scale power transactions rely on 138 high-frequency optimal control. In a charging station with a 139 large quantity of EV charging piles, the optimization calcu-140 lation time will exceed the control time segment, which is 141 unable to satisfy conditions of optimization. 142 The concept of decentralized architecture [22], [23], [24], 143 [25], [26], [27], [28], [29], [30], [31] aims to solve the 144 above-mentioned problems. Each EV charging pile can inde-145 pendently perform optimal scheduling control according to 146 charging demands of EVs. Calculation time can be greatly 147 reduced, which is the advantage of decentralized architecture, 148 so the very short-term forecasting results of renewable energy 149 power generation and load consumption can be applied to 150 optimal scheduling in shorter time segments, to diminish the 151 impact of uncertainty. 152 However, the major problem of decentralized architecture 153 is overall charging station power optimal dispatching, which  In sum, as high-proportion of EVs arises in the future, sub-185 stantial bidirectional charging and discharging transactions of 186 EVs will follow by increasing installation of charging piles.

187
The existing centralized optimal scheduling method is unable 188 to satisfy optimal control conditions of EV charging station.

208
The concepts of an intelligent CSMS are proposed in this 209 paper by combining the blockchain technology, AI internet 210 of thing (AIoT), optimal distributed EMS, and blockchain 211 power transaction technology. Contributions of this paper are 212 illustrated as follows:

213
• An Innovative intelligent CSMS of an EV charging sta-214 tion: Based on AIoT, this paper proposes the architecture 215 for the CSMS by combining blockchain technology and 216 double-layer optimal scheduling and control technolo-217 gies. The centralized optimal scheduling module for the 218 charging station is performed by a cloud server at time 219 segment of 15 mins for the distributed optimal charging 220 and discharging control of EV to be performed by each 221 charging pile at every 5 mins. With this double-layer architecture, CSMS is capable of 238 managing large quantities of EV charging piles, achiev-239 ing maximization of power utilization efficiency, decreas-240 ing charging cost of EVs, suppressing peak load of grid, 241 smoothing renewable energy power generation output, and 242 maintaining power supply and demand balance, as well as 243 power quality in grid.

245
This study presents a blockchain intelligent CSMS platform 246 of EV charging station combined with AIoT technology, 247 double-layered optimal energy management technology and 248 blockchain technology, its architecture is shown in Fig. 1. 249 It integrates renewable energy power generation equipment, 250 ESS device, a large quantity of EV charging piles, building 251 load, and other distributed power resources, and adopts a cen-252 tralized and decentralized double-layered optimization algo-253 rithm architecture to achieve an optimal ESS and EV charging 254 and discharging strategy. The proposed approach employs 255 blockchain technology to develop a power trading platform, 256 which enables charging station operator to effectively manage 257 distributed power resources under its governance through 258 scheduling in order to participate in DR bidding and ancil-259 lary service market of transmission and distribution sys-260 tem operator and conduct green power trading. The detailed 261      In this paper, the Redundant Byzantine Fault Tolerance 292 (RBFT) mechanism [37] is adopted as a consensus method 293 for chaining verification of blockchain. Each peer node is 294 assigned a unique hash certificate and provided with private 295 and public keys. The hash certificate is used to identify the 296 node, and the private and public keys are used for data encryp-297 tion. The process is responsible for transaction verification 298 computation with a voting mechanism used to determine 299 whether the transaction can be chained or not. If two-thirds 300 of the peer nodes agree, the transaction can be chained. 301 Unlike Bitcoin's proof-of-work consensus mechanism, the 302 process adopted does not require miners to conduct verifica-303 tion computation to greatly reduce verification latency, speed 304 up the transaction, and to exempt additional commission. 305 The sequence of the complete power transaction process is 306 as follows: the user initiates a transaction request on front-307 end user interface, the orderer node is called to receive the 308 transaction event via API, one of the peer nodes which is used 309 to execute smart contract, verification and voting for chaining 310 is then conducted; after reaching consensus, the transaction is 311 uploaded to chain.

312
A smart contract operates on all peer nodes and writes 313 all types of power trading rules on it, and is in charge of 314 executing bidding of transaction, matching of transaction, 315 and settlement of transaction automatically. After the chain-316 ing process is completed, detailed power transaction infor-317 mation is stored in distributed ledger, then matching and 318 settlement are finished according to detailed power trans-319 action information and power data recorded in the ledger. 320 The detailed information in the transaction process is writ-321 ten into the distributed ledger through the blockchain ledger 322 node located in the cloud server, and is announced syn-323 chronously on the user interface, including a webpage and 324 VOLUME 10, 2022  Located in the cloud and local side, the distributed ledger 344 network, consisting of blockchain distributed ledger data 345 nodes, is employed as the database in the proposed system. 346 It receives power data uploaded by each local blockchain 347 ledger-node in every minute and records detailed power trans-348 action information, which is sent from the blockchain power 349 trading platform. The data recorded in ledger are then used for 350 the settlement references in the designed smart contract. As it 351 is needed, the data can be also used as the training data needed 352 by the AI forecasting model. Once the settlement/accounting 353 and training purpose is achieved, the power data can be 354 deleted and updated thus without the data storage issue.

355
The steps of data uploading to distributed ledger are shown 356 in Fig. 4. A light-weighted proof-of-work (LWPoW) must 357 be performed first when writing data. In general, proof-of-358 work (PoW) is regarded as solving a complex mathematical 359 problem, which requires quite a lot computing power, usually 360 handled by a server computer or graphics card computing 361 unit. Raspberry Pi is a cheap and functional embedded device, 362 acts as a local side blockchain ledger node, but has computing 363 power far less than the above-mentioned devices, not to speak 364 of being used to deal with PoW.  be given depending on DR bidding price after deducting 418 commission.

419
• Smart green power charging and discharging service: 420 The smart green power charging and discharging ser-421 vice includes the 30-kW fast charging and the 7-kW 422 slow charging. Users need to make a reservation on 423 the platform one day ahead, and arrive at the charging 424 station at the reservation period. The EV smart green 425 charging service is controlled by the optimal scheduling 426 control which is conducted double-layered CSMS under 427 conditions of not affecting existing charging service. 428 The EV user receives a certain percentage of reward for 429 green power discharging; if participating in DR bidding, 430 reward will be given depends on DR bidding price after 431 deducting commission.

432
In sum, when the number of blockchain nodes and 433 blockchain distributed ledger nodes increases, the power 434 transaction processing capability of the blockchain power 435 trading platform is increased, since more nodes join in com-436 puting. In addition, system stability and data storage are also 437 improved with more nodes built. When a large quantity of 438 bidirectional EV charging piles are introduced into the grid 439 in future, the blockchain system design in this paper will be 440 more efficient when processing high-frequency power trading 441 and power data recorded by a large number of distributed 442 power resources. Apart from the current AI model training method, a cen-446 tralized architecture is usually adopted to collect and store 447 data. To protect privacy of user behavior, although there 448 is de-identification design of current architecture, in the 449 centralized data collection process, user privacy would be 450 VOLUME 10, 2022    The upper layer performs optimal charging and discharg-516 ing scheduling of entire EV charging station at time interval 517 of 15 min, the bottom layer performs optimal charging and 518 discharging scheduling control with a distributed architecture 519 developed in each EV charging pile at a 5-min interval. The 520 architecture is described below and is shown in Fig. 9.   The process is shown in Fig. 10   is shown as Fig. 12 and the algorithm is shown in Fig. 13.

557
In the first step, EMS reads EV power transaction data of 558 blockchain distributed ledger, 15 min upper-layer optimiza-559 tion amount of EV charging and discharging, existing EV 560 charging and discharging scheduling information, to calculate 561 the current time window, t.

562
The second step is to update the time window t = t + 1, 563 then EMS reads the forecasting results of 5-min renewable 564 energy power generation and 5-min load consumption pre-565 dicted by AI prediction model, then the EV charging power 566 upper bound and discharging power lower bound will be 567 calculated with the priority of EV charging and discharging. 568 The third step is to update the system information after 569 altering, such as real-time price, EV charging power upper 570 bound and discharging power lower bound and dynamic 571 window end-time of EV, and start the optimal scheduling. 572 In a decentralized architecture, optimal control of each EV 573 charging pile is performed by adopting the MILP algorithm, 574 in case of satisfying conditions of objective functions and 575 constraints. Finally, in the fourth step, the output of EV 576 charging pile control command is yielded.

579
When a battery is repeatedly charged and discharged, its life 580 span decreases, depending on its type and chemical composi-581 tion. This paper assumes that both EV and ESS use lithium-582 iron phosphate (LFP) batteries, and considers the effect of 583 total number of cycles on battery capacity. Fig. 14 illustrates 584 the relationship between the number of cycles of LFP battery 585 and battery capacity.

586
The points in the figure are actual data provided by bat-587 tery manufacturer, the right-side vertical axis presents the 588 assumed battery life. As shown in Fig. 14, it assumes that 589 when battery capacity drops below 65%, the battery is no 590 longer used, which means its life has ended. When the battery 591 capacity on left side y-axis drops to 65%, the battery life on 592     from microgrid, battery degradation cost caused by charging 602 and discharging scheduling of ESS, reward for EV users 603 participating in smart charging and discharging, profits from 604 participating in DR bidding of the power company, penalty 605 cost for not meeting charging demand of EV users, and 606 penalty cost for exceeding contract capacity.

607
Eq. (3) defines power purchased from the microgrid, taking 608 into account building load consumption, PV power gener-609 ation, total power of EV, and ESS charging and discharg-610 ing. Eq. (4) calculates the purchasing power cost from the 611 microgrid of the EV charging station. Eq. (5) The cost of reward given to EV users for participating 626 in smart charging and discharging transactions is calculated 627 by (7). Eq. (8) represents penalty cost for exceeding contract 628 capacity more or less than 10%. Eq. (9) represents the penalty 629 item for exceeding contract capacity less than 10%. EV n ,t · C feedback · t 15min (7) The overall EV charging station transformer constraint is 643 as (13), and optimal scheduling problem of centralized EV 644 must satisfy the constraints (14) to (20). Eqs. (14) and (15) 645 are the charging and discharging power limitation of EVs.  Before optimizing scheduling of distributed EV charging 690 piles, it is necessary to calculate allocation of charging and 691 discharging. In Eq. (26), as shown at the bottom of the next 692 page, pri ch n,t means the charging priority of the nth EV in 693 the time window t, based on comparison between renewable 694 energy power generation and load consumption forecasting 695 data per 5 min and 15 min. If there is surplus power, it will be 696 allocated to EVs for charging. Instead, ESS would discharge 697 to meet the charging demand of EVs. In Eqs. (27) and (28), 698 as shown at the bottom of the next page, p ch max EV ,n,t means 699 maximum charging power of EVs at time window t, whereas 700 p dis min EV ,n,t means minimum discharging power of EVs at time 701 in Eqs. (35) to (43). Eqs. (35) and (36) are the charging and 726 discharging power limitations of EVs. The power of EVs 727 are limited to charging and discharging state and maximum 728 charging and discharging power of EVs, Pch 5min EV n ,t means 729 charging and Pdis 5min EV n ,t means discharging.

730
Eq. (37) is corresponding maximum discharging power 731 limitation according to types of EV charging pile. Eq. (38) 732 and (39) indicate maximum charging and minimum discharg-733 ing power limitation of EV according to allocation of priority. 734 The charging power is zero when the EV is not in the charging 735 station, which is as per Eq. (40). Eq. (41) C 5min,n charging price,t = Pch 5min EV n ,t · C charging price,t · t 5min I 5min power dispatching,t = Pch 5min EV n ,t + Pdis 5min EV n ,t · C power dispatching,t · t 5min (32)

797
If the microgrid is not engaged in any power transaction mode 798 and does not perform optimal scheduling, the EV adopts 799 the method of first come first served upon arrival at the 800 charging station. The overall power of the microgrid is shown 801 in Fig. 17 Fig. 18 shows the overall power diagram of centralized 809 optimal EV charging pile control per 15 min of EV charging 810 station. In contrast to Fig. 17, it can be clearly seen that 811 the congestion caused by the arrive of large quantity EVs is 812 solved. Moreover, EV charging station can integrate EVs in 813 its field, participate in DR bidding of power utility, to obtain 814 additional profits, and reward users participating in this power 815 transaction.   Table 3, computing time 822 needed for centralized optimization per 5 min has signifi-823 cantly exceeded its scheduling requirement.

824
In an EV charging station with more than 100 EVs, central-825 ized optimization architecture for 5 min cannot perform real-826 time EV charging pile optimal scheduling control. Although 827 centralized optimization architecture for 15 min can meet 828 VOLUME 10, 2022     Fig. 22(a) and (b) show the results of EV charging and 841 discharging scheduling results diagram, which present ser-842 vice mode of only charging in low speed or smart charging 843 and discharging in fast speed, respectively, choosing by EV 844 user. In the only charging mode, EMS performs optimal 845 scheduling control according to actual operation situation in 846 the premise of satisfying the EV charging demand. On the 847 other hand, in the smart charging and discharging mode, EMS 848 FIGURE 21. Overall power of charging station microgrid with double-layered centralized CSMS and decentralized EMS optimal scheduling considering uncertainty.   Table 4 describes comparisons of 15-min and 5-min cen-853 tralized architectures, and the architecture proposed in this 854 paper. Although the proposed method cannot realize max-855 imization of power utilization efficiency as well as 5-min 856 centralized architecture does, it can reduce penalty cost of 857 contract capacity by 58%, increase operating profit by 2.3%, 858 and decrease charging cost of EV users participating in smart 859 bidirectional charging and discharging by about 10%. The 860 15-min centralized type, since its incapability of conducting 861 optimal control in short time, is less able to resist fluctuation 862 uncertainty caused by prediction error.

863
When PV power generation is insufficient, it is neces-864 sary to purchase additional high-priced power from the grid, 865 increasing power purchase cost compared to the 5-min cen-866 tralized architecture. However, the double-layer architec-867 ture proposed in this paper is an optimization architecture. 868 By adopting 5-min optimal control, uncertainty of PV power 869 generation is compensated by EVs and ESS devices.   earn more income for EV charging station, but also addition-873 ally reward EV users.

875
The blockchain system proposed in this paper operates on 876 computer with Intel 4 Core CPU. The blockchain system 877 built up in this paper for the experiment has 1 orderer 878 node, two peer nodes and two cloud-ledger nodes on 879 an Intel server, and three local ledger-nodes on Rasp-880 berry Pi. The blockchain platform is all self-designed. The 881 1000 times consecutive transactions are tested on chaining 882 process, its results are shown in Fig.23. The average latency 883 by 2.3%, decrease charging cost of EV users participating 939 in smart bidirectional charging and discharging by about 940 10%, and hundreds of charging piles can be managed within 941 acceptable execution time.

942
Thus far, the 1,000 charging piles have been simulated 943 for EV charging stations in commercial buildings. Next, the 944 authors plan to implement the platform in a real virtual 945 power plant (VPP) to verify the system platform performance 946 and meet demands for charging and discharging transac-947 tions, when the number of EVs increases rapidly. Meanwhile, 948 by integrating more distributed power resources in the power 949 grid through the power trading platform, the overall power 950 utilization efficiency can be maximized to assist the energy 951 management of the participants in the VPP. 952 electric vehicle charging stations with adopted smart charging/discharging 1008 schedule,'' IEEE Access, vol. 8, pp. 196908-196919, 2020.