## 5 Fading Memory Proportional Derivative Algorithm  
Our group has investigated an algorithm that is related to the PID control system, without the integration component. Instead of using integration to arrive at a basal and duration-related insulin delivery rates, it applies a \"fading memory\" of the proportional and derivative components in order to utilize the time duration of abnormal glycemia. For example, in the setting of prolonged elevation of glucose level, the algorithm does not integrate a glucose area. Instead, it applies a decay calculation so that the more recent information has a greater effect on the output than more remote information. In so doing, if glucose levels are found to be elevated over several hours, insulin delivery is increased to a higher rate than if glucose had been elevated only for a few minutes. However, a prolonged glucose level elevation that occurred two days previously is not relevant and does not increase the insulin delivery rate, due to the fact that the memory has completely \"faded\". This method has been applied to rats with type 1 diabetes with good success [29, 30]. During in vivo studies, there is a \"priming\" effect indicating that the pancreatic beta cell keeps a memory of prior glycemic levels, though that memory clearly fades over time [31]. Using an FMPD approach, our group found that in animals, the use of intravenous insulin was remarkably successful in controlling glycemia [30]. When subcutaneous insulin with FMPD was used instead, the glycemic control was also successful [29], though less optimal than with IV insulin. The efferent delay of fast-acting analog insulin is assumed to be the explanation for this difference. The following section gives the specific FMPD algorithm equations that our group used for computing insulin delivery in a recent closed loop study in rats with type 1 diabetes [32]. Figure 3: A comparison of insulin infusion rates based only on the proportional error (IIR, PE) vs IIR based on a fading memory of PE (IIR, FMPE). When glucose is elevated to 200, note that if the IIR is based only on PE, the IIR remains steady throughout the duration of elevated glucose; but the IIR based on fading memory of PE adapts by continuing to increase the IIT during the period of hyperglycemia. The FMPD algorithm also adjusts the IIR according to a fading memory of the derivative error (not shown here). Also not shown are the basal infusion rates and glucagon infusions (using different gain factors) based on fading memories of proportional and derivative errors. The definitions/abbreviations used in FMPD calculations are as follows:  
1. PE = proportional error, equal to the glucose level minus the goal glucose. 2. DE = derivative error (the \"goal\" derivative is zero, so the derivative is equal to the derivative error). 3. Kpe = gain coefficient for proportional error. 4. Kde = gain coefficient for derivative error. 5. Wpe = weight given to a proportional error. 6. Wde = weight given to a derivative error. 7. termpe = weighted proportional error term that includes the gain coefficient factor. 8. termde = weighted derivative error term that included the gain coefficient factor. 9. Zpe = steepness coefficient for proportional error history. 10. Zde = steepness coefficient for derivative error history. 11. t = time. (Note that a t of 10 indicates 10 minutes back into history.) The fundamental equation utilized by the FMPD is:  
Insulin infusion rate = SUM of all termpe values over the history segment + SUM of all termde values over the same history segment  
90 minutes was used as the duration of the history segment. PE and DE were measured and calculated every 5 minutes.