In this paper, an intelligent neural network-based controller is designed and implemented to control the speed of a permanent magnet synchronous motor (PMSM). First, the exact mathematical model of PMSM is presented, and then, by designing a controller, we apply the wind turbine emulation challenges. The designed controller for the first time is implemented on a Arm Cortex-M microcontroller and tested on a laboratory PMSM. Since online learning neural network on a chip requires a strong processor, high memory, and convergence guarantee, this article uses the offline method. In this method, first, for different work points, the neural network is trained by local controllers, and then, the trained network is implemented on the chip and used. Uncertainty in the parameters and the effect of load torque as challenges of control systems are applied in the proposed method, and a comparison with other methods is performed in the implementation results section.