A method for transactive energy control in a hierarchical multi-agent control system, the hierarchical multi-agent control system comprising a household layer, a microgrid layer, and a distributor layer, wherein the household layer includes a plurality of household reinforcement learning agents, the microgrid layer includes a plurality of microgrid reinforcement learning agents, and the distributor layer includes a distributor reinforcement learning agent, the method comprising:
- controlling, by each household reinforcement learning agent, a household electric load and charging and discharging of respective household batteries,
- training each household reinforcement learning agent as an actor-critic reinforcement learning model, in which a critic neural network evaluates actions of an actor neural network and approximates states of the actor neural network,
- wherein the actions include the charging and discharging the respective household batteries,
- wherein the states include state of charge of the household batteries;
- when energy in the household layer is in a shortage state, importing energy from an external power grid, and when energy in the household layer is in a surplus state, exporting energy to the external power grid, in a manner that energy imported and energy exported is minimized;
- maximizing, by a microgrid reinforcement learning agent, use of local energy in the microgrid based on a pricing policy for local transactions,
- when a microgrid is in an energy shortage state such that its local energy is insufficient to cover internal demand, accessing energy in other microgrids,
- when a microgrid is in an energy surplus state such that distributed generation surpasses the internal demand, selling energy to other microgrids experiencing a shortage,
- when energy is unavailable at the microgrid layer, importing energy from the distributor layer,
- when the energy is over-produced at the microgrid layer, exporting energy to the distributor layer;
- setting, by the distributor reinforcement learning agent, buy and sell prices among the microgrids in a manner that simultaneously facilitates energy trading among the microgrids and minimizes carbon emissions.