This paper presents an improved PI-controller for minimizing the ripple torque of switched reluctance motor (SRM) drives in electric vehicle applications. The motor speed is controlled by an optimized proportional-integral PI-controller in the outer loop, and the motor torque is controlled by an additional optimized PI-controller with a hysteresis controller in the inner loop. The controller gains are obtained based on a Harris Hawk's Optimization (HHO) Because of the nonlinear characteristics of the SRM. The objective function is to minimize the integration of the absolute error (IES). A 6/4 SRM is used to investigate the performance of the motor with the proposed controller using Matlab/Simulink toolbox. According to the simulation results, the suggested controller achieves to acceptable ripple torque and achieves the target speed.