Core loss and torque ripple in IPM machines: dedicated modeling and design trade off