Design and Analysis of a Generalized High-Order Disturbance Observer for PMSMs With a Fuzy-PI Speed Controller

This paper proposes a generalized high-order observer for estimating total disturbance of permanent magnet synchronous motors (PMSMs). This total disturbance is dominated by load torque but also includes many other terms such as frictions, viscous force, Eddy and flux pulling forces, and noises. Comprehensive experimental results and analyses under various scenarios will be presented to find the appropriate order of the observer. We will compare the performance of zero-order observer (ZDO), first-order observer (FDO), and second-order observer (SDO) under three different scenarios of load torque. Additionally, the results of an state observer (ESO) under the same conditions are also presented. The experimental results show that FDO and SDO achieve similar performance and both of them are notably better than the ZDO and ESO. However, during the severe conditions of load torque, the SDO-based controller can achieve better performance compared to that of FDO-based controller. Moreover, fuzzy algorithm is applied to online tune the PI gains in the speed loop. The results also show that the SDO-based fuzzy-PI control scheme is effective in disturbance rejection and high-performance speed tracking. All of the experiments are carried out on a 300-W PMSM testbed with a digital signal processor (DSP).


I. INTRODUCTION
The wide usage of materials with high magnetic properties such as samarium-cobalt (SmCo), ferrite, neodymium-ironboron (NdFeB), and alnico (alloy of aluminum, nickel cobalt, and other elements) makes possible to extensively use permanent magnet synchronous motors (PMSMs) in industrial applications. Due to its compact size and ability to generate high power and effective operation at rated speed, the PMSM is successfully utilized in electric vehicles, robotics, disk drive systems, and other applications which require precise control performance [1], [2]. In PMSM drives, there are many type of disturbances such as an unexpected external load torque, unknown frictions, parameter uncertainties, and sensor noises [3]. Adding these altogether makes a total disturbance which is not easy to deal with as it includes many The associate editor coordinating the review of this manuscript and approving it for publication was Xinyu Du . terms with both fast and slow varying characteristics. In this sense, disturbance observer based control schemes, in which the disturbance is estimated and compensated in the control loop, seem to be a good choice.
In a numerous of publications, the mechanical frictions were assumed to be known whereas the other terms of disturbance such as frictions due to Eddy and flux pulling torques, noises, and unmodelling errors are neglected. Under this frame, a number of load torque observers were designed: fuzzy observer [4], active disturbance rejection control (ADRC) scheme [5], [6], H ∞ -based observer [7], polynomial observer [8], nonlinear observer [9], extended state observer (ESO) [10], [11], sliding mode observer (SMO) [12]- [16], extended Kalman filter (EKF) [17], nonlinear optimal observer [18], [19], time-varying nonlinear observer [20], linear disturbance observer [21]. Although the results showed the good performance, this kind of assumption is not realistic and not feasible in most of applications, since the frictions are typically unknown and noises are unpreventable. An observer was proposed in [22] to estimate the load torque and its cogging terms; unfortunately, the friction was still simply assumed to be known.
Another important issue that the published techniques faced is the assumption that the disturbance or its high time-derivatives is slowly varying. The methods in [4]- [7], [9]- [21], [23]- [25] assumed that the load torque was slowly-varying, i.e., its first time-derivative was zero. It is correct for the case of constant or piece-wise constant load torque; however, it is not reasonable when the load torque is continuously varying such as pulse, triangle, and sinusoidal shapes. In [8], [26], the high-order time-derivatives of the load torque/disturbance is considered as zero. Although this improve compared to the previous assumption, the performance of the observer might not be good at the transient time of pulse and the whole time of time-varying load torque such as triangular or sinusoidal shapes. A fast-terminal integral sliding-mode disturbance observer (FI-SMDO) is proposed to estimate the lumped disturbance in [27] with the assumption that the first time-derivative of disturbance is bounded. Unfortunately, this assumption is not applicable for estimating the terms of disturbance with the order larger than two. Also, it seemed that this order of observer was randomly chosen, there were no analyses or any estimation performance was shown to justify this selection.
Considering these facts, this paper proposes a generalized high-order observer for estimating the total disturbance in PMSMs. The proposed observer can solve two issues of the existing estimation techniques i.e., 1) estimate only the load torque while consider other parts such as frictions and noise are known or negligible; and 2) consider the disturbance is slowly varying at once. Based on the assumption that there is a bounded high-order time-derivative of the total disturbance, the two aforementioned issues are solved. Under a straight-forward gain tuning rule using optimal control theory, the observer gains are selected. The order of the observer is selected by step-by-step increase the order of the main assumption under different scenarios until the estimation and tracking performance are not significantly improved between two consecutive orders of the observer. The estimation value will be input to the controller, which, in this case, is proportional-integral (PI) type. For further improving the control performance, especially during the transient time, fuzzy rules will be used to online adjust the PI gains. Fuzzy logic control become popular as a one of the nonlinear, adaptive methods to systems with unknown mathematical models. Fuzzy rules have been utilized in [28] to adjust parameters of PI controller in the speed loop of the interior PMSM (IPMSM). Fuzzy rules help controller to be automatically adapted in a random environment with satisfactory dynamic and performance [29]. More recent application of fuzzy logic control can be found in [29], [30]. In this paper, comprehensive experimental results will be shown with different orders of the observer, as well as with conventional ESO. The comparison is also made between fixed-gain PI controller and fuzzy-PI controller. The results show that, although the first-order and the second-order observers possess similar estimation performance, the most appropriate control scheme is the second-order observer (i.e., assume that the second time-derivative of the total disturbance is bounded)-based fuzzy-PI controller, especially during the serious condition of the load torque. All the experiments are carried out on a 300-W PMSM testbed with a digital signal processor (DSP).

II. MATHEMATICAL MODEL
Considering a surface-mounted PMSM (SPMSM), the variation of rotor mechanical speed is decided by the difference between the generated mechanical torque and the load torque where J -a moment of inertia of the rotor, w m -mechanical speed of the rotor, T m -mechanical torque of the motor, and T L -load torque. Whereas, in general, the mechanical torque can be calculated by here T e = K t i q -electromagnetic torque, K t -a torque constant of the SPMSM, T fric -friction torque, T visc -viscous and Eddy current pulling force, T dφ m -pulling force due to the flux, with c ed -an Eddy current coefficient, c fric -a static friction constant, c hys -a hysteresis loss coefficient, d visc -a viscous damping constant, w m -a mechanical speed of the rotor, φ m -a magnetic flux linkage in a dq-frame, d ed -a Eddy current damping coefficient. So (1) can be rewritten as In (2), T L is typically considered as an external disturbance. Moreover, although T fric , T visc , and T dφ m can be calculated as in (1), their coefficients are unknown, in general. Therefore, let us define the total disturbance as then (2) can be shorten to Remark 1: Commonly, in recent papers [4]- [21], [31]- [35], it is assumed that term T fric is known whereas T visc and T dφ m are ignored when designing observers. So, essentially, the designed observers estimate only T L . However, in practice, the aforementioned disturbance terms are inevitable [36] and it is hard to know their behaviors or VOLUME 10, 2022 parameters. Therefore, it is more practical to assume that all the terms T fric , T visc , T dφ m , and T L are unknown and need to be estimated.
In practice, there might exist parameter uncertainties and noises (such as sensor noises), then they all can be combined in to the total disturbance z. For example, let us consider where J n is the nominal inertia and δJ is the unknown variations of the inertia. Also, consider an additional noise d on the left side of (2), then (4) becomes with a new z is defined as So the following assumption is used for the rest part of this paper to design the control systems: Assumption 1: 1) w m , i q , and i d are measurable; 2) T fric , T visc , T dφ m , T L , δJ , and d, hence z, are unknown.

III. GENERALIZED HIGH-ORDER TOTAL DISTURBANCE OBSERVER DESIGN
In this section, a generalized high-order observer will be designed to estimate the total disturbance. By defining x = w m , u = T e , and k = 1/J n ; (6) becomes, with A = 0, B = k, C = 1, and D = −k. Assumption 2: Let the total disturbance to be continuous and its high-order time derivatives are upper bounded, i.e. |z (n+1) | ≤ , where z (n+1) is the (n + 1) th -derivative of the total disturbance, represents an arbitrary positive number.
Note that recent published methods require the assumption that the disturbance is slowly varying [4]- [7], [9]- [21] or the highest order time derivative [8], [26] is zero. In Assumption 2, we only need the highest order derivative of the disturbance is bounded, which is much more practical. Apparently, the Assumption 2 can be expressed by the following equations where T , N , and M stand for system matrices, s is a vector of derivatives of the disturbance z with T = 0 I n 0 0 1×n , in which I n is identity matrices of the given dimension and z (0) = z. By combining (8) and (9), the system of the following form can be constructed Then the proposed generalized observer, which estimates the total disturbance and its high-order derivatives can be designed as where L = W oC T R −1 o is the optimal gain for the observer, with W o is the solution of the following algebraic Riccati equationÃ in which weighting matrices Q o and R o are an (n+2)×(n + 2) positive semidefinite matrix and a positive scalar number, respectively. The gain tuning procedures of the proposed observer are provided in [37]. In short, the weighting matrices are selected to be diagonal with their elements depending on the measurement noises. If the measurement noises are high, elements of Q o are small and those of R o are big. When the measurement noises are low, it is vice versa. One important point is, in many previous high-order observer designs, e.g., [8] and [38], there is no clear gain tuning rule, so basically, the gains are selected by trial-and-error, which restrict their applications in practice.
Theorem 1: By referring to [37], the estimation errors between the states in (10) and (11) are proved to be ultimate bounded and uniform stable of an arbitrarily small ball centered at zero.

A. ZERO-ORDER DISTURBANCE OBSERVER
When n = 0, the proposed disturbance observer becomes zero-order disturbance observer (ZDO). Note that, in this case, the observer is designed with the assumption that the first time-derivative of the disturbance is bounded. The system matrices and vectors in (10) becomes As indicated, most of the published methods for PMSMs have the same form as ZDO [4]- [7], [9]- [21]. In some other papers [39], [40], the authors named the same form of observer as PI observer (PIO).

B. FIRST-ORDER DISTURBANCE OBSERVER
When n = 1, the proposed disturbance observer becomes first-order disturbance observer (FDO). In this case, the observer is designed with the assumption that the second time-derivative of the disturbance is bounded. The system matrices and vectors arẽ Based on our literature review, this is the first time a highorder observer is proposed to estimate total disturbance of PMSMs in general form. Also this is the first time when SDO is proposed for PMSM drives.
Although the high-order of the disturbance is considered and estimated, the system matricesÃ andC are very spare, and consequently, the algebraic Riccatti equation in (12) is very easy to solve. Also note that, (12) can be solved by the command 'care' in MATLAB. This makes the proposed generalized high-order observer very practical. A schematic diagram of the SDO is shown in Fig. 1.  (13) can be set as follows

IV. FUZZY-PI CONTROLLER DESIGN AND STABILITY ANALYSIS
Finally, using the rules described in (14)- (16), the output of the fuzzy-PI speed controller is summarized as (17) where σ i is a normalized weight of each fuzzy rule in (14)- (16) and ; γ i are membership functions defined for each rule. The sigmoid type membership functions are used in the proposed fuzzy-PI speed controller and expressed as where a i , b i , and F are positive constant parameters of the membership functions. Since fuzzy sets defined above represented by some fuzzy numbers which belongs to open intervals which depends onw m andẇ m , three sigmoid functions are chosen as suitable and efficient membership functions [41]. Empirical studies for the parameters of the membership functions are performed to let the rules of the fuzzy inference work effectively. VOLUME 10, 2022 Remark 2: The output of the fuzzy speed controller in (17) represents the total torque on the right side of (6). To compensate the effect of the total disturbance, the output of the proposed observer is added with the output of the fuzzy-PI controller, hence the reference torque command is defined T ref = T fuzzyPI +ẑ. This, actually, is the estimation of the electromagnetic torque.
So the reference for i q current is calculated as

B. STABILITY ANALYSIS OF THE FUZZY-PI CONTROLLER AND THE OBSERVER-BASED CONTROL SCHEME
From (6), dynamic of the speed error can be expressed asẇ where k 1 = K t k, z = z − η k w m − γ k sign(w m ) , η = c ed + d visc and γ = c hys + c fric are unknown positive constant numbers. Note that the term ηw m and γ sign(w m ) represents the T visc and T fric , respectively in (1).
Theorem 2: By referring to [42], it is proved that the speed error in (20) asymptotically converges to zero.
Proof: From Theorem 2, speed tracking errorw m given in (20) is stable at zero. And from Theorem 1, the estimation error e obs in (21) is also stable at zero. Then, using Lemma 1, it reveals that the speed error and estimation error are stable at zero. Fig. 2 depicts the overall diagram of the proposed control scheme.

V. EXPERIMENTAL RESULTS
The experiments are conducted on the 300-W SPMSM setup manufactured by Lucas-Nuelle as shown in Fig. 3. A threephase induction motor (IM) servo-drive is utilized to supply a load torque. This servo-drive is controlled via the servo-machine control unit. The parameters of the SPMSM     are listed in Table 1. The algorithm is written in the MAT-LAB/Simulink environment and then translated to C language to implement on the DSP of the setup. Fig. 4 shows     three scenarios of the load torque commands that will be used in this paper to analyze the performance of the proposed observers and controllers as well as compared with the conventional ones.

A. OBSERVER ORDER AND PARAMETERS DESIGN
First, we design ZDO and tune the gains for this ZDO to achieve the satisfied performance. After that, the FDO is designed in order to see if FDO is better than ZDO under the same three scenarios. It is shown that the performance of the FDO is superior compared to that of ZDO. Therefore,    we continue design the SDO and tune for the gains. In this case, the results show that the performance of SDO and FDO VOLUME 10, 2022 are similar. So, we stop increasing the order of the observer. The selected gains of ZDO, FDO, and SDO are shown in the Table 2. Here we also implement ESO [10], [11] in all cases for comparison. And the controller in this case is conventional (fixed-gain) PI type. Fig. 5(a) illustrates the estimation performance of the observers, i.e., ZDO, FDO, SDO, and ESO whereas Fig. 5(b) show the speed tracking of the conventional PI controller using these four observers under the Case 1 of load torque. In Fig. 5(a), the continuous red line is the electromagnetic torque T e and the dash back dash line is the estimated total disturbanceẑ. At steady-state, the total disturbance is equal to the electromagnetic torque. As we cannot measure the real total disturbance, here we use the electromagnetic torque, instead. It is show that the estimation performance of FDO and SDO are similar and both of them are better than ESO and ZDO. This can be explained by their (ZDO's and ESO's) lack of the high-order terms to estimate the fast-varying term of the total disturbance. In Fig. 5(b), the comparative tracking performance is presented. Note that the speed reference is set at 2000 rpm. It can be seen that the tracking performance of the ESO-based controller is the worst, whereas it is not easy to check which is the best. In order to show the difference of these four methods, the quantitative performance are summarized in Table 3. In this table, the integral of absolute error (IAE) and integral of time absolute error (ITAE) are shown for both estimation and tracking errors. The statistics in Table 3 confirms that ESO is the worst both in estimation and tracking performance. It can be also observed from the Table 3  Until this point, it can be concluded that: 1) The estimation and tracking performance of FDO and SDO are very similar. 2) It seems that tracking performance of the SDO-based PI controller is better than that of the FDO-based PI controller, especially for the severe conditions of load torque.

B. PROPOSED OBSERVER-BASED FUZZY-PI CONTROL
The gains of the fuzzy-PI speed controller and fixed-gain (conventional) PI speed controller are presented in Table 6, whereas the parameters for fuzzy rules are summarized in Table 7. In this subsection, we will compare the SDO-based fixed-gain PI and the SDO-based fuzzy-PI control methods. Fig. 8 shows the direct and quadrature axes currents (i d and i q ) and speed responses of these two control schemes when the load torque changes abruptly from zero to 0.8 N · m. The associated quantitative performance are summarized in Table 8. It can be observed from the Fig. 8 and Table 8 that, the SDO-based fuzzy-PI controller is better than SDObased fixed-gain PI controller in both criteria, IAE and ITAE (fuzzy PI/ fixed-gain PI, IAE: 12.5875/14.0875, ITAE: 3.0056/3.3350).
With the aforementioned results and analyzes, it is revealed that: 1) The proposed high-order observer is better than the conventional ESO. 2) FDO and SDO show similar performance and both of them are better than ZDO.
3) The SDO-based PI controller is slightly better than the FDO-based PI controller during the extreme conditions of load torque 3) The SDO-based fuzzy-PI controller achieves the better performance than the SDO-based fixed-gain PI controller.

VI. CONCLUSION
This paper presents a comprehensive analysis to select the order of observer in the framework of a generalized high-order observer to estimate the total disturbance in PMSMs. Also, a novel control scheme consisting of a fuzzy-PI speed controller and the proposed generalized high-order observer is presented. The experimental results show that the proposed estimation algorithms perform better than ESO under various scenarios of load torque, even with lowest order (SDO). The results also show that the SDO-based controller seems slightly better than the FDO-based controller during the serious load torque conditions. In normal conditions of load torque, it seems that SDO and FDO give similar estimation and tracking performance. The fuzzy PI speed controller is designed to further improve the tracking performance. The comparative results reveal that the proposed high-order observer-based fuzzy-PI speed controller is very effective for controlling PMSM drives not only because of its robustness but also because of its simplicity and practicality.