Next Article in Journal
Low-Profile Broadband Dual-Polarized Dipole Antenna for Base Station Applications
Previous Article in Journal
An Optimized Deep Learning Model for Predicting Mild Cognitive Impairment Using Structural MRI
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Unified Environment for Real Time Control of Hybrid Energy System Using Digital Twin and IoT Approach

1
Icam School of Engineering, Lille Campus, 6 Rue Auber, B.P 10079, CEDEX, 59016 Lille, France
2
Laboratory of Innovative Technologies, University of Picardie Jules Verne, 80000 Amiens, France
*
Author to whom correspondence should be addressed.
Sensors 2023, 23(12), 5646; https://doi.org/10.3390/s23125646
Submission received: 3 May 2023 / Revised: 3 June 2023 / Accepted: 12 June 2023 / Published: 16 June 2023
(This article belongs to the Topic IoT for Energy Management Systems and Smart Cities)

Abstract

:
Today, climate change combined with the energy crisis is accelerating the worldwide adoption of renewable energies through incentive policies. However, due to their intermittent and unpredictable behavior, renewable energy sources need EMS (energy management systems) as well as storage infrastructure. In addition, their complexity requires the implementation of software and hardware means for data acquisition and optimization. The technologies used in these systems are constantly evolving but their current maturity level already makes it possible to design innovative approaches and tools for the operation of renewable energy systems. This work focuses on the use of Internet of Things (IoT) and Digital Twin (DT) technologies for standalone photovoltaic systems. Based on Energetic Macroscopic Representation (EMR) formalism and the Digital Twin (DT) paradigm, we propose a framework to improve energy management in real time. In this article, the digital twin is defined as the combination of the physical system and its digital model, communicating data bi-directionally. Additionally, the digital replica and IoT devices are coupled via MATLAB Simulink as a unified software environment. Experimental tests are carried out to validate the efficiency of the digital twin developed for an autonomous photovoltaic system demonstrator.

1. Introduction

Renewable energy systems, such as solar panels and wind turbines generate power from natural resources that are available intermittently. Since they produce variable power, their effective dissemination can be accelerated by better control and monitoring. Traditionally, data acquisition systems (DAQs), usually centralized, are used for collecting all system data [1]. However, the cost of commercial DAQs is the most significant barrier for greater diffusion. IoT (Internet of things) based smart meters have recently gained substantial popularity for control and measurement data. Indeed, their ability to communicate data over networks offers a wide range of applications. Therefore, IoT devices can potentially be useful for real-time energy management. Accordingly, energy production efficiency and reliability can be significantly improved ([2,3,4]). This can help reduce dependence on traditional fossil fuel-based energy sources and promote renewable energy.
However, implementing IoT in renewable energy systems faces several challenges due to the variety of protocols and devices available in the market [5]. This can make it difficult to integrate IoT devices while ensuring their compatibility with the existing infrastructure [6].
On the other hand, defined as the combination of the physical system and its digital model, the Digital Twin (DT) paradigm can be used to predict energy production and consumption. It also enables predictive maintenance [7]. Therefore, it is crucial to implement techniques that provide a wide range of operational data about the actual system [8]. IoT technology can be associated with DT thanks to their ability of actuation and sensing.
In this work, our objective is to build a DT of a standalone PV system to deal with real-time energy management challenges. Figure 1 depicts the diagram of the digital twin as developed in this work:
-
Physical system: made up of two PV panels, batteries, DC loads, a solar emulator, and a weather station.
-
Smart sensors and actuators: including devices required for control and monitoring purposes.
-
Digital counterpart implemented in MATLAB: including mainly EMR-based model, Real-Time monitoring, and control systems.
To experimentally validate the proposed framework, we have developed a lab demonstrator according to IoT-based architecture for embedded and distributed instrumentation. Furthermore, to cope with the devices’ heterogeneity, we use MATLAB Simulink. Indeed, this is a comprehensive software environment that can communicate with sensors and Programmable Logic Controllers through client/server applications.
This document is structured as follows. First, we present a review of the literature related to our work. In the second part, we detail our test bench which constitutes the physical part of the proposed Digital Twin. In the third part, we present an approach based on the Energetic Macroscopic Representation (EMR) formalism as a numerical counterpart of our system. Finally, the experimental validation of the resulting digital twin will be discussed.

2. Literature Review

Several studies have considered photovoltaic systems monitoring. In [9], the authors used the IoT and MQTT (MQTT: Message Queuing Telemetry Transport) in web-based monitoring. They implemented this approach to monitor the performance of the solar panels and the battery system, as well as the energy consumption of a living laboratory. Similar work is reported in [10]. When compared to other protocols, MQTT has a small footprint, making it much more suitable for resource-constrained environments. Despite several benefits, it is important to note that MQTT brokers do not provide the same level of entity authentication or encryption capabilities [11]. Moreover, IoT devices are often not interoperable, and it is difficult to integrate external sources of information and cloud computing to use energy more efficiently. Indeed, it requires the design and implementation of hierarchical architectures and standardized solutions to facilitate interoperability. Till today, no standard solution is established yet [12]. However, most providers share IoT middlewares, which has fostered the emergence of cross-domain applications.
In [13], the authors developed a Smart Home monitoring system using Power Line Communication (PLC) which has the advantage of not needing additional communication cables [14]. This article also demonstrates the potential of using PLCs to monitor individual photovoltaic panels.
Moreover, the review work [1] provides an overview on the importance of monitoring systems for photovoltaic plants (electrical and meteorological data). The article reviews different types of monitoring systems that are currently available for PV plants, including hardware and software aspects. The authors discuss the advantages and disadvantages of each type of system and provide examples of commonly used components.
There exist several commercial software for monitoring and simulation of PV systems such as LabVIEW ([15,16,17,18]) and MATLAB Simulink ([19,20]).
Furthermore, studies in [20,21,22,23,24], present an energy management system by using Programmable Logic Controller. Compared to other hardware control systems, PLCs have specific advantages as ruggedness, noise immunity, modularity, low cost, and small footprints [25].
We also reviewed several papers dealing with Digital Twins. This concept is particularly popular in the context of industry 4.0, where it is mainly implemented for manufacturing systems [26]. Nowadays, there is a significant trend to apply this concept to the electrical energy field [27]. That said, there are few concrete applications. Moreover, as there are several misconceptions about digital twin definition [28], it is important to distinguish the digital twin, the digital model, and the digital shadow. In fact, the digital model is defined as a digital copy of a physical system without any data exchange and is generally used for simulation and design purposes. Likewise, the Digital Shadow is a combination of a physical system and its digital model with a one-way data exchange.
Although some authors claim to use the concept of the Digital Twin as just defined above, most of the articles deal with the “digital model” or “digital shadow”. For instance, authors in [27] study the digital twin possibilities for fault diagnosis purpose of PV system. However, they use a digital shadow instead of digital twin. We find the same confusion in the articles [29,30,31,32,33].
Relatively to our contribution, Table 1 summarizes the state of art of the current literature dealing with digital twin applications.
In this work, we propose a Digital Twin of a complete photovoltaic system using MATLAB software as a unified environment. This framework is suitable to address the following topics:
-
Real-time access to multi-protocol data for monitoring purposes.
-
Modelling, simulation, and real-time control of PV systems
-
Implementing of innovative energy management systems
-
Reporting
In other words, this experimental platform can be used to compare simulation results and monitored data in real time. Indeed, it could be used to develop new approaches for fault detection and prediction issues. This integrated environment allows on the one hand to have a large panel of toolboxes (modelling, code generation, machine learning, advanced control, cloud computing…). Therefore, it could be easily used for advanced control and optimization purposes.

3. Materials and Methods

The concept of the digital twin, object of this work, is implemented on a test rig. In this section we describe the structure of the demonstrator, its instrumentation and control system.

3.1. PV System Description

The stand-alone system is composed of the following elements (Figure 2):
  • Solar emulator as artificial light source,
  • 2 × 215 Wp photovoltaic panels (SunPower Co., San José, CA, USA),
  • 28 Ah batteries as storage system (Victron Energy B.V., Almere, The Netherlands),
  • DC loads.
  • Power converters (Victron Energy B.V., Almere, The Netherlands).

3.2. Sensors and Data Aquisition

Developing a digital twin for renewable energy systems requires constant data collection and monitoring [40]. Therefore, it is necessary to implement techniques that provide a wide range of data:
-
Weather data (temperature, irradiance, wind speed…);
-
Real time electrical data (energy, currents, voltages, batteries’ state of charge…).
The experimental platform is equipped with sensors of various technologies that do not use the same communication protocol. To transmit measurement data to a unified software environment, we have developed a hardware and software architecture based on the following components:
-
An IoT architecture combining smart sensors for electrical data [41] and a weather station. As IoT, these devices use heterogeneous communication protocols [42], including Modbus TCP/IP, HTTP, and PROFINET;
-
MATLAB Simulink, as an integrated environment concentrating all the operational data of the system, constitutes the core of the digital twin.
Figure 3 depicts the demonstrator overview and its control system architecture.

3.3. Control System

At first level, the embedded control system is based on a S7-1200 PLC which controls solar emulator and relays. This allows experimental tests to be carried out according to real-time weather data or with historical data.
At the second level, the overall control of the PV system is performed within MATLAB Simulink programs using the embedded PLC as a slave. Data communication is carried out using OPC-UA and Industrial Communication Toolbox™.
Figure 4 describes the unified architecture proposed in this work.

4. PV System Modeling

This section details our approach to modeling the PV system. The aim is to develop the digital replica counterpart of the Digital Twin.

4.1. Solar Panels

A photovoltaic (PV) power system consists of two solar panels (SPR-215-WHT). PV parameters of each panel are given in Table 2.
PV panel is composed of several cells. Each PV cell is made up of semiconductor materials which can convert solar irradiance into electrical energy. Based on the electronics theory of semiconductor p-n junction, it can be described by a current source. The studied panel model in this work is represented by an equivalent circuit. It consists of a single diode for the cell polarization function and two resistors (series and shunt) for the losses (Figure 5). The equivalent circuit is composed of an ideal current source I p h in parallel, reverse diode, series resistance R s and parallel resistance R s h .
The I p v = f V p v characteristic of this model is given by the following equation:
I p v = I p h I D V p v + R s I p v R s h
where:
-
I p v is the current generated by solar panel;
-
I p h is the photocurrent, which is linearly proportional to irradiance and depends on the temperature as shown in the following equation:
I p h = ( I p h n + α s c Δ T ) G G n
where Δ T = T T n ( T n = 25 ° C ), G is the incident of irradiation on the solar panel, and G n (1000 W/m²) at standard conditions (STC);
-
I D is the diode current:
I D = I 0 [ exp q V p v A K T 1 ]
where: I 0 is the PV cell reverse saturation current that mainly depends on the temperature, q is the electronic charge of an electron ( 1.6 × 10 19 C), T is the temperature of the PV cell, k is Boltzmann’s constant ( 1.38 × 10 23 J/K), and A is the diode ideality factor.
A PV panel is made up of numerous identical PV cells connected in series to provide a higher voltage. A PV module composed of n s identical cells in series can also be represented by the equivalent circuit shown Figure 4a but the circuit needs to be modified [43] as follows (Figure 5b):
R s _ n s = n s R s ,   R s h _ n s = n s R s h ,   A n s = n s n ,   I 0 _ n s = I 0 ,   I p h _ n s = I p h
The solar panel datasheet does not include some important parameters, such as R s and R s h . To obtain them, we used the PV array tool of Matlab by setting the PV parameters of the studied solar panel. Table 3 shows the extracted parameters.
The mathematical model of the studied solar panel is then implemented under MATLAB Simulink and the results are compared to datasheet data as shown in Figure 6.
The dotted curves in Figure 5 represent data from the datasheet and the continuous ones come from the mathematical model. These results show a good correlation between the model and the solar panel manufacturer’s data.
To assess the model’s effectiveness, we conducted indoor tests of the PV panel. The PV panel was illuminated using an artificial light source, while its output was connected to a rheostat. To obtain the I-V curves, measuring instruments were integrated, as depicted in Figure 7a.
Figure 7b shows the simulation and experimental results, confirming the accuracy of the implemented mathematical model.

4.2. Batteries Bank

Due to the inherent variability of PV power, the battery plays a crucial role in stand-alone PV systems. In this system, two 12 V AGM batteries are installed and connected in a series configuration. The utilization of AGM batteries provides additional benefits, as they facilitate recombination and effectively mitigate gas emissions during overcharge. Consequently, the demand for room ventilation is reduced, and the batteries do not emit any acid fumes during normal discharge operations [44].
The battery model in Figure 8 considers a constant internal resistance. This resistance is connected in series with the internal voltage source which depends on various parameters [45].
The terminal voltage of the battery is given by:
V b a t = E R I b a t ( t )
where:
  • R : is the internal resistance;
  • I b a t : is the battery current.
The controlled voltage source E is described by the following equation:
E = E 0 K Q Q I b a t ( t ) d t + A e x p ( B I b a t ( t ) d t )
where:
  • E 0 : Fully charged voltage;
  • K : polarization voltage (V);
  • Q : battery capacity (Ah);
  • A : exponential zone amplitude (V);
  • B : exponential zone time constant inverse (Ah).
The parameters of this equivalent circuit can be identified by considering the discharge characteristics with a nominal current.
We use a lead-acid battery, which features a nominal voltage of 12 volts (E0), a capacity of 14 Ah ( Q ), a rated current of 0.7 A, and an internal resistance of 14 mΩ (Table 4).
The model parameters (K = 0.12, A = 0.66, B = 7) are obtained through graphical estimation based on the rated current discharge characteristic curve. The simulation results are depicted in Figure 9. The Q-V discharge curve is composed of three sections. The first section represents the exponential voltage drop if the battery is initially fully charged. The second phase represents the charge that can be extracted from the battery until the voltage drops below the battery nominal voltage. Finally, the third section represents the total discharge of the battery, when the voltage drops quickly. The width of these sections depends on the battery type.
To estimate the state of charge of the battery (SoC), the well-known Coulomb counting method is used due to its simplicity. It relies on measuring the current and the estimation of the initial state of charge of the battery.
S o C t = S o C 0 1 C n o m t 0 t i b a t t t d t 100

4.3. Power Electronics

Figure 10 illustrates the simplified PV system architecture, comprising a solar panel, a battery for energy backup, and power converters (MPPT regulator) that connect these components to the DC load.
We determined the converter topology based on the current state of the art since it was not specified by the manufacturer. Photovoltaic energy harvesting relies primarily on irradiance and solar panel temperature, resulting in variable PV voltage. Therefore, implementing Maximum Power Point Tracking (MPPT) is essential to maximize power extraction regardless of weather conditions. A DC-DC converter is used to enable voltage adjustment from the photovoltaic panels to match the battery voltage. This converter performs step-up and step-down functions by controlling the input-to-output voltage ratio through the variation of the converter switching device’s on-off duty cycle. Another converter is required to supply and regulate the voltage for the DC load. In the literature, this configuration is commonly referred to as a two-stage DC-DC converter (Figure 11), as reported in [46].

4.4. EMR Representation of the Digital Replica

In the proposed system, the battery imposes a constant voltage, and the PVs relates to the battery through the buck converter. It enables effective Maximum Power Point Tracking (MPPT) control for the PV panels. Moreover, RC ( R c p v , C p v ) and RL ( R l p v , L p v ) filters are inserted between the PV and the buck converter to reduce voltage and current ripple. Finally, the battery is connected with the DC Load via a chopper and a RL ( R l d c , L d c ) filter.
EMR (Energetic Macroscopic Representation) is a graphical formalism for organizing models and control of subsystems within a complete system [47]. The advantage of the EMR formalism lies in its ability to provide a comprehensive and systematic approach for modeling and analyzing complex energy systems. Firstly, each component is translated into EMR elements, and their inputs and outputs are defined according to the causality principle (action/reaction). Moreover, the system is decomposed into basic subsystems with interactions using colored pictograms (orange and green). Furthermore, the control blocks are depicted as blue parallelograms. Table 5 depicts the main EMR elements.
Based on the information on all parts of the demonstrator and hypothesis, the EMR (Energetic Macroscopic Representation) of the studied system is designed. The modeling methodology and the EMR organization method are provided in [49]. In Figure 12, the entire EMR organization of the Digital model is depicted.
The control chains are deduced using inversion control theory [50] where the control structure of a system is considered as an inverse model of the system (Figure 13).
The tuning paths (yellow lines in Figure 14) are defined according to the following objectives:
  • Extract the maximum of the solar power by acting on chopper 1 to find the optimal solar panels voltage;
  • Satisfy the DC load demand by acting on chopper 2.
The control scheme of the hybrid system is obtained by inverting the EMR element by element according to the tuning chains (see lower part of Figure 14).
Conversion elements are inverted directly as they have no time-dependence behavior. The accumulation elements (rectangle with forward slash) cannot be inverted physically to avoid derivation. Thus, an indirect inversion is made by using IP controller. Table 6 shows three examples of direct and indirect inversion.
The MPPT (Maximum Power Point Tracking) algorithm is widely used in PV systems. In this study, the Perturb and Observe (P&O) method is implemented. As shown in Figure 15a, the power curves versus the PV panels output voltage present maximum power points (empty circles). A Perturb and Observe Maximum Power Point Tracking strategy [51] is implemented to define the reference voltage imposed on PV panels to obtain the maximal PV power whatever the irradiance and temperature are (Figure 15b). The P&O algorithm begins by sensing PV voltage and current voltage. The value of the current power (V(k) X I(k)) is then compared to the previous power measurements. If the difference between the two measurements is equal to zero, then the value of the voltage is used as a reference to control the PV voltage thanks to the chopper. If the value of the difference is not equal to zero and if an increase in PV voltage generates an increase in power, this means that there is a convergence to MPP (Maximum Power Point). However, if the power decreases, the PV voltage reference must be reduced to converge to the MPP. The developed algorithm is implemented by the MPPT strategy block (dark blue block) as shown in Figure 15a.
The following figure (Figure 16) presents the implemented digital model under MATLAB Simulink thanks to a Simulink library containing the EMR basic pictograms.
To evaluate the effectiveness of the developed digital model, simulations have been carried out with real-time solar irradiance and temperature data (Figure 17a) for a typical day (30 June 2022). The digital model can be run and connected to real time weather conditions thanks to Simulink Desktop Real Time. This latter provides a real-time kernel for executing Simulink models on a laptop or desktop running Windows or Mac OS X.
Figure 17b shows simulation results of P p v , P b a t , P D C l . PV panels cannot provide enough energy to feed the DC load ( P p v < P D C l = 10 W) before the time 0.1 s, 6:30 a.m. Thus, the battery provides the DC load during this period. After 6:30 a.m., the photovoltaic panels begin to produce electricity and the battery provides the difference to satisfy the battery. When PV power exceeds the load demand, the battery is charging.
Figure 18a shows simulation results for I p v , I b a t , I D C l while Figure 18b shows the state of charge of the battery. The battery is discharging when PV panels output is insufficient, and it is charging when PV power is higher than DC load demand.

5. Experimental Results and Discussion

Real-time measurements were carried out to show the effectiveness of the proposed unified framework, where the three electromagnetic relays are activated. These measurements are subsequently compared in real time with the digital model data, as outlined in Figure 1.
The applied solar irradiance is presented in Figure 19. From the figure, we can see that the artificial source causes a slight delay and behaves like a first-order system with non-linear behavior depending on the increase or decrease in light. This is due to the light dimmer.
Figure 20 represents the measured PV current and the PV numerical model, highlighting a slight deviation observed in the illumination levels around 300 W/m². This difference is due to both the approximation of the mathematical model and the non-uniform illumination of the PV panels. Furthermore, it should be noted that the maximum relative error is approximately 6%, and the maximum absolute error is around 0.1, which is considered low.
In Figure 21, the measured and digital model load currents are depicted. The tests were initiated by activating a single lamp and subsequently both lamps. This led to an increase in the DC current from 0.23 A to 0.46 A.
Measured and digital model battery currents are depicted in Figure 22. A positive current refers to a battery discharge, while a negative current refers to the charging phase.
Figure 23 represents PV power, battery power and DC load power, respectively. From 0 to 50 s, the demanded power is higher than the PV power. The battery is then in discharging mode. However, when the PV power is higher than the demanded DC power, the battery is charging. The comparison between real data and the digital model data shows a good correlation between them. Indeed, the maximum relative deviations between the real and digital model data are 8% for PV power, 12% for battery power, and 2% for load power.
To establish a feedback loop between the virtual and real word of the digital twin, we implement an energy management algorithm in MATLAB Simulink. The rule-based energy management algorithm sends control signals to the PLC (s7 1200). The advantage of using a rule-based control approach is its ease of implementation in real-time [52]. The flowchart of the energy management algorithm is illustrated in Figure 24. It receives measurement data as inputs and generates relay control signals as outputs, which are subsequently transmitted to the PLC.
The energy management system generates five different modes. They are described in Table 7.
To assess the effectiveness of the energy management system, the initial load is set to 112 W. Figure 25 displays the recorded external solar irradiance for a one-hour period on a cloudy day. Subsequently, these data are transmitted to the dimmer, enabling the generation of adjustable artificial lighting.
Initially, the total power required by the load is provided by both the battery and solar power sources, as the PV alone cannot fully support the load (Figure 26). During the period from 0 to 757 s, the system operates in mode II.
Between 757 s and 876 s, as well as from 932 s to 1317 s, the solar irradiance remains below 50 W/m², leading the system to switch to mode V (system OFF). From 1317 s to 3508 s, the system once again operates in mode II. During the period from 3508 s to 3600 s, the load demand gradually decreases from 111 W to 60 W, causing the battery to generate less power to meet the load requirements.
Figure 27a shows the battery voltage waveform, while Figure 27b displays the battery State of Charge. The battery primarily operates in discharging mode, except during periods when the system is not in operation (mode I).

6. Conclusions

In this work, we discussed the challenges of implementing IoT in renewable energy systems and the potential of digital twins for predicting energy production and consumption. We proposed a framework that combines the use of Internet of Things (IoT) and Digital Twin (DT) technologies for standalone photovoltaic systems. The digital twin is defined as the combination of the physical system and its digital model, allowing for bidirectional data communication. Furthermore, we designed a digital model of the PV system by using Energetic Macroscopic Representation formalism. Experiments performed in real time and their analysis demonstrate the effectiveness of the proposed framework. As future work, we plan to use this platform to explore machine learning’s potential to enhance energy management of PV systems.

Author Contributions

Conceptualization, L.C. and A.S.; Formal analysis, L.C., A.S. and A.R.; Methodology, L.C.; Investigation, L.C., A.S. and A.R.; Software, L.C. and A.S.; Supervision, L.C.; Writing—original draft, L.C.; Experimental tests, L.C., Writing—review and editing, L.C., A.S. and A.R. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Madeti, S.R.; Singh, S. Monitoring system for photovoltaic plants: A review. Renew. Sustain. Energy Rev. 2017, 67, 1180–1207. [Google Scholar] [CrossRef]
  2. Motlagh, N.H.; Mohammadrezaei, M.; Hunt, J.; Zakeri, B. Internet of Things (IoT) and the Energy Sector. Energies 2020, 13, 494. [Google Scholar] [CrossRef] [Green Version]
  3. Shrouf, F.; Miragliotta, G. Energy management based on Internet of Things: Practices and framework for adoption in production management. J. Clean. Prod. 2015, 100, 235–246. [Google Scholar] [CrossRef]
  4. Adhya, S.; Saha, D.; Das, A.; Jana, J.; Saha, H. An IoT based smart solar photovoltaic remote monitoring and control unit. In Proceedings of the 2016 2nd International Conference on Control, Instrumentation, Energy & Communication (CIEC), Kolkata, India, 28–30 January 2016; pp. 432–436. [Google Scholar] [CrossRef]
  5. Baidya, S.; Potdar, V.; Ray, P.P.; Nandi, C. Reviewing the opportunities, challenges, and future directions for the digitalization of energy. Energy Res. Soc. Sci. 2021, 81, 102243. [Google Scholar] [CrossRef]
  6. Mukhopadhyay, S.C.; Suryadevara, N.K. Internet of Things: Challenges and Opportunities; Springer: Berlin/Heidelberg, Germany, 2014; Volume 9, pp. 1–17. [Google Scholar] [CrossRef]
  7. Yu, W.; Patros, P.; Young, B.; Klinac, E.; Walmsley, T.G. Energy digital twin technology for industrial energy management: Classification, challenges and future. Renew. Sustain. Energy Rev. 2022, 161, 112407. [Google Scholar] [CrossRef]
  8. Agostinelli, S.; Cumo, F.; Guidi, G.; Tomazzoli, C. Cyber-Physical Systems Improving Building Energy Management: Digital Twin and Artificial Intelligence. Energies 2021, 14, 2338. [Google Scholar] [CrossRef]
  9. Rachid, A.; Djedjig, A. IoT and MQTT based web monitoring of a solar living laboratory. In Proceedings of the 2022 2nd International Conference on Digital Futures and Transformative Technologies (IcoDT2), Awalpindi, Pakistan, 24–26 May 2022. [Google Scholar] [CrossRef]
  10. Voutsinas, S.; Karolidis, D.; Voyiatzis, I.; Samarakou, M. Development of an IoT power management system for photovoltaic power plants. In Proceedings of the 2022 11th International Conference on Modern Circuits and Systems Technologies (MOCAST), Bremen, Germany, 8–10 June 2022. [Google Scholar] [CrossRef]
  11. Dinculeană, D.; Cheng, X. Vulnerabilities and Limitations of MQTT Protocol Used between IoT Devices. Appl. Sci. 2019, 9, 848. [Google Scholar] [CrossRef] [Green Version]
  12. Martín-Lopo, M.M.; Boal, J.; Sánchez-Miralles, A. A literature review of IoT energy platforms aimed at end users. Comput. Netw. 2020, 171, 107101. [Google Scholar] [CrossRef]
  13. Han, J.; Choi, C.-S.; Park, W.-K.; Lee, I.; Kim, S.-H. PLC-based photovoltaic system management for smart home energy management system. IEEE Trans. Consum. Electron. 2014, 60, 184–189. [Google Scholar] [CrossRef]
  14. Miller, D.; Mirzaeva, G.; Townsend, C.D.; Goodwin, G.C. The Use of Power Line Communication in Standalone Microgrids. IEEE Trans. Ind. Appl. 2021, 57, 3029–3037. [Google Scholar] [CrossRef]
  15. Chouder, A.; Silvestre, S.; Taghezouit, B.; Karatepe, E. Monitoring, modelling and simulation of PV systems using LabVIEW. Sol. Energy 2013, 91, 337–349. [Google Scholar] [CrossRef]
  16. Dabou, R.; Bouraiou, A.; Ziane, A.; Necaibia, A.; Sahouane, N.; Blal, M.; Khelifi, S.; Rouabhia, A.; Slimani, A. Development of autonomous monitoring and performance evaluation system of grid-tied photovoltaic station. Int. J. Hydrogen Energy 2021, 46, 30267–30287. [Google Scholar] [CrossRef]
  17. Atia, D.M.; El-Madany, H.T.; Atia, Y.; Zahran, M.B. Real-Time Implementation of Energy Management for Photovoltaic/Battery/Diesel Hybrid System Based on LabVIEW. Int. J. Renew. Energy Res. 2022, 12, 1105–1116. [Google Scholar] [CrossRef]
  18. Vergura, S.; Natangelo, E. Labview-Matlab Integration for Analyzing Energy Data of PV Pants. Renew. Energy Power Qual. J. 2010, 1, 1248–1252. [Google Scholar] [CrossRef]
  19. Dhillon, J.; Unni, A.; Singh, N. Design and Simulation of a PV System with Battery Storage Using Bidirectional DC-DC Converter Using Matlab Simulink. In Proceedings of the 2022 1st International Conference on Sustainable Technology for Power and Energy Systems (STPES), Srinagar, India, 5–6 July 2022. [Google Scholar] [CrossRef]
  20. Manolakos, D.; Papadakis, G.; Papantonis, D.; Kyritsis, S. A stand-alone photovoltaic power system for remote villages using pumped water energy storage. Energy 2004, 29, 57–69. [Google Scholar] [CrossRef]
  21. Gouda, O.; Amer, G.; Elkhodary, T.; Awaad, M. Optimum Design and Implementation of Stand-alone Tracking Photovoltaic Power System based on PLC and Microcontroller. In Proceedings of the 14th International Middle East Power Systems Conference (MEPCON’10), Cairo, Egypt, 19–21 December 2010; pp. 119–124. [Google Scholar]
  22. Kowsalya, M.; Elakya, A.; Pradeep, R. Solar Operated PLC Based Automated Irrigation System with Fault Preventer. In Proceedings of the 7th International Conference on Advanced Computing and Communication Systems (ICACCS), Coimbatore, India, 19–20 March 2021. [Google Scholar] [CrossRef]
  23. Lee, J.; Lee, S.; Cho, H.; Ham, K.S.; Hong, J. Supervisory control and data acquisition for Standalone Hybrid Power Generation Systems. Sustain. Comput. Inform. Syst. 2018, 20, 141–154. [Google Scholar] [CrossRef]
  24. Mohammed, N.; Danapalasingam, K.A.; Majed, A. Design, Control and Monitoring of an Offline Mobile Battery Energy Storage System for a Typical Malaysian Household Load Using PLC. Int. J. Power Electron. Drive Syst. 2018, 9, 180–188. [Google Scholar] [CrossRef]
  25. Alphonsus, E.R.; Abdullah, M.O. A review on the applications of programmable logic controllers (PLCs). Renew. Sustain. Energy Rev. 2016, 60, 1185–1205. [Google Scholar] [CrossRef]
  26. Tao, F.; Zhang, H.; Liu, A.; Nee, A.Y.C. Digital Twin in Industry: State-of-the-Art. IEEE Trans. Ind. Inform. 2018, 15, 2405–2415. [Google Scholar] [CrossRef]
  27. Pan, H.; Dou, Z.; Cai, Y.; Li, W.; Lei, X.; Han, D. Digital twin and its application in power system. In Proceedings of the 2020 5th International Conference on Power and Renewable Energy (ICPRE), Shanghai, China, 12–14 September 2020; pp. 21–26. [Google Scholar]
  28. Fuller, A.; Fan, Z.; Day, C.; Barlow, C. Digital Twin: Enabling Technologies, Challenges and Open Research. IEEE Access 2020, 8, 108952–108971. [Google Scholar] [CrossRef]
  29. Fahim, M.; Sharma, V.; Cao, T.-V.; Canberk, B.; Duong, T.Q. Machine Learning-Based Digital Twin for Predictive Modeling in Wind Turbines. IEEE Access 2022, 10, 14184–14194. [Google Scholar] [CrossRef]
  30. Agostinelli, S.; Cumo, F.; Nezhad, M.M.; Orsini, G.; Piras, G. Renewable Energy System Controlled by Open-Source Tools and Digital Twin Model: Zero Energy Port Area in Italy. Energies 2022, 15, 1817. [Google Scholar] [CrossRef]
  31. Zaballos, A.; Briones, A.; Massa, A.; Centelles, P.; Caballero, V. A Smart Campus’ Digital Twin for Sustainable Comfort Monitoring. Sustainability 2020, 12, 9196. [Google Scholar] [CrossRef]
  32. Moi, T.; Cibicik, A.; Rølvåg, T. Digital twin based condition monitoring of a knuckle boom crane: An experimental study. Eng. Fail. Anal. 2020, 112, 104517. [Google Scholar] [CrossRef]
  33. Livera, A.; Paphitis, G.; Pikolos, L.; Papadopoulos, I.; Montes-Romero, J.; Lopez-Lorente, J.; Makrides, G.; Sutterlueti, J.; Georghiou, G.E. Intelligent Cloud-Based Monitoring and Control Digital Twin for Photovoltaic Power Plants. In Proceedings of the 2022 IEEE 49th Photovoltaics Specialists Conference (PVSC), Philadeplhia, PA, USA, 5–10 June 2022; pp. 0267–0274. [Google Scholar] [CrossRef]
  34. Al-Ali, A.; Zualkernan, I.A.; Rashid, M.; Gupta, R.; Alikarar, M. A smart home energy management system using IoT and big data analytics approach. IEEE Trans. Consum. Electron. 2017, 63, 426–434. [Google Scholar] [CrossRef]
  35. Jain, P.; Poon, J.; Singh, J.P.; Spanos, C.; Sanders, S.R.; Panda, S.K. A Digital Twin Approach for Fault Diagnosis in Distributed Photovoltaic Systems. IEEE Trans. Power Electron. 2019, 35, 940–956. [Google Scholar] [CrossRef]
  36. Cheddadi, Y.; Cheddadi, H.; Cheddadi, F.; Errahimi, F.; Es-Sbai, N. Design and implementation of an intelligent low-cost IoT solution for energy monitoring of photovoltaic stations. SN Appl. Sci. 2020, 2, 1–11. [Google Scholar] [CrossRef]
  37. de Arquer Fernández, P.; Fernández, M.A.F.; Candás, J.L.C.; Arboleya, A.P. An IoT open source platform for photovoltaic plants supervision. Int. J. Electr. Power Energy Syst. 2021, 125, 106540. [Google Scholar] [CrossRef]
  38. Pereira, R.I.; Dupont, I.M.; Carvalho, P.C.; Jucá, S.C. IoT embedded linux system based on Raspberry Pi applied to real-time cloud monitoring of a decentralized photovoltaic plant. Measurement 2018, 114, 286–297. [Google Scholar] [CrossRef]
  39. Abdallah, E.L.; Ouassaid, M.; Zidani, Y. Development of a Real-Time Framework between MATLAB and PLC through OPC-UA: A Case Study of a Microgrid Energy Management System. 2022, p. 13. Available online: https://www.researchsquare.com/article/rs-1265626/v1 (accessed on 22 March 2022).
  40. Qian, C.; Liu, X.; Ripley, C.; Qian, M.; Liang, F.; Yu, W. Digital Twin—Cyber Replica of Physical Things: Architecture, Applications and Future Research Directions. Future Internet 2022, 14, 64. [Google Scholar] [CrossRef]
  41. Transducer of, D.C. Circuit Parameters with Ethernet|Lumel. Available online: https://www.lumel.com.pl/en/catalogue/product/transducer-of-d-c-circuit-parameters-with-ethernet-p30h (accessed on 17 June 2022).
  42. Jaloudi, S. Communication Protocols of an Industrial Internet of Things Environment: A Comparative Study. Future Internet 2019, 11, 66. [Google Scholar] [CrossRef] [Green Version]
  43. Wang, Y.-J.; Hsu, P.-C. Analytical modelling of partial shading and different orientation of photovoltaic modules. IET Renew. Power Gener. 2010, 4, 272–282. [Google Scholar] [CrossRef]
  44. Guo, S. The Application of Genetic Algorithms to Parameter Estimation in Lead-Acid Battery Equivalent Circuit Models. Master’s Thesis, University of Birmingham, Birmingham, UK, 2010; p. 137. [Google Scholar]
  45. Tremblay, O.; Dessaint, L.-A.; Dekkiche, A.-I. A Generic Battery Model for the Dynamic Simulation of Hybrid Electric Vehicles. In Proceedings of the IEEE Vehicle Power and Propulsion Conference, Arlington, TX, USA, 9–12 September 2007; pp. 284–289. [Google Scholar]
  46. Jamshidpour, E.; Jovanović, S.; Poure, P. Equivalent Two Switches and Single Switch Buck/Buck-Boost Circuits for Solar Energy Harvesting Systems. Energies 2020, 13, 583. [Google Scholar] [CrossRef] [Green Version]
  47. Bouscayrol, A.; Guillaud, X.; Delarue, P.; Lemaire-Semail, B. Energetic Macroscopic Representation and Inversion-Based Control Illustrated on a Wind-Energy-Conversion System Using Hardware-in-the-Loop Simulation. IEEE Trans. Ind. Electron. 2009, 56, 4826–4835. [Google Scholar] [CrossRef]
  48. Mokhena, T.; Mochane, M.; Tshwafo, M.; Linganiso, L.; Thekisoe, O.; Songca, S. Powerful Multilevel Simulation Tool for HiL Analysis of Urban Electric vehicle’s Propulsion Systems Raul; Intech Open: London, UK, 2016; pp. 225–240. [Google Scholar]
  49. Lhomme, W.; Delarue, P.; Giraud, F.; Lemaire-Semail, B.; Bouscayrol, A. Simulation of a Photovoltaic Conversion System using Energetic Macroscopic Representation. In Proceedings of the 15th International Power Electronics and Motion Control Conference (EPE/PEMC), Novi Sad, Serbia, 4–6 September 2012. [Google Scholar] [CrossRef] [Green Version]
  50. Gomand, J. Analyse de Systèmes Multi-Actionneurs Parallèles par une Approche Graphique Causale—Application a un Processus Électromécanique de Positionnement Rapide. Ph.D. Thesis, Ecole Doctorale no. 432: Sciences des Métiers de l’Ingénieur, l’École Nationale Supérieure d’Arts et Métiers, Paris, France, 2009. [Google Scholar]
  51. Femia, N.; Petrone, G.; Spagnuolo, G.; Vitelli, M. Optimization of Perturb and Observe Maximum Power Point Tracking Method. IEEE Trans. Power Electron. 2005, 20, 963–973. [Google Scholar] [CrossRef]
  52. Mirzaei, A.; Forooghi, M.; Ghadimi, A.A.; Abolmasoumi, A.H.; Riahi, M.R. Design and construction of a charge controller for stand-alone PV/battery hybrid system by using a new control strategy and power management. Sol. Energy 2017, 149, 132–144. [Google Scholar] [CrossRef]
Figure 1. Diagram of the digital twin of the standalone PV system.
Figure 1. Diagram of the digital twin of the standalone PV system.
Sensors 23 05646 g001
Figure 2. PV system demonstrator.
Figure 2. PV system demonstrator.
Sensors 23 05646 g002
Figure 3. Control system architecture of the PV plant.
Figure 3. Control system architecture of the PV plant.
Sensors 23 05646 g003
Figure 4. Digital Twin architecture overview.
Figure 4. Digital Twin architecture overview.
Sensors 23 05646 g004
Figure 5. Equivalent circuit model. (a) PV cell; (b) PV panel composed of n s cells in series.
Figure 5. Equivalent circuit model. (a) PV cell; (b) PV panel composed of n s cells in series.
Sensors 23 05646 g005
Figure 6. Actual data vs. data computed by the model: (a) I-V characteristics from datasheet; (b) actual I-V characteristics vs. computed I-V characteristics; (c) actual P-V characteristics vs. computed P-V characteristics.
Figure 6. Actual data vs. data computed by the model: (a) I-V characteristics from datasheet; (b) actual I-V characteristics vs. computed I-V characteristics; (c) actual P-V characteristics vs. computed P-V characteristics.
Sensors 23 05646 g006
Figure 7. Experimental test and comparison of I-V curves: (a) experimental components of the tested PV panel; (b) comparison between real test and the mathematical model.
Figure 7. Experimental test and comparison of I-V curves: (a) experimental components of the tested PV panel; (b) comparison between real test and the mathematical model.
Sensors 23 05646 g007
Figure 8. Nonlinear Battery model.
Figure 8. Nonlinear Battery model.
Sensors 23 05646 g008
Figure 9. (a) Discharge curve (Q-V); (b) Discharge curve (Hours-V).
Figure 9. (a) Discharge curve (Q-V); (b) Discharge curve (Hours-V).
Sensors 23 05646 g009
Figure 10. Simplified PV system architecture.
Figure 10. Simplified PV system architecture.
Sensors 23 05646 g010
Figure 11. Topology of stand-alone hybrid PV system.
Figure 11. Topology of stand-alone hybrid PV system.
Sensors 23 05646 g011
Figure 12. EMR of the studied hybrid system.
Figure 12. EMR of the studied hybrid system.
Sensors 23 05646 g012
Figure 13. Inversion-based control principle.
Figure 13. Inversion-based control principle.
Sensors 23 05646 g013
Figure 14. EMR and deduced control of the studied hybrid system.
Figure 14. EMR and deduced control of the studied hybrid system.
Sensors 23 05646 g014
Figure 15. (a) PV Power versus solar panel voltage for different irradiance (T = 25°) (b) Flowchart of perturb and observe algorithm.
Figure 15. (a) PV Power versus solar panel voltage for different irradiance (T = 25°) (b) Flowchart of perturb and observe algorithm.
Sensors 23 05646 g015
Figure 16. MATLAB Simulink model of the studied hybrid system and its control.
Figure 16. MATLAB Simulink model of the studied hybrid system and its control.
Sensors 23 05646 g016
Figure 17. (a) Monitored irradiance and temperature profiles; (b) PV, battery, and load power curves.
Figure 17. (a) Monitored irradiance and temperature profiles; (b) PV, battery, and load power curves.
Sensors 23 05646 g017
Figure 18. (a) PV, Battery, and DC load currents; (b) Battery state of charge.
Figure 18. (a) PV, Battery, and DC load currents; (b) Battery state of charge.
Sensors 23 05646 g018
Figure 19. Applied solar irradiance (artificial light source).
Figure 19. Applied solar irradiance (artificial light source).
Sensors 23 05646 g019
Figure 20. Digital model PV current vs measured PV current.
Figure 20. Digital model PV current vs measured PV current.
Sensors 23 05646 g020
Figure 21. Digital model vs measured load currents.
Figure 21. Digital model vs measured load currents.
Sensors 23 05646 g021
Figure 22. Digital model battery current vs measured battery current.
Figure 22. Digital model battery current vs measured battery current.
Sensors 23 05646 g022
Figure 23. Digital model data vs measured PV, battery, and load power.
Figure 23. Digital model data vs measured PV, battery, and load power.
Sensors 23 05646 g023
Figure 24. Rule-based algorithm flowchart.
Figure 24. Rule-based algorithm flowchart.
Sensors 23 05646 g024
Figure 25. Measured irradiance.
Figure 25. Measured irradiance.
Sensors 23 05646 g025
Figure 26. Measured PV, battery, and load power.
Figure 26. Measured PV, battery, and load power.
Sensors 23 05646 g026
Figure 27. (a) Battery voltage; (b) Battery state of charge.
Figure 27. (a) Battery voltage; (b) Battery state of charge.
Sensors 23 05646 g027
Table 1. Literature review related to IoT and DT usage for energy management.
Table 1. Literature review related to IoT and DT usage for energy management.
ReferenceIoT CapabilityMulti-ProtocolsEnergy ManagementMonitoringDigital ModelDigital ShadowDigital Twin
[34]
[29]-
[35]
[9]
[36]
[37]
[16]
[30]-
[38]
[39]-
[10]---
ProposedUnified
environment
Table 2. Parameters of the SPR-215-WHT solar panel at STC form datasheet.
Table 2. Parameters of the SPR-215-WHT solar panel at STC form datasheet.
ParameterValue
Maximum power P m a x 215 Wp
Voltage at maximum power point V m p 39.8 V
Current at maximum power point I m p 5.40 A
Open circuit voltage V o c 48.3 V
Short Circuit Current I s c 5.80 A
Voltage temperature coefficient β o c −136.8 mV/°C
Current temperature coefficient α s c 3.5 mA/°C
Number of cells per module n s 72
Table 3. Parameters of the SPR-215-WHT solar panel at STC form datasheet.
Table 3. Parameters of the SPR-215-WHT solar panel at STC form datasheet.
ParametersValues
R s _ n s 0.72262  
R s h _ n s 198.7727  
I 0 3.8896 × 10 15 A
A n s 0.74816
Table 4. Parameters of an AGM battery from datasheet.
Table 4. Parameters of an AGM battery from datasheet.
CapacityNominal VoltageInternal ResistanceWeight
14 Ah/0.7 A12 V14 mΩ4.05 kg
Table 5. Some elements of EMR and of control pictograms [48].
Table 5. Some elements of EMR and of control pictograms [48].
PictrogramsPictograms Significance
Sensors 23 05646 i001Source of energy
Sensors 23 05646 i002Element with energy accumulation
Sensors 23 05646 i003Coupling devices for energy distribution
Sensors 23 05646 i004Control bloc without energy accumulation
Sensors 23 05646 i005Control block with controller
Sensors 23 05646 i006Strategy block
Table 6. Direct and indirect inversion of EMR blocks.
Table 6. Direct and indirect inversion of EMR blocks.
SystemEquationsBlock Diagrams EMR and Based Inversed Based Control
Chopper1Sensors 23 05646 i007 m b c 1 = V b a t _ m e a s V b c 1 _ r e f
m b c 1 = I L p v I b c 1
Sensors 23 05646 i008Sensors 23 05646 i009
RL filterSensors 23 05646 i010 H s = ( 1 R l d c ) 1 + L d c R l d c s Sensors 23 05646 i011Sensors 23 05646 i012
RC filterSensors 23 05646 i013 H s = R c p v 1 + R c p v C p v s Sensors 23 05646 i014Sensors 23 05646 i015
Table 7. Different modes of the energy management system.
Table 7. Different modes of the energy management system.
ModesLoadChopper 1Chopper 2Battery
Mode I: When the battery SOC reaches 96%, which indicates a nearly full charge, the system is operating in float mode. At this point, the PV power output is greater than the load demand. Therefore, the battery should not continue to charge, and the Victron regulator automatically switches to a lower charge voltage mode called float mode to maintain the battery charge level and prevent overcharging.ONFLOATONFloat
Mode II: This mode is activated when the battery’s SOC is within the normal range of 40 to 96 % and the power generated by the PV panels is lower than the load demand. In such a scenario, the PV panels alone are unable to meet the load requirement, and hence the battery is used to supplement the power supply. The battery operates in the discharge mode, while the PV converter operates in the MPPT mode, and the load remains connected.ONMPPTONDischarge
Mode III: This mode is activated when the battery’s SOC is within the normal range of 40 to 90 percent and the power generated by the PV panels is higher than the load demand. In such a scenario, the load is powered solely by the PV panels, and any surplus power is utilized to charge the battery. The battery operates in the charging mode, while the PV converter remains in the MPPT mode.ONMPPTONCharge
Mode VI: This mode is activated when the battery’s SOC drops below 40%, and the power generated by the PV panels is higher than the minimum power required, which is a fixed small value. In such a scenario, the load demand exceeds the PV power output, and the fully discharged battery cannot supplement the power supply. However, the PV panels can still generate power, which can be used to charge the battery after the load is disconnected. In this mode, the PV converter operates in the MPPT mode, and the battery is charging, while the load remains disconnected.OFFMPPTOFFCharge
Mode V: This mode occurs when irradiance is very low or non-existent. In this case, the system goes into complete off mode until solar radiation starts again. The battery charges during the day and is ready to supply the load in case of absence of solar radiation.OFFOFFOFFOFF
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Chalal, L.; Saadane, A.; Rachid, A. Unified Environment for Real Time Control of Hybrid Energy System Using Digital Twin and IoT Approach. Sensors 2023, 23, 5646. https://doi.org/10.3390/s23125646

AMA Style

Chalal L, Saadane A, Rachid A. Unified Environment for Real Time Control of Hybrid Energy System Using Digital Twin and IoT Approach. Sensors. 2023; 23(12):5646. https://doi.org/10.3390/s23125646

Chicago/Turabian Style

Chalal, Lamine, Allal Saadane, and Ahmed Rachid. 2023. "Unified Environment for Real Time Control of Hybrid Energy System Using Digital Twin and IoT Approach" Sensors 23, no. 12: 5646. https://doi.org/10.3390/s23125646

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop