# IoT-Driven Resilience Monitoring: Case Study of a Cyber-Physical System
## 6 Case Study
### Testbed Functionality Validation  
The system has been validated in various scenarios, reflecting the impact of variable real-world conditions on the performance of power generation along with validation of mDTs integration with each other and with sensor readings and action commands along with the Communication and Persistence Layer. In the validation scenario discussed in this work, the DT has been set up to update the panel orientation in near real-time to make it face the sun directly (rotating with two DoF in Figure 8). Command messages travel from the Digital Twin to its physical counterpart every minute, and the MPPT is tuned to keep the battery LoC between 10.25 and 10.5 volts. The observations were gathered at a frequency of one batch of sensor data every 30 s over a time span of 30 min. These collections occurred at various times of different days, encompassing an external perimeter, and were conducted under sunny weather conditions, sunny weather conditions with occasional periods of partial cloudiness, and cloudy conditions. As a result, the panel orientation was updated to match the (solar azimuth, solar elevation) couples of angles. For instance, in the sunny sky scenario, the panel spans from (175\({}^{\circ}\), 27\({}^{\circ}\)), respectively, to (183\({}^{\circ}\)27\({}^{\circ}\)). The plot illustrated in Figure 19 is a sample of the evolution of PV output voltage and battery level of charge (LoC). The irregular pattern of the PV curve reflects the disturbance introduced by obstacles that cause shading phenomena on the PV panel's surface, which are mainly characterized by the passage of clouds and some external obstacles (a tree). As a result, the curve features a series of steep descents and ascents, but the range of the PV output voltage is still kept relatively small (less than 1 volt) by the MPPT. On the other hand, the curve representing the battery LoC exhibits a saw-tooth profile. In particular, slow descents caused by the execution of edge tasks are interleaved by steep ascents, which will represent the intervention of the MPPT in feeding the battery enough to keep its LoC between the above-mentioned thresholds. A second scenario was simulated to observe the evolution of PV voltage output when the panel's pose is fixed. This test is conducted to have a focused evaluation of the functionality of integrated mDTs with DBMS and IoT elements and to validate the efficacy of the proposed architecture. Figure 20 plots this curve during sunset. The temperature curve is arguably related to the solar exposition intensity, as it smoothly goes down as the position of the sun concerning the solar panel changes. On the other hand, the PV voltage output curve resembles a discrete descending staircase function. This profile is given by the action of the MPPT component, whose function is to regularize the output voltage by tracking the maximum power intensity provided by the PV panel. The results demonstrate that the system of systems yields the anticipated outcomes, and the overall complex system functions efficiently. However, the system is subject to certain limitations, which will be elaborated upon in the next section along with the proposed future steps.  
Figure 19: PV panel output and battery level.  
Figure 20: Sunset: PV output and air temperature.