This paper describes an optimal neural controller, applied to a turbocharger diesel engine. It presents the training of a neural controller, based on the theory of backpropagation, for trajectory tracking of the engine speed. The Gauss-Newton algorithm will be explained in a recursive manner, including a forgetting factor for time varying systems. Some simulation results are presented.