Text this: A comprehensive simulation based methodology for optimal design of a PMSM drive