Control of magnetic bearings in wind turbines