Due to the widespread use of electric motors in various industries, it is very important to have optimally designed motors in that they have high efficiency and lower negative effects on the quality of the power grid. Therefore, in this paper, the effects of winding type (wide and concentrated) on ripple torque in internal permanent magnet motor (IPMM) are investigated. In order to reduce the ripple torque and to increase the average torque, by making optimal holes in the rotor surface and using the sensitivity analysis method, the structure of the IPMM is improved. In this method, the number, dimensions and location of holes are optimized using the sensitivity analysis approach, which reduces the ripple torque of the motor. Using a concentrated winding instead of a wide winding, the toothed ripple torque is reduced by approximately 75% while maintaining the average torque value. Also, by making holes in the rotor surface and optimizing them using the finite element technique and sensitivity analysis, it is demonstrated that the amount of ripple torque by 20%. In the proposed approach, it is proved that in the concentrated winding, in addition to reducing the spatial harmonics, the average amount of torque can also be improved. Obtained results of the simulation confirm the effectiveness of the proposed method.