Abstract-- We consider optimal experiment design for parametric prediction error system identification of linear timeinvariant systems in closed loop. The optimisation is performed jointly over the controller and the external input. We use a partial correlation approach, i.e. we parameterize the set of "admissible controller" - "external input" pairs by a finite set of matrix-valued trigonometric moments. Our main contribution is twofold. First we derive a description of the set of admissible finite-dimensional moments by a linear matrix inequality. Optimal input design problems with semi-definite constraints and criteria which are linear in these moments can then be cast as semi-definite programs and solved by standard semi-definite programming packages. Secondly, we develop algorithms to recover the controller and the power spectrum of the external input from the optimal moment vector. This furnishes the user a complete and very general procedure to solve the inpu...