Modeling and Control of Magnetic Gear Dynamics in a Wind Turbine Drivetrain