Energy Maximising Robust Control for Spectral and Pseudospectral Methods with Application to Wave Energy Systems