{'fraction_non_alphanumeric': 0.02991139454822507, 'fraction_numerical': 0.01721316101360122, 'mean_word_length': 4.836462450592886, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Design and High-Order Precision Numerical Implementation of Fractional-Order PI Controller for PMSM Speed System Based on FPGA

: In this paper, the design of a fractional-order proportional integral (FOPI) controller and integer-order (IOPI) controller are compared for the permanent magnet synchronous motor (PMSM) speed regulation system. A high-precision implementation method of a fractional-order proportional integral (FOPI) controller is proposed in this work. Three commonly used numerical implementation methods of fractional operators are investigated and compared for comprehensively evaluating the numerical implementation performance in this work. Furthermore, for the impulse response invariant implementation method, the effects of different discretization orders on the control performance of the system are compared. The high-order fractional-order controller can be implemented accurately in a control system with the ﬁeld-programmable gate array (FPGA) with the capability of parallel calculation. The simulation and experimental results show that the high-precision numerical implementation method of the designed high-order FOPI controller has better performance than the ordinary precision fractional operation implementation method and traditional order integer order PI controller.


Introduction
As a generalization of integer calculus, fractional calculus can describe the actual physical objects more accurately. Fractional calculus has attracted more and more attention in engineering and physics, such as physical modeling, controller design [1][2][3], chaotic systems [4,5], and so on [6]. In the field with specific characteristics such as viscoelasticity and friction, fractional calculus can be used to describe some important applications [7]. Moreover, the fractional-order controller has more parameters and can improve the overall performance of the control systems, such as robustness and disturbance rejection [3,8]. Field-Programmable Gate Array (FPGA) has been widely used for digital system implementation due to its concurrency, programmability, and short development cycle [9][10][11][12][13]. Regardless of the complexity of the control algorithm, the computation cycle of controller based on FPGA can be relatively short compared to a pipelined digital signal processor (DSP) and personal computer (PC) because of its parallel architecture [14]. The implementation of the servo system based on FPGA can achieve high performance such as high bandwidth and good dynamic response performance [15,16]. A high-precision digital proportional integral derivative (PID) controller based on FPGA is implemented in [17].
A permanent magnet synchronous motor (PMSM) has advantages of high power, low loss, and high efficiency, providing the desired control performance and flexibility [18]. The field-oriented control (FOC) algorithm is generally regarded as a good method to control the PMSM. It has been applied in many fields, such as industrial robots, precision machining platforms, and so on. In view of the coupling, time-varying, and other nonlinear characteristics of PMSM, fractional-order controllers can achieve better control performance over traditional controllers [19][20][21].
The discretization of the fractional order operator is essential for fractional-order numerical implementation. The mathematical problems are more complex for a fractionalorder integrator/differentiator than an integer-order integrator/differentiator. Ideally, an integer-order transfer function containing infinite poles and zeros is required to implement a fractional-order transfer function, which is impossible in practical systems. However, the proper approximation can be obtained with finite zeros and poles. Due to resource and computing time constraints, fractional-order discretization order is usually less than 7th in the microprocessor system. In [22], a fractional-order active disturbance rejection controller (FOADRC) is proposed for the speed servo system of PMSM, which has good tracking and anti-load disturbance performance. Experimental verification is carried out based on the DSP platform with the 5th fractional discretization order. In [23], a fractional-order proportional integral derivative (FOPID) controller is used to control the position of suspended objects in a magnetic levitation system (MLS), which has a better position accuracy with fewer efforts than conventional methods. In addition, the fractional-order operator is implemented with the 7th-order discretization with Visual C. Therefore, the traditional microprocessors are limited by resources and algorithm running time, and it is challenging to realize high-order discretization fractional operators. Many researchers study the numerical discretization of fractional-order operators based on FPGA implementation. In [24,25], a fractional-order discretization method is proposed based on the Grunwald Letnikov (GL) definition, which is numerically discretized based on FPGA implementation and applied to practical fractional-order systems. This method effectively reduces the memory dependence of fractional order operators, but it can only have a good fitting effect of a fractional-order operator in a small frequency range. In [26], a fractional-order operators discretization method is proposed based on the GL definition using the piecewise linear approximation algorithm. The implementation is based on FPGA with better fitting accuracy and high FPGA resource utilization. However, the effective fitting frequency range of the fractional operator is still tiny. A few people have studied and compared the FPGA implementation performance of fractional operators with other commonly used methods.
In this paper, the high-precision numerical implementation of FOPI is carried out based on FPGA. Based on the PMSM model, an FOPI controller is designed with the given frequency domain index for the speed control of PMSM. The influential factors of discretization accuracy are investigated, including different discretization methods and discretization orders. The field-oriented control method is realized based on FPGA. Experimental results show that the high-precision numerical implementation method has better dynamic response characteristics and robustness.
The main contributions of this paper are as follows: (1) Three commonly used fractional-order operator discretization methods are compared in the frequency-domain, including the impulse response invariant method, Oustaloup method, and GL method. Furthermore, the fitting effects are investigated with different discretization orders of three methods. (2) The numerical implementation method of the field-oriented control and the high-precision FOPI controller is proposed based on FPGA, which can achieve higher precision with less time delay. (3) PMSM speed servo simulation and experimental results are presented to show the control performance advantages of the designed high-order FOPI controller based on FPGA.
The research process of this paper is shown in Figure 1. We introduce the design of the FOPI controller in Section 2. Section 3 presents the comparison of numerical implementation methods of fractional order operators. Section 4 demonstrates the simulation analysis of PMSM speed control performance of different controllers. Section 5 introduces the FPGA structure design and the experimental research. Finally, we give the conclusion in Section 6.

The Plant Model of PMSM Servo System
In this paper, the speed loop of PMSM is taken as the controlled object. Figure 2 is the PMSM speed servo system, where C(s) and C i (s) are the speed controller and the current controller. K 0 , K 1 , and K 2 are the voltage, current, and speed conversion factors, respectively. T i is the current filter coefficient. The red dotted block and blue dotted block are electromagnetic components and mechanical components. The electromagnetic part can be described by where u q is the q axis voltage, E is the electromotive force, C e is the electromotive force coefficient, n is the speed, i q is the q axis current, and R and L are the stator equivalent resistance and inductance, respectively. The mechanical part can be described by, where T e and T L are the electromagnetic torque and equivalent torque of the load, k m = 30/π, C m is the torque coefficient, i L is the equivalent load current, J is the flywheel inertia, and B is the viscosity coefficient. The transfer functions of the electromagnetic and mechanical parts can be calculated by, where k v = k m C m . A nonlinear identification approach based on output error is adopted to get the model parameters [27]. Based on this method, the electromagnetic part model and mechanical part model can be identified as, In order to reduce the influence of current disturbance, we introduce a first-order digital low-pass filter as follows: where T i is the filter coefficient.
The current loop controller model is where K pc and K ic are proportional and integral coefficients. The open-loop transfer function of the current loop can be seen in Figure 2, and its definition is as follows: In this paper, K 0 = 213.667, K 1 = 19.2, K 2 = 0.0005, and T i = 0.000318. The current controller is designed by the cancellation method with relationship K pc /K ic = 1/a. The gain crossover frequency is set as w c = 3000 rad/s, The current loop controller model can be obtained as follows: Based on the principle of FOC, the parameters of the Iq controller and Id controller are the same. So, the plant model of the PMSM speed control system is as follows, P(s) = 2.76847 × 10 8 s 3 + 3141.38s 2 + 1.30327 × 10 7 s + 1.79413 × 10 7 . Compared with the traditional linear PI controller, FOPI has more flexibility in parameters adjustment, including the fractional order. In order to make the speed control of PMSM robust to loop gain variation, an FOPI controller is considered with the structure as, where K P is the proportional gain, K i is the integral gain, and α is the order of the integration. The open-loop transfer function G s (s) can be written as, The controller C(s) contains three unknown parameters. The gain crossover frequency is given as ω c , and the phase margin is given as φ m . Three specifications are imposed as follows, (1) Phase margin specification, (2) Gain crossover frequency specification, (3) Flat phase specification, d(Arg(G(jω))) dω The flat phase specification demands the phase is flat around the gain crossover frequency ω c . It means that the system is robust to loop gain variation and maintains a constant overshoot as the gain changes.
The control design specifications are set as φ m = 60 • and ω c = 20 rad/s. By calculation, the intersection value of K i and α is obtained as K P = 0.252623, K i = 3.28026, and α = 0.494177. The open-loop Bode diagram is obtained, which meets the design index, as shown in Figure 3. The dots with different colors in the figure represent the phase at the gain crossover frequency.

Integer-Order PI Controller Design
In order to compare with the fractional-order controller, we also design an integerorder proportional intregral (IOPI) controller for the PMSM system. The structure of the IOPI controller is, where K P , K i are the parameters for proportional and integral items. The open-loop transfer function G 2 (s) with plant and IOPI controller can be written as, The phase margin and gain crossover frequency are, The controller of IOPI consists of two unknown control parameters. The control design specifications are set as φ m = 60 • and ω c = 20 rad/s. According to the constraint conditions, K i = 10.4586, K P = 0.78521. The open-loop Bode diagram of G 2 (s) is obtained, which meets the design index, as shown in Figure 3.

Numerical Implementation of Fractional Order Operators
The order of the fractional-order operator can be any real number or even a complex number. The basic operator of fractional calculus is a D α t [28], where a and t are the upper and lower limits of the fractional-order operator, and α is the order of the operator. The fractional-order differential and integral of function f (t) are as follows, where the operator a D α t represents the α order derivative or integral of the function. It can be seen that a fractional-order operator combines a fractional integral with a fractional differential. Therefore, the integer order is a special case of fractional-order operator. Three of the most commonly used definitions of fractional calculus are Caputo [29], Riemann-Liouville (RL) [30], and Grunwald-Letnikov (GL) [31].
The fractional-order operator s α is an infinite dimensional system and cannot be directly applied to an integer-order system. Therefore, the approximation of fractionalorder control systems is very important. The discretization methods of fractional order can be divided into direct discretization and indirect discretization. The idea of a direct discrete method is divided into two parts. The first part is the conversion of a fractional operator from the s-domain to discrete time domain z-domain. The commonly used methods include Euler, Tustin, and Al-Alaoui. The second part is to use a function of finite order in the z-domain to approximate the z-domain model of the operator. The discretization process is realized through a power series expansion (PSE) [32] and continued fraction expansion (CFE) [33]. The indirect discrete method approximates the fractional-order system to a continuous high-order integer-order system, such as the Oustaloup method [34] and Carlson method [35]. In this paper, three commonly used numerical methods are studied: impulse response invariant method, Oustaloup method, and GL discretization method.

Impulse Response Invariance Method
The impulse response invariance method was proposed for the discretization of fractional order operators [36]. According to the RL definition of fractional order integral, the α-order integral of unit impulse function δ(t) can be expressed as: where g(t) is the impulse response function of fractional-order integral operator 1/s α . g(t) is sampled by an ideal pulse sequence with impulse 1, and the sampling signal of the impulse response is obtained as: where T s is the sampling period. The pulse response sampling signal is modified as, The discretization transfer function of the fractional-order integral operator 1/s α can be obtained, where p and q are the orders of the polynomials.

Oustaloup Method
The Oustaloup method was developed on the basis of the study of complex calculus operators. In a certain approximation frequency range, the global approximation of the fractional-order operator is realized by assigning the zeros and poles of the integer-order transfer function. Since the frequency characteristic curve of the fractional order operator is a slant line, there is no filter to approach the fractional-order operator on the whole frequency band but only one frequency band. This method has a good fitting effect in the concerned frequency band. However, the disadvantage of this method is that the effect is not ideal in the high-frequency range. Assuming that the band of interest is (ω L , ω H ) and the number of filters is 2N + 1, the recursive filter can be expressed as: The zeros ω k , poles ω k , and gains K of the filter are shown as,

GL Method
The direct discretization of GL with finite memory length is the simplest way to implement fractional operators [33]. The GL fractional order operator is defined as follows: where W (α) j is the binomial coefficients and a is the interval superscript. In order to facilitate the implementation in the control system, the approximated version of the GL definition is given by [24]: where h is the step size, L is the window size (the discretization order), and W (α) j is calculated recursively by, Considering the principle of short memory, the error in calculating the approximated derivative is: where a + L < t < b and | f (t)| < M when a < t < b. It can be seen from the definition that the fitting error will decrease with the increase of window size. From Equation (32), the GL equation can be divided into two steps: first, the binomial coefficients W (α) n , where all coefficients are multiplied by 1 h α ; second, multiplication is performed between the input and the coefficients.

Simulation Analysis
Theoretically, the higher the approximation order is, the higher the approximation accuracy is. However, in the real systems, a high approximation order will significantly affect the operation time and resource occupation in embedded controllers with microprocessors. So, in practical application, the order of approximation is selected based on the trade-off of the control performance requirement and hardware limitation. In this paper, in order to demonstrate the advantages of the high-order implementation of the fractionalorder operator on FPGA with parallel calculation, different implementation methods and discretization orders are executed on FPGA for the PMSM control system.

Comparison of Three Discretization Methods
In order to evaluate the performance of the three numerical methods, given the same discretization order, the results of the three numerical methods are compared. The Bode plots of three fractional operator numerical methods are studied and compared with the ideal value. In order to study the implementation of three fractional-order numerical discretization methods, typical different fractional-order operator orders and frequency bands are given, and the effects of different discretization orders are compared. The designed parameters are shown in Table 1. Considering the actual digital system realization of the PMSM speed loop, the discretization sampling frequency is 4 kHz. The following are the detailed comparisons: (1) The comparison of case 1 is shown in Figure 4. It can be seen that the fitting performance of the GL definition implementation method is not very close to the ideal value. In this case, the Oustaloup method has a good fitting performance. However, the effect of Oustaloup still has some shortcomings. The fitting error of the phase at high and low frequency is large, and the accuracy of amplitude fitting needs to be improved.
(2) The comparison of case 2 is shown in Figure 5. It can be seen that the fitting effect of the GL definition implementation method is improved. With the increase of discretization order, the fitting effect of the impulse response invariant method is greatly improved. In the amplitude frequency diagram, in the frequency range [3 Hz, 1000 Hz], the impulse response invariant method has higher amplitude frequency fitting accuracy than the Oustaloup method. For the phase, the Oustaloup method has a better fitting performance at low frequency, and the impulse response invariance method has better fitting performance at high frequency. (1) The comparison of case 1 is shown in Figure 4. It can be seen that the fitting performance of the GL definition implementation method is not very well with the ideal value. In this case, the Oustaloup method has a good fitting performance. However, the effect of Oustaloup still has some shortcomings. The fitting error of phase at high and low frequency is large, and the accuracy of amplitude fitting needs to be improved.
(2) The comparison of case 2 is shown in Figure 5. It can be seen that the fitting effect of the GL definition implementation method is improved. With the increase of discretization order, the fitting effect of the impulse response invariant method is greatly improved. In the amplitude frequency diagram, in the frequency range [3 Hz, 1000 Hz], impulse response invariant method has higher amplitude frequency fitting accuracy than Oustaloup method. For the phase, the Oustaloup method has better fitting performance at low frequency, and the impulse response invariance method has better fitting performance at high frequency.  (3) The comparison of case 3 is shown in Figure 6. Increasing the frequency range of interest [1Hz, 10000Hz], the amplitude and phase fitting accuracy of Oustaloup at high (1) The comparison of case 1 is shown in Figure 4. It can be seen that the fitting performance of the GL definition implementation method is not very well with the ideal value. In this case, the Oustaloup method has a good fitting performance. However, the effect of Oustaloup still has some shortcomings. The fitting error of phase at high and low frequency is large, and the accuracy of amplitude fitting needs to be improved.
(2) The comparison of case 2 is shown in Figure 5. It can be seen that the fitting effect of the GL definition implementation method is improved. With the increase of discretization order, the fitting effect of the impulse response invariant method is greatly improved. In the amplitude frequency diagram, in the frequency range [3 Hz, 1000 Hz], impulse response invariant method has higher amplitude frequency fitting accuracy than Oustaloup method. For the phase, the Oustaloup method has better fitting performance at low frequency, and the impulse response invariance method has better fitting performance at high frequency.  (3) The comparison of case 3 is shown in Figure 6. Increasing the frequency range of interest [1Hz, 10000Hz], the amplitude and phase fitting accuracy of Oustaloup at high (3) The comparison of case 3 is shown in Figure 6. Increasing the frequency range of interest [1 Hz, 10,000 Hz], the amplitude and phase fitting accuracy of Oustaloup at high frequency is reduced, while the impulse response invariance method still maintains a good fitting performance.
(4) The comparison of cases 4 and 5 is shown in Figures 7 and 8. The order of the three methods is 24th. The fractional order operators are s 0.1 and s 0.9 , respectively. It can be seen that with the increase of fractional order at (0,1), the fitting accuracy of the GL method and impulse response invariant method is improved compared with the ideal value. For s 0.1 , the Oustaloup method has a good fitting performance in the case of discretization order 24th. For s 0.9 , in the frequency range [1 Hz, 1000 Hz], the impulse response invariant method has a better amplitude and phase-fitting performance than the Oustaloup method in the case of the 24th discretization order. frequency is reduced, while the impulse response invariance method still maintains a good fitting performance.
(4) The comparison of case 4, 5 is shown in Figure 7 and Figure 8. The order of the three methods is 24th. The fractional order operators are s 0.1 and s 0.9 respectively. It can be seen that with the increase of fractional order at (0,1), the fitting accuracy of GL method and impulse response invariant method is improved compared with the ideal value. For s 0.1 , the Oustaloup method has a good fitting performance in the case of discretization order 24th. For s 0.9 , in the frequency range [1Hz, 1000Hz], the impulse response invariant method has a better amplitude and phase fitting performance than the Oustaloup method in the case of discretization order 24th. For the speed loop control of PMSM, the FOPI controller is implemented by using the impulse response invariance method. The fractional integral operator 1/s α can be approximated by an integrator in series with an approximate fractional differential operator. The fractional order integral operator 1/s 0.494177 can be approximated by an integrator frequency is reduced, while the impulse response invariance method still maintains a good fitting performance.
(4) The comparison of case 4, 5 is shown in Figure 7 and Figure 8. The order of the three methods is 24th. The fractional order operators are s 0.1 and s 0.9 respectively. It can be seen that with the increase of fractional order at (0,1), the fitting accuracy of GL method and impulse response invariant method is improved compared with the ideal value. For s 0.1 , the Oustaloup method has a good fitting performance in the case of discretization order 24th. For s 0.9 , in the frequency range [1Hz, 1000Hz], the impulse response invariant method has a better amplitude and phase fitting performance than the Oustaloup method in the case of discretization order 24th. For the speed loop control of PMSM, the FOPI controller is implemented by using the impulse response invariance method. The fractional integral operator 1/s α can be approximated by an integrator in series with an approximate fractional differential operator. The fractional order integral operator 1/s 0.494177 can be approximated by an integrator For the speed loop control of PMSM, the FOPI controller is implemented by using the impulse response invariance method. The fractional integral operator 1/s α can be approximated by an integrator in series with an approximate fractional differential operator. The fractional order integral operator 1/s 0.494177 can be approximated by an integrator in series with an approximate fractional differential operator s 0.5058 . In order to evaluate the influence of the discretization order of the impulse response invariant method on the system performance, different discretization orders (7th and 24th) are given, and their performances are compared. The Bode diagram of fractional order s 0.5058 is shown in Figure 9. It can be seen that the fitting effect of the 24th is better than that of the 7th, which is closer to the design value at the frequency of 20 rad/s, and the phase is smoother. In Figure 10, the dots with different colors represent the phase at the gain crossover frequency. The gain crossover frequency of the open-loop Bode diagram of the 24th is larger than that of the 7th, which is closer to the design value. The phase of the open-loop Bode diagram corresponding to IOPI at 20 rad/s is not as flat as that for the FOPI controller, so the robustness to loop gain variation for IOPI should not be as good as that for FOPI. in series with an approximate fractional differential operator s 0.5058 . In order to evaluate the influence of the discretization order of the impulse response invariant method on the system performance, different discretization orders of 7th and 24th are given and their performances are compared. The Bode diagram of fractional order s 0.5058 is shown in Figure 9. It can be seen that the fitting effect of the 24th is better than that of the 7th, which is closer to the design value at the frequency of 20 rad/s, and the phase is smoother. In Figure 10, the gain crossover frequency of the open-loop Bode diagram of the 24th is larger than that of the 7th, which is closer to the design value. The phase of the open-loop Bode diagram corresponding to IOPI at 20 rad/s is not as flat as that for FOPI controller, so the robustness to loop gain variation for IOPI should not be as good as that for FOPI.  in series with an approximate fractional differential operator s 0.5058 . In order to evaluate the influence of the discretization order of the impulse response invariant method on the system performance, different discretization orders of 7th and 24th are given and their performances are compared. The Bode diagram of fractional order s 0.5058 is shown in Figure 9. It can be seen that the fitting effect of the 24th is better than that of the 7th, which is closer to the design value at the frequency of 20 rad/s, and the phase is smoother. In Figure 10, the gain crossover frequency of the open-loop Bode diagram of the 24th is larger than that of the 7th, which is closer to the design value. The phase of the open-loop Bode diagram corresponding to IOPI at 20 rad/s is not as flat as that for FOPI controller, so the robustness to loop gain variation for IOPI should not be as good as that for FOPI.

The Influence of Discretization Order of Impulse Response Invariant Method
The step response waveform is shown in Figure 11, and it can be seen that FOPI has a smaller overshooting and setting time than IOPI. The response of 24th order has a smaller overshoot and smaller setting time than that of 7th order. The comparison of the closedloop transfer function Bode diagram is shown in Figure 12. The peak value of 24th-order discretization is smaller than that of 7th-order discretization. Therefore, the high-order implementation of the fractional-order operator is more consistent with the expected value and has better performance. In Figure 13, the 24th-order discretization controller input has smaller amplitude oscillations and reaches steady state faster. In Figure 14, the output peak value of the FOPI controller is smaller than the IOPI, and the 24th-order discretization FOPI controller reaches the steady state faster than 7th-order discretization. The unit step responses of the designed IOPI and FOPI controllers are plotted with controller gain change 0.9 to 1.1 (±10% variations from the nominal value 1), as shown in Figure 15. It can be seen that the designed high-order FOPI controller has a lower overshoot than the IOPI controller. In addition, the overshoots of the high-order FOPI controller remain almost constant under loop gain variations, which means the system is more robust to loop gain changes. The simulation results of speed reference variations are shown in Figure 16. The speed reference changes from 200 to 400 r/min. Compared with the IOPI controller, the FOPI controller has better dynamic response performance with less overshoot and less adjustment time. In addition, the 24th-order discretization method has better response performance than the 7th-order discretization method.

FOC Algorithm Implementation Based on FPGA
The speed loop control of PMSM is based on the field-oriented control (FOC) method, which decouples the excitation current from the torque current. The FOC structure is shown in Figure 17, where i d is the d-axis current, U d is the d-axis voltage, n r is the reference speed, and i a and i b are the two phase currents of the motor. Generally, FOC consists of seven parts: namely, Clark transform, Park transform, inverse Park transform, space vector pulse-width modulation (SVPWM), speed controller, current controller, and speed calculation module. Each part requires a specific computation period, and the longest signal path in each stage determines the bandwidth of this phase. The seven parts together determine the bandwidth of the entire system. The FOC structure based on FPGA is shown in Figure 18, where θ is the motor encoder angle value. The whole algorithm process is divided into five states. While the Clark module and the Park module are running, the speed calculation module and the speed controller module can run independently at the same time. Similarly, the Iq controller and the Id controller can operate independently at the same time. Each module makes full use of the FPGA's concurrent operation to reduce the running time and improve the operation bandwidth. In this paper, the FPGA clock signal is 100 Mhz. Regardless of the current acquisition and encoder acquisition time, the calculation time of the whole speed loop is 127 FPGA clocks.  Figure 18. FOC algorithm control based on FPGA.

FPGA Implementation of Fractional-Order Operator
The structure of the fractional PI controller is presented in Figure 17, in which an integrator is connected in series with fractional differential. We study the FPGA implementation of fractional-order operators with reference to FOPI, and the FPGA-based fractional-order operator module can also be used independently for other fractional-order systems. According to the impulse response invariance method, the z-domain expression of the fractional operator s α can be obtained, where w i and d i (i = 1...n) are the discretization coefficients of fractional-order operators. The fractional differential operator function is as follows, where x and y are the input and output. According to Equations (35) and (38), the i-th output can be expressed as The hardware implementation of the fractional operator is illustrated in Figure 19. The input and output signals are 37-bit fixed-point numbers, with 5-bits for the integer part and 32-bits for the fractional part. The fractional order operator discretization is an 83-bit fixed-point number, with 13-bits for the integer part and 70-bits for the fractional part. The parameter k 0 is the conversion factor, and k 0 = 1 2 38 . While improving the implementation accuracy of the fractional-order operator, the number of bits of the output signal remains unchanged. Based on the concurrency of FPGA, w i x i multiplication and d i−1 y i−1 multiplication can be carried out at the same time. While implementing high-precision fractional-order operator, the internal concurrent structure of the module improves the running speed.  Figure 19. The hardware architecture of fractional operator.
The approximate z-domain transfer function of s α (α = 0.5058) is shown as Equations (41)-(43) with the sampling period Ts = 0.00025 s. The integer-order integral operator is discretized using the backward difference method with the same sampling period. When the fractional discretization order is 7, When the fractional discretization order is 24, (43)

Experimental Verification
The experimental platform is shown in Figure 20, including a PMSM, servo driver, and PC interface. The servo drive is based on FPGA-10M50DAF484C7G, which is used for encoder reading, AD sampling, and control algorithm implementation. The FPGA-10M50DAF484C7G has 484 pins and 50K logic elements, and the maximum frequency is 450 MHz. The motor is VM7-M13A-2R020-D1, and the parameters are shown in Table 2.  The speed responses of the FOPI and IOPI are shown in Figure 21. The discretization order 24th step response has a smaller overshoot and adjustment time. For a fair comparison, the controllers gain are set as 90%, 100%, and 110% of the nominal value. As shown in Figures 22 and 23, the high-order fractional order controller achieves better robustness. Figure 24 shows that the FOPI controller has better dynamic response performance than the IOPI controller when speed changes. In addition, the 24th-order discretization method based on FPGA implementation has better response performance than the 7th-order discretization method.

Conclusions
In this paper, an FOPI controller is designed to control the speed of PMSM, and the numerical implementation accuracy of the fractional-order operator is investigated. Three common numerical implementation methods of the fractional-order operator are studied. Both the impulse response invariant method and the Oustaloup method have good fitting performance with 24th-order discretization. The effects of different discretization orders with the impulse response invariant method on the control performance of the system are compared. The FOC algorithm is implemented based on very high speed integrated circuit hardware description language (VHDL), including the IOPI controller and high-performance FOPI controller. Compared with the traditional pipelined structure microprocessor, FPGA can break through the limitation of data bits, and the parallel characteristic can improve the running speed. According to the simulation and experimental results of the PMSM speed loop, the servo system based on the high-order FOPI controller can obtain better dynamic response performance and robustness. The FPGA-based fractional-order operator module can be integrated into other fractional-order systems.