In this paper the problem of optimizing the output regulation of a weakly dual redundant plant with multiple actuators is addressed from a control theoretic viewpoint. When a system is underactuated, only subsets of the outputs can be independently controlled, while the remaining ones are constrained. With a specific focus on the asymptotic output tracking problem for MIMO systems with periodic references, we investigate the connection between the overall optimal input and the individually optimal controllers that lead to a perfect tracking of each output component. In particular the design of the optimal closed-loop controllers using a dynamic compensator is proposed