Introduction | What is a digital twin? How does it work in HIL?
The renewable energy transition is underway, with current events pushing away from fossil fuels and non-renewables such as natural gas and oil. Generating and sharing power locally, in community energy systems (CES), is now more accessible than ever before thanks to advances in sustainable energy technologies and grid control methods. However, implementing these changes is a major challenge. Existing grid infrastructure features a complex mix of new and old equipment, most of which is not designed for the unique grid balancing and stability challenges posed by distributed renewable energy resources. Therefore, any new grid equipment or control mechanism must be carefully tested to avoid any unexpected or disastrous consequences. Fortunately, there is a safe environment where these complex interactions can be tested, considering the unique local conditions of each site.
Enter the digital twin. Digital twins are high-fidelity mathematical models of a physical device or a system. The key word in this definition is “high-fidelity”/ This means that, for the same conditions or stimuli, a digital twin will behave in exactly the same way as the physical device or a system. For example, a digital twin of a solar power plant will produce the same amount of power and provide the same power quality (voltage, frequency, harmonics, etc.) as the physical power plant for identical conditions: solar irradiation, outside temperature, type of the PV panels, condition of PV panels (e.g. recently cleaned or atmospherically contaminated), type of the inverter(s) used in the solar power plant, etc.
Example of the C-HIL digital twin concept. With HIL, the real controller (bottom) is the device under test, and it receives and sends the same signals to either the real system (left) or the digital twin emulation (right).
Hardware-in-the loop (HIL) methodology is the most powerful way to utilize the digital twin, providing an interface between the digital twin and a physical device/system. Namely, HIL testing allows a device under test (DUT) to “believe” it is operating on the real system while actually operating on a digital twin: all thanks to the high fidelity of the digital twin, which provides the DUT the same types of signals at the same speed and the same power levels as it would in a real installation. In the context of digital twins of community energy systems (CES), the DUT is typically a SCADA system, a building management system (BES), or a cloud aggregator, controlling and operating the digital grid as if it were the real grid. This is useful in a range of cases: testing new operational strategies, training new grid operators, troubleshooting equipment errors, assessing new functionalities, or technical implications of introducing new business models and new devices.
Types of Digital Twins| Why would I need a digital twin?
Digital twins can be classified in different ways. The simplest classification looks at the phase in the product lifecycle that they support, meaning that there are developmental phase digital twins and operational phase digital twins.
Development phase digital twins (or product/production digital twins) support the construction, renovation, and implementation processes of new products and services. These involve making a digital twin prototype of the planned system prior to construction. For example, if you want a new grid-storage battery system on an existing site, a development phase digital twin allows to centralize data on the site, and see where and how the needed changes to the electrical network could be implemented. Then, with HIL, you can explore how the planned system would perform in the target site, helping better size the final system, identify potential control issues and test the communication with the system works, all before building a real prototype.
Example of a digital twin of a microgrid system for testing control of a SCADA system
Operational phase, or performance, digital twins support the operational and maintenance phases of an installation. These often work by gathering live and historical data from a real site, feeding it into a database, displaying the data of individual devices (digital twin instances) or the performance of all devices together (digital twin aggregates) so it can be interpreted easily by site managers, e.g. through a Building Information Management (BIM) system. A HIL-based operational phase digital twin provides a high-fidelity sandbox environment for testing new control strategies or for training new microgrid/CES operators, without jeopardizing the real system. Additionally, operational digital twins support scenario testing, enabling data-driven predictive maintenance and/or cybersecurity robustness tests to avoid system failures before they occur, and making post-mortem analysis of system failures and their potential solutions easier for bringing the grid system back online faster.
HIL-based Digital Twins| What do you need to make a digital twin?
Every digital twin is a model, but not all models are digital twins. The difference between the two is in the fidelity and accuracy of emulation of the physical device or a system, which, in the case of digital twins, are indistinguishable from the physical one. To make this possible and create a model that can be rightfully called a “digital twin” it is necessary to, firstly, get the relevant inputs for modelling and, secondly, to have relevant data for its validation.
The first requirement for creating a digital twin is the proper modelling inputs. In other words, the modelling engineer creating a digital twin needs to know exactly what devices should be included in the twin, their specifications and operational characteristics. The level of details and data inputs depend on the purpose of the digital twin. For example, when performing sizing studies for new assets, such as choosing the optimal size of a battery storage system, the relevant modelling inputs include the nameplate data of existing assets, e.g. types of solar panels, the power rating and efficiency of the solar inverters, and other relevant data contained in the specifications table at the end of the modelled asset’s user manual. However, for integration and pre-commissioning use cases, information on the communication layer is also necessary, e.g. the inverters’ MODBUS register maps, custom SunSpec registers and functionalities of battery storage systems, or the OCPP versions of EV chargers. By creating a model with the same communication capabilities as the physical system, the modelling engineer creates a true digital twin that, from the point of view of a device under test, e.g. SCADA or a building management system, behaves exactly like the real system, including the capability to read and write the same data using the same communication setup. To achieve this, modelling engineers create a data specification document based on the digital twin’s purpose: the relevant stakeholders fill it in with nameplate data, technical specification and, possibly, communication registers for the modelled assets. With the proper inputs, the model is guaranteed to accurately replicate the physical device or system.
Every modelling engineer knows the significance of the phrase “garbage in; garbage out”. An accurate model becomes a digital twin through model validation, which ensures that relevant inputs produce relevant and accurate outputs from the model. In digital twinning, validation is the process of fine-tuning the model so that its behaviour fully matches the behaviour of the physical device or system it is intended to represent, i.e. ensuring the model is useful for the conditions and inputs in question. The main requirement for validation is a data set of relevant measurements: historical, or, preferably, both historical and real-time. With relevant historical measurements, the modelling engineers can carefully modify and parametrize the model until its behaviour is identical to the physical device (or a system) for the same inputs and in the same conditions. The data required for validation and its granularity depend on the purpose of the digital twin. For power flow analyses and asset sizing studies, 15-minute interval data is usually sufficient (e.g. for PV plants: solar irradiation, power output, etc.). Conversely, for emulation of time-critical scenarios, e.g. provision of ancillary services such as frequency restoration, it is necessary to have second- or sub-second measurements, together with additional data from the asset(s), e.g. state of charge, current operational mode of the battery, etc. If the purpose of the digital twin is to accelerate integration, the communication layer also needs to be validated, ensuring the correct scaling and type of measurements via MODBUS, CAN, IEC61850 or other communication protocols. Finally, if the digital twin is a multi-physics twin, an additional, second-degree, validation is needed to ensure that each of the individually validated models work together as expected. For instance, if a microgrid includes a CHP whose thermal output needs to be emulated together with its electrical power output, the power and thermal models must be validated together to ensure the measurements of the complete emulated system do not statistically differ from a physical site or system for identical inputs and conditions.
In short, once you create a model based on relevant inputs and validate it via relevant historical or real-time measurements, you have created a digital twin: a model whose behaviour 100% matches the behaviour of your physical device or a system.
Digital Twins in CREATORS| How do digital twins de-risk, speed-up and streamline creating Community Energy Systems?
Community Energy System (CES) is a recent development of the distributed generation concept, where local energy assets are integrated to supply a local community with its energy requirements from renewable energy or high-efficiency co-generation energy sources. A CES is similar to a microgrid because it comprises multiple aggregated generation and storage units that are monitored and controlled to maximize self-consumption, reduce or completely eliminate energy bills, or even create revenue streams by selling flexibility or ancillary services. As such, every CES has unique assets and local regulations, and each CES presents both a business development and a technical challenge thanks to their novelty and the need to integrate and supervise diverse (renewable) energy assets that previously operated independently. Business-wise, the main challenge is to find the best business case and revenue stream for the unique combination of assets and local market regulations. Technology-wise, the challenge is the integration and management of diverse assets, especially when assets were previously managed independently by diverse management (e.g. SCADA) systems. Fortunately, digital twins help with both, dramatically speeding up the process of creating a CES. That is how they are used in CREATORS where digital twins were made for all tier 1 pilot sites (Acroni, Port of Barcelona, Tartu and Temse), and some tier 2 pilot sites (e.g. Castilla Y Leon).
Digital twins de-risk creating CES because they are the only technology which can fully validate, from the operational perspective, the early techno-economic analyses or new revenue stream ideas. More precisely, techno-economic analyses use simplified models (sometime just Excel sheets) to estimate capital cost, operating cost, and revenue from, primarily, financial input parameters: few technical input parameters include asset capacity, power output and similar generic data that assumes that assets are controlled and made to perform as expected in any scenario and under any conditions. As the number of distributed energy resources increases, the complexity and challenge of controlling them increases exponentially, as well as the risk of something not working as expected. Most succinctly, good business ideas may seem simple to implement, but simple is not necessarily easy: many projects ultimately fail because techno-economic analyses underestimated or completely ignored the operational challenges. With a digital twin, the techno-economic analysis can be validated in standard use cases over days, weeks, or months of operation, but also in edge and emergency scenarios. Furthermore, if the techno-economic analyses or new revenue streams include installation of new assets (e.g. a battery storage system, or PV farm), the digital twin allows assessing the impact of new assets from the financial perspective (e.g. peak shaving, time-of-use optimization, etc.), but also from the perspective of power quality and the technical performance of the CES, ensuring that there are no major issues or voltage/frequency fluctuations.
The top-level view of a digital twin of an industrial tier 2 site in the CREATORS project
In addition to de-risking investment decisions through operational verification and validation of business models, digital twins also speed-up and streamline CES creation and commissioning. Specifically, when digital twins include the communication layer of all key assets in the CES (e.g. MODBUS registers of PV inverters, SunSpec maps of battery storage systems and OCPP profiles of EV chargers), their integration can be conducted in the digital twin. Once all integration challenges are solved in the digital twin, such as measurement scaling and command message formatting, the configuration from the digital twin can just be pushed to the physical CES site: this way the commissioning time can be reduced to a single day.
All operational data of the pilot site can be visualized in the digital twin SCADA, e.g. this screenshot shows PV power plant production for each month, as well as the annual PV production.
The same digital twin setup allows integration of future assets and streamlined expansion of the asset portfolio in CES. Firstly, the original digital twin can be expanded with a generic model of a new asset to verify that its addition will not cause any operational issues. Secondly, the digital twin with a generic asset model can be modified to contain an exact model of the asset which will be installed, so that, once more, an integration can be done in the digital twin. This way, the downtime of the physical CES is minimal: the configuration from the digital twin just needs to be pushed to the new physical asset.
The digital twin can be set up to have visualization widgets for each month, e.g. here the digital twin is used to assess the benefits of adding a BESS and the widgets show energy that is consumed in a given month when the BESS is operating in parallel with PV. The digital twin in this case verifies the initial idea that an addition of a BESS can help prevent over-consumption in all tariffs (P1, P2 and P3): the widget displays how many hours, in each period of tariff, the power is going above the contracted limit (with a virtual BESS installed). In this case the number of over-consumption hours in each tariff is zero (0.000 h for P1, P2 and P3), which means that the addition of a BESS will solve the current problem of the CES: with a BESS they will no longer have to pay fees for over-consumption.
CREATORS Application of Digital Twins| How does the CREATORS approach use digital twins?
The goal of CREATORS is to provide a solution that unifies technical, financial and social technologies and services to empower local initiators to quickly establish and operate advanced community energy systems (CES). The CREATORS approach changes the CES creation paradigm because it is designed to reduce preparation and operational costs by up to 60 %, ensure 99.95 % uptime, reduce capital expenditure by up to 35 % and increase additional incomes by up to 40 %. Digital twins represent one of the key technologies to make this happen. Specifically, development-phase digital twins are used to shorten the preparation phase and dramatically reduce the commissioning time. This is the stage in which four pilots sites in Belgium, Spain, Slovenia and Estonia are right now: digital twins are used to determine the optimal sizing of new assets and determine and validate the CES optimization strategies. However, once a CES is deployed, its development-phase digital twin will become an operation-phase digital twin emulating the operation of the physical site. These operation-phase digital twins (“digital shadows”) support the entire life-cycle of the CES because they make it possible to assess technical and financial changes to the CES without disrupting their operation: new revenue streams, business models, impacts of new assets and CES expansion… everything can be tested in the safety and zero-risk of the digital twin.
In many respects, the CREATORS approach to CES, which integrates digital twins, represents one of the easiest and safest ways to achieve new REPowerEU goals and to achieve rapid transition to a decentralized, digitalized and decarbonized smart grid.
Parts of this blog are integrated into a blog on digital twins in EU smart grid research. Typhoon HIL blog: HIL-powered digital twins advance European smart grid research (typhoon-hil.com)
WANT TO CREATE A CES THE CREATORS WAY?