The Bispectral Index (BIS) is an electroencephalogram-derived measure of anesthetic depth. A closed-loop anesthesia system can be built using BIS as the control variable, a proportional-integral-differential control algorithm, and a propofol target-controlled infusion system as the control actuator. Recent studies have shown that such system is able to provide clinically adequate anesthesia. We hypothesized that BIS can also indicate the adequacy of analgesia and therefore built a combined closed-loop anesthesia system using BIS as the control variable, two proportional-integral-differential control algorithms, a propofol and a remifentanil target-controlled infusion systems as the control actuators. In preparation for a large multi-center control trial, we propose a prospective randomized study to evaluate the effectiveness of such a closed-loop anesthesia system. Two groups of patients are compared: one in which propofol and remifentanil are administered by the anesthesiologist using target-controlled infusion systems, and one in which propofol and remifentanil are administered automatically by the combined closed-loop anesthesia system. In both groups, the goal is to maintain BIS between 40 and 60, the recommended range during anesthesia by the manufacturer. We expect the combined closed-loop anesthesia system group to do similar or better.