Receding Horizon Pseudospectral Control for Energy Maximization With Application to Wave Energy Devices