Speed‐loop frequency‐adaptive and current‐loop optimal harmonic periodic controllers for fault‐tolerant SPMSM drive systems

Ministry of Science and Technology, Taiwan, Grant/ Award Number: MOST 108‐2221‐E‐011‐085 Abstract The surface permanent magnet synchronous motor (SPMSM) drive system has been widely used in the industry due to its high power density, high efficiency and easy to control. nature The author proposes a speed‐loop frequency‐adaptive periodic controller and a current‐loop optimal harmonic periodic controller for a fault‐tolerant SPMSM drive system, including normal operating conditions and faulty operating conditions. The faulty conditions consist of an insulated gate bipolar transistor (IGBT) open‐circuit and an IGBT short‐circuit. A digital signal processor, TMS‐320F‐2808, manufactured by Texas Instruments, is used as a control centre to execute the proposed fault‐detection, fault‐diagnosis, frequency‐adaptive and optimal harmonic periodic control algorithms. Experimental results show the proposed advanced periodic controllers can provide better performance than the proportional integral controller and the classic periodic controller, including transient responses, load disturbance responses, and tracking responses under normal and faulty conditions.


| INTRODUCTION
The surface permanent magnet synchronous motor (SPMSM) has been widely used in low and middle power applications such as robotics, electric vehicles, air conditioners, and other applications in industry and home appliances, due to its simple structure, high power density and high efficiency. In industrial applications, the SPMSM drive system provides good transient responses and good load disturbance responses. The traditional proportional integral (PI) controller, however, cannot satisfy both good transient responses and good load disturbance responses. Many control algorithms have been developed for SPMSM drive systems to improve their dynamic responses, such as an adaptive control, a neural-based robust control, and a sliding-mode control. The classic periodic control (CPC) has been employed in the SPMSM drive system due to its good performance [1,2]. In order to improve the dynamic response and to reduce its overshoot, the CPC is used to achieve zero steady-state error tracking of any periodic signals due to its high gains at certain harmonic frequencies.
However, frequency variations can lead to a mismatch between the systems' nominal internal model and the actual periodic references and may shift high gains away from the actual frequency. Thus, the CPC schemes may fail to accurately track periodic signals at a varying frequency condition [3,4]. Moreover, the CPC is generally in its digital form, which requires the period of the references to be represented as an integer multiple of the sample time of the digital control system. This implies that the period of the periodic signal must be an integer; however, in the real world, the period is not an exact integer [5,6]. The varying frequency often induces the fractional period harmonics. This may lead the CPC to generate low gains at certain harmonic frequencies and produce poor tracking accuracy. Therefore, a frequency-adaptive periodic control (FAPC) can be a good solution that is able to self-tune the corresponding internal model to match the external signal closely. The FAPC can make the periodic signal generator period and the actual signal period become closer. The CPC is used to provide an effective way to suppress certain harmonics. For example, in the SPMSM drive system, 6k � 1 and 6k � 2 harmonics dominate the total harmonic distortion (THD). However, the CPC is too slow to eliminate these fixed order harmonics with a satisfactory dynamic response.
To address the above SPMSM fault-tolerant issues, the author introduce pioneer method to explore an FAPC to compensate for varying frequencies of the speed-loop and an optimal harmonic periodic controller (OHPC) to reduce certain harmonics for the current-loop. This fractional-delay filterbased internal model is the first to be proposed which provides an FAPC to compensate for varied frequency periodic signals. The FAPC is designed to improve the dynamic responses of the SPMSM drive system, including fast transient responses, load disturbance responses and tracking responses. This OHPC, which consists of two parallel selective harmonic controllers (SHC), is the first one to be used to improve the current responses. Each SHC module has an independent control gain. A generic recursive SHC module is developed to incorporate the internal models for each cluster of harmonics. The OHPC offers a fast error convergence rate and yieldsS t 0 low THD with high tracking accuracy. In addition, the study is the first to use the daxis current error and the q-axis current error to detect and diagnose the faulty condition of an SPMSM, and by using this method, the required detection and diagnosis time can be effectively reduced. The three ideas mentioned above are original according to the authors' knowledge 2 | FAULT-TOLERANT SPMSM DRIVE SYSTEM SPMSM drive system failures can be categorised into two types: motor failure and hardware circuit failure. Motor failure includes bearing damage, open winding and partially shortcircuited winding. Hardware circuit failure includes inverter failure, current sensor failure and encoder failure. The inverter is susceptible to failures, but not the motor.

| Fault tolerant inverter
Several fault diagnosis methods have been previously proposed. For example, Kontarcek et al. proposed a current predictive method for open-phase fault detection. However, this method requires a lot of computations [7]. Jung et al. investigated a model reference adaptive method-based voltage distortion observer. This method, however, needs very complicated computations [8]. Naidu et al. proposed an x-by-wire drive system, but the detection and diagnosis method was not discussed [9]. To fill this gap, the authors propose a new fault detection and fault diagnosis method.
The fault-tolerant inverter is shown in Figure 1, which includes six insulated gate bipolar transistors (IGBTs) S a , S a 0 , S b , S b 0 , S c and S c 0 , and two back-up IGBTs, S t and . Six TRIACs are added to isolate the faulty leg and to connect the back-up leg. In addition, three high-speed fuses F a , F b and F c are inserted into the fault-tolerant inverter as well. We use the aphase short-circuit as an example, when the a-phase upper-leg and lower-leg short-circuit, the F a high-speed fuse quickly burns out. The a-phase then becomes an open-circuit. After the a-phase open-circuit is detected and diagnosed by the digital signal processor (DSP), the DSP turns off the TRIAC T af ; and turns on the TRIAC T at: As a result, the back-up IGBTs S t and S t 0 are used to replace the original a-phase IGBTs S a and S a 0 . Then a fault tolerant configuration is established. Further, the author investigates the fault-tolerant drive system for an open-circuit fault and a short-circuit fault of the inverter. Figure 2 shows a block diagram of the proposed fault diagnosis method. The i x in the block diagram shows that the input represents the a-phase, b-phase and c-phase measured currents, i a , i b and i c , respectively. The three-phase currents of the motor i a , i b and i c are converted into d-q axis currents by using the a-b-c axis to d-q axis coordinate transformation. Under faulty conditions, the amplitude of the d-q axis currents is calculated as follows ji s j ¼ ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi ffi

| Fault diagnosis method
where ji s j is the amplitude of the d-q axis currents. Then, the input measured currents i a , i b and i c can be normalised as Under the normal condition, the normalised current is a balanced sinusoidal current and has a fixed amplitude within the range of ±1. To obtain a positive average value, the threephase sinusoidal currents, i a , i b and i c are rectified and shown as ji xN j in Figure 2. The average values of the three-phase currents are computed every cycle. Finally, three diagnosis parameters e x are used as the index of the fault detection. The e x is shown as where 〈ji xN j〉 nc is the average absolute value of the three-phase normalised current under normal conditions. The value of the 〈ji xN j〉 nc is equal to 2 π . The diagnosis parameter e x , in which x represents the a-phase, b-phase, or c-phase, described in Equation (3) have a special characteristic feature that allows the DSP to detect and diagnose the fault. When the drive system is operated under normal operating conditions, all the diagnosis parameters, which are represented bye x , are near zero. However, in the real world, to avoid the noise interruption, a 20% margin can be selected. As a result, the threshold,Th f , is selected as the absolute value of 0.13 by the authors. When a one-IGBT is opened or short-circuited, the diagnosis parameter e x of the corresponding faulty phase has a positive value, while the other two normal phases have negative values of their diagnosis parameter, e x . Therefore, the fault detection and phase diagnosis can be obtained by comparing the parameters e x to a threshold, Th f . The relationship is expressed as follows When all of the diagnosis signals are less than the fault threshold, Th f , and all e x are near zero, the motor drive system is operated under normal conditions. However, when one or some of the diagnosis signals, in which je x j is or are larger than the threshold, Th f , the motor can be operated either under faulty conditions or under external load added conditions. Further, the load threshold T h l is compared to i d to identify whether a faulty condition occurs or an external load is added. The faulty condition matches the following inequality In summary, if ji d j ≤ Th l and je x j ≤ Th f , the drive system is operated at a normal condition. However, if ji d j ≤ Th l and je x j ≥ Th f , the drive system is at a normal condition but with an external load. Otherwise, if ji d j ≥ Th l and je x j ≥ Th f the drive system is operated at a faulty condition. However, the selection of T h l depends on the real physical condition.
The flux of the SPMSM is provided by the permanent magnet on the rotor. As a result, the d-axis current command is set at zero. By using the d-axis current regulation, the real d-axis current is below �0.5A. Considering the interruption of the noise, the Th l is selected as an absolute value of 1A. Compared to previous research [7][8][9], the proposed method has the following advantages. For example, the proposed method requires very simple computations. As a result, the detection time is less than 2 ms; however, the detection time of previous research is near 5 ms [8]. Furthermore, the proposed method is very accurate because both the i d and e x are used to execute the fault detection and diagnosis.

| Classical periodic controller
The internal model principle states that the output of a closedloop system can track or reject the reference signal with zero steady-state error if an accurate model of the reference generator is included in the stable closed-loop system [10][11][12]. Figure 3(a) shows a periodic signal with a period of T 0 , which can be generated by a time-delay-based positive feedback loop in the continuous-time domain. According to Figure 3(a), the transfer function of the periodic signal generator is defined as is the signal period with f 0 frequency and ω 0 is the angular signal frequency. The periodic signal generator G rc ðsÞ is expanded as It can be observed from the Equation (7) that the periodic signal generator is equivalent to the parallel combination of an impulse signal, a step signal and a signal of all harmonics. In addition, the periodic signal generator has a pole at s ¼ �jnω 0 ; as a result, the periodic signal generator produces an infinite gain at several different harmonic frequencies, as shown in Figure 3(b). The infinite gain leads to zero-tracking errors at each nω 0 harmonic frequency. When the drive system uses a DSP, the Equation (6) is discretised as where N ¼ T 0 T sc with T sc being the sampling period. Based on the internal model G rc ðzÞ in Equation (8), the discrete-time domain of a CPC is shown in Figure 4. The QðzÞ is a low-pass filter.

| Frequency adaptive periodic controller
The key of an FAPC is to accurately produce a fractional delay for the internal model embedded in the controller. As a result, the block diagram of an FAPC is similar to Figure 4 but has a non-integer delay step N s . Moreover, the FAPC control algorithm is simplified in here. In the real world, the periodic controller is usually employed in a digital form. In the discretetime domain, the internal model of an FAPC can be discretised as follows and where k rc is the controller gain, N s is the ratio between the variable sampling frequency f s and the sampling frequency f , and G f ðzÞ is a phase-lead compensator which improves the stability of the overall closed-loop system. Generally speaking, to enable the digital CPC to be frequency-adaptive, a variable sampling rate f s is used.
Compared to the CPC, which has a fixed sampling interval, the FAPC has a non-fixed sampling interval. However, a variable sampling interval control system can significantly increase the complexity of the implementation, such as: online timer interrupt updates and online controller redesigns. As a result, the FAPC is not easily realised [4]. In fact, using a digital periodic controller with a fixed sampling rate cannot exactly obtain the harmonics of a varying-frequency sampling interval control system. The fractional digital control system can be expressed as the following ztransformation where N i is the integer part of N s and F ¼ N s − N i is the fractional part of N s . The range of F is from zero to one. To enable the periodic controller as a frequency-adaptive controller, the easiest way is to omit the fractional delay z −F , and replace the fractional delay z −N s with the nearest integer delay, either z −N i or z −ðN i þ1Þ . In this case, the harmonic reduction ability of these integer-delay periodic controllers can seriously decay due to the omission of the fractional delay z −F ; especially, when the sampling rate f s is low. To solve this problem, a fractional delay (FD) filter with a fixed sampling rate provides a very effective approximation. With the fractional digital delay z −F developed by the FD filter, the periodic controller becomes immune to frequency variations. Among various FD filter design techniques, a traditional Lagrange interpolation method offers a simple but very effective approach to improve the computation of the coefficient updates. By using the Lagrange interpolation polynomial finiteimpulse-response FD filter, the fractional digital delay z −F can be expressed as follows where k ¼ 0; 1; :::; n, and the coefficient A k can be obtained as where i ¼ 0; 1; :::; n. To simplify the calculation, n=1 is chosen to be the Lagrange interpolation polynomial degree. This choice leads to the following approximation: and Equations (14)- (16) indicate that a Lagrange interpolationbased FIR FD filter only needs very simple multiplication and addition for the coefficient updates, and it is very suitable for fast online tuning algorithms. After some mathematical processes, we can obtain Equation (17) is the structure proposed by the authors as shown in Figure 5(a).
When n = 1 and F = 0 are chosen, which is shown in Equations (13) and (14), the results of z −F are equal to one. Therefore, in Equation (17), the FAPC becomes the CPC. The FAPC provides a general method to track or eliminate any periodic signals with an arbitrary fundamental frequency. With an increase in the degree n, a more accurate but more complicated approximation can be acquired. Generally speaking, the Lagrange interpolation-based FIR FD filter offers an effective way to enable frequency-adaptive delaybased periodic controller schemes to achieve several advantages, including smooth responses, easy explicit formulas for the coefficients, and accurate responses at low frequencies.
However, it should be pointed out that such a low-pass FD filter provides a satisfactory approximation of the fractional delay only within its bandwidth. Figure 5(b) shows the typical closed-loop control system with a plug-in frequency-adaptive digital periodic controller. In Figure 5(b), G arc ðzÞ is the transfer function of the FAPC, ω r * is the speed command, ω r ðzÞ is the output speed, and Δω r ðzÞ is the tracking error of the speed.
The proposed method uses an FAPC to cascade to the conventional speed-loop PI controller. In order to execute the speed regulation, a PI controller is used; however, for certain frequencies, the FAPC has to be used. As a result, the transient responses, load disturbance responses, and tracking responses of the SPMSM can be significantly improved. In this article, the computation of an FAPC is quite simple, and it only includes a control gain, a fractional delay time, a low-pass filter, a feedforward, and a phase-lead compensator. This computation brings only a few additions. As a result, the proposed control method is easy to implement and can be tuned online by using a DSP.
Without using the plug-in of the G arc ðzÞ, according to Figure 5(b), the transfer function H sc ðzÞ of the feedback system is where G psc ðzÞ is the transfer function of the SPMSM drive system and G csc ðzÞ is the conventional PI feedback controller. By considering the plug-in FAPC, G arc ðzÞ, and by using Mason's gain formula, one can obtain [13] and define Substituting Equations (17) and (19b) into (19a), one can obtain According to Equations (18) and (20), we can conclude that the closed-loop FAPC system is asymptotically stable if the following two stability conditions hold The above stability criteria for the FAPC drive system is similar to the CPC drive system, and the stability condition is the same as the CPC system adding a passband of the FD filter in Equation (12). When approaches 1, the stability of the FAPC, which is shown in Equation (21), is equivalent to the stability of the CPC. The parameters of the FAPC, such as a control gain k rc and a phase-lead compensator G f ðzÞ, are determined using stability analysis in the closed-loop control system. The detailed analysis is shown in reference [14] and is omitted here by the authors due to the limitation of scope. By using this similar method, we can obtain parameters of the controller, which are shown in Figure 6.

| CURRENT-LOOP OPTIMAL HARMONIC PERIODIC CONTROLLER
This section describes an internal model principle based on an OHPC, which can suppress specific harmonics in the system. In previous research, Zhou et al. proposed an internal model principle based on an OHPC for the inverter to mitigate harmonics [15]. Here, the author applies the general structure to the current-loop controller of an SPMSM. The OHPC consists of two SHC components, where each SHC module has a function to reduce nk � m harmonics. Figure 7(a) shows the complex internal model of an SHC signal in continuous-time [16]. To compensate the selected nk � m harmonics, a compact delay-based selective harmonic generator is expressed as follows G �m ðsÞ ¼ uðsÞ where n and m are integers and n > m ≥ 0. The periodic selective harmonic generator in (22) is expanded into where m ¼ 0; 1; :::; n − 1. From the Equation (23), the complex internal model of (22) is equivalent to a parallel combination of an impulse signal, a step signal and a subharmonic signal. In addition, a periodic selective harmonic generator G �m ðsÞ has a pole at s ¼ jð�nk � mÞω 0 , so the periodic selective harmonic generator produces an infinite gain at the harmonic frequencies which are shown in Figure 7(b). These harmonic frequencies are ð6k � 1Þ harmonics. The infinite gain leads to zero tracking errors at a specific harmonic frequency if G �m ðsÞ is included in the closed-loop system. Through the internal model of selective nk � m harmonics, a harmonic signal generator is obtained by combining two conjugate complex internal models, as shown in Figure 8 [17]. Their transfer function is expressed as According to Equation (24) and Figure 8, it is possible to convert the continuous-time harmonic periodic signal generator into a discrete form. Figure 9 shows the block diagram of the discrete The transfer function of the SHC in the discrete-time domain is expressed as [18]  The SHC provides a universal recursive internal model principle, which is tailored for nk � m harmonics. For example, to suppress the 5th and 7th harmonics in the motor drive system, the selected parameters n ¼ 6 and m ¼ 1are chosen, and then substituted into (25). The transfer function is simplified as Furthermore, to compensate for more harmonics for better accuracy while keeping fast convergence rates, an OHPC that includes paralleled SHC components of (25) is tailored for the selected harmonics, as shown in Figure 10. The OHPC consists of two SHCs that are connected in parallel. Each SHC module has the purpose of suppressing 6k � 1 and 6k � 2 harmonics. The transfer function of the OHPC is expressed as where m and n are the set of the parameters related to the selected harmonics, and m ≤ n 2 . The proposed OHPC bridges the complex parallel structure periodic control [19] and the nk � m order periodic control [20][21][22]. Figure 10  -635 and q-axis currents. The OHPC is selected in front of the PI current controller, and a feedforward OHPC is connected in series.
The periodic selective harmonic generator produces an infinite gain at the harmonic frequency to suppress a specific harmonic in the system when the harmonic frequency is near the pole. Here, the current of the motor drive system is analysed by harmonics, and it can be seen that the 6k � 1 and 6k � 2 harmonics are quite high. The selection of the OHPC is used to suppress the steady-state errors of these harmonics. As a result, the harmonics of the current are improved.
Without using the plug-in of the OHPC G ohpc ðzÞ, the transfer function H cc ðzÞ of the feedback system is written as where G pccx ðzÞ is the transfer function of the uncontrolled plant, and G ccc ðzÞ is the conventional PI feedback controller. By considering the plug-in OHPC scheme G ohpc ðzÞ shown in Figure 10 and by using Mason's gain formula [13], one can obtain According to (28) and (29), the OHPC system in Figure 10 is asymptotically stable if the following two conditions hold [23]: 1. The H cc ðzÞ is asymptotically stable. 2. The control gains k m ≥ 0 satisfy the following inequality 0 < where k m ¼ k 1 þ k 2 is the control gains for the corresponding SHC modules G shc ðzÞ with m ¼ 1; 2 and k 1 > k 2 . The stability criteria for an OHPC system are compatible with the SHC system. The error convergence rate of the OHPC system is optimised by independently tuning the control gains k m according to the harmonic distribution. The OHPC system can achieve error convergence rates up to 0.5n times faster than the CPC systems. In general, the OHPC offers a solution to the mitigation of the harmonic distortion mainly concentrated at multiple harmonics, in particular nk � m harmonics frequencies. The proposed OHPC controller is shown in Figure 11. The input of the current-loop PI controller is the current error plus the output of the feedforward OHPC and the current-loop PI controller produces the d-q axis voltage, which is converted by the PWM to generate the switching states. The switching states are used to control the inverter to drive the SPMSM. There are three advantages of the proposed OHPC used here. First, it is easy to implement and has simple computation due to its limited number of compact delay-based SHC modules. Moreover, it has high control accuracy due to the flexibility to select harmonics for compensation. Finally, it achieves a fast dynamic response due to its simplicity in tuning the control gainsk m .

| IMPLEMENTATION
Now, an implemented SPMSM system was built to evaluate the performance of the proposed method. Figure 12(a) shows the block diagram of the SPMSM drive system and Figure 12(b) shows the hardware circuit of the proposed SPMSM drive system. A DSP, type TMS-320F-2808, was used as a control centre for the SPMSM drive system. The control and faulttolerant algorithms were implemented using C-language. The speed-loop sampling interval was 1 ms, and the current-loop sampling interval was 100 μs. The SPMSM was driven by an inverter with a switching frequency of 10 kHz. The phase currents were measured by Hall-effect current sensors and were converted through two A/D converters. An absolute encoder was used to measure the rotor speed and position.
QðzÞ and G f ðzÞ use the same parameters as the speed-loop FAPC.

| EXPERIMENTAL RESULTS
The SPMSM used by the authors is manufactured by SUMFU machinery, type MH 2026. The SPMSM is 8-pole, 2 kW, rated speed 2000 r/min, rated torque 9.5N.m and the related parameters are as follows. Stator resistance r s = 0.73Ω, d-q axis inductances L d ¼ L  Figure 13(a) and (b) shows the measured results when the proposed SPMSM drive system is operated under normal operating conditions using different controllers. Figure 13(a) shows the measured transient responses at 600 r/ min. The FAPC has a faster transient response and smaller steady-state errors than the CPC and PI controllers. The reason is that FAPC has an adaptive time delay while a CPC has a fixed time delay. Figure 13(b) shows the load disturbance response under 600 r/min and a 4.5 N.m external load. Again, the FAPC, which has frequency adaptive characteristic, provides a quicker recovery time and a lower speed dip than the CPC and PI controllers. The results show the proposed FAPC can improve both transient responses and steady-state errors, and improve disturbance rejection performance. In Figure 13(b), the OHPC is not included because the OHPC does not influence the load disturbance. The OHPC is put in the current-loop, which only influences the harmonics of the current but not the speed response of the motor. Figure 14(a) and (b) shows the experimental performance of the SPMSM drive system in sinusoidal wave tracking responses. The FAPC has smaller errors and better trajectory tracking responses when compared to the other controllers. Figures 15(a, b) and 16(a, b) show the steady-state current measurements of different current controllers at 500 r/min. Figure 15(a) shows the measured three-phase currents using a PI controller. The three-phase currents include serious distortions. Figure 15 Figure 16(a) shows the measured three-phase currents using OHPC. Figure 16(b) shows that the THD of OHPC is 4.49%, which is only 0.56 times lower than the THD of the PI controller. Comparing Figures 15(b) and 16(b), we can conclude that the PI controller cannot produce satisfactory output current while the OHPC can. Figure 17(a-c) shows the measured responses of the aphase open-circuit using the fault-tolerant method proposed by the author. Figure 17(a) shows the measured three-phase currents using the PI controller. The peak current reached near 9A, which is three times higher than the normal current. Figure 17(b) shows the measured three-phase current responses using the OHPC. The peak current reached near 4 A, which is 1.5 times higher than the normal current. Comparing Figure 17 addition, the PI controller requires 3 ms to recover to normal conditions, while the OHPC only requires only 1 msfor the same . Figure 17(c) shows the measured speed responses. The FAPC has smaller steady-state errors than the PI controller.
The PI controller provides a 30 r/min overshoot and the FAPC has a 10 r/min overshoot. Figure 18(a-c) shows the measured responses of the aphase short circuit using the proposed fault-tolerant method. Figure 18(a) shows the measured three-phase currents using the PI controller. The peak current reached near 10A, which is 3.3 times higher than the normal current. Figure 18(b) shows the measured three-phase currents using the OHPC. The peak current reached 7A is 2.3 times higher than the normal current. Comparing Figure 18(a) and (b), we can conclude that the OHPC provides better responses again when the a-phase short-circuits. Moreover, the PI controller requires 4 ms to recover to normal conditions, while the OHPC only requires 2 ms to recover to normal conditions. Figure 18(c) shows the measured speed responses. The PI controller provides a 75 r/ min overshoot and the FAPC has a 40 r/min overshoot. Again, the FAPC performs better than the PI controller. Figure 19(a-c) shows the measured results of the a-phase short-circuit after adding a 2 N.m load using the proposed fault-tolerant drive system. The drive systems perform well even though there is a change in the load condition. Figure 20 (a-c) shows the measured results of the a-phase open-circuit after adding a 2 N.m load using the proposed fault-tolerant drive system. Again, the drive system performs well. Figure 21(a) and (b) shows the errors of normalised current in digital value by using a fault-tolerant method. Figure 21(a) shows the measured result of an open circuit, in which the b-phase and c-phase are below threshold but the aphase is exceeded. Figure 21(b) shows the measured result of short circuit, in which the b-phase and c-phase are below threshold but the a-phase is exceeded. According to the experimental results, the FAPC provides faster responses than the CPC and PI controllers. However, if the FAPC is used for both speed-loop and current-loop, the drive system sometimes produces oscillations [22]. As a result, using a FAPC for speed-loop control and using an OHPC for current-loop control can be the best choice. The fundamental current frequency is determined by the motor speed and the pole number of the motor because a field orientation control is used in the proposed method. The harmonic currents come from the switching frequency of the inverter, the limited bits of the A/D converters and the truncation errors of the DSP.

| CONCLUSION
Here, an FAPC is implemented as a speed-loop while OHPC is implemented as a current-loop for a fault-tolerant SPMSM drive system. A 32-bit DSP, TMS-320F-2808, is used to execute the FAPC, CPC and PI controller for speed-loop, the OHPC and PI controller for current-loop, and fault-tolerant detection, diagnosis and control algorithms. The experimental results show that the SPMSM drive system with a speed-loop FAPC has the best performance, including good transient responses and good load disturbance responses, and the currentloop OHPC can improve transient responses better than PI controllers during faulty conditions. -641