The paper proposes a new, discrete time LQ optimal controller synthesis for output tracking over an infinite horizon. The resulted controller consists of a state feedback and a feedforward term. The solution requires a one step ahead prediction of the reference signal. For a smooth enough reference signal this can be replaced with extrapolation. Here, the properties for constant reference signals are examined, time varying references will be covered with another article. The method guarantees asymptotical stability and zero steady state tracking error. The elaborated techniques satisfy the separation principle for an arbitrary deterministic or stochastic state estimator. The reference tracking problem for a quadrotor helicopter is solved by the method. The trajectory tracking control is successfully applied both with reference signal preview and extrapolation (considering time varying references also).