Optimization Design of PMSM With Hybrid-Type Permanent Magnet Considering Irreversible Demagnetization