The streamlined powertrain of electric cars compared to ICE vehicles is one of the contributors to EVs’ better energy efficiency. The EV's simple powertrain significantly reduces friction with a motor and a reduction gear set as its main components. However, this reduced friction can lead to a loss of damping in the car's dynamics, which can cause unpleasant oscillation and vibration to the passenger. One of the excitation sources in the electric car is the cogging torque of the permanent magnet synchronous motor (PMSM). This cogging torque depends not only on the design but also on external factors such as temperature and loading torque. There is room for improvement when we use adaptive control to compensate for the uncertain cogging torque. We present an adaptive control method that estimates unknown cogging torque given the rotor position sensor signals and compensates for the motor torque ripple. The control method is validated with an EV powertrain simulation that assumes uncertain motor torque ripple.