Research Article

SV2G-ET: A Secure Vehicle-to-Grid Energy Trading Scheme Using Deep Reinforcement Learning

Algorithm 2

V2G or G2V for EV.
 Input: State , energy prices, vehicle volume
 Output: EV G2V/V2G schedules
(1)Implement the DNN parameters trained by Algorithm 1.
(2)for Timestep t: 1 to do
(3)Obtain past 2 days energy prices.
(4)Network extracts the features from the data of energy prices.
(5)Calculation of action-value (, , ) by Q network
(6)The action is selected randomly, otherwise
(7)Output G2V/V2G schedule.
(8)Execute ET_Transaction_Details() for secure access
(9)Publish ET details over EBT and stored in off-chain mode IPFS.
(10)Generate private_key and public_key.
(11)Distribute private_key and public_key to all stakeholders i.e., EV_Owner, utility_supplier, SG administrator.
(12)end forreturn