Modeling and Design Optimization of A Shaft-Coupled Motor and Magnetic Gear