  This article presents the guided Bayesian optimization algorithm as an
efficient data-driven method for iteratively tuning closed-loop controller
parameters using an event-triggered digital twin of the system based on
available closed-loop data. We define a controller tuning framework independent
of the controller or the plant structure. Our proposed methodology is
model-free, making it suitable for nonlinear and unmodelled plants with
measurement noise. The objective function consists of performance metrics
modeled by Gaussian processes. We utilize the available information in the
closed-loop system to identify and progressively maintain a digital twin that
guides the optimizer, improving the data efficiency of our method. Switching
the digital twin on and off is triggered by data-driven criteria related to the
digital twin's uncertainty estimations in the BO tuning framework. Effectively,
it replaces much of the exploration of the real system with exploration
performed on the digital twin. We analyze the properties of our method in
simulation and demonstrate its performance on two real closed-loop systems with
different plant and controller structures. The experimental results show that
our method requires fewer experiments on the physical plant than Bayesian
optimization to find the optimal controller parameters.
