Case Study

Digital Twin Data Modeling with Internet of Things Streaming Telemetry for Peak Shaving in Virtual Power Plants

Green IT

My virtual power plant prototype consisted of a microservice-based data platform built using advanced technologies such as Apache Kafka, actor model programming in Scala, and Akka to leverage actors and advanced streaming.

My virtual power plant prototype consisted of a microservice-based data platform built using advanced technologies such as Apache Kafka, actor model programming in Scala, and Akka to leverage actors and advanced streaming.

Project snapshot

Challenge

Model and operate a virtual power plant that can smooth peak demand with reliable, real-time telemetry.

Constraints

  • Large event volume from heterogeneous simulated battery devices.
  • Need for near-real-time decision support and forecasting.
  • Limited project timeline within a thesis setting.

Intervention

  • Designed a microservice architecture with Apache Kafka for stream durability and throughput.
  • Implemented actor-model based digital twin logic using Scala and Akka.
  • Integrated weather and market data for forecasting and optimization workflows.

Outcomes

  • Delivered a working digital twin prototype for peak-shaving scenarios.
  • Demonstrated real-time aggregation and insight generation across distributed entities.
  • Validated a scalable architecture approach for Green IT energy systems.

This is my final master’s thesis, which I worked on independently as part of my Master of Science (MSc) in Computer Science and Informatics at Roskilde University. The subject area of my thesis was computer science, with a focus on exploring innovative solutions for Green IT and sustainable energy. The project ran for six months, from June 2021 to January 2022, with a total workload of approximately 480 hours.

My master’s thesis was quite an adventure, where I dove deep into a technical topic within the energy sector, which I titled digital twin data modeling with Internet of Things streaming telemetry in virtual power plants.

The diagram below shows the core modeling idea from the project: a hierarchical digital twin where low-level device telemetry is continuously aggregated into higher-level state that can be used for forecasting and peak-shaving decisions.

Functional diagram for virtual power plant
Functional diagram showing telemetry flow and processing stages used in the prototype architecture.

Research Problem

My research hypothesis was to investigate whether battery storage units can be used to smooth peak load periods in the energy sector. Peak load periods are short time windows with very high electricity demand—for example in the evening, when most people are at home cooking dinner, doing laundry, and using household appliances. These peak periods are currently very expensive due to the challenges of meeting electricity demand during such spikes. New and innovative research in both software and hardware solutions for sustainable energy is required to address this problem.

Method

My methodology followed an experimental computer science approach, which I used to explore innovative solutions through the design and evaluation of a virtual power plant prototype system. A virtual power plant is a virtual representation of a power plant that can aggregate energy from a large set of smaller, heterogeneous energy resources such as residential and commercial battery storage systems, electric vehicles, smart thermostats, and more. This aggregation enables peak-shaving by using stored energy during peak demand periods or by trading energy on electricity markets when appropriate.

I used computer simulation as a method to simulate battery storage units, which allowed me to evaluate the prototype system by experimenting with large volumes of simulated streaming telemetry data.

Potential Solution

My objective was to explore innovative solutions to this challenge. Battery storage units combined with renewable energy sources (wind and solar) represent a promising solution that can help smooth peak demand by discharging electricity from batteries when demand is highest, thereby reducing costs for both electricity producers and consumers. Batteries can then be recharged when electricity production is high—for example when the wind is blowing or the sun is shining.

Results

My virtual power plant prototype consisted of a microservice-based data platform built using advanced technologies such as Apache Kafka to provide high data throughput, scalability, durable storage, and high availability. I combined Apache Kafka with actor model programming in Scala and Akka to leverage actors, advanced streaming, and the principles of the Reactive Manifesto. This architecture was used to design a digital twin prototype that provides real-time insights into battery storage units for peak-shaving use cases.

I also collected and aggregated weather data and electricity market data, which I used to train an artificial neural network for electricity price forecasting in order to predict when future peak demand periods would occur. Based on these forecasts, I developed algorithms to schedule battery storage units to reduce peak load periods.

The results showed that virtual power plants can be built using state-of-the-art technologies such as Apache Kafka and actor model programming, and that it is possible to use electricity price forecasting and battery scheduling algorithms to smooth peak demand.

You can check out combotto.io if you would like to learn more about the project.

Need similar outcomes?

I can help assess your current architecture and scope a pragmatic implementation plan.

Related content

Discuss a similar project

Share your current setup and target outcome.

Prefer direct contact? Call +45 22 39 34 91 or email tb@tbcoding.dk.

Best for teams with architecture, reliability, security, or delivery risk in critical systems.

Typical response time: same business day.