This article presents a model-free control technique based on an extremum seeking control algorithm (ESC). The idea is to use ESC as a direct controller to minimize the quadratic error. Considering that it is possible to minimize the error to zero, it is then possible to track a reference. In addition, the technique can guarantee operation for different points of application, as well as for time-varying parameters. This technique was tested, through simulations, in a quadruple tank system.