Text this: Long-Horizon direct model predictive control of an active capacitor for ripple energy compensation in single-phase DC-to-AC converters