Thermal and Electromagnetic Modeling for Prototyping Permanent Magnet DC Motors