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

Intelligence Layer of the Twin

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

Intelligence lab

Part A runs a control room in which four controllers set the fan of the pack and you set the weights of the objective that ranks them. Part B matches the needs of an operator with the services of the twin. Part C computes a cumulative sum by hand.

Part A: The control room

Four controllers drive the fan of the pack over a two-hour trip with a hot afternoon load. Set the weights of the objective, which put a degree-hour above 44 °C, a kilowatt-hour (kWh) of fan energy and a milliampere-hour (mAh) of lost capacity on one scale, then run all four. A degree-hour is one degree above 44 °C for one hour. Without cooling the fan stays off, and the always-on fan runs at full duty. The fixed rule switches the fan fully on above 42 °C and off again below 40 °C. The twin in the loop plans once per minute: It looks ten minutes ahead with three fan settings, 0, 0.5 and 1, and applies the cheapest one. The weights are a business decision: Watch how they change the ranking.

ControllerPeak (°C)Degree-hours above 44 °CFan energy (kWh) Capacity lost (mAh)Objective

Open in ColabContinue in Colab, section 7: the twin plans the fan of the full pack model.

Part B: Which service of the twin?

Match each need of an operator with the service that meets it.

Open in ColabContinue in Colab, section 2: a Gaussian-process surrogate and its training box.

Part C: A cumulative sum by hand

The standardised residuals of five periods are 0.1, 0.4, 0.6, 0.5 and 0.7. The cumulative sum starts at zero and adds each residual minus an allowance of 0.25, but never falls below zero. The alarm is raised when the sum exceeds 1.0.

Open in ColabContinue in Colab, section 5: the cumulative sum against a fixed limit on the pack.