Dynamic Simulations of Electric Machinery: Using MATLAB/SIMULINK