AI in Smart Energy Systems Lecture 2 Notes
AI in Smart Energy Systems Lecture 2 Notes
Energy
Systems
Lecture 2
Sohail Khan
Contents
1 Digital Twins .............................................................................................................................. 2
1.1 Varieties............................................................................................................................. 3
1.2 RTDS .................................................................................................................................. 4
1.3 Summary:........................................................................................................................... 4
1.4 Questions........................................................................................................................... 5
2 Transactive Energy..................................................................................................................... 6
2.1 Summary............................................................................................................................ 8
2.2 Questions........................................................................................................................... 9
3 Blockchain for Power Systems ................................................................................................... 9
3.1 Blockchains ........................................................................................................................ 9
3.2 Smart Contract ................................................................................................................. 10
3.3 BlockChain Applications: .................................................................................................. 10
3.4 Challenges in Blockchain: ................................................................................................. 11
3.5 Summary:......................................................................................................................... 12
3.6 Questions......................................................................................................................... 12
1 Digital Twins
A digital twin is a numerical, mathematical simulation replica of something real. For example,
We have an object - say a planet. We model this object i.e planet in a simulation environment
by using a numerical model. Then we feed it with data from the real world to define its
equations, topologies, dependencies, and mechanisms so that the twin replicates reality as
close as possible.
Thus, we will be able to get information out of the twin that is hard to obtain from the real
world, because mostly, it is not under our control.
Applications
Several sectors already use such digital twins. Some important sectors are the airline industry,
the automotive industry, and construction:
Airline industries use flight simulators as a digital twin to replicate an actual aircraft.
The automotive industry uses it to test vehicles for driving stability and many other
properties.
In construction, digital twins are used in forecasting whether a crane fits through a
particular passage of a construction site.
Even after finishing the building, we can have twins that help us to evaluate its energy
efficiency or evacuation routes.
Properties
A digital twin has several important properties. First of all, a core part of the digital twin is its
numerical model. However, it is crucial to realize that this numerical model is not everything.
A digital twin also has a particular purpose, and it needs to be part of a workflow.
Usually, there is data going in and out, and it must be clear how that happens, but also how
to update the models, how people interact with it, and how to create it in the first place.
These last two aspects might be even more complicated than the numerical model itself.
1.1 Varieties
There are different types of digital twins in the case of the power system; they differ in model
fidelity, and therefore also in execution speed. In terms of speed, we can distinguish between
those that are slower than real-time, those who execute in real-time, and those that are faster
than real-time.
If the twin is slower than in real-time, it means that the model takes more time to simulate
or execute than would pass in reality. So, if you want to investigate one hour, it might take
you 5 hours to simulate this one hour. These twins are used for design purposes such as the
sizing of equipment or to study dynamic phenomena such as grid stability.
If the twin runs precisely in real-time, we can run it in parallel with reality and do some
anomaly checks. If our real power plant or system deviates from what the twin does, there is
most likely a problem. It means that something has happened that the twin doesn’t know of:
something is for instance broken or something was not specified and modelled.
If the twin is faster than in real-time, we can fast-forward into the future to see what will
happen. We can even investigate alternative future scenarios to help in decision-making.
Provided that our twin is fast enough, we can spawn several twins in parallel to tell us
potential outcomes. It is then possible to make a statistically robust decision based on the
results of these simulations.
A dashboard is maybe the most simple twin possible. It shows us what currently is happening
in our power plant or system. It doesn’t tell us the future. It doesn’t tell us alternatives. It just
displays a reality. However, this can already be considered a twin. The above-explained types
are illustrated in the graph below:
In order to analyze the power system, we can also use a twin. One of them is a real-time twin
based on high-performance computing hardware called the Real-Time Digital Simulator
(RTDS). With this, a transmission system is modelled, and on simulation, we can analyze
expansion planning, for instance; we can see the impact of adding another wind farm.
For this, we need the topological data of the grid, all the parameters of the lines, cables,
power stations, and transformers. What we get out of it is a powerful tool that can be used
to study scenarios, for instance, to find out where the stability limits of the system are. This
information can be used to improve the actual grid.
RTDS in short is a powerful super-computer twin that can interact with many things.
In conclusion, a digital twin can not only simulate the grid, but it can also interact with real
elements in an experiment, such as external controllers, power hardware, people, software,
and digital equipment.
As we have seen, the RTDS is a mighty twin. But in the future, they might be everywhere.
Remember that computers in the 1940s were big machines occupying entire rooms? Now you
can fit much more capable ones into your pocket.
The same could happen to twins. Now they are on super-computers, but in the future, they
might become ubiquitous. We might have a little twin in our house. There might be a twin in
your electric car. There might be a twin at the substation. It might not oversee and understand
the entire power system, but it will include everything necessary for that particular asset and
situation, replicating its immediate environment. We can use it for control, diagnostics, and
everything else for which we currently need the centralized, expensive, powerful twin. So,
digital twins help in decision making and will have a more significant role in the future also at
the edge of the system.
1.3 Summary:
A digital twin is a digital replica of a real object or system. We usually need lots of data
or knowledge to create and run that twin, and - if it is a real-time twin - to synchronize
it with its real counterpart. It can deliver us insights into potential alternative futures,
depending on the twin’s capabilities and speed.
The model itself is essential, but it’s not everything. We need a lot of software around
it. It is embedded in a workflow to get the data in and out, to analyze it, and to keep
the twin up-and-running and synchronized with reality.
For the power system, the high art of twinning is to use dedicated super-computers
to imitate power system dynamics. If they are real-time capable, they can interact with
controllers, power hardware, people and software, and digital equipment.
In the future, we believe that these twins will be used at the edge as well rather than
having them only on super-computers. The digital edge will be much more aware of
itself and its environment in future, and a digital twin, located on the controller in the
field, is the means for that. Such twins will help with controls, diagnostics and analytics
for complex power systems.
1.4 Questions
What is the main difference between a digital twin and a regular numerical simulator?
You would use a digital twin that is faster than real time when you want to:
This chapter deals with supply and demand, liberalization, and the future of automated
electricity markets. The traditional energy supplier was a single party that provided
generation, transmission, distribution, and sales to customers as a simple feel-good package.
Monopolies, however, lead to inefficiencies and other problems, so power systems were
deregulated in many countries.
The deregulated or liberalized way is to decouple generation from the infrastructure. This
way, the customers can at least choose their supplier or the generation of their will.
The grids are a natural monopoly: it is very costly to have two grids side by side, so it’s hard
to compete here. But, power stations and generation units can compete so that customers
can choose their suppliers. The electricity market facilitates this.
Figure 1. merit-order curve
Figure 1 shows the supply curve or, more specifically: the merit-order curve. To construct this
curve, we collect all the generation products. In this case, it’s a chunk of solar energy, a large
chunk of wind energy, and a block of fossil generation. There are prices to each of these
amounts, and we sort them from left to right, from cheap to expensive. As you can see,
renewables are much more affordable than fossil energy; this is because their primary fuel is
free. So what happens is that the renewables are on the left side and push the fossils to the
right.
The consumption or demand also gets a curve with amounts and prices. This is shown in figure
2. Here you see two of these curves: one for day-time and one for night-time. If consumers –
such as industry and households - are sensitive to changing prices they consume less when it
is expensive and more when it is cheaper. This is called the price elasticity of the demand.
To implement such a market for generation units and consumers, we need three things.
1. Platform: we need a platform where the bids, needs, and options are matched with
each other.
2. Rules: there must be rules on how to do this.
3. Infrastructure: the required infrastructure for the delivery of the product might also
have some requirements.
As a customer, you can freely choose between different suppliers and even switch from time
to time. You make an agreement with one delivery party. This delivery party can also act as a
Balance Responsible Party or BRP for short. The BRP has a portfolio of generating units and
consumers to keep in balance. It can do this by using its own generation assets or buying the
required energy from power plants on energy markets.
The BRP announces the expected mismatch of its pool to the grid company which then checks
if everything is in balance at the end. Final mismatches are solved using the spot market,
which is more expensive, as you can imagine.
If this process is automated and made available to even smaller devices, we arrive at
transactive energy. A simple example is the PowerMatcher. There are different assets:
consumer devices such as household devices, computers, or air conditioning but also energy
generation units. We equip all these assets with software agents that act on behalf of these
assets. Aggregators combine the bids of several assets into one offer.
For instance, all the devices in your house are aggregated by one house agent. These
aggregators are again software agents, now representing a certain number of devices or
device agents. And even aggregators can be aggregated further. With this structure, we create
a hierarchy that scales very well. Then an auctioneer receives all the bids (generation and
consumption bids) and creates the price based on the market rules it implements.
The price is then broadcast to all the subscribers. If this is automated with embedded systems
and intelligence at the edge, we have transactive energy brought to each asset in the grid!
2.1 Summary
The power system can be deregulated. The most straightforward case is the
decoupling of generation units from the grid companies.
Usually, a market is implemented where the demand and supply of bigger players are
matched, and the price is created using the merit order curves.
We need to have a market platform, specific rules, and an infrastructure.
In a flat, transactive energy system, much smaller players - individual houses and
devices - can act on these markets; they can make contracts, bid for energy or
flexibility. Then, an auctioneer or some other market facilitator creates the prices in
the end. The PowerMatcher implements this in an automated way by using software
agents.
2.2 Questions
Who is responsible for balancing supply and demand in the free electricity market?
The primary element is a piece of data. Of this block, we can create a unique cryptographic
hash signature. If we make a chain of such blocks where each block also contains the previous
block’s hash signature, we get a blockchain. This is the data foundation behind all these
blockchain applications.
Hash signature.
Transactions that are also part of the data.
A peer-to-peer network is used.
Everything that we want to store is put inside the block on a public ledger. This is a shared
database that is entirely transparent. The magic element is that the transactions are verified
on a peer-to-peer network. The verification technique depends on blockchain technology and
can be proof of stake, proof of work, etc. This makes it impossible to tamper with the data.
This means with blockchain, documents and proof of transactions can be stored safely and
transparently.
Example: You can write in a smart contract that if the temperature is below -5°C and it’s a
Friday evening, you wish to purchase a certain amount of energy from other users to heat
your house. In this example, there are two conditions and one action. If we agree on this, our
contract is validated by the peer-to-peer network. Then, it is put onto the public ledger in the
blockchain. The smart contract can even be a python code that is executed on my heat pump.
Then, the literal script is stored on the blockchain and run when the conditions apply.
In the power business, there are plenty of applications where we can use blockchains:
The most trivial is energy trading when bidding and transactions are executed in a
blockchain.
We can also attach emission certificates with an entry or token in the blockchain.
We can use smart contracts to execute control actions in order to balance power with
ancillary services. In this case, the blockchain must be very fast. If we want it to react
within seconds, the blockchain has to be able to provide that.
Blockchain projects:
This technology is new, and projects are coming and going. Here are a few examples.
1. Enerchain is a blockchain platform for peer-to-peer trading used for wholesale market
applications in the energy domain and energy communities in Europe. It’s designed to
be fast.
2. Project of Vandebron and TenneT. It uses electric vehicles and their storage
capabilities to implement power balancing services. Here we already have an
application that implements control and smart contracts.
3. The Brooklyn Microgrid is an energy community with prosumers that implement
transactive energy. If you have excess energy because of your rooftop solar panels,
you can sell it to your neighbor or somebody else. Smart meters and crypto tokens
facilitate that. You, as a user, can indicate your preferences, for example, that you
would like to buy energy only up to a specific price.
4. There are plenty of solar projects where the produced energy is tagged with a
cryptographic signature. This energy is traded, and because of the signature, you can
know that the energy you consume is really green.
Blockchains are data blocks signed with a cryptographic hash, and they can contain
different kinds of data or even scripts.
A smart contract is a computer program or a transactional protocol intended to
automatically execute, control, or document legally relevant events and actions
according to the terms of a contract or an agreement. In other words, there are
decisions to be made or executed when certain conditions apply.
There are wide applications of blockchains and smart contracts other than
cryptocurrencies.
There are many ongoing projects in power systems that use blockchains and smart
contracts. They can be an energy coin, used to finance projects, or utilised to execute
control actions based on smart contracts.
This technology being innovative comes also with challenges. These range from
identity management down to the energy consumption of the entire infrastructure.
3.6 Questions
A smart contract is :