High performance output tracking can be achieved by precompensator or feedforward controllers based on the inverse of either the closed-loop system or the plant model, respectively. However, it has been shown that these inverse controllers can adversely affect the tracking performance in the presence of model uncertainty. In this paper, a model-free approach based on only one set of acquired data from a simple closed-loop experiment is used to tune the controller parameters. The approach is based on the decorrelation of the tracking error and the desired output and is asymptotically not sensitive to noise and disturbances. From a system identification point of view the stable inverse of the closed-loop system is identified by an extended instrumental variable algorithm in the framework of errors-in-variables identification methods. By a frequency-domain analysis of the criterion, it is shown that the weighted two-norm of the difference between the controller and the inverse of the closed-loop transfer function can be minimized. The method is successfully applied to a high precision position control system.