Pulse-width-amplitude modulation (PWAM) for reducing inverter switching loss in HEV/EV motor or generator system