In this whitepaper, we shall examine the current state of decentralized energy management from demand side flexibility to energy production and show how connecting the two results in a highly decentralized virtual power plant manifesting self-sovereign energy. To do so we need to understand three relationships. The first is the decentralization movement characterized by blockchain technology and its relationship to self-sovereignty. The second is the growing shift towards sustainable energy production and its relationship to the prevailing infrastructure. And the third is the relationship between demand-side flexibility and electric vehicle smart charging apps.
The decentralization movement, characterized by blockchain technology [4, 5], is ambitious and is already spawning solutions that provide awesome opportunities for new social and economic interactions (the rise of NFTs is one such example). Decentralization also provides a counterbalance to abuses and corruption that occasionally occur in some organizations where power is concentrated, including large corporations and governments. Decentralization supports self-determination and the right of individuals to self-organize without compromising on self-sovereignty and all that it entails. Of course, the realities of a more decentralized world will also have its challenges and issues, such as the needs of international law, regulations, and other edges to which we much adhere.
In a world needing to head to a zero-carbon environment, the current generation has relied upon large capital investments to build farms of wind, solar, and water generated electricity feeding into a, seemingly, centrally managed infrastructure. Little has been done to truly harness the scale that exists in harnessing the individual, the single house or block of flats that have or could have solar and battery storage. Grants help adoption but without the follow-on to harness the power of the individual we will continue to rely on centralized approaches to energy supply. A more decentralized approach is needed .
Back in 2021, the UK government recommended (“Government’s intention is therefore to mandate a minimum set of requirements in 2021 that supports the early smart charging market.“, ) that charging points for electric vehicles must respect the needs of the grid and the Distribution Systems Operator (DSO) (for example ScottishPower Energy Networks or
Western Power Distribution) in fostering demand side reduction and so be able to smart charge the vehicles based on some notion of good time slots vs bad time slots. As a direct result of this edict the “still in a nascent stage” market for smart charging apps  was given a boost including our own smart charging apps at Electric Miles. We just had a wider vision from the start.
On the one hand, the smart charging apps that move towards meeting demand side flexibility and are able to aggregate 3rd parties can make a leap in doing the same for any asset that can charge, discharge, turn on, or turn off. On the other hand, the rise of blockchain technology enables us to manage assets, authenticating the assets right to participate in a way that can span charge, discharge, turning on, and turning off without any centralized management. It cries out for some notion of constraints on one side and some notion of schedules that are actionable against owned assets on the other.
When you combine schedules and constraints it points towards Artificial Intelligence (AI) and Machine Learning (ML) generated constraints and constraint-generated schedules [2, 3]. Self-sovereignty  comes from enabling each asset owner, from a single household to a small business, to plug in to such a system and start collaborating with others based on the need to sell energy or save energy. It enables us to deliver Virtual Power Plants that can self-organize around needs expressed as constraints, preserve self-sovereignty, and add security to local energy needs whilst respecting the needs of the grid.
What is needed is some way of enabling asset owners from the smallest to the largest to participate in a Virtual Power Plant whenever they wish in order to deliver “fast frequency response” to balance the grid in the future .
Challenges to today’s solutions
We list 5 key challenges that must be overcome to deliver a truly decentralized self-sovereign approach to virtual power plants.
We ask people to switch things off between certain hours, we call it demand-side flexibility. Not exactly a reliable way of reducing demand .
Challenge 1: High bar to supply
The bar to generation and supply is set extremely high. Largely because of regulations and process adherence .
For the purpose of ascertaining whether a breach of these Regulations may have occurred, a person duly authorised by the Secretary of State shall be entitled at all times to inspect and to make examinations and tests of a supplier’s works and to examine and take records of the readings of any instruments used by the supplier.
(2) The supplier shall afford reasonable facilities for any such inspection, examination or test, but shall not be responsible for any interruption in the supply which may be occasioned thereby.
Challenge 2: Capital investment
Investment is focused on large capital projects to generate. We don’t encourage individual participation on the supply side  and yet we ask customers to manually participate in demand reduction . As a result, the potential inherent in the individually owned assets is missed.
Challenge 3: Flexibility is wider than EVs
Today’s needs for flexibility [8, 12] will be dominated by Electric Vehicles and yet with energy prices rising many are turning to static batteries to charge off-peak and discharge at peak times to arbitrage the market. This suggests that a more encompassing approach is needed to deliver a highly decentralized approach to delivering demand and supply flexibility and unlock the value in the assets of many. The challenge for flexibility will be its ability to deliver outcomes very rapidly from a variety of assets, we call this fast frequency response .
Challenge 4: Coordinating self-owned assets
Very few projects and VPP initiatives  have successfully incorporated true micro-generation. The current bar to entry for supply is based upon the idea of central control. Whereas microgeneration needs to be able to have a more peer-to-peer collaborative approach to control while still fulfilling the needs to manage risk and ensure good and effective operation [4,5].
Challenge 5: Delivering the benefits of blockchain solutions
Today’s technology [4, 5, 6] is not without its own challenges. To date the projects undertaken in the energy sector have been based on either a private/permission blockchain or on a blockchain that uses Proof of Work (PoW) . The dominant use cases have been market or trading focused.
What these use cases have revealed, according to , is summarized in the table below:
Our Solution, Our VPP
When you combine the generic attributes of EV smart charging, embodied by what we do at Electric Miles today, extending the assets under management into the home with the power of decentralization of a blockchain and layer AI and ML to foster accurate predictions on supply, energy types, weather conditions and all manner of other data then you have the technology needed to meet the challenges.
At a high level a blockchain provides trusted immutable data with enforceable behavior. Whereas a constraint-solving system is a well-known way of dealing with scheduling issues. The former addresses the needs of trust in cost accounting and immutability provides the basis of auditing to enable supply. The latter ensures that the population of assets can be made to work together over a specific period to deliver the smoothing out of the entire grid.
Our approach will use a Proof of Stake [5,11] based, sharded blockchain with high degrees of concurrency, the ability to store anything and correct by construction smart contracts. As our base we will use the open source RChain. And to make the blockchain easy to use (a criticism cited in ) we will make it mountable as an NFS drive. Furthermore, the tokenomics model for the inevitable token will be true utility tokens and not a listed tradeable cryptocurrency. We will not list. We will have a tokenomics model for the PoS security that benefits internal and external validator nodes that provide a competitive return on investment in decentralizing the blockchain. We will also use tokens internally for all cost accounting, moving between fiat and token as needed at the extremities.
The blockchain will be used as a key system of record respecting the self-sovereignty of asset owners. They will own their own data which will appear in an NFS drive on their mobile or laptop. The data we will hold there will include registration of their assets, periodic inspection data, cost accounting for consumption of energy or services and production or preservation of energy from them, and historical data on schedule execution.
The executable schedules will be paired with assets and will define in any period what behavior is required of the asset. This includes stopping charging, reducing consumption, starting charging and discharging. The schedules are created using a constraint solving system that takes in constraints from all stakeholders in the energy eco-system from the National Grid, the Distribution System Operators (DSO), other 3rd party aggregators, the individual asset owners, and Virtual Power Plants. A set of constraints is created reflecting these stakeholders’ needs and are applied over executable schedules that asset owners own. Each asset owner can accept the executable schedule automatically or be notified about any changes and so manually intervene. The asset owners can turn off executable schedules whenever the need arises. The last inch, the bit that connects the executable schedule to the asset, provides the connectivity and control of assets. In the world of EVs this is dominated by OCPP (Json over winsockets)  and OCPI (an API protocol) . Whereas assets such as static batteries are accessed in the same way using the open source foxBMS  and/or YYY . Further control of assets that have an impact on flexibility when turned off or turned down such as heat pumps, are addressed using standards such as OpenTherm  and EEBus  . And standards enabling discharge from solar and wind are based on IEEE 2030.5  and CSIP . Our plan is to ensure that the semantics of our schedules are an appropriate subset of all these standards so that we can reason over the assets and constraints to be met and produce suitable executable schedules.
The format and the semantics of our executable schedules will be open sourced to enable others to create auto enactment of the schedules so that they can apply them to assets under their control or management. Guaranteed execution of schedules can only be provided by the assets under the direct control of the VPP.
SMARTFlex: Constraints and schedules
A schedule in our world looks remarkably like a diary for the day. It is a dynamically sliding window into the future rather than the past. Each schedule is associated with one asset under direct or indirect management. Each slot in the schedule has a date and time associated with instructions to the asset under management. The schedule, as an executable, applies the instructions at the time in the schedule to the asset. The sort of instructions that our schedules have are, START CHARGE (start a charging session), STOP CHARGE (stop a charging session), SUPPLY (discharge to the grid), STOP SUPPLY (stop discharging to the grid), REDUCE RATE (reduce the rate of consumption with a target), INCREASE RATE (increase the rate of consumption with a target).
Because schedules are associated with specific assets and those assets are owned by individuals or companies, they own their schedules too. They are part of the self-sovereign data that makes a self-sovereign individuals’ digital presence. The instructions for each schedule are created by using a constraint system that takes in selfsovereign constraints of the self-sovereign individual along with constraints from the grid, the DSOs and any other operator in the energy eco-system. A constraint specifies legal combinations of assignments of values to the variables . In our case, the variables are the timeslots in the schedules and the instructions we choose to place into them and the countable consequence (in terms of energy saved or provided). The actions that we take (the instructions) are constrained in order to meet the countable consequence at a given time for a given period. Examples of some of these constraints are shown below: My car must be 80% charged before I leave at 7:30am on the 23rd April. (charge @ 7:30am 23rd April >= 80%) I have a personal need between 6:30am and 8:30am to consume X amount of energy to get ready for the day from my battery storage. (battery @ 6:30am >= X charge) The zone demarked by postcodes PL and TR must not exceed Y amount of energy on the 26th April between 6pm and 8pm. (total energy of PL and TR between 6:pm and 8pm <= Y)
These can all be expressed as constraints in a system and prioritized. The constraint system calculates the possible values for each schedule that contributes to energy consumption and provision and attenuates individual assets to meet the highest order constraint. In the examples above the highest-order constraint is the last one.
In some cases, it may not be possible to meet all constraints and in those circumstances the constraint system would provide details on what constraints one could change to meet the highest order.
The constraint system loads the constraints for all parties continuously and solves them regularly. When a fast frequency response  event is called (always ahead of time), the constraint system fires into action and produces the schedules. The schedules are held in the self-sovereign owner’s data space (on a blockchain) and the various connectivity components
that mediate assets directly get called into action at the due date and time to deliver the participatory outcome. The summation of all the outcomes provides the necessary constraint satisfaction to the highest order constraint.
The role of the blockchain
In an energy eco-system that enables people to join and leave at will in participating in a virtual power plant that can provide a fast frequency response to the grid across a highly decentralized set of assets we need a connective infrastructure that is at least as decentralized as the assets themselves. This is to ensure that the self-sovereign ownership is not compromised which in turn engenders trust of asset owners and yet ensures trust for distribution systems operators and the grid itself. Rather than having one “trusted” 3rd party where all asset data is lodged we need a network that is trusted in and of itself. We need algorithmic trust. This sort of trust is the domain of blockchain technology.
Hitherto blockchain technology has not been scalable enough to meet the demands of the energy eco-system. With a new generation of blockchain platform typified by the move to Proof of Stake networks, and with developments in smart contracting languages that are free from unintended consequences [21,24] it becomes possible to do more than just energy trading. With a blockchain that is mountable as and NFS drive we can envisage self-sovereign data being available as a mounted folder and to be permissioned by the self-sovereign individual for collaboration in our VPP. With such a blockchain we can make it easy to use, we can make it highly secure, and we can scale linearly and cost effectively.
The blockchain storage at the self-sovereign level will include storage for certifications to supply, inspections, and other operational trusted data. The blockchain will also be used as a system of record of the execution of schedules and the cost accounting for demand reduction and supply. We will run two blockchains, one for operational use which will use last finalize state and snapshotting to maximize operational efficiency without the loss of important permanent data.
Conceptually the architecture looks a little like the following:
The different asset types are invoked by standards-based connectors, today for EVs this is OCPP and OCPI. And similar standards exist for in-house devices from heat pumps to inverters and batteries.
The Prediction Machine
The idea of a prediction machine is not new. We can trace its roots back to the 19th century with the tide-prediction machine, and analogue computer from the earliest ages of automated computing .
What makes this early reference so important is the recognition of the domain specificity. It is equally true of our own prediction machine. It won’t predict the winner of the lottery but it will assist in the running of a VPP by collaborating with the SMARTFlex Engine and using classic AI techniques to derive predictive analytics to drive supply and demand as well as helping to better schedule maintenance and audit.
The rise of AI has been predicated on the easy availability of data. Without that shift in the cloud era there would not have been enough data to drive the development of AI as we know it today.
Our prediction machine  consumes data from the web (weather, price information, and anything else deemed relevant) combines it with the data in the archive blockchain – to ensure that we do not consume resource from operational management – and offers predictions in multiple ways. The first and most important way is to feed constraints (on demand, supply, price and so on) to the SMARTFlex Engine. A sort of self-tuning approach to flexing.
How our VPP meets the challenges
Our VPP solution deals with the 5 challenges in the following ways:
Challenge 1: High bar to supply
Our solutions use of a blockchain that can store arbitrary data ensures that the self-sovereignty of that data (effectively the assets) is not compromised in any way and at the same time the data important to supply is kept on the blockchain itself. This means that digital signatures can be used to ensure that the data is attested to and that in turn provides the risk management needed to supply safely and securely.
Challenge 2: Capital investment
Our solution does not require large solar farms or wind farms or any other more centralized generation mechanism. Although we can consume assets and aggregated assets of arbitrary size with no adverse impact. We can operate entirely organically without large capital expense.
Challenge 3: Flexibility is wider than EVs
Our solution incorporates a generic means of flexing assets through schedules of executable instructions as to what the assets need to do and when they need to do it. Those assets are not just Electric Vehicles and their chargers, those assets may include static batteries, inverters, heat pumps in which we attenuate their use to meet the flexibility
requirements without adversely impacting the asset owners.
Challenge 4: Coordinating self-owned assets
We meet the coordination needs through three mechanisms. The blockchain itself is used as a collaboration plane between asset owners and the SMARTFlex Engine. The constraints at various levels from self-sovereign individuals to the grid provide a means of coordinating so that the desired outcome can be delivered over all the assets.
Challenge 5: Delivering the benefits of blockchain solutions
We deliver the real benefits of a blockchain approach by making the blockchain mountable and therefore easy to use, enabling the storage of arbitrary data, support for attestation of data, a highly concurrent core with sharding and PoS ensures we can scale and be sustainable at the same time. Coupled with a correct by construction smart contract language the goals of efficiency, effectiveness, and security can be delivered in the widest context from trading to operations from demand side flexibility to supply side flexibility.
The urgency of NOW
The shift from centralized to decentralized energy is inevitable. Whoever solves the coordination problem will have changed energy management forever. We believe we have that solution.
At Electric Miles our vision is to enable homes, businesses, and electric vehicles to share in the production, storage, supply, and management of decentralized energy and reap the benefits. We will handle the needs of individuals, homes, and businesses while meeting the needs of local DSOs and the GRID itself in our pursuit to unlock the potential of decentralized selfsovereign energy and help the world achieve net zero.
If you are an investor, then help us make this real. If you are interested in working with us on our VPP, then contact us. We are building a consortium to do it.
 “Electric Vehicle Smart Charging: Government Response to the 2019 Consultation on Electric Vehicle
Smart Charging” 2019
 Constraint programming, wikipedia
 “Constraint Programming and Artificial Intelligence” Springer, 1994
 “Electricity powered by blockchain: A review with a European perspective” 2022
 “Blockchain challenges and opportunities: a survey” 2018
 “Blockchain: The basis for disruptive innovation in the energy sector?”, 2017
 “Governance and societal impact of blockchain-based self-sovereign identities”, 2022
 “Believe it or watt: Octopus Energy customers provide 108MW of grid flexibility in first ‘Saving
Session’ – equivalent of a gas power station”, 2023
 “The Electricity Supply Regulations”, 1988
 “Scheme Closure”, 2019
 “RChain Whitepaper”, 2017
 “Virtual Power Plants In The 20s Moving From Theory To Practice”, IEEFA.org, 2022
 “Artificial Intelligence: Foundations of Computational Agents”, 4.2.1 Constraints, Cambridge
University Press, 2017
 Open Charge Point Protocol, 2018
 Open Charge Point Interface, 2020
 foxBMS open source battery management system, 2023
 OpenTherm, 2023
 EEBus, 2023
 IEEE 2030.5, 2018
© Electric Miles 2023 15
 Rholang, 2017
 Tide-prediction machine, 19th century
 “An Overview of the EM Value Narrative – Whitepaper”, 2023
 L.G. Meredith and Matthias Radestock. A reflective higher-order calculus. Electronic Notes in
Theoretical Computer Science, 141(5):49–67, 2005. Proceedings of the Workshop on the Foundations of
Interactive Computation (FInCo 2005).