An optimal tuning strategy for tidal turbines