A Novel Online Multivariate Identification for Autotuning Speed Control in PMSM Drives

A novel online algorithm to identify themoment of inertia, viscous friction coefficient, and load torque of PMSM (PermanentMagnet Synchronous Motor) drives and a distinctive autotuning speed control scheme are presented.The proposed identification algorithmdoes not requiremotors run in a particular trajectory and only needs a short identification time. A Luenberger speed observer is introduced to eliminate noises which are generated by the detection of position signal and to improve the accuracy of identified parameters. Parameters of the speed controller are optimized by analyzing the mathematical model of the system and the formula of the PI controller. Compared to a standard recursive least squares method (RLSM) and traditional PI algorithm, the effectiveness of the proposed identification algorithm and autotuning speed control scheme are validated through simulations and experiments.


Introduction
PMSM (Permanent Magnet Synchronous Motor) has been more and more popular in many industrial applications because of its advantageous features, simple structure, high torque-to-current ratio, high efficiency, and low maintenance cost [1][2][3].Many PI (proportional-integral) speed control algorithms for PMSM drives are widely used in practical control applications owing to their simple control structure, ease of design, low cost, and effectiveness [4,5].However, parameters of speed controllers are highly vulnerable to parameter variations and external disturbances, such as load variation, speed change, external unpredictable disturbance, and mechanical parameters of the motor's nonlinear change in PMSM drives.So it is important to identify the motor mechanical parameters and load torque for autotuning parameters of speed controller to run in the better condition [6,7].
Many identification algorithms have been developed for PMSM drives such as identifying the moment of inertia of mechatronic servo systems based on the time average of a product of torque reference input [8] and using a fullorder state observer [9].They are offline algorithms.The identification algorithm which estimated inertia by using the speed observer needs the periodic test signal [10].So algorithms [8][9][10] are not suitable for online identification in real-time.The recursive least square algorithm method (RLSM) and the Kalman filter have been used to estimate the moment of inertia [11,12], but estimated value using RLSM has some oscillation on speed change and large error at low speeds.In addition, they also ignore the influence of the viscous friction coefficient.A reduced-order extended Luenberger observer has been used to estimate the moment of inertia and is not involved in the research of load torque [13].
The estimated values of mechanical parameters are used to optimize performance of the speed controller in real-time.Many autotuning control algorithms for PMSM drives have been studied.The fuzzy rules are using for autotuning PI gains in [14] and a hybrid control system is proposed in [15], which contains a PI controller and fuzzy controller in the steady state.However, both these methods use offline-tuning rules, which are not suitable for dealing with parameter variations of system.It will be very difficult to limit disturbances rapidly if adopting linear control methods in [16].An adaptive PI controller for online-tuning PI gains is employed in [17].But it does not show the performance of the speed controller under time-varying system uncertainties.A two-step estimation method, which is called in the sequel the steady-state response method (SSRM), is proposed in [18].Unfortunately, the authors do not estimate the load torque and do not show the results at different speed.
In this paper, an online identification method which can simultaneously identify three mechanical parameters (the moment of inertia of the system, the viscous friction coefficient of the motor, and the load torque) and a distinctive autotuning speed control scheme are proposed, which adjusts the speed loop parameters using the identified parameters.The online identification algorithm does not require the motors run in a particular trajectory and only needs short identification time.The identified moment of inertia of the system is substituted into the Luenberger observer model to correct the effect of the model.The autotuning speed scheme can be transformed by comparing the PI transfer function and the formula of mathematical model of PMSM.At last, by comparing their performance of the RLSM and conventional PI speed controller, the effectiveness of the identification algorithm and the proposed control scheme has been verified.
The organization of this paper is as follows.First, the structure of speed control loop is given in Section 2.Then, Section 3 presents the identification algorithm and autotuning speed control scheme adopted in this paper.In Section 4, experiments are shown and the analysis of results is demonstrated.At last, Section 5 gives the conclusions of this paper.

The Scheme of Speed Control Loop
The research object is the model of a surface-mounted PMSM.The FOC (Field Oriented Control) is a very practical and effective control strategy for PMSM drives [19][20][21][22][23]. Theoretically, the FOC for a PMSM drive allows the motor torque to be controlled independently with the flux like DC motor operation.In other words, the torque and flux are decoupled from each other.Also, the structure of cascade control loops mainly comprises two current loops and a speed loop.Two PI algorithms are used in the two current loops, respectively.Usually, the -axis reference current id is forced to   * = 0.If the two current loops work well, the output id satisfies   =   * = 0. Considering that the motor is the SPMSM, the -axis and -axis inductance satisfy   =   =   .No reluctance torque is present and then the axis current   will be controlling the motor electromagnetic torque.So, the mathematical model of a SPMSM can be simplified and modeled as Figure 1 and expressed as The angular acceleration, which is obtained by approximating the derivation and applying Euler's rule, can be computed as follows: where   is 1 ms; it is also the system sampling time and the control cycle of the speed controller.Generally, the velocity and angular acceleration are obtained by differential of position and differential of the velocity, respectively.Thus, the actual values of the position, velocity, and angular acceleration are not simultaneous, which brings multiple lag and greatly affects the identification accuracy.Therefore, a Luenberger observer is constructed and shown in Figure 2 [24].The observer compensator used in this paper is a PID compensator.The observer aims to remove the phase lag of differences, allow higher loop gains, and measure real-time motor position, velocity, and angular acceleration at any time, which normally corrupts the velocity measurement [25].
The proposed control scheme which includes the proposed identification algorithm and the autotuning algorithm is shown in Figure 3.The diagram of the control scheme covers PI speed controller, PI current controllers, autotuning algorithm, density estimation algorithm, Luenberger observer, and physical system of the motor in the loaded state.According to the actual -axis current and the actual position signal, angular acceleration and angular velocity are obtained by the Luenberger observer.Then, three identified parameters have been estimated by the proposed identification algorithm based on the actual values of -axis current, angular acceleration, and angular velocity.The identified moment of inertia of the system is substituted into the observer to reduce the errors of the observer model.At last, controller parameters can be drawn using autotuning algorithm and adjust the motor into the optimal state.

Identification Algorithm and Autotuning
Speed Control Scheme 3.1.Identification Algorithm.The precondition of the proposed identification algorithm is that the motor is running at a constant speed, the speed and the load torque of the motor are steady but allow a little fluctuation, and fluctuations of speed and torque are at an acceptable range during the period of identification time.Under this precondition, the proposed identification algorithm can online obtain highly accurate moment of inertia of the system, viscous friction coefficient, and load torque in short time.When the rotor speed and load torque are constant in a short period of time, the mathematical model of the motor can be discretized and solved.Since three motor parameters are fixed, the solution to the equation is also constant.Based on the discrete form of (1), the motor state corresponding to the series of discrete points is acquired.Using any three consecutive points, a matrix equation ( 4) can be listed and shown as follows:

Physical system
Modeled system

Multivariate identification
Adaptive control Also, the linear matrix inequalities with feasible performance constraints are used for expression (4).The condition of geometric solution of expression ( 4) is the inequality

PI current controller PI speed controller
According to expressions (3) and ( 5), expression ( 6) is obtained and simplified to get expression (7): A group of data satisfying formula ( 7) is substituted into (4).Formulas ( 8)-( 11) can be viewed as expressions to obtain identified values of the moment of inertia, viscous friction coefficient, and load torque: When the motor is unloaded (  = 0), formulas ( 12) and ( 13) are derived by solving formula (1).The sufficient condition of that is inequality (14): There are measurement errors of speed and angular acceleration.And external electromagnetic equipment can cause interference to the measurement of current signals.
To reduce measurement errors of detection signals, they are limited by three restrictive solutions that are listed in formula (15).Considering the actual conditions, motors and inverters are nonlinear devices.The motors themselves have the cogging torque, saturation, and cross saturation.If directly calculating the matrix of the mathematical model of SPMSM, there are computational errors in identification values.But most identification values are very close to the reference value.As far as possible, to decrease computational errors of identification values, the identification values are also limited by three restrictive solutions that are listed in formula (16).Each group of data must simultaneously satisfy the restrictive solutions that are listed below: where Usually,  min ,  min , and  min satisfy  min = 0,  min = 0, and  min = 0, respectively.In industrial field, the load inertia is less than 20 times of the inertia of a servo motor  0 .So  max satisfies  max = 21 ⋅  0 .The viscous friction coefficient of the motor is nonlinear and associated with speed. max is equal to the ratio of the rated torque and the rated speed. max is equal to the rated torque.If there is more information, they are used to narrow the range of restrictive solutions in order to improve performance of identification algorithm.
Each group of solutions calculated by formula (8) corresponds to a point in a three-dimensional (3D) space.The , , and   are defined as the -axis, -axis, and -axis of the 3D coordinate system, respectively.Based on the numerical analysis and general theory of statistics, when more points are corresponding to solutions of the equation, the regional density close to actual values in the 3D coordinate system is larger.The densest region and the average of the densest region are both figured out according to the required accuracy.Consequently, the three identified motor parameters were obtained simultaneously.The moment of inertia of the system and the load torque are not related to speed; however, the viscous friction coefficient is a nonlinear parameter related to speed.Thus, the viscous friction coefficient is affected by motor speed.If the identification values change during the identification time, it could slow down the convergence speed of the identification and would not be conducive to obtain stable and accurate identification values.For accurate and stable identification, the three mechanical parameters should remain unchanged during the time required for identification.And, the time required for identification in this paper is set to 2 seconds.Therefore, one noticeable conditional restriction in this identification algorithm is that the load torque, the moment of inertia of drive systems, the viscous friction coefficient, and speed of drive systems are constants or fluctuate within the small range of permission in 2 s.When PMSDS in motion meets the conditional constraint, the proposed identification algorithm can estimate the identification target with stable and high identification precision at full speed range.
For example, the motor parameters (, , and   ) used in the simulation are set as 0.022 kg⋅m 2 , 0.0125 N⋅m⋅s, and 9.25 N⋅m at the rotor speed of 900 rpm.When the motor is at a constant speed, the valid range of the speed is from 880 to 920.Specific information of the motor and controller is shown in Section 4. According to the above conditions, the restrictive solutions used in simulation are listed below: The schematic drawing of the identification results is shown in Figure 4, where Figure 4(a) shows the 3D coordinates diagram; Figures 4(b), 4(c), and 4(d) show the projections of 3D graphics in plane -, plane -, and plane -, respectively.The solutions to the equations are not always fixed but fluctuate around the actual solution.With more solutions, more points are around the actual solution.Therefore, the density of regions around actual solution increases.Because the number of solutions is fixed, the maximum density region can be easily identified using the proposed identification algorithm.The 3D coordinate system in Figure 4(a) is analogized as a cuboid and its length, width, and height are each divided into 1000 equal parts, which build up one billion small cuboids.With a comparison of the number of points in these small cuboids, the small cuboid that contains the most points is the densest slum in the entire 3D coordinate system.The region containing the most points is selected and the average values of the corresponding solutions which are the three identified motor parameters are calculated.When the motor is stable at constant speed, the stable load torque and small fluctuations in the rotor speed slightly impact the identified load torque and viscous friction coefficient.The identification results are more concentrated and shown in Figure 4  positive to negative are much larger than that of the rotor speed.It greatly impacts the identified moment of inertia.Then the identified moment of inertia of the system is more dispersed than the identified load torque and viscous friction coefficient (Figures 4(b) and 4(c)).However, the identified values are very close to the actual values.

Autotuning Speed Control Scheme. The open-loop transfer function of the PI controller can be given as
Equations ( 19) can be obtained: By substituting (3) to the discrete form of ( 1), ( 22)-( 23) can be written as By substituting (2) to the difference between ( 23) and ( 22), ( 24) can be expressed as Ignoring that   ( + 1) =   (), (24) can be rewritten as Ignoring that (( + 1) + ( − 1) − 2 ⋅ ()) and (( + 1) − ()) are both equal to zero, (26) can be derived:  Since ( 26) is the identical equation, ( 27)-( 28) can be derived as According to deduced equations above, we can elaborate relations between PI parameters of speed controller, three identified parameters, and the sampling period of system.The proposed adaptive algorithm has a straightforward approach to online autotune PI parameters of speed controller and considered completely influences of the moment of inertia of system, viscous friction coefficient of motor, and load torque.Not only that, the proposed autotuning algorithm also has the following guidance in practical application: (a) The moment of inertia of the system is positively related to the proportional gain.When the moment of inertia changes, the proportional gain also needs corresponding changes.If the moment of inertia is in a stable condition, the proportional gain is updated to reduce the steady-state error and improve the system dynamic response by ( 27).
(b) The viscous friction coefficient of the motor is positively related to the integral gain.But the integral part of the speed controller has a cumulative effect; viscous friction coefficient has no significant effect on the performance of the speed controller.
(c) It is not direct relationship between the load torque and the PI parameters.However, if the load torque is changed, the reference current and the feedback current also change.So the load torque indirectly affects the PI parameters.When the load torque has been stable, the PI parameters using (27) are changed to reduce the steady-state error and improve the system dynamic response.displayed in Figure 7(a) (with the observer) and Figure 7(b) (with a low pass filter).The range of output signals from the 16-bit DAC module on the IPC is ±10 V.The range of actual velocity is ±2000 rpm and that of angular acceleration is ±2972 rad/s 2 .Channel 1 on oscilloscope is reference speed, channel 2 is actual angular acceleration, and channel 3 is actual speed.From Figures 7(a) and 7(b), the response time using the observer is faster and there is smaller lag.The angular acceleration is less volatile than that with the low pass filter.

Simulation and Experiment for Performance of the Identification Algorithm
Experiment 1.The no-load motor parameters used in the simulation and experiment are set as follows: reference  8(c) and 8(d).The estimated moment of inertia using RLSM is not convergent and estimation error of that is more than 10% at 2 s.Whether the speed of the noload motor is at 300 or 1500 rpm, the time required for the proposed identification algorithm is only 1.  But, estimated moment of inertia using RLSM is not convergent and estimation error of that is more than 10% at 2 s.
Thus, whether the SPMSM is under different load torque, different load inertia, different viscosity coefficient, or at different speeds, the identification time is in 1.2 s.According to the identified errors of these identified parameters, all the identified errors of them are within 5%, and the minimum identified error is less than 1%.The proposed identification algorithm also satisfies the identification accuracy and the time required for identification in different conditions.Thus, when the rotor speed changes under a constant load torque, the response time and accuracy of the control system using the proposed adaptive algorithm are superior to that using the traditional PI algorithm.Experiment 4. When the rotor speed is set at 300 or 1500 rpm under different load torques, the dynamic response diagram of the motor is displayed in Figures 10(e)-10(h).Under loading and unloading of 5 N⋅m at the rotor speed of 300 rpm, the settling time and overshoot of the rotor speed that introduces the proposed adaptive control algorithm represented by the red line are 160 ms and 1.5 rpm in Figure 10(e), respectively.However, the settling time and overshoot of the rotor speed that introduces the traditional PI algorithm represented by the green line are 300 ms and 7.8 rpm in Figure 10(f), respectively.Under loading and unloading of 10 N⋅m at the rotor speed of 1500 rpm, the settling time and overshoot of the rotor speed that introduces the adaptive control algorithm are 200 ms and 7 rpm in Figure 10(g), respectively.However, the settling time and overshoot of the rotor speed that introduces the traditional PI algorithm are 330 ms and 36 rpm in Figure 10(h), respectively.Consequently, the response time and accuracy of the control system that adapted the adaptive control algorithm are better than the traditional PI control system when the load torque changes at constant speed.When the operation condition changes, the proposed method can estimate the mechanical parameters and update the speed controller's parameters to ensure that the motor is in the optimum operating condition.

Conclusion
This paper presents a novel online identification algorithm and a distinctive autotuning algorithm for adjusting the controller parameters in PMSM drives.The moment of inertia, load torque, and viscosity coefficient of the motor can be simultaneously obtained online by the proposed algorithms.The proposed identification algorithm does not require motors run in a particular trajectory and has high identification accuracy.Using identified parameters and the PI transfer function, the autotuning algorithm can be deduced.Some guidance of the proposed autotuning algorithm in practical application has been introduced and explained.By comparing their performance of RLSM and PI speed algorithm, the accuracy of the proposed identification algorithm and satisfactory performance of the servo system using the proposed autotuning algorithm have been verified by simulations and experiments.Sampling period of the system 1, 2, . . ., , . . ., : Discrete time points * : Reference value.

Figure 1 :
Figure 1: The physical system of motor in the loaded state.

Figure 2 :
Figure 2: The physical model of motor using Luenberger observer.

Figure 3 :
Figure 3: The diagram of control system scheme.
(d).According to formula (3), fluctuations of angular acceleration that alternately change from

Figure 4 :
Figure 4: The schematic drawing of the identification results.

Figure 6 :
Figure 6: Photograph of the test bench.
2 s and both the simulation values and the experimental values of  and  are very close to the reference values.

4. 4 . 3 .
Experiment for Dynamic Performance of the Control SystemExperiment Figures10(a) and 10(b) show dynamic performances of the step response, using the proposed adaptive algorithm represented by the red line and using the traditional PI algorithm represented by the green line, under the load torque of 10 N⋅m.The step speed signal increases from 300 to 1500 rpm.The settling time and overshoot of the rotor speed using the proposed adaptive algorithm are 160 ms and 8 rpm in Figure10(b), respectively.However, the settling time and overshoot of the rotor speed using the traditional PI algorithm are 220 ms and 30 rpm in Figure10(a), respectively.
Figures 10(c) and 10(d) show a Bode plot of the closedloop transfer function of the proposed autotuning PI speed controller.The gain in decibels and phase in degrees are plotted against the frequency in hertz.The frequency scale is logarithmic and the vertical scales are linear.The frequency spans from 0.01 Hz to 1000 Hz in Figures 10(c) and 10(d).The gain is shown in Figure 10(c), scaled at 5 dB per division.The phase is shown in Figure 10(c), scaled at 20 ∘ per division.Closed-loop responsiveness is commonly measured in the frequency domain as the bandwidth, the frequency at which the gain has fallen −3 dB.That frequency is about 260 Hz in Figure 10(c).And the phase lag accumulates to 46.49 ∘ in Figure 10(d).The proposed adaptive algorithm shows a wide gain and phase stability margin and the system bandwidth.

Figure 8 :
Figure 8: The identified  and  when the no-load motor is at 300 rpm and 1500 rpm.

Figure 9 :
Figure9: The identified , , and   when the loaded motor is at 300 rpm and 1500 rpm.

Figure 10 :
Figure10: Dynamic performance of the control system when the loaded motor is at 300 rpm and 1500 rpm.
All experiments were performed on a prototype SPMSM, whose parameters are listed in Table1.The schematic drawing of the simulation bench with the Simulink6/Matlab5 is shown in Figure5.Because it is related to the rotor speed, the viscous friction coefficient with different simulation values is introduced at different speeds.It is used to analyze the effectiveness of the identification algorithm.The experimental data are obtained from the data collection and storage section of the IPC.The CPU used for the IPC is equipped with a 2.26 GHz Intel Core 2 Duo processor.The photograph of the test bench is shown in Figure6.The load torque is provided by the load motor and is tested by the torque tester.