The cogging force arising due to the strong attraction forces between the iron core and the permanent magnets, is a common inherent property of the linear motors, which significantly affects the control performance. Therefore, significant research efforts have been devoted to the compensation of the cogging force. In this paper, an identification approach based on the radial basis function neural network (RBFNN) is proposed to obtain an accurate model of the cogging force. A self-adaptive hybrid self-learning teaching-learning-based optimization (SHSLTLBO) method is utilized to train the neural network. Finally, the experimental results confirm the effectiveness and the superiority of the proposed cogging force identification method.