In order for an "artificial pancreas" to become a reality for ambulatory use, a practical closed-loop control strategy must be developed and critically evaluated. In this paper, an improved PID control strategy for blood glucose control is proposed and evaluated in silico using a physiologic model of Hovorka et al. The key features of the proposed control strategy are: (i) a switching strategy for initiating PID control after a meal and insulin bolus; (ii) a novel time-varying setpoint trajectory, (iii) noise and derivative filters to reduce sensitivity to sensor noise, and (iv) a systematic controller tuning strategy. Simulation results demonstrate that the proposed control strategy compares favorably to alternatives for realistic conditions that include meal challenges, incorrect carbohydrate meal estimates, changes in insulin sensitivity, and measurement noise.