t = 00:00
Glucose in bloodstream Insulin from pump
⚠ Couldn't load the 3D engineThree.js failed to load from the CDN. Check your connection and reload.

Artificial Pancreas: Closed-Loop Insulin Control

An "omnipotent" medical system is, in practice, a tireless one: a controller that reads a patient's blood glucose thousands of times a day and doses insulin automatically, without ever needing sleep, food, or a break. This simulation builds that loop for real. Blood glucose, remote insulin action and plasma insulin evolve under Bergman's minimal model — the same three-state equations used to design and validate actual artificial-pancreas hardware — while a PID controller watches the glucose trace and adjusts insulin infusion every simulated minute to hold it near 100 mg/dL. Trigger a carbohydrate meal and watch glucose rise as the gut empties, the pump respond, and the system settle back into range; toggle the closed loop off to see the same meal handled by nothing but the body's own (impaired) insulin response, and tune patient sensitivity or controller aggressiveness to see how each reshapes the correction.