An infusion system, which may be a closed loop infusion system or "semi-closed-loop" system, uses state variable feedback to control the rate that fluid is infused into the body of a user. The closed loop infusion system includes a sensor system, a controller, and a delivery system. The "semi-closed-loop" system further includes prompts that are displayed or sounded or otherwise provide indications to the user prior to insulin delivery. The sensor system includes a sensor for monitoring a condition of the user. The sensor produces a sensor signal, which is representative of the condition of the user. The delivery system infuses a liquid into the user at a rate dictated by the commands from the controller. The system may use three state variables, subcutaneous insulin concentration, plasma insulin concentration, and insulin effect, and corresponding gains, to calculate an additional amount of liquid to be infused as a bolus and to be removed from the basal delivery rate of the liquid.