The regulation of glycemic homeostasis represents one of the most critical physiological processes of the human body, the disruption of which in patients with diabetes requires precise and personalized exogenous interventions to prevent complications, such as potential hyperglycemia or hypoglycemia. This study concerns the development, implementation, and validation of a blood glucose control algorithm in a MATLAB environment, where an automated insulin infusion system was simulated on a virtual patient in complete safety. The biological interaction between insulin and glucose was mathematically formalized through Bergman's Minimal Model, defined by a three-state-variable, continuous-time non-linear system. To counteract the potential disturbances caused by meal-related carbohydrate absorption, two different closed-loop control strategies were designed and compared. As a first strategy, a classical approach was used, namely PID Gain Scheduling; subsequently, two advanced approaches based on Reinforcement Learning algorithms, a Deep Q-Network (DQN) architecture and another defined as Soft Actor-Critic (SAC), were implemented and compared with the objective of evaluating their relative performances and identifying the most efficient solution. From the comparative analysis of the computational results, significant performance differences emerged. The PID controller proved effective for glycemic stabilization, while nonetheless highlighting limits related to discretization rigidity and the complexity associated with the manual tuning of the linear controllers' parameters. Conversely, the Reinforcement Learning-based agents showed superior flexibility, proving capable of continuously mapping the patient's non-linearities and developing a predictive capacity for insulin infusion over time. In particular, the comparison between DQN and SAC made it possible to highlight which of the two approaches best optimizes the controller. Furthermore, the implementation of a Reinforcement Learning-oriented approach, achieved through strict penalties in the reward function, ensured the elimination of hyperglycemic peaks. Finally, the work outlines future developments of the research, highlighting the possibility of extending and validating the algorithms on multi-compartmental simulators (such as the Dalla Man et al., 2007 model) or on FDA approved platforms (such as the UVA/Padova simulator). This step will be fundamental for testing the reliability and optimization of the controllers on heterogeneous virtual populations, bringing this technology even closer to clinical application on the patient.
La regolazione dell’omeostasi glicemica rappresenta uno dei processi fisiologici più critici del corpo umano, la cui interruzione nei pazienti affetti da diabete richiede interventi esogeni precisi e personalizzati per prevenire complicanze, come una possibile iperglicemia o ipoglicemia. Tale studio riguarda lo sviluppo, l’implementazione e la validazione di un algoritmo di controllo della glicemia in ambiente MATLAB, dove si è andati a simulare un sistema di infusione automatizzata di insulina su un paziente virtuale in totale sicurezza. L’interazione biologica tra insulina e glucosio è stata formalizzata matematicamente attraverso il Modello Minimo di Bergman, definito da un sistema non lineare tempo-continuo a tre variabili di stato. Per andare a contrastare i possibili disturbi causati dall’assorbimento di carboidrati legati ai pasti, sono state progettate e messe a confronto due differenti strategie di controllo a ciclo chiuso. Come prima strategia si è andati ad utilizzare un approccio classico, ovvero il PID Gain Scheduling, in seguito sono stati implementati e confrontati due avanzati approcci basati su algoritmi di Reinforcement Learning, un’architettura Deep Q-Network (DQN) ed un’altra definita come Soft Actor-Critic (SAC), con l’obiettivo di valutarne le relative performance ed individuare la soluzione più efficiente. Dall’analisi comparativa dei risultati computazionali sono emerse significative differenze prestazionali. Il controllore PID si è dimostrato efficace per la stabilizzazione glicemica, pur evidenziando limiti legati alla rigidità della discretizzazione e alla complessità legata alla calibrazione manuale dei parametri dei controllori lineari. Gli agenti basati su Reinforcement Learning invece hanno mostrato una flessibilità superiore, dimostrandosi capaci di mappare in modo continuo le non-linearità del paziente e sviluppando nel tempo una capacità predittiva nell’infusione dell’insulina. In particolare, il confronto tra DQN e SAC ha permesso di evidenziare quale dei due approcci ottimizzi al meglio il controllore. Inoltre, l’implementazione di un approccio orientato al Reinforcement Learning, ottenuto tramite rigide penalità nella funzione di reward, ha garantito l’abbattimento dei picchi iperglicemici. Infine, il lavoro delinea i futuri sviluppi della ricerca, evidenziando la possibilità di estendere e validare gli algoritmi su simulatori multi-compartimentali (come il modello Dalla Man et al., 2007) o su piattaforme approvate dalla FDA (come il simulatore UVA/Padova). Tale passaggio risulterà fondamentale per testare l’affidabilità e l’ottimizzazione dei controllori su popolazioni virtuali eterogenee, avvicinando ulteriormente questa tecnologia all’applicazione clinica sul paziente.
Tecniche avanzate per il controllo del sistema insulina-glucosio: PID-Scheduling e Reinforcement Learning
DI GIOIA, ALESSANDRO
2025/2026
Abstract
The regulation of glycemic homeostasis represents one of the most critical physiological processes of the human body, the disruption of which in patients with diabetes requires precise and personalized exogenous interventions to prevent complications, such as potential hyperglycemia or hypoglycemia. This study concerns the development, implementation, and validation of a blood glucose control algorithm in a MATLAB environment, where an automated insulin infusion system was simulated on a virtual patient in complete safety. The biological interaction between insulin and glucose was mathematically formalized through Bergman's Minimal Model, defined by a three-state-variable, continuous-time non-linear system. To counteract the potential disturbances caused by meal-related carbohydrate absorption, two different closed-loop control strategies were designed and compared. As a first strategy, a classical approach was used, namely PID Gain Scheduling; subsequently, two advanced approaches based on Reinforcement Learning algorithms, a Deep Q-Network (DQN) architecture and another defined as Soft Actor-Critic (SAC), were implemented and compared with the objective of evaluating their relative performances and identifying the most efficient solution. From the comparative analysis of the computational results, significant performance differences emerged. The PID controller proved effective for glycemic stabilization, while nonetheless highlighting limits related to discretization rigidity and the complexity associated with the manual tuning of the linear controllers' parameters. Conversely, the Reinforcement Learning-based agents showed superior flexibility, proving capable of continuously mapping the patient's non-linearities and developing a predictive capacity for insulin infusion over time. In particular, the comparison between DQN and SAC made it possible to highlight which of the two approaches best optimizes the controller. Furthermore, the implementation of a Reinforcement Learning-oriented approach, achieved through strict penalties in the reward function, ensured the elimination of hyperglycemic peaks. Finally, the work outlines future developments of the research, highlighting the possibility of extending and validating the algorithms on multi-compartmental simulators (such as the Dalla Man et al., 2007 model) or on FDA approved platforms (such as the UVA/Padova simulator). This step will be fundamental for testing the reliability and optimization of the controllers on heterogeneous virtual populations, bringing this technology even closer to clinical application on the patient.| File | Dimensione | Formato | |
|---|---|---|---|
|
Tesi.pdf
embargo fino al 24/04/2028
Dimensione
2.34 MB
Formato
Adobe PDF
|
2.34 MB | Adobe PDF |
I documenti in UNITESI sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.
https://hdl.handle.net/20.500.12075/29486