The theory of optimal control has the feature of H∞ minimizing the worst-case gain of an unknown disturbance input. When appropriately modified, the theory can be used to design a “switching” controller that can be applied to insulin injection for blood glucose (BG) regulation. The “switching” controller is defined by a collection of basic insulin rates and a rule that switches the insulin rates from one value to another. The rule employed an estimation of BG from noisy measurements, and the subsequent optimization of a performance index that involves the solution of a “jump” Riccati differential equation and a discrete-time dynamic programming equation. With an appropriate patient model, simulation studies have shown that the controller could correct BG deviation using clinically acceptable insulin delivery rates.