We present a framework for the gradual improvement of model-based controllers. The total time of the learning procedure is divided into a number of learning intervals. After a learning interval, the model is refined based on the measured data. This model is used to synthesize the controller that will be applied during the next learning interval. Excitation signals can be injected into the control loop during each of the learning intervals. On the one hand, the introduction of an excitation signal worsens the control performance during the current learning interval since it acts as a disturbance. On the other hand, the informative data generated owing to the excitation signal are used to refine the model using a closed-loop system identification technique. Therefore, the control performance for the next learning interval is expected to improve. In principle, our objective is to maximize the overall control performance taking the effect of the excitation signals explicitly into account. However, this is in general an intractable optimization problem. For this reason, a convex approximation of the original problem is derived using standard relaxations techniques for Experiment Design. The approximated problem can be solved efficiently using common optimization routines. The applicability of the method is demonstrated in a simulation study.