New approach to cogging torque simulation using numerical functions