  Online Feedback Optimization (OFO) controllers steer a system to its optimal
operating point by treating optimization algorithms as auxiliary dynamic
systems. Implementation of OFO controllers requires setting the parameters of
the optimization algorithm that allows reaching convergence, posing a challenge
because the convergence of the optimization algorithm is often decoupled from
the performance of the controlled system. OFO controllers are also typically
designed to ensure steady-state tracking by fixing the sampling time to be
longer than the time constants of the system. In this paper, we first quantify
the impact of OFO parameters and the sampling time on the tracking error and
number of oscillations of the controlled system, showing that adjusting them
without waiting for steady state allows good tracking. We then propose a tuning
method for the sampling time of the OFO controller together with the parameters
to allow tracking fast trajectories while reducing oscillations. We validate
the proposed tuning approach in a pressure controller in a centrifugal
compressor, tracking trajectories faster than the time needed to reach the
steady state by the compressor. The results of the validation confirm that
simultaneous tuning of the sampling time and the parameters of OFO yields up to
87% times better tracking performance than manual tuning based on steady state.
