INS and diabetes mellitus: Formulated from an engineering point of view, the control of diabetes is driven by routine self-treatment behaviors which may occasionally evolve into hypo- or hyperglycemia-triggering events, for example, insulin mistiming, bolus/basal imbalance, missed meal, or excessive exercise.