  A novel nonlinear model predictive control approach for state signal shaping
is proposed. The control strategy introduces a residual shape cost kernel based
on the dynamics of circular limit cycles from a supercritical Neimark-Sacker
bifurcation normal form. This allows the controller to impose a fundamental
harmonic state signal shape with a specific frequency and amplitude. An
application example for harmonic compensation in distribution grids integrated
with renewable energies is presented. The controller is tasked with the
calculation of the reference current for an active power filter used for load
compensation. The results achieved are successful, reducing the harmonic
distortion to satisfactory levels while ensuring the correct frequency and
amplitude.
