## 1 Introduction  
The permanent magnet synchronous motors market is growing due to their competitive cost, efficiency and reliability. These motors have common applications in fast dynamic positioning systems and machine tool spindle drives, because they have one of the highest torque-to-losses ratios [1]. However, these motors have an important disadvantage known as \"torque ripple\", which is mainly due to the magnetization and the manufacturing of the windings. Torque ripple causes deterioration of the speed and position trajectory, and at high speed applications, torque ripple causes an increase of acoustic noise and additional energy losses [2]. There are methods to control Alternate Current (AC) motors, such as Direct Torque Control (DTC) and Field-Oriented Control (FOC), which have become powerful and popular control schemes for high performance AC drives, but they present undesired large torque and flux ripples [3; 4]. A versatile PMSM (permanent magnet synchronous motors) model for torque ripple together with an adaptive control algorithm are an option for torque ripple minimization [5]. Knowledge about torque ripple harmonics is used for the adaptation of the control algorithm; additionally, a current controller is designed to achieve ripple minimization [5]. Moreover, the torque pulsations vary periodically with rotor position, and they are reflected as velocity ripple, particularly at low speeds. Iterative Learning Control (ILC) is intuitively an excellent choice for torque ripple minimization [6]. Using the periodic nature of torque ripple and based on the component's harmonic distortion in the time domain of the compensation signal, the Fourier series controller coefficients can be adjusted with the aim of reducing the torque ripple in a PMSM, thus allowing for smoother operation [7]. As the Fourier series of a time function characterizes the frequency property of the signal, the Fourier series can be used as a tool for analyzing the convergence of the iterative learning control rules [8]. Further, the Fourier series can be applied in other cases, especially in periodic phenomena. Periodic disturbances affect many physical systems, and periodic reference tracking is required for some applications [9]. Controllers in the frequency domain have several advantages. The main advantage of designing a repetitive controller in the frequency domain is the simplicity in the control algorithm and the real-time implementation [10]. In an invertible generalized flux/current Switched Reluctance Machine (SRM) model based on the Fourier series expansion, the key features are geometry and material property dependency, flexibility in the choice of Fourier terms for the desired level of accuracy and the existence of the inverse flux and torque models [11]. Fourier series representations using trigonometric functions are most commonly used. However, the exponential form of the Fourier series has also been applied, and it has some advantages, such as smaller and clearer mathematical expressions, which makes it easier to extend conclusions that have been developed in the past [12]. Fourier series also can be seen as Neural Networks (NNs) when the series coefficients are strategically modified. These have some differences from traditional NNs. With Fourier Series Neural Networks (FSNN), without prior knowledge of the system model, all of the nonlinearities and uncertainties of the dynamical system are lumped together and iteratively compensated [13]. Other applications of the FSNN have been for servo systems. Some control laws based on a friction model, for servo systems, cannot accomplish an excellent control performance for specific applications with high precision positioning and low velocity tracking. In order to solve this problem, a Fourier series neural network was introduced to approximate a nonlinear, complex and unknown function caused by the frictional phenomenon [14].