Digital Twin with Python (VTR UGE 21), day 5 of 5

Visualization and Capstone Development

Prof. Dr. Utku Kose, Süleyman Demirel University

Operations lab

Part A repeats the trust loop of the twin over twelve readings step by step, with sliders for its numbers. Part B separates verification from validation. Part C repeats the noise floor of a validation step by step, also with sliders. Part D estimates the model error behind a validation result. Part E runs the assembled twin in an operations panel with faults you inject. In Parts A and C every intermediate value is rounded, and the next step continues with the rounded value, as in a calculation by hand. Part F fills a credibility scorecard for the twin of a smart thermostat from six pieces of evidence.

Part A: The observer and the cumulative sum, reading by reading

The trust loop of the dashboard and of the assembled twin. The pack starts at 44.0 °C, and once per minute the model of the twin predicts a rise of 0.10 °C. A hidden fault, for example a weaker cooling, lets the true pack warm faster by an extra amount per minute. Each reading carries a little noise. The twin computes the residual, adds its size minus the allowance to the cumulative sum, moves its belief by the gain times the residual and sets the fan, with full cooling as the fail-safe action once the sum has passed the decision limit. The sliders set the fault, the gain, the allowance and the decision limit.

Back to the lecture: A dashboard for the operator. The lecture continues there with Section 2 of the Colab notebook: Open it from the next orange box.

Part B: Verification or validation?

Decide which question each check answers.

Back to the lecture: Verification and validation, where the text continues after the box of this part.

Part C: The noise floor of a validation

The validation of the lecture: a root mean square error (RMSE) between twin and readings, a sensor noise \(\sigma\) and the number \(N\) of readings. The steps compute the implied model error, the scatter of the RMSE from one experiment to the next and whether the measured RMSE lies far enough above the floor to show a model error at all. The figure draws the implied model error as a function of the RMSE and shades the range in which the data cannot tell a model error from none.

Back to the lecture: Verification and validation, where the text continues after the box of this part.

Part D: The model error behind a validation result

The error between twin and sensor is measured by the RMSE. With a sensor noise of standard deviation sigma, the error of the model itself is estimated as the square root of RMSE squared minus sigma squared. All values are in °C.

Back to the lecture: Verification and validation. The lecture continues there with Section 5 of the Colab notebook: Open it from the next orange box.

Part E: The operations panel

The panel runs the pack and its twin for two hours in the browser. Inject a fault at a chosen time and watch the twin: It compares every reading with its own physics prediction, a model temperature that no reading ever corrects. When the mean of their differences over the last five minutes exceeds 1 °C in either direction, the twin declares the loss of trust, switches the fan to its fail-safe setting, full speed, and reports the change in the event log. The log can be exported as JSON lines, one record per line in the JavaScript Object Notation, the format of the notebook.


Back to the lecture: The assembled twin under a fault. The lecture continues there with Section 7 of the Colab notebook: Open it from the next orange box.

Part F: A scorecard for a smart thermostat

A smart thermostat learns how long a room takes to warm up and starts the heating early enough for the room to be at 21 °C at seven in the morning. Its twin is a model of the room. Six pieces of evidence describe how far the twin has been checked. Give each element of the scorecard the status that its evidence supports, as in the scorecard of the lecture: PASS, PARTIAL or NOT DONE. The scorecard below fills as you choose.

ElementStatus

Back to the lecture: Your asset and the final project. The lecture continues there with Section 9 of the Colab notebook: Open it from the next orange box.