Real‐time simulation of electric machine drives with hardware‐in‐the‐loop