An insulin monitoring and delivery system, the system comprising one or more processors, one or more non-transitory computer-readable storage devices, and program instructions stored on at least one of the one or more storage devices for execution by at least one of the one or more processors, the program instructions comprising:
- first program instructions to track, via an insulin on board estimator module and in real time, insulin on board (IOB) of a patient, IOB being an amount of insulin active and/or an amount of insulin to be active in the patient;
- second program instructions to receive feed-forward signals and calculate, via a monitoring module and Kalman filtering, an amount of insulin need of the patient, wherein the amount of insulin need of the patient is calculated by insulin that should be on board (ISOB)-IOB, wherein the ISOB is based on an estimation or a prediction of patient glucose level;
- third program instructions to compare, via a fault detection and classification module, the amount of insulin active in the patient and/or the amount of insulin to be active in the patient with the amount of insulin need of the patient;
- fourth program instructions to determine, via the fault detection and classification module, an insulin fault level based on the comparison;
- and
- fifth program instructions for causing, via a remediation module and in response to the fourth program instructions determining the fault level, an insulin device to automatically change insulin delivery such that the amount of insulin active in the patient approaches the amount of insulin need of the patient.