Sensorless Fractional Order Control of PMSM Based on Synergetic and Sliding Mode Controllers

: The ﬁeld oriented control (FOC) strategy of the permanent magnet synchronous motor (PMSM) includes all the advantages deriving from the simplicity of using PI-type controllers, but inherently the control performances are limited due to the nonlinear model of the PMSM, the need for wide-range and high-dynamics speed and load torque control, but also due to the parametric uncertainties which occur especially as a result of the variation of the combined rotor-load moment of inertia, and of the load resistance. Based on the fractional calculus for the integration and di ﬀ erentiation operators, this article presents a number of fractional order (FO) controllers for the PMSM rotor speed control loops, and i d and i q current control loops in the FOC-type control strategy. The main contribution consists of proposing a PMSM control structure, where the controller of the outer rotor speed control loop is of FO-sliding mode control (FO-SMC) type, and the controllers for the inner control loops of i d and i q currents are of FO-synergetic type. Superior performances are obtained by using the control system proposed, even in the case of parametric variations. The performances of the proposed control system are validated both by numerical simulations and experimentally, through the real-time implementation in embedded systems. under the conditions where the controller of the current loops is of PI type. It also presents the performances obtained by using the synergetic control for the control of currents i d and i q , within an FOC-type control structure of the PMSM with PI speed controller.


Introduction
The permanent magnet synchronous motor (PMSM) is widely used in industrial applications, the aerospace industry, electric vehicles, robotics, electric drives and computer peripherals. The popularity of using the PMSM for a very wide range of applications is due to a set of advantages such as efficiency, small size, high power and high torque density. Naturally, for the control of the PMSM, a number of algorithms and control strategies have been developed, both in the range of the classic type of control, and also as through modern and unconventional approaches. The field oriented control (FOC) and direct torque control (DTC) [1][2][3][4][5][6][7] can be distinguished among the control strategies of the PMSM. The DTC strategy is characterized by a simpler structure in terms of controllers which are generally ON-OFF, but inherently the performance of the control system is affected by the occurrence of oscillations. The FOC strategy contains a cascade control structure, where the outer loop controls the PMSM rotor speed, and the inner control loops control currents i d and i q . In the classical approach, the FOC strategy controllers are PI type. This approach includes all the advantages provided by the simplicity of using such controllers, but inherently the control performances are limited due to the nonlinear model of the PMSM, the need for wide-range and high-dynamics speed and load torque control, but also due to the parametric uncertainties which occur especially as a result of the variation of the combined rotor-load moment of inertia, and of the load resistance.

Fractional Order Calculus
Let us note that the non-integer order operator for integration and differentiation as aD α t , where α represents the fractional order, a and t represent the limits of the interval at which the operator is applied [27,28].
Although there are several ways to define this operator, not all have a generally accepted meaning. The most widely used definition is the Riemann-Liouville differintegral [32,33]: where m − 1 < α < m, m ∈ N, and Γ(·) represents Euler's gamma function. Another useful definition in practical applications is given by Grünwald-Letnikov [32,33]: where (·) represents the integer part.
Similarly to the case of the integer order of the operator defined in (1), the Laplace transform is applied and the transfer function for signals and with fractional derivative is defined. For example, if the orders of the fractional operator s are integer multiples in relation to the commensurate order q, (q ∈ R + , 0 < q < 1, α k = kq), the transfer function H(λ) can be expressed as follows: where λ = s q .
Electronics 2020, 9, 1494 4 of 44 However, in the case of linear and time-invariant systems, in the fractional case, the state space representation becomes: D q x(t) = Ax(t) + Bu(t) y(t) = Cx(t) + Du(t) (5) Furthermore, the stability of the system (5) can be verified by fulfilling the following relationship: |arg(eig(A))| > q π 2 (6) where 0 < q < 1 represents the commensurate order, and eig(A) is the eigenvalue of the associated matrix A.
To obtain a good approximation of a transfer function with fractional order in a specified frequency range (ω b , ω h ) and of order N, Oustaloup's recursive filter for s γ and 0 < γ < 1 can be used as follows [32,33]: where ω k , ω k and K are given by: Furthermore, a refined Oustaloup filter is given by [32]: ; In Equations (9) and (10), usually b = 10 and d = 9.

Mathematical Model of PMSM. Transfer Function Representation. FOC Strategy of PMSM
The mathematical model of the PMSM in the rotor reference frame (d-q frame) by applying the Park transform and according to [1,2] is obtained in the following form: where u d , u q and i d , i q are the stator voltages and currents in the d-q reference frame of the PMSM, L q , L d and R q , R d are the stator inductances and resistances in the d-q reference frame, ω e is the electrical angular velocity of the rotor, λ 0 is the flux linkage, and ρ is the differential operator. The flux on the d-q axes is expressed as: By indicating the electromagnetic torque developed by the PMSM as T e , the following relations on the PMSM dynamics can be expressed: T e = 3 2 n p λ d i q − λ q i d ; T e = K t i q T e = T L + Bω + J dω dt (13) Electronics 2020, 9, 1494 5 of 44 where K t = 3 2 n p λ 0 represents the torque constant, B represents the viscous friction coefficient, J represents the rotor inertia, n p represents the number of pole pairs, and T L represents the load torque.
By assuming the following simplifications L d = L q = L, R d = R q = R s , and ω e = n p ·ω, where ω is the angular velocity of the rotor, the following PMSM model can be obtained: Using the Equations (11)- (14) describing the PMSM, Figure 1 shows the block diagram by reduced transfer functions of the PMSM rotor speed control system. In addition to the notations presented above, we denote the transfer functions of current and speed sensors as H c (s) and H ω (s) in Figure 1. Usually these are 1st order transfer functions where the time constant is in the order of milliseconds, thus allowing a simplified approach to the reduction of these transfer functions to constants.  (14) Using the Equations (11)- (14) describing the PMSM, Figure 1 shows the block diagram by reduced transfer functions of the PMSM rotor speed control system. In addition to the notations presented above, we denote the transfer functions of current and speed sensors as Hc(s) and Hω(s) in Figure 1. Usually these are 1st order transfer functions where the time constant is in the order of milliseconds, thus allowing a simplified approach to the reduction of these transfer functions to constants.  (15) where: Kin = 0.65· (Vdc/Vcm) and Tin = 1/(2· fc), Vdc represents the dc link voltage (input of the inverter), Vcm represents the maximum control voltage, and fc represents the switching frequency of the inverter. In Figure 1 by shifting the point of intersection of the back-electromotive force (back-EMF) loop with the speed loop to the point of intersection with the current loop, an equivalent form of defining the fixed part (the current control loop of iq) as transfer functions is shown in Figure 2 [39]. The transfer function of the inverter is as follows: (15) where: K in = 0.65·(V dc /V cm ) and T in = 1/(2·f c ), V dc represents the dc link voltage (input of the inverter), V cm represents the maximum control voltage, and f c represents the switching frequency of the inverter. In Figure 1 by shifting the point of intersection of the back-electromotive force (back-EMF) loop with the speed loop to the point of intersection with the current loop, an equivalent form of defining the fixed part (the current control loop of i q ) as transfer functions is shown in Figure 2 [39].
Electronics 2020, 9, x FOR PEER REVIEW 6 of 45  (16) is the transfer function of the inner current loop which represents the fixed part of the speed control system (outer control loop) which becomes as follows: In Figure 2, using the following notations: is the transfer function of the inner current loop which represents the fixed part of the speed control system (outer control loop) which becomes as follows: where Figure 3 shows the proposed general block diagram of the enhanced FOC control type strategy for PMSM. In this paper, the speed controller of the outer control loop is a classic PI-type controller, but, as shown in Section 4, it can be replaced with FO-PI, TID, FO-lead-lag, and FO-SMC controllers. Furthermore, compared to the classic approach, the PI-type current controllers in the inner control loop can be replaced with synergetic and FO-synergetic controllers, as presented in Section 5. The output of these controllers provides the reference i qref for the inner current control loop, where i dref = 0. Section 6 presents improvements that can be made to the classic FOC-type scheme by using an SMO-type observer to estimate the rotor position and speed, but also an FDO observer to detect the faults on the PMSM supply phases.
is the transfer function of the inner current loop which represents the fixed part of the speed control system (outer control loop) which becomes as follows: Figure 3 shows the proposed general block diagram of the enhanced FOC control type strategy for PMSM. In this paper, the speed controller of the outer control loop is a classic PI-type controller, but, as shown in Section 4, it can be replaced with FO-PI, TID, FO-lead-lag, and FO-SMC controllers. Furthermore, compared to the classic approach, the PI-type current controllers in the inner control loop can be replaced with synergetic and FO-synergetic controllers, as presented in Section 5. The output of these controllers provides the reference iqref for the inner current control loop, where idref = 0. Section 6 presents improvements that can be made to the classic FOC-type scheme by using an SMO-type observer to estimate the rotor position and speed, but also an FDO observer to detect the faults on the PMSM supply phases.

Fractional Order Speed Controllers for PMSM
By using the fractional-type control, whose basic elements were described in Section 2, this section presents the equations of certain fractional-type controllers that will replace the PI-type speed controller in the FOC-type control strategy of PMSM.

FO-PI Speed Controller
Furthermore, in terms of the fractional controllers, the most commonly used are the PI λ D µ controllers, which can be expressed as follows [33]: where e(t) represents the error signal. After applying the Laplace transform to Equation (19), by assuming zero initial conditions, the following equation is obtained: Electronics 2020, 9, 1494 7 of 44 where K p represents the proportional gain, K i represents the integrator gain, λ represents the integrator order (positive), K d represents the differentiator gain, and µ represents the differentiator order. For λ = µ = 1, the result is the usual integer-order PID controller.

TID Speed Controller
Another fractional controller used in applications is the TID controller, which can be described by the next transfer function [33]: where K t represents the tilt gain, n represents the tilt integrator order, K i represents the integrator gain, and K d represents the differentiator gain.

Lead-Lag Speed Controller
The general form of the transfer function of an FO-lead-lag controller is given by [33]: where λ represents the fractional order of the FO-lead-lag controller. It is noted that, for α > 0, a lead effect of the FO-lead-lag controller is obtained, while for α < 0, a lag effect of the FO-lead-lag controller is obtained.
For k = K c x α , the common form of the FO-lead-lag controller is obtained: , and x has a very high value (for example x > 10,000), the transfer function of the FO-lead-lag controller becomes the transfer function of the FO-PI controller. It can therefore be concluded that there is an increased flexibility in the use of the FO-lead-lag controller in a control loop.

FO-SMC Speed Controller
To achieve an SMC-type controller for the control of a PMSM motor described by Equation (14), the state variables x 1 and x 2 described below are selected [1]: where x 1 represents the tracking error of the speed.
Equation (26) defines the sliding surface S of the zero-error manifold. Through differentiation, the following equation is obtained (27): .
where c represents the positive adjustable parameter and D = 3n p λ 0 2J is obtained from Equation (13). In order to control the response time of the PMSM control system, the condition of time evolution of the surface S is imposed like in Equation (28): Electronics 2020, 9, 1494 8 of 44 where ε and q represent the positive adjustable parameters; sgn() represents the signum function.
To reduce the chattering effect (characteristic of the SMC design), the sgn function is replaced with the sigmoid function defined as follows: For a = 4 and c = 0, H ∈ [−1 1], the transition of the function H from −1 to 1 is smoothed and ensures the reduction of the chattering effect. Based on these, after some calculations, the SMC-type controller output value is obtained in the following form: It can be specified that i qref represents the current reference for the control loop on q axis, while i dref is set to zero according to the FOC-type control strategy [23]. To demonstrate the stability of the PMSM control system under the action of the control law given by Equation (30), the Lyapunov function candidate is selected in the following form V = 1 2 S 2 [1].
After some calculations, V is given by the relation (31). To achieve the FO-SMC controllers, the sliding surface S is selected as follows: After differentiation, the following relation is obtained: Based on the mathematical model of the PMSM described in Section 3, the following relation is obtained: .
By inserting Equation (34) into Equation (33), the following relation is obtained: For . S = 0, the following relation is obtained: By applying operator D 1−µ (described in Section 2) to both members of Equation (36), the following relation is obtained: .
This results in the following relation: .
The current reference i qref is obtained from Equation (39) as follows: .

Fractional Order Synergetic Current Controllers for PMSM
The synergetic control can be considered as a generalization of the sliding mode control (SMC), retaining the decoupling design procedure and model order reduction properties of this type of control and the advantages provided by this approach for the synthesis of the control. Thus, in this section, the PI-type current controllers will be replaced for the inner current control loops in the FOC-type control strategy, with synergetic and FO-synergetic type controllers to obtain superior performances.
For the synergetic control, a macro-variable is defined as a function of the states of the system, as follows [19]: The synthesized control inputs will force the system to operate on the manifold Ψ = 0, in a similar manner to the SMC. A number of macro-variables equal to the number of control inputs are defined. The dynamic evolution of each macro-variable is defined according to the following equation: where T is selected so as to achieve the rate of convergence of the system evolution towards the desired manifold. By differentiating the macro-variable Ψ: and by inserting Equation (43) into (42) using the explicit description of the states .
x from the mathematical model, in the case of the PMSM expressed by Equation (14), the control law is obtained as follows: In case of applying the FOC type strategy for the PMSM control (see Figure 4), the outer speed control loop supplies the reference i qref at the PI-type speed controller output for the inner control loop whose controller proposed in this paper is synergetic. According to Equations (42)-(44), the synergetic controller provides the controls u d and u q . Furthermore, according to the FOC control strategy of the PMSM i dref = 0.
According to [20], in order to achieve superior control performance under static and dynamic regime, ω acc and ω dec are defined as the angular velocity of the rotor by selecting the current limit mode of operation for accelerating and decelerating transients, respectively, of the following form: In case of applying the FOC type strategy for the PMSM control (see Figure 4), the outer speed control loop supplies the reference iqref at the PI-type speed controller output for the inner control loop whose controller proposed in this paper is synergetic. According to Equations (42)-(44), the synergetic controller provides the controls ud and uq. Furthermore, according to the FOC control strategy of the PMSM idref = 0. According to [20], in order to achieve superior control performance under static and dynamic regime, ωacc and ωdec are defined as the angular velocity of the rotor by selecting the current limit mode of operation for accelerating and decelerating transients, respectively, of the following form: where iqmax is the maximum admissible current on q-axis, and kq is a value which is dynamically adjusted as a function of the angular velocity of the rotor error. The control law for q axis can be expressed as follows: for  For ω > ω acc and ω < ω dec the macro-variable on q axis Ψ q can be represented as in the following equation: and for ω ≤ ω acc the macro-variable on q axis Ψ q is represented in Equation (47), and for ω ≥ ω dec the macro-variable on q axis Ψ q is represented in Equation (48).
where i qmax is the maximum admissible current on q-axis, and k q is a value which is dynamically adjusted as a function of the angular velocity of the rotor error. The control law for q axis can be expressed as follows: for ω acc < ω < ω dec , u q is given by Equation (49), for ω ≤ ω acc , u q is given by Equation (50), and for ω ≥ ω dec , u q is given by Equation (51): The macro-variable on d axis Ψ d can be represented as in the following equation: After some calculus, the control law for d axis can be expressed as follows [20]: Following the calculations made for the synergetic control of the PMSM, using definitions (1) and (2) of the fractional calculus for integration and differentiation operators, in this section we will obtain the values of the controls u d (t) and u q (t).
We define the macro-variable on q axis Ψ q similarly to (46) for ω > ω acc and ω < ω dec , as follows: where: Ψ q is calculated, and the following relation is obtained: By inserting (55) into the Equation (42) of dynamic evolution of macro-variable Ψ q , for T = T q , the following relation is obtained: By rearranging the terms in Equation (56) the following relation is obtained: After some calculations, Equation (56) becomes: Based on this, the control u q of the PMSM is obtained: Similarly to relations (47) and (48), control u q is obtained for ω ≤ ω acc and ω ≥ ω dec , respectively. Next, the macro-variable on d axis Ψ d is defined: Ψ d is calculated, and the following relation is obtained: Electronics 2020, 9, 1494 12 of 44 By inserting (61) into the Equation (42) of dynamic evolution of macro-variable Ψ d , for T = T d , the following relation is obtained: By applying the operator defined in (1), D −µ (which becomes I µ ) to both members of Equation (62) the following relation is obtained: After some calculations, Equation (63) becomes: Based on this, the control u d of the PMSM is obtained:

Rotor Speed Estimation and Fault Detection
This section presents two observers, which complete the classic FOC-type control structure. Thus, the sensorless characteristic of the control is ensured by an SMO-type observer which estimates the PMSM speed. Furthermore, the use of an FDO-type observer enables the fault detection of the current sensors on the PMSM supply lines.

Rotor Speed and Position Estimations Based on SMO-Type Observer
By using the PMSM operating equations given by the relations (11)- (14), and by applying the inverse Park transform, the equations of the currents i α and i β and the back-EMF e α and e β are obtained in α-β frame [2]: Based on these, the PMSM operating equations can be rewritten as: The equations of the SMO-type observer according to which the rotor speed and position can be estimated are given by the equations [23,25]: where: k represents the observer gain, and H is a sigmoid type function described in Equation (29).
The sliding vector is selected as follows: Electronics 2020, 9,1494 13 of 44 To demonstrate the stability of the proposed observer, a Lyapunov function is selected of the form [25]: The current error system is defined in the form: According to these, .
V is calculated, and the following relation is obtained: By selecting the observer gain as k ≥ max |e α |, e β , the stability condition of the observer is obtained: . V < 0. Based on this, on the sliding surface, the following relation is obtained: Based on relations (73) and (74), are obtained the estimations for e α and e β : Finally, the estimates for the speed and position of the PMSM rotor can be obtained as below: where: θ 0 represents the initial electrical position of the rotor. Figure 5 shows the implementation in the MATLAB/Simulink environment in order to perform the numerical simulations of the SMO-type observer for the estimation of the position and rotor speed of the PMSM. Electronics 2020, 9, x FOR PEER REVIEW 14 of 45

Fault Detection Based on FDO-Type Observer
To detect the faults of the current sensors on the PMSM supply phases, an FDO-type observer will be used. In the α-β frame, the equations analogous to those described in Equation (11) for a PMSM are as follows: Figure 5. Sliding mode observer (SMO)-type observer-MATLAB/Simulink implementation block diagram.

Fault Detection Based on FDO-Type Observer
To detect the faults of the current sensors on the PMSM supply phases, an FDO-type observer will be used. In the α-β frame, the equations analogous to those described in Equation (11) for a PMSM are as follows: According to Equation (77), the following relation can be written: Considering the flux linkage λ ext = λ 0 in α-β frame is obtained the following relation: Let us note: According to Equation (78), the equation of the PMSM which has an embedded FDO-type observer can be written as [40]: is the unknown but bounded disturbance vector, x is the state vector, u and y represents the input and output vector, Consider a new state variable z, which is just variable y, but filtered, with a, b constants: By selecting a = 0, b = 1, Equation (81) becomes: Based on relations (80)-(82), the system of equations of the PMSM with embedded FDO observer becomes: Consider f s the actuator fault of the system described by (83). The FDO-type observer has the following form [40]: ν 1 and ν 2 are selected, as control signals for the correction of the sliding mode, as follows: where e x = x −x and e z = z −ẑ, and L 1 and L 2 are positive design constants. Let us note e s = f s −f s . Based on this, the equations of the errors can be written as follows: To demonstrate the stability of FDO-type observers, the Lyapunov function is selected as follows: where Q > 0 is a constant matrix with appropriate dimensions. By calculating . V, the following relation is obtained: To ensure stability, by selecting L 1 > d and L 2 > C e x , the law of adaptation for faults vector f s is obtained: Since i α and i β can be derived from i a,b,c in the form: Then, the effect of the occurrence of faults f sα and f sβ , propagate in the form of faults f a and f b in phases a and b of the PMSM power windings in the form of equations and laws of adaptation described by Equations (91)-(93): In order to achieve the implementation of the FDO-type observer in the MATLAB/Simulink environment, it is necessary to define the equations presented in this section explicitly, by components. .
Equation (89) is implemented as follows: We specify that s represents the complex variable in Equations (70)-(73). Figure 6 shows the implementation in MATLAB/Simulink of the FDO-type observer using the equations defined explicitly by components (94)-(100).

Numerical Simulations
For the numerical simulations performed in MATLAB/Simulink and presented in this section, the PMSM parameters are shown in Table 1.

Numerical Simulations-Fractional Order Speed Controllers for PMSM
The block diagram for the implementation in MATLAB/Simulink of the PMSM control system based on the FOC strategy proposed in this article is presented in Figure 7. The results of the

Numerical Simulations
For the numerical simulations performed in MATLAB/Simulink and presented in this section, the PMSM parameters are shown in Table 1.

Numerical Simulations-Fractional Order Speed Controllers for PMSM
The block diagram for the implementation in MATLAB/Simulink of the PMSM control system based on the FOC strategy proposed in this article is presented in Figure 7. The results of the behavior of the PMSM control system are presented comparatively, using the classic PI controller, FO-PI controller, TID controller, FO-lead-lag controller and FO-SMC controller for the control of the outer PMSM rotor speed control loop. The other blocks in Figure 7 implement the speed reference generator, the load torque generator, the time evolution I/O signals and the model of the PMSM drive. The sensorless function of the control system of the rotor speed is provided by the use of an SMO-type observer described in Section 6. Additionally, to detect the faults of the current sensors on the supply phases of the PMSM, an FDO-type observer as described in Section 6 is embedded in the general control structure in Figure 7. Starting from Equations (17) and (18), which represent the transfer function of the fixed part of the PMSM rotor speed control system, for the nominal parameters presented in Table 1, the theoretical transfer function of the fixed part is obtained: The discrete form obtained for the transfer function based on Equation (101) according to the Tustin method for a sampling period of 0.1 ms is: The transfer function of the fixed part of the PMSM rotor speed control system is obtained by using the MATLAB System Identification Toolbox, through identification in continuous and discrete form in Equations (103) The tuning of PI controllers by using Ziegler-Nichols methods is a well-known technique. In the fractional case, the FOMCON toolbox for the MATLAB utility program is used for the tuning of Starting from Equations (17) and (18), which represent the transfer function of the fixed part of the PMSM rotor speed control system, for the nominal parameters presented in Table 1, the theoretical transfer function of the fixed part is obtained: The discrete form obtained for the transfer function based on Equation (101) according to the Tustin method for a sampling period of 0.1 ms is: Electronics 2020, 9,1494 18 of 44 The transfer function of the fixed part of the PMSM rotor speed control system is obtained by using the MATLAB System Identification Toolbox, through identification in continuous and discrete form in Equations (103) and (104), respectively: The tuning of PI controllers by using Ziegler-Nichols methods is a well-known technique. In the fractional case, the FOMCON toolbox for the MATLAB utility program is used for the tuning of FO-PI controllers. In order to obtain the optimal tuning parameters in the fractional case, a number of optimization methods are incorporated in the FOMCON toolbox, both in the frequency range and in the time domain. In the frequency range, the goal of optimizing the parameters is achieved by obtaining optimal performance in terms of the sensitivity function S(jω) for disturbance rejection for the low and middle frequency range and the rejection of the high frequency noise using the complementary sensitivity function T(jω). In the time domain, the tuning of fractional controllers is carried out by minimizing optimal criteria, such as the integral absolute error (IAE) [41].
Using the FOMCON toolbox for MATLAB, an FO-PI controller described by Equation (20) can be tuned for the control of the PMSM rotor speed. For K p = 1.2, K i = 12, λ = 1.1, and K d = µ = 0, the transfer function of the FO-PI controller is obtained: The closed loop transfer function of the PMSM rotor speed control, where the controller is given by Equation (20) and the fixed part is given by Equation (103), is expressed in the following form: .3272 · 10 8 s 1.1 + 4.3272 · 10 9 s 3.2 + 73730s 2.2 + 4.3746 · 10 8 s 1.1 + 4.3272 · 10 9 (106) Using the FOMCON toolbox for MATLAB, the stability of the closed loop system of the PMSM rotor speed control, in other words, the fulfillment of the condition given by the relation (6) is graphically presented in Figure 8, where it is noted that the system is stable.
The step response for the FO-PI controller given by the relation (105), considering the fixed part is represented by both the theoretical transfer function and by the transfer function obtained through identification, in other words, the relations (101) and (103), respectively, is presented in Figure 9.
A similar response is noted in the two cases, with a good behavior under both the dynamic and stationary regimes and which additionally proves the similarity between the transfer function of the fixed part obtained theoretically and by identification. Figure 10 shows the closed loop system consisting of the FO-PI controller given by relation (105) and theoretical transfer function given by relation (101), Bode diagram, Nyquist diagram and Nichols diagram. The stability of the system can be inferred from the specific interpretation of these diagrams and, in addition (to the conclusions in Figure 8), an amplitude stability margin of 12 dB can be noted.
For the implementation in DSP, it is necessary to obtain the transfer function of the FO-PI controller given in Equation (105) in an equivalent form as discrete variable z, but of integer order. For this, according to those presented in Section 2, an approximation of the fractional order transfer function can be obtained with an integer-order continuous transfer function, by using the Oustaloup filter.
The step response for the FO-PI controller given by the relation (105), considering the fixed part is represented by both the theoretical transfer function and by the transfer function obtained through identification, in other words, the relations (101) and (103), respectively, is presented in Figure 9.
A similar response is noted in the two cases, with a good behavior under both the dynamic and stationary regimes and which additionally proves the similarity between the transfer function of the fixed part obtained theoretically and by identification.   Figure 10 shows the closed loop system consisting of the FO-PI controller given by relation (105) and theoretical transfer function given by relation (101), Bode diagram, Nyquist diagram and Nichols diagram. The stability of the system can be inferred from the specific interpretation of these diagrams and, in addition (to the conclusions in Figure 8), an amplitude stability margin of 12 dB can  For the implementation in DSP, it is necessary to obtain the transfer function of the FO-PI controller given in Equation (105) in an equivalent form as discrete variable z, but of integer order. For this, according to those presented in Section 2, an approximation of the fractional order transfer function can be obtained with an integer-order continuous transfer function, by using the Oustaloup filter. In the usual frequency range for the presented application ω = (10 −2 ; 10 3 ) rad/s, in Equation (107) is expressed and the equivalent transfer function obtained. In order to obtain the discrete form of this equivalent transfer function, the Tustin substitution is used, and the obtained discrete transfer function is expressed in Equation (108) Another fractional order controller is presented in Equation (21) and for K t = 1.2, K i = 12, n = 10, and K d = 0, the following transfer function of the fractional order TID controller is obtained: The closed loop transfer function for the fixed part presented above in Equation (103) and the TID controller given by Equation (109) is the following: The response to the unit step of the PMSM rotor speed control loop with fractional TID controller is shown in Figure 11. A good performance is noted in dynamic and stationary regime. In the usual frequency range for the presented application ω = (10 −2 ; 10 3 ) rad/s, in Equation (107) is expressed and the equivalent transfer function obtained. In order to obtain the discrete form of this equivalent transfer function, the Tustin substitution is used, and the obtained discrete transfer function is expressed in Equation (108) Another fractional order controller is presented in Equation (21) and for Kt = 1.2, Ki = 12, n = 10, and Kd = 0, the following transfer function of the fractional order TID controller is obtained: The response to the unit step of the PMSM rotor speed control loop with fractional TID controller is shown in Figure 11. A good performance is noted in dynamic and stationary regime. Proceeding as above in the case of the FO-PI controller, using the Oustaloup filter zpk, in the TID controller case the results for integer-order will be as follows:  Figure 11. Unit step response of the PMSM rotor speed control system with transfer function obtained through identification for the fixed part and fractional TID controller.
Proceeding as above in the case of the FO-PI controller, using the Oustaloup filter zpk, in the TID controller case the results for integer-order will be as follows: Electronics 2020, 9, 1494 22 of 44 In case of another fractional order controller which is presented in Equation (23), and for k' = 300, x = 50, λ = 1.4 and α = 0.11, the following transfer function of the FO-lead-lag controller is obtained: 3.606 · 10 8 s 2.1 + 7.373 · 10 4 s 1.1 + 4.74 · 10 6 (113) The closed loop transfer function for the fixed part presented above in Equation (103) and the FO-lead-lag controller given by Equation (113) is the following: H CL_LL = abs 1.0561 · 10 11 − 6.942 · 10 9 · i s 2.1 + 73730s 1.1 + abs(1.0561 · 10 11 − 6.942 · 10 9 · i) The response to the unit step of the PMSM rotor speed control loop with the FO-lead-lag controller is shown in Figure 12. Furthermore, for this type of fractional order controller a good performance is noted in the dynamic and stationary regimes. In case of another fractional order controller which is presented in Equation (23), and for k' = 300, x = 50, λ = 1.4 and α = 0.11, the following transfer function of the FO-lead-lag controller is obtained: The closed loop transfer function for the fixed part presented above in Equation (103) and the FO-lead-lag controller given by Equation (113)  The response to the unit step of the PMSM rotor speed control loop with the FO-lead-lag controller is shown in Figure 12. Furthermore, for this type of fractional order controller a good performance is noted in the dynamic and stationary regimes. By using the Oustaloup filter zpk in the FO-lead-lag controller case the results for integer-order will be as follows:   By using the Oustaloup filter zpk in the FO-lead-lag controller case the results for integer-order will be as follows:  Figure 13 presents the results of the simulation of the PMSM rotor speed control, where the speed controller is FO-PI-type and PI-type, respectively. For a speed reference of 2000 rpm, with no load torque, good dynamic and static results are obtained, but with an obvious advantage of the FO-PI controller. The variations of the stator currents i a,b,c , and of currents i d and i q are presented, and compliance with reference i dref = 0 is noted according to the FOC strategy. In Figure 14, the FO-PI controller is compared to the PI controller for the PMSM rotor speed control system, for a speed reference of 2000 rpm and a load torque of 5 Nm. The overshooting by the speed PI-type controller and the good static and dynamic performance provided by the speed FO-PI-type controller can be noted in the detail in the said figure. The parametric robustness provided by the FO-PI controller for the PMSM rotor speed control loop is presented in Figure 15, where, for the speed and load torque references presented in Figure  14 plus a 50% increase of the J parameter (combined inertia of rotor and load), it is presented by maintaining a response with good dynamic and stationary performance. In Figure 14, the FO-PI controller is compared to the PI controller for the PMSM rotor speed control system, for a speed reference of 2000 rpm and a load torque of 5 Nm. The overshooting by the speed PI-type controller and the good static and dynamic performance provided by the speed FO-PI-type controller can be noted in the detail in the said figure. In Figure 14, the FO-PI controller is compared to the PI controller for the PMSM rotor speed control system, for a speed reference of 2000 rpm and a load torque of 5 Nm. The overshooting by the speed PI-type controller and the good static and dynamic performance provided by the speed FO-PI-type controller can be noted in the detail in the said figure. The parametric robustness provided by the FO-PI controller for the PMSM rotor speed control loop is presented in Figure 15, where, for the speed and load torque references presented in Figure  14 plus a 50% increase of the J parameter (combined inertia of rotor and load), it is presented by maintaining a response with good dynamic and stationary performance. The parametric robustness provided by the FO-PI controller for the PMSM rotor speed control loop is presented in Figure 15, where, for the speed and load torque references presented in Figure 14 plus a 50% increase of the J parameter (combined inertia of rotor and load), it is presented by maintaining a response with good dynamic and stationary performance. Electronics 2020, 9, Figure 16 shows the response of the control system in the case of ωref = 300 rpm and double the nominal load torque, TL = 10 Nm. Figure 16 also shows the time evolution of the electromagnetic torque, of the stator currents, as well as currents id and iq. A very good response time (12 ms) is noted, given the lack of overshooting and the evolution of the id current around zero. For the implementation of the FO-SMC-type control described in Section 4, the parameters ε = 300, q = 200, c = 100 and μ = 0.55 were selected.     Figure 16 shows the response of the control system in the case of ωref = 300 rpm and double the nominal load torque, TL = 10 Nm. Figure 16 also shows the time evolution of the electromagnetic torque, of the stator currents, as well as currents id and iq. A very good response time (12 ms) is noted, given the lack of overshooting and the evolution of the id current around zero. For the implementation of the FO-SMC-type control described in Section 4, the parameters ε = 300, q = 200, c = 100 and μ = 0.55 were selected.    The parametric robustness of the PMSM control system is noted in Figure 18, where, for the same speed and load torque references in Figure 17, however, with a 100% increase of J parameter and an added uniformly distributed noise, good static and dynamic performances are noted, while there is an override of less than 2%. For a comparison between the performance obtained for the PMSM rotor speed control by using the speed PI controller, the FO-PI speed controller, the TID speed controller, the FO-lead-lag speed controller and the FO-SMC speed controller, Figure 19 shows the system response in closed loop for a reference of 300 rpm and a load torque of 10 Nm. The superiority of the speed FO-PI-type speed controller, TID-type speed controller, FO-lead-lag speed controller and FO-SMC speed controller over the speed PI-type controller is noted. This can be intuited by the fact that the first two controllers mentioned have a higher number of tuning parameters than the PI-type controller, and their mathematical model can be considered more accurate due to the use of the fractional calculus The parametric robustness of the PMSM control system is noted in Figure 18, where, for the same speed and load torque references in Figure 17, however, with a 100% increase of J parameter and an added uniformly distributed noise, good static and dynamic performances are noted, while there is an override of less than 2%. The parametric robustness of the PMSM control system is noted in Figure 18, where, for the same speed and load torque references in Figure 17, however, with a 100% increase of J parameter and an added uniformly distributed noise, good static and dynamic performances are noted, while there is an override of less than 2%. For a comparison between the performance obtained for the PMSM rotor speed control by using the speed PI controller, the FO-PI speed controller, the TID speed controller, the FO-lead-lag speed controller and the FO-SMC speed controller, Figure 19 shows the system response in closed loop for a reference of 300 rpm and a load torque of 10 Nm. The superiority of the speed FO-PI-type speed controller, TID-type speed controller, FO-lead-lag speed controller and FO-SMC speed controller over the speed PI-type controller is noted. This can be intuited by the fact that the first two controllers mentioned have a higher number of tuning parameters than the PI-type controller, and their mathematical model can be considered more accurate due to the use of the fractional calculus For a comparison between the performance obtained for the PMSM rotor speed control by using the speed PI controller, the FO-PI speed controller, the TID speed controller, the FO-lead-lag speed controller and the FO-SMC speed controller, Figure 19 shows the system response in closed loop for a reference of 300 rpm and a load torque of 10 Nm. The superiority of the speed FO-PI-type speed controller, TID-type speed controller, FO-lead-lag speed controller and FO-SMC speed controller over the speed PI-type controller is noted. This can be intuited by the fact that the first two controllers mentioned have a higher number of tuning parameters than the PI-type controller, and their mathematical model can be considered more accurate due to the use of the fractional calculus for integration and differentiation operators. Of the four speed controllers compared, the superiority is apparent for the speed FO-SMC-type controller which does not feed any overshooting, and the response time is below 15 ms for the nominal load torque. The value of the speed/torque ripple is defined as follows: where N represents the number of samples, x and x ref represent the rotor speed/torque and the prescribed reference of speed/torque, respectively. Table 2 compares a number of performance indices obtained by using fractional speed controllers for a reference speed ω ref = 300 rpm and a load torque reference T L = 10 Nm. The performances of these types of controllers are presented both in the case of nominal parameters, and in the case of J parameter doubling. It can be noted that the fractional controllers and especially the FO-SMC speed controller have superior performance.  Figure 20 shows the evolution of the SMO-type observer for the estimation of the PMSM rotor speed. Very good stationary results are noted, except for the first 100 ms, when, normally, at the start of PMSM, it is controlled in the open loop, according to a predefined sequence.

Numerical Simulations for Rotor Speed Estimation and Fault Detection
The numerical simulation parameters L 1 = 150,000 and L 2 = 50 (amplification factors of the FDO-type observer) are selected to test the efficiency of the FDO-type observer described in Section 6. Thus, Figure 21 shows the efficiency of this type of observer due to the fact that it very precisely reconstructed the currents i α and i β together with the outputs z α and z β provided by Equation (84), which describes the implementation of the FDO-type observer under the conditions where faults of the current sensors may occur.
Based on Equations (91)-(93), which express the relationships between the fault flags on phases α and β in the α-β reference frame and the real supply phases a, b, c of the PMSM, Figure 22 shows that, for the occurrence of a fault on phase a, it is detected, and a specific fault flag is set to logic 1, during the occurrence of such a fault of the current sensor. The detection threshold used is 4 A, and a fast response of the FDO-type observer of 60 ms is noted. The numerical simulation parameters L1 = 150,000 and L2 = 50 (amplification factors of the FDO-type observer) are selected to test the efficiency of the FDO-type observer described in Section 6. Thus, Figure 21 shows the efficiency of this type of observer due to the fact that it very precisely reconstructed the currents iα and iβ together with the outputs zα and zβ provided by Equation (84), which describes the implementation of the FDO-type observer under the conditions where faults of the current sensors may occur. Based on Equations (91)-(93), which express the relationships between the fault flags on phases α and β in the α-β reference frame and the real supply phases a, b, c of the PMSM, Figure 22 shows that, for the occurrence of a fault on phase a, it is detected, and a specific fault flag is set to logic 1, during the occurrence of such a fault of the current sensor. The detection threshold used is 4 A, and a fast response of the FDO-type observer of 60 ms is noted.
The response time of the FDO-type observer is the time between the moment of occurrence of a fault of the sensor and the setting of the fault flag, under the conditions where the occurrence of false fault detections is eliminated by setting of the 4 A threshold, and the disturbance on the system (d1  The numerical simulation parameters L1 = 150,000 and L2 = 50 (amplification factors of the FDO-type observer) are selected to test the efficiency of the FDO-type observer described in Section 6. Thus, Figure 21 shows the efficiency of this type of observer due to the fact that it very precisely reconstructed the currents iα and iβ together with the outputs zα and zβ provided by Equation (84), which describes the implementation of the FDO-type observer under the conditions where faults of the current sensors may occur. Based on Equations (91)-(93), which express the relationships between the fault flags on phases α and β in the α-β reference frame and the real supply phases a, b, c of the PMSM, Figure 22 shows that, for the occurrence of a fault on phase a, it is detected, and a specific fault flag is set to logic 1, during the occurrence of such a fault of the current sensor. The detection threshold used is 4 A, and a fast response of the FDO-type observer of 60 ms is noted.
The response time of the FDO-type observer is the time between the moment of occurrence of a fault of the sensor and the setting of the fault flag, under the conditions where the occurrence of false fault detections is eliminated by setting of the 4 A threshold, and the disturbance on the system (d1   Figure 23 presents the block diagram of the MATLAB/Simulink implementation of the PMSM sensorless control system based on the synergetic current control or the FO-synergetic current control for the inner current loops control.

Numerical Simulations-Fractional Order Synergetic Current Controllers and PI Speed Controller for PMSM
The main functional blocks represented in the block diagram of the control system are: the PI The response time of the FDO-type observer is the time between the moment of occurrence of a fault of the sensor and the setting of the fault flag, under the conditions where the occurrence of false fault detections is eliminated by setting of the 4 A threshold, and the disturbance on the system (d 1 and d 2 , described in Equation (80) used the in this numerical simulation is a uniform random variable with amplitude in the range −10 to 10 A. Figure 23 presents the block diagram of the MATLAB/Simulink implementation of the PMSM sensorless control system based on the synergetic current control or the FO-synergetic current control for the inner current loops control.  Figure 23 presents the block diagram of the MATLAB/Simulink implementation of the PMSM sensorless control system based on the synergetic current control or the FO-synergetic current control for the inner current loops control.

Numerical Simulations-Fractional Order Synergetic Current Controllers and PI Speed Controller for PMSM
The main functional blocks represented in the block diagram of the control system are: the PI speed controller which supplies current iqref (idref = 0 according to the FOC control strategy), the speed reference generator, the synergetic controller or the FO-synergetic controller, the load torque generator, the PMSM motor drive, the SMO-type observer, the acceleration and deceleration of the rotor angular velocity and the Clarke and Park transformation.
The synergetic current controllers or the FO-synergetic current controller block provides the controls ud and uq by implementing Equations (49)-(51) and (53) for the synergetic current control, and Equations (59) and (65) for the FO-synergetic current control, respectively.  The main functional blocks represented in the block diagram of the control system are: the PI speed controller which supplies current i qref (i dref = 0 according to the FOC control strategy), the speed reference generator, the synergetic controller or the FO-synergetic controller, the load torque generator, the PMSM motor drive, the SMO-type observer, the acceleration and deceleration of the rotor angular velocity and the Clarke and Park transformation.
The synergetic current controllers or the FO-synergetic current controller block provides the controls u d and u q by implementing Equations (49)-(51) and (53) for the synergetic current control, and Equations (59) and (65) for the FO-synergetic current control, respectively.
For a speed reference of 500 rpm and a torque load of 1 Nm when using a synergetic controller, Figure 24 presents the qualitatively superior response of the system with an override below 8%, but with a notable performance response time of 2 ms.
In Figure 25, by replacing the synergetic controller with the FO-synergetic controller, for the same conditions presented in Figure 24, the reduction of the override to 4% and an excellent performance determined by the 1 ms response time are noted. For a speed reference of 500 rpm and a torque load of 1 Nm when using a synergetic controller, Figure 24 presents the qualitatively superior response of the system with an override below 8%, but with a notable performance response time of 2 ms. For the numerical simulations in which the FO-synergetic type controller is used, the parameters described in Section 5 are: kiq = 10,000, kq = 10,000, iqmax = 50, Td = 3, Tq = 3, kid = 10,000 and μ = 0.5 (for Equations (54) and (60)).
In Figure 25, by replacing the synergetic controller with the FO-synergetic controller, for the same conditions presented in Figure 24, the reduction of the override to 4% and an excellent performance determined by the 1 ms response time are noted.   For the numerical simulations in which the FO-synergetic type controller is used, the parameters described in Section 5 are: kiq = 10,000, kq = 10,000, iqmax = 50, Td = 3, Tq = 3, kid = 10,000 and μ = 0.5 (for Equations (54) and (60)).
In Figure 25, by replacing the synergetic controller with the FO-synergetic controller, for the same conditions presented in Figure 24, the reduction of the override to 4% and an excellent performance determined by the 1 ms response time are noted.   Figure 26 presents the comparative time evolution of the numerical simulation for the FOC strategy with PI current controllers, synergetic current controllers and FO-synergetic current controllers of the PMSM. Figure 26 shows that very good performance achieved by using the synergetic control for the inner current loops i d and i q . Obviously, due to the additional control parameters, between the two types of synergetic control, the best performance is obtained by using the FO-synergetic current controllers. Figure 26 presents the comparative time evolution of the numerical simulation for the FOC strategy with PI current controllers, synergetic current controllers and FO-synergetic current controllers of the PMSM. Figure 26 shows that very good performance achieved by using the synergetic control for the inner current loops id and iq. Obviously, due to the additional control parameters, between the two types of synergetic control, the best performance is obtained by using the FO-synergetic current controllers.  Table 3 compares a number of performance indices obtained by using fractional current controllers for a reference speed ωref = 500 rpm and a load torque reference TL = 1 Nm. The performances of these types of controllers are presented both in the case of nominal parameters, and in the case of J parameter doubling. It can be noted that the synergetic controllers, and especially the FO-synergetic current controller, have superior performance.   Table 3 compares a number of performance indices obtained by using fractional current controllers for a reference speed ω ref = 500 rpm and a load torque reference T L = 1 Nm. The performances of these types of controllers are presented both in the case of nominal parameters, and in the case of J parameter doubling. It can be noted that the synergetic controllers, and especially the FO-synergetic current controller, have superior performance.

Numerical Simulations-Fractional Order Speed Controllers and Fractional Order Synergetic Current Controller for PMSM
This subsection presents the numerical simulations for the structure proposed in this article, namely, an FOC control strategy of the PMSM where the speed controller is of the SMC or FO-SMC types, and the controllers for the current control loops are of synergetic and FO-synergetic type. Figure 27 shows the block diagram of the MATLAB/Simulink implementation.

Controller for PMSM
This subsection presents the numerical simulations for the structure proposed in this article, namely, an FOC control strategy of the PMSM where the speed controller is of the SMC or FO-SMC types, and the controllers for the current control loops are of synergetic and FO-synergetic type. Figure 27 shows the block diagram of the MATLAB/Simulink implementation. For the implementation of the FO-SMC-type control described in Section 4, the parameters ε = 300, q = 200, c = 100 and μ = 0.55 were selected, and for the FO-synergetic type controller described in Section 5, the parameters kiq = 10,000, kq = 10,000, iqmax = 50, Td = 3, Tq = 3, kid = 10,000 and μ = 0.5, for Equations (54) and (60), were selected.
The evolution of the time response for the PMSM control system with FO-SMC speed controller and FO-synergetic current controller for ωref = 500 rpm, TL = 1 Nm is presented in Figure 28. Very good static and dynamic performances can be noted, of which we mention the response time of 0.92 ms and an overshoot of less than 1.2%. For the implementation of the FO-SMC-type control described in Section 4, the parameters ε = 300, q = 200, c = 100 and µ = 0.55 were selected, and for the FO-synergetic type controller described in Section 5, the parameters k iq = 10,000, k q = 10,000, i qmax = 50, T d = 3, T q = 3, k id = 10,000 and µ = 0.5, for Equations (54) and (60), were selected.
The evolution of the time response for the PMSM control system with FO-SMC speed controller and FO-synergetic current controller for ω ref = 500 rpm, T L = 1 Nm is presented in Figure 28. Very good static and dynamic performances can be noted, of which we mention the response time of 0.92 ms and an overshoot of less than 1.2%. In Figure 29, under the same conditions, but for a load torque of 10 Nm, very good performances of the PMSM control system with a response time of 1.2 ms are also obtained. The parametric robustness of the proposed control system is demonstrated in Figure 30 by obtaining a response time of 1.6 ms under the conditions where a uniformly distributed noise with 0.2 Nm magnitude additionally acts on the load torque, J parameter has a 100% increase, and also the stator resistance Rs has double the nominal value. In Figure 29, under the same conditions, but for a load torque of 10 Nm, very good performances of the PMSM control system with a response time of 1.2 ms are also obtained. The parametric robustness of the proposed control system is demonstrated in Figure 30 by obtaining a response time of 1.6 ms under the conditions where a uniformly distributed noise with 0.2 Nm magnitude additionally acts on the load torque, J parameter has a 100% increase, and also the stator resistance R s has double the nominal value. Figure 28. Simulation of the PMSM time evolution with FO-SMC speed controller and FO-synergetic current controller-ωref = 500 rpm, TL = 1 Nm, (ε = 300, q = 200, c = 100 and μ = 0.55 for FO-SMC speed controller), (kiq = 10,000, kq = 10,000, iqmax = 50, Td = 3, Tq = 3, kid = 10,000 and μ = 0.5 for FO-synergetic current controllers).
In Figure 29, under the same conditions, but for a load torque of 10 Nm, very good performances of the PMSM control system with a response time of 1.2 ms are also obtained. The parametric robustness of the proposed control system is demonstrated in Figure 30 by obtaining a response time of 1.6 ms under the conditions where a uniformly distributed noise with 0.2 Nm magnitude additionally acts on the load torque, J parameter has a 100% increase, and also the stator resistance Rs has double the nominal value.    Table 4 presents the comparative results of the performance of these control systems according to: overshoot, settling time, steady state error and speed ripple defined in relation (117). It is obvious that the control system proposed in this article based on FO-SMC speed controller and FO-synergetic current controllers has the best performance.
It is obviously noticeable that the values obtained for the settling time are 0.92 ms under nominal parameters of the PMSM, along with the other performance indices which can be considered as very good for the FO-SMC speed controller and the FO-synergetic current controller. The PMSM used in these numerical simulations is implemented in Power Systems/Simscape Electrical toolbox from Simulink, and in many scientific papers it is used as benchmark, and, to our   Table 4 presents the comparative results of the performance of these control systems according to: overshoot, settling time, steady state error and speed ripple defined in relation (117). It is obvious that the control system proposed in this article based on FO-SMC speed controller and FO-synergetic current controllers has the best performance.
the FO-synergetic current controller is the best settling time obtained for a usual range of the speed reference and load torque, and for any other proposed controllers.
In addition, under the same conditions as a classic FOC-type control system of a PMSM, Figure 32 also shows an improvement in the THD of the currents in the PMSM supply phases. Thus, THD is reduced from 50% to 22%. Obviously, for further reduction of the THD, additional specialized systems as those presented in [42] can also be added.   It is obviously noticeable that the values obtained for the settling time are 0.92 ms under nominal parameters of the PMSM, along with the other performance indices which can be considered as very good for the FO-SMC speed controller and the FO-synergetic current controller. The PMSM used in these numerical simulations is implemented in Power Systems/Simscape Electrical toolbox from Simulink, and in many scientific papers it is used as benchmark, and, to our best knowledge, the settling time of 0.92 ms obtained when using the FO-SMC speed controller and the FO-synergetic current controller is the best settling time obtained for a usual range of the speed reference and load torque, and for any other proposed controllers.
In addition, under the same conditions as a classic FOC-type control system of a PMSM, Figure 32 also shows an improvement in the THD of the currents in the PMSM supply phases. Thus, THD is reduced from 50% to 22%. Obviously, for further reduction of the THD, additional specialized systems as those presented in [42] can also be added.

Experimental Results
For the experimental validation of the simulations of the proposed PMSM control algorithms, which were presented and validated by numerical simulations in the previous section, this section presents the development platform used for their real time implementation in embedded systems.
The developed algorithms are implemented in MATLAB/Simulink and use dedicated functions from specialized libraries in the Model-Based Design Toolbox S32K1xx Series which contains the Automotive Math and Motor Control Library Set for NXP S32K14x devices, a toolbox which is dedicated to the PMSM control.
The hardware platform dedicated for the PMSM control for the experimental testing of the proposed algorithms is an S32K144 development kit which contains an S32K144 evaluation board (S32K144EVB-Q100), DEVKIT-MOTORGD board based on SMARTMOS GD3000 pre-driver and Linix 45ZWN24-40 PMSM type. The controller of the development platform is S32K144 MCU which is of 32bit Cortex M4F type, which has a time base of 112 MHz with 512 KB of flash memory and 54 KB of RAM.
There are also a number of dedicated hardware peripherals (FTM, ADC, PDB, PWM, timers) for the PMSM control, common analog and digital I/O processing blocks, but also a wide range of communication blocks which are common for the industrial environment. Among the communication interfaces we mention OpenSDA serial debug interface, CAN controller with CAN-FD protocol. Figure 33 shows an image of the experimental platform. The software application block diagram of the implementation in MATLAB/Simulink and Model-Based Design Toolbox S32K1xx Series NXP for the embedded system of the PMSM control system is presented in Figure 34. The main blocks presented are: data acquisition and commands, which is supervised by the dispatcher software interrupters, current controllers from inner loop and speed controller from outer loop.
There are also a number of dedicated hardware peripherals (FTM, ADC, PDB, PWM, timers) for the PMSM control, common analog and digital I/O processing blocks, but also a wide range of communication blocks which are common for the industrial environment. Among the communication interfaces we mention OpenSDA serial debug interface, CAN controller with CAN-FD protocol. Figure 33 shows an image of the experimental platform. The software application block diagram of the implementation in MATLAB/Simulink and Model-Based Design Toolbox S32K1xx Series NXP for the embedded system of the PMSM control system is presented in Figure 34. The main blocks presented are: data acquisition and commands, which is supervised by the dispatcher software interrupters, current controllers from inner loop and speed controller from outer loop. Figure 35 presents the block diagram of the software for the outer speed control loop MATLAB/Simulink model utilizing the bit accurate models for the Automotive Math and Motor Control Library Set for NXP S32K14x devices. The main blocks are: speed reference, initialization speed loop, switching block output command, classical PI speed controller and FO-PI speed controller. The Discrete Zero-Pole function from Simulink [43] is used for the implementation of the     The Discrete Zero-Pole function from Simulink [43] is used for the implementation of the FO-PI speed controller described in Section 4. Equation (108), which represents the discrete form of the FO-PI speed controller, is implemented through this function.   The inner loop for the current control runs every 0.1 ms and the outer loop for the speed control runs every 1 ms. By comparison, each program implemented for numerical simulations, presented in Section 7, runs at each 0.001 ms.
Based on FreeMaster, which is a real-time debugging monitoring software interface for data visualization, configuration and tuning of embedded software applications, the next figure presents the real time evolution of the parameters of the PMSM control system. For reasons of communication between the FreeMaster software interface from the host PC and the controller of the PMSM, the sampling time for the evolution of parameters in Figures 36-44  The following figures show the real-time evolution of the main PMSM control parameters of interest using the FO-PI speed controller. The real-time evolution of the stator currents are presented in Figure 42, the real-time evolution of i d and i q currents are presented in Figures 43 and 44 presents the real-time evolution of the electromagnetic torque.
Based on FreeMaster, which is a real-time debugging monitoring software interface for data visualization, configuration and tuning of embedded software applications, the next figure presents the real time evolution of the parameters of the PMSM control system. For reasons of communication between the FreeMaster software interface from the host PC and the controller of the PMSM, the sampling time for the evolution of parameters in Figures 36-44 is 10 ms. Figures 36-38 present the real-time evolution of the PMSM rotor speed with classical PI speed controller.             The following figures show the real-time evolution of the main PMSM control parameters of interest using the FO-PI speed controller. The real-time evolution of the stator currents are presented in Figure 42, the real-time evolution of id and iq currents are presented in Figures 43 and 44 presents the real-time evolution of the electromagnetic torque.
It can be noted that there is a similarity between the results obtained by numerical simulation in Figure 13 for the control of the PMSM using an FO-PI speed controller, ωref = 2000 rpm and no load torque, and the experimental results presented in Figures 42-44 concerning the stator currents, the electromagnetic torque and id and iq currents. Furthermore, Figures 36-41 show the superiority of the FO-PI speed controller over the classic PI speed controller, in the case of implementation in an embedded system.  The following figures show the real-time evolution of the main PMSM control parameters of interest using the FO-PI speed controller. The real-time evolution of the stator currents are presented in Figure 42, the real-time evolution of id and iq currents are presented in Figures 43 and 44 presents the real-time evolution of the electromagnetic torque.
It can be noted that there is a similarity between the results obtained by numerical simulation in Figure 13 for the control of the PMSM using an FO-PI speed controller, ωref = 2000 rpm and no load torque, and the experimental results presented in Figures 42-44 concerning the stator currents, the electromagnetic torque and id and iq currents. Furthermore, Figures 36-41 show the superiority of the FO-PI speed controller over the classic PI speed controller, in the case of implementation in an embedded system. It can be noted that there is a similarity between the results obtained by numerical simulation in Figure 13 for the control of the PMSM using an FO-PI speed controller, ωref = 2000 rpm and no load torque, and the experimental results presented in Figures 42-44 concerning the stator currents, the electromagnetic torque and id and iq currents. Furthermore, Figures 36-41 show the superiority of the FO-PI speed controller over the classic PI speed controller, in the case of implementation in an embedded system.

Conclusions
Based on fractional calculus, this article presents a number of fractional controllers for the PMSM rotor speed control loops and id and iq current control loops in the FOC-type control strategy. The proposed system for the PMSM control is based on an FO-SMC speed controller and FO-synergetic current controllers. Due to the additional control parameters generated in the structure of the fractional order controllers, superior performances are obtained for the PMSM rotor speed control. In addition, the sensorless-type PMSM control structure detects the faults of the current sensors and performs a significant reduction in the THD. The parametric robustness of the proposed control system is demonstrated by very good control performances achieved even when the uniformly distributed noise is present in the load torque TL, and under variations by 100% of the load torque TL, of the moment of inertia of J rotor and of the stator resistance Rs. The performances of

Conclusions
Based on fractional calculus, this article presents a number of fractional controllers for the PMSM rotor speed control loops and id and iq current control loops in the FOC-type control strategy. The proposed system for the PMSM control is based on an FO-SMC speed controller and FO-synergetic current controllers. Due to the additional control parameters generated in the structure of the fractional order controllers, superior performances are obtained for the PMSM rotor speed control. In addition, the sensorless-type PMSM control structure detects the faults of the current sensors and performs a significant reduction in the THD. The parametric robustness of the proposed control system is demonstrated by very good control performances achieved even when the uniformly distributed noise is present in the load torque TL, and under variations by 100% of the load torque TL, of the moment of inertia of J rotor and of the stator resistance Rs. The performances of It can be noted that there is a similarity between the results obtained by numerical simulation in Figure 13 for the control of the PMSM using an FO-PI speed controller, ω ref = 2000 rpm and no load torque, and the experimental results presented in Figures 42-44 concerning the stator currents, the electromagnetic torque and i d and i q currents. Furthermore, Figures 36-41 show the superiority of the FO-PI speed controller over the classic PI speed controller, in the case of implementation in an embedded system.

Conclusions
Based on fractional calculus, this article presents a number of fractional controllers for the PMSM rotor speed control loops and i d and i q current control loops in the FOC-type control strategy. The proposed system for the PMSM control is based on an FO-SMC speed controller and FO-synergetic current controllers. Due to the additional control parameters generated in the structure of the fractional order controllers, superior performances are obtained for the PMSM rotor speed control. In addition, the sensorless-type PMSM control structure detects the faults of the current sensors and performs a significant reduction in the THD. The parametric robustness of the proposed control system is demonstrated by very good control performances achieved even when the uniformly distributed noise is present in the load torque T L , and under variations by 100% of the load torque T L , of the moment of inertia of J rotor and of the stator resistance R s . The performances of the proposed control system are validated both by numerical simulations and experimentally, through real-time implementation in embedded systems.

Conflicts of Interest:
The authors declare no conflict of interest.