An algorithm designed to automatically control insulin delivery was tested in rats with Type 1 diabetes. This nonlinear algorithm included a fading memory component of proportional and derivative errors in order to simulate normal insulin secretion. Error-weighting functions for the proportional and derivative terms were used with a performance index designed for error adaptation. In the first version of the algorithm, the proportional gain was adaptively varied. In the second version, a low rate of basal insulin delivery was adaptively varied. Six 6-h studies with each version were conducted using frequent blood sampling and intravenous insulin delivery. In Version 2 studies, blood glucose levels during the last two hours were well-controlled and significantly lower than in Version 1 (118 +/- 2.0 vs. 130 +/- 2.9 mg/dL). Neither version produced hypoglycemia. Future research using this algorithm needs to focus on automated glucose sensing in combination with insulin delivery.