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