Optimizing Control of Wave Energy Converter with Losses and Fatigue in Power Take off