This paper presents an approach to anesthesia control using a model-based controller. General anesthesia with propofol is considered. The proposal tries to take advantage of the benefits of model-based controllers to improve the performance of control in anesthesia. The controller proposed is based on the application of two control actions. First, a nominal term is applied obtained from the inverse dynamics model. This action is corrected by adding a second term that compensates modeling errors, disturbances, etc. To compute the correction, a linearization of the model is considered around the nominal state and optimization is performed to compute the control action. Several results obtained in simulation are presented to test the efficiency of the method.