Field-oriented Controlled Permanent Magnet Synchronous Motor Drive with Dynamic-parameter Speed Controller Based on Generalized Regression Neural Network

A dynamic-parameter speed controller based on a generalized regression neural network (GRNN) was developed for a field-oriented controlled (FOC) permanent magnet synchronous motor (PMSM) drive. The decoupled FOC PMSM drive was established using the current and voltage of the stator. The designed time-varying-parameters speed controller replaced the conventional fixed-parameters speed controller to adapt to drastic load variations and serious interference. A GRNN was utilized to develop the time-varying-parameters speed controller, and the smooth curve of the pattern layer was adjusted using the firefly algorithm (FA). Hall effect current sensors were used as an electromagnetic sensing element to detect the stator current from the PMSM. The MATLAB/Simulink© toolbox was used to establish the simulation scheme, and all the control algorithms were realized using a TI DSP 6713-and-F2812 control card. Simulation and experimental results under load changes confirmed the effectiveness of the proposed approach.


Introduction
Compared with induction motors, permanent magnet synchronous motors (PMSMs) have the advantages of a high efficiency, high power factor, high power density, and small volume. (1) PMSMs are widely used in electric vehicles, rail transportation, elevators, medical equipment, home appliances, processing machines, marine electric propulsion, and injection molding machines. (2,3) According to AC motor field-oriented control theory, (4) by performing a coordinate transformation, the complicated PMSM mathematical model can be divided into torque-current and flux-current components. Both components are orthogonal and controllable, and the maximum torque-to-current ratio is achieved. The conventional speed controller of a field-oriented controlled (FOC) PMSM drive is designed with fixed parameters, and its performance is easily deteriorated by drastic load changes and serious interference. Speed control with dynamic parameters has been widely applied to FOC PMSM drives, such as dynamic-parameter design using an optimal control or robust control approach, (5)(6)(7) dynamicparameter adjustment using a neural network or fuzzy logic control, (8)(9)(10)(11) dynamic-parameter determination by a cerebellar-like model, (12) and dynamic-parameter identification from a linear parameter-varying scheme. (13) In this study, the speed controller of an FOC PMSM was designed with dynamic parameters to adapt to drastic load changes and serious interference. In the proposed dynamic-parameter FOC PMSM drive, a generalized regression neural network (GRNN)-based speed controller was utilized to predict the control parameters (proportional and integral gains) for FOC PMSM dynamic speed control. The smooth curve of the pattern layer of GRNN as a nonlinear mapping of the desired speeds and control parameters was adjusted using the firefly algorithm (FA). The trained GRNN-based proportional-integral (P-I) controller can predict suitable proportional and integral gains to overcome the trial-and-error design of P-I gains, and also can minimize overshoot, improve transient responses, and eliminate steady-state errors. In addition, the pole placement was used to design d-axis and q-axis stator current controllers based on the decoupled PMSM mathematical model. In the stator current measurement, the stator current was obtained from a PMSM using Hall effect current sensors. In controller design, the GRNN-based dynamic-parameter speed controller has the advantages of a low computing cost, suitability for dynamic control, and the use of a small number of training datasets to achieve the approximate nonlinear mapping characteristic. (13,14) This paper comprises six sections. Section 1 presents the research motivation, background, and literature review on the dynamic-parameter speed controller of FOC PMSM drives. Section 2 describes the proposed decoupled FOC PMSM drive. Section 3 discusses the GRNN dynamic-parameter controller scheme and design procedure. Section 4 details the pattern layer smooth curve adaptation using the FA. Sections 5 and 6 cover the experimental setup and results, discussion, and conclusion.

Decoupled FOC PMSM Drive
The stator winding of a PMSM is three-phase, symmetrical, and distributed. Suppose the permanent magnets are surface-mounted on the rotor without damper winding, and the magnet axis of the rotor permanent magnets is co-located with the d-axis of the rotor shaft. The stator dynamic matrix equation of a PMSM in the synchronous reference coordinate frame is given by (15) where p = d/dt is a differential operator; e ds i and e qs i are the d-axis and q-axis stator currents, e ds v and e qs v are the d-axis and q-axis stator voltages, R s and L s are the resistance and inductance of the stator, respectively; λ F is the equivalent rotor magnet flux produced by the permanent magnets of the rotor; and ω e is the speed of the synchronous reference coordinate frame.
Under an FOC PMSM condition, the first row of Eq. (1) shows that the second term on the right side is a coupling component in relation to the q-axis stator current. Also, the second row of Eq. (1) shows that the first and fourth terms on the right side are the coupling components in relation to the d-axis stator current and equivalent rotor magnet flux, respectively. These coupling components allow the definition of the d-axis and q-axis stator voltage feed-forward compensations as Thus, the linear control of the d-axis and q-axis stator current loops is achieved, and the voltage commands of the d-axis and q-axis stator current control loops are obtained from where ds v′ and qs v′ are the outputs of the d-axis and q-axis stator current controllers, respectively. The generated electromagnetic torque of a PMSM is derived as where P is the motor pole number. Equation (4) shows that the equivalent rotor magnet flux λ F and q-axis stator current e qs i are orthogonal. The electromagnetic torque of a PMSM is dominated by e qs i , and the maximum torque-to-current ratio can be achieved. The mechanical equation of the motor is acquired as where J m and B m are the inertia and viscous friction coefficients of the motor, respectively; T L is the load torque; ω rm = (2/P)ω r is the mechanical speed of the motor shaft; and ω r is the rotor electric speed of the PMSM. From the first rows of Eqs. (1) and (2), and from the second rows of Eqs. (1) and (2), the plants of the d-axis stator current control loop and the q-axis stator current control loop are respectively derived as Because the stator current control loop is dominated by the electrical time constant and the speed control loop is dominated by the mechanical time constant, the bandwidth of the inner q-axis stator current control loop is much higher than that of the outer speed control loop; hence, in this study, the closed-loop gain of the q-axis stator current loop can be set as unity. Through Eq. (5), the plant of the speed control loop is derived as The whole linear control block diagram of the proposed FOC PMSM drive is displayed in Fig. 1. In the upper control block, the parameters K pq , K iq are the proportional and integral gains of the q-axis stator current controller; and K ps , K is are the proportional and integral gains of the speed controller, respectively. In the lower control block, K pd , K id are the proportional and integral gains of the d-axis stator current controller, respectively. The d-axis stator current command is set as 0 because of the permanent magnet of the rotor.

Dynamic-parameter Speed Controller Based on GRNN
Artificial intelligence has been widely used in smart control fields. Machine learning algorithms, which are applied to perception, decision-making, and feedback control, are used in artificial intelligence applications. (16,17) Decision-making can further improve the ability of prediction, diagnosis, and judgment, by collecting a large amount of data and using machine learning algorithms for data estimation and prediction. Machine learning with optimization algorithms uses searched datasets to establish an adaptive training model to perform the prediction function. In this study, a GRNN machine learning algorithm was implemented to estimate the proportional and integral gains (K ps , K is ) for the dynamic-parameter speed controller; the GRNN consists of an input layer, pattern layer, summation layer, and output layer, as shown in Fig. 2.

Input layer
In the input layer of the proposed GRNN model, the input dataset is X = ω rm . The input dataset is normalized as follows: where X max is the maximum value of X, n = 1, 2, ..., N, and N is the number of training datasets. The normalized training database was adjusted by the P-I speed controller based on the conventional FOC PM drive, which is shown in Fig. 3. Here, the X-axis is the proportional gain parameter (K ps ), the Y-axis is the integral gain parameter (K is ), and the Z-axis is the mechanical speed (ω rm ).

Pattern layer
The number of pattern layers depends on the number of training objects. The pattern layer is nonlinear and can be approximated by a Gaussian function (Fig. 4). The more complex the training objects, the larger the number of pattern layers, and the more computations required. The Gaussian function is given by where X k is the input of the Gaussian function, P k is the training database of the GRNN, and σ is the smoothing parameter, which can be adjusted by the optimization algorithm.

Summation layer
The summation layer consists of two operations. The first is to accumulate all the neurons in the pattern layer, which is the sum of the probabilities and is given by Eq. (11). The other is to multiply each layer of the datasets by the output of the training dataset and then sum the product, as expressed by Eq. (12), where Y k,i is the output of the training database and i is the index of the datasets.

Output layer
By dividing Eq. (12) by Eq. (11) and normalizing the result, as given by Eq. (13), the output layer is obtained. In this study, the output layer provides the dynamic proportional gain parameter (K ps_dy ) and the dynamic integral gain parameter (K is_dy ).
and Y max is the maximum of the training datasets.

Pattern Layer Smooth Curve Adaptation Using FA
The FA is an intelligent cluster searching algorithm, which compared with other intelligent cluster searching algorithms, has the advantages of fewer adjustment parameters, easy implementation, and greater effectiveness at finding the global best solution. (18) The concepts of FA include the following: attraction is directly proportional to brightness, brightness decreases with increasing distance, and fireflies do not distinguish between genders. Initially, N fireflies are scattered in the interval [X, Y], defined by the user. A GRNN calculation is performed to acquire the initial brightness of each firefly. When the initial brightness is closer to the training datasets, a higher brightness is obtained. The firefly attractiveness is given by where I 0 is the attractiveness at r n = 0, γ is the light absorption coefficient, and r n is the relative brightness of the fireflies. Parameters I 0 = 1 and γ = 1 were used in this study, as recommended in the literature. (19,20) The attraction of a firefly is related to its own brightness and also to the relative brightness of neighboring fireflies. The attraction decreases as the distance increases. The relative brightness of fireflies is expressed as where D n is the position of the target firefly, and D n−1 is the position of any firefly. The phototaxis of the firefly is shown in Fig. 5. If there is no brighter firefly, the target firefly will move randomly, as expressed by where ε is the accuracy determined by the user; in this research, ε = 10 −3 , and α ∈ [0, 1] is a random number.
The normalized smooth parameter optimization of the pattern layer using FA is shown in Fig. 6. Here, the X-axis is the smooth parameter σ, the Y-axis is the number of iterations n, and the Z-axis is the error Δe. The flow chart of the FA is shown in Fig. 7.  A block diagram of the proposed dynamic-parameters speed controller design for FOC PMSM drives is shown in Fig. 8. The drive includes a dynamic-parameter speed controller, d-axis and q-axis stator current controllers, d-axis and q-axis stator voltage decoupling, coordinate transformation between the synchronous and stationary reference frames (2 e 2 3 e ⇒ 3, 2 e 2 3 e ⇐ 3), and a GRNN dynamic-parameter design scheme. In this study, the P-I controllers for the d-axis and q-axis stator current control loops were designed according to the pole placement. The dynamic-parameter speed controller was designed using the GRNN, and the pattern layer smooth curve was adjusted using the FA. Here, the three-phase currents (i as , i bs , i cs ) were obtained from the PMSM using Hall-effect current sensors (red dashed line in Fig. 8).

Experimental Setup and Results
A simulation scheme of the proposed system was established using the MATLAB/Simulink © toolbox. The implementation program was executed by a TI DSP 6713-and-F2812 control card and a voltage source inverter to actuate the PMSM. A standard three-phase, 220 V, 0.75 kW, Y-connected PMSM was used to confirm the effectiveness of the proposed dynamic-parameter speed controller for FOC PMSM drives based on a GRNN. In a running cycle, the sequence of speed commands was designed as follows: forward-direction acceleration from t = 0 s to t = 1 s; forward-direction steady-state running over 1 ≤ t ≤ 4 s; forward-direction braking to reach zero speed in the interval 4 ≤ t ≤ 5 s; reverse-direction acceleration from t = 5 s to t = 6 s; reversedirection steady-state running over 6 ≤ t ≤ 9 s; reverse-direction braking to reach zero speed in the interval 9 ≤ t ≤ 10 s. Furthermore, in the running cycle, the load changes were designed as follows: in the forward-direction steady-state running in the interval 1 ≤ t ≤ 4 s, a 2 N-m load was added from t = 1.5 s to t = 2 s, no load was added during 2 ≤ t ≤ 2.5 s, a 4 N-m load was added from t = 2.5 s to t = 3 s, and no load was added during 3 ≤ t ≤ 4 s; in the reverse-direction steady-state running in the interval 6 ≤ t ≤ 9 s, a 2 N-m load was added from t = 6.5 s to t = 7 s, no load was added during 7 ≤ t ≤ 7.5 s, a 4 N-m load was added from t = 7.5 s to t = 8 s, and no load was added during 8 ≤ t ≤ 9 s.
The simulated and experimental results with steady-state load changes for a reversible steady-state speed command of 2000 rev/min are illustrated in Figs. 9 and 10, respectively. Each figure includes four responses: (a) the command (dashed line) and actual (solid line) rotor speed, (b) the torque, (c) the dynamic proportional gain parameter, and (d) the dynamic integral gain parameter.
According to the results of the simulated and experimental tests under reversible operations and steady-state load change conditions, the developed dynamic-parameter speed controller based on a GRNN could accurately adjust the rotor speed (reversible steady-state command of 2000 rev/min) under steady-state load change conditions. Furthermore, the torque response confirmed that designed dynamic P-I parameters exactly adapt to the load alteration.

Conclusions
A dynamic-parameter speed controller based on a GRNN was developed for FOC PMSM drives. The decoupled FOC PMSM drive was established according to the current and voltage of the stator. The GRNN was used to design the speed controller with dynamic P-I gain parameters, and the pattern layer smooth curve was adjusted using the FA. The three-phase stator currents for implementing the dynamic-parameter speed controller for FOC PMSM drives were provided by Hall effect current sensors. The simulation and experimental results for different reversible steady-state speed commands under steady-state load changes confirmed the promising performance of the proposed dynamic-parameter speed controller for FOC PMSM drives.