The back electromotive force (EMF) waveform of brushless dc motor (BLDCM) is trapezoid. But it is not absolutely trapezoid because of motor manufacturing. In this paper, a method of modeling for BLDCM with nonideal back EMF is presented. Eighteen states during an electric angle cycle are obtained after the nonideal back EMF of BLDCM is analyzed. The S-Function of MATLAB is used to generate the nonideal back EMF according to rotor speed and position. The pulse width modulation (PWM) current control of BLDCM is adopted. Simulated results validate the method.