Multiphysic optimal design of an inverter fed PMSM and choice of switching frequency,