Optimal Control Methods for Tracking Multi-periodic Reference Signals: Single and Multi-periodic Repetitive Control