Sei sulla pagina 1di 4

2017 International Conference on System Science and Engineering (ICSSE)

Design and Implementation of a RBF -based PI Controller for


PMSM Drives*
Phan-Thanh Nguyen and Minh-Tam Nguyen

Abstract- This work presents a hardware implementation model. When the controlled object is changed, the
of a RBF NN (Radial Basis Function Neural Network), then use parameters cannot adjust automatically to adapt to the
this RBF NN to design a PI controller for PMSM (Permanent changed condition. With these problems, the limitations of
Magnet Synchronous Motor) drives. In this paper, firstly, the traditional PI controller exposed day by day. We cannot get
mathematical model of PMSM drives and the architecture of the ideal result in actual application.
the RBF NN which consists of an input layer, a hidden layer of
nonlinear processing neurons with Gaussian function and an Based on the advantages of RBF neural network [ 5], this
output layer are described. Secondly, a very high speed IC paper presents the combination of RBF neural network and
hardware description language (VHDL) is adopted to describe traditional PI, designs a kind of composite and adaptive RBF­
the behavior of the RBF - PI Controller, and the data type PI controller based on RBF neural network identification, to
applies 32bit length Q24 format and 2's complement operation. strengthen the control effect.
Additionally, finite state machine (FSM) is applied for reducing
the hardware resource usage. Thirdly, to verify the correctness Recently, a co-simulation work by Electronic Design
of the designed VHDL code for computing the RBF-PI, based Automation (EDA) Simulator Link has been applied to verify
on electronic design automation (EDA) simulator link, a co­ the effectiveness of the HDL code in the motor drive system
simulation work is constructed by Simulink and ModelSim [ 6]. In this paper, a co-simulation by EDA Simulator Link is
which the input stimuli and output responses are run in
applied to speed control for PMSM drive. The PMSM,
Simulink and the computation of the RBF-PI is performed in
inverter and speed command are performed in Simulink and
ModelSim. Finally, some simulation results validate the
effectiveness of the proposed RBF-based PI (RBF-PI)
RBF-based speed PI controller and the current vector
Controller for PMSM Drives. controller described by VHDL code are executed in
ModelSim. Finally, the simulation result validates the
Keywords- Radial Basis Function Neural Network (RBF
effectiveness of the proposed control system.
NN), PI Controller, VHDL, Simulink and ModelSim co­
simulation, Permanent magnet synchronous motor (PMSM) II. MATHEMATICAL MODEL OF PMSM DRIVE AND
drive
VECTOR CONTROL
I. INTRODUCTION
The typical mathematical model of a PMSM is described,
With many advantages such as fast dynamic in two-axis d-q synchronous rotating reference frame, as
performance, high efficient controllability and simplification follows
of construction, maintenance, the permanent magnet L .
synchronous motor (PMSM) drives nowadays have a main
did rs
=--1 d +W
' q 1 + 1 vd (1)
--
e - -

role-play and are widely used in industrial servo-applications dt Ld Ld q Ld


where variable speed and torque control is needed, involves di L . rs ' KE 1
q
-=-0) -
d / - - I - 0) - +-v (2)
its fast-response characteristics and better accuracy [ 1-4]. d q q
dt e L L e L L
. q q q q
Conventional PI controller for electric motor control now where Vd, Vq are the d and q axis voltages; id, iq, are the d and
is used extensively in industrial process due to its simple q axis currents, rs is the phase winding resistance; Ld, Lq are
structure, high reliability and easy to implement. PI
the d and q axis inductance; OJe is the rotating speed of
controller is mostly effective for linear or nearly linear
control systems, where the model of the object can be easily magnet flux; KE is the permanent magnet flux linkage.
got, the results will be good. However, this controller has The current loop control of PMSM drive is based on a
many limitations. As we all know, in the actual industrial vector control approach. That is, if the id is controlled to 0,
process, the controlled objects are always nonlinear, time­ the PMSM will be decoupled and controlling a PMSM like
varying and difficult to establish accurate mathematical
to control a DC motor. Therefore, after decoupling, the
torque of PMSM can be written as the following equation
*This research was supported by Southern Taiwan University of Science
and Technology (STUST), Taiwan; and Ho Chi Minh City University of
Technology and Education (HCMUTE), Vietnam.
� = 3: KEiq�K,iq (3)

Phan-Thanh Nguyen is with the Faculty of Electrical and Electronics Considering the mechanical load, the overall dynamic
Engineering, Ho Chi Minh City University of Technology and Education,
equation of PMSM drive system is obtained by
Ho Chi Minh City, Vietnam (corresponding author to provide phone: +84-
907-489-309; e-mail: thanhnp@hcmute.edu.vn). d
Jm -OJr + BmOJr � TL= - (4)
Minh-Tam Nguyen is with the Faculty of Electrical and Electronics
dt
Engineering, Ho Chi Minh City University of Technology and Education,
Ho Chi Minh City, Vietnam (e-mail: tamnm@hcmute.edu.vn).

978-1-5386-3422-6/17/$31.00 ©2017 IEEE 103


2017 International Conference on System Science and Engineering (ICSSE)

where Te is the motor torque, P is pole pairs, Kt is torque In hidden layer, the multivariate Gaussian function is used as
constant, Jm is the inertial value, Bm is damping ratio, TL is the activated function, and its formulation is shown as
the external torque, ill,. is rotor speed. follows.
-C;llz .
III. RBF-PI CONTROLLER DESIGN AND ITS DIGITAL <1>; = exp(- IIX ), 1= 1,2,....nz (6)
HARDWARE IMPLEMENTAnON 2cr;z

In control algorithm, to cope with the system uncertainty, where n2 is the number of neuron in hidden layer,
a RBF-PI controller is proposed and a RBF NN is used to Ci = [Gn Gi2 ...Gin! f ,(J; denote the node center of radial
identify the plant dynamic. This RBF NN identification
provides more accurate plant information for RBF-PI basic function and node variance (or width) of F" neuron,
controller to tune its parameters. Hence, the PI controller is and IIX -C;II is the norm value (Euclidean distance) which
worked by getting the information from the system is measured by the inputs and the node center at each
identification. neuron. Finally, the network output in Fig. 2 can be written
as
"2

Yj = Lwj/A (7)

where Y j is the /" output value, wj; is the weight from


j Iii output to I'fh neuron, and .1. '
'f'i IS the output 0f I·fh neuron.

Figure 1. Structure of adaptive RBF-PI control based on RBFNN


el

The structure shown in Fig. 1 illustrates an adaptive RBF


Xl
NN controller-based PI for PMSM Drive, that is, the motor X2
speed is controlled following the reference model and the 0

PI's parameters are modified on-line using of results of 0

RBFNN identification, called Jacobian). Moreover, the


XII!
difference between the reference model output and the actual
output of the plant is used in a system identification process.
The design of the controller is performed on the basis of the
plant model developed through the identification process. In
Stochastic gradient
this structure, the error between the nonlinear plant and the descent learning
reference model can be back propagated through the known algorithm

dynamics of the plant's model and used in updating the Input layer Hidden layer Output layer
controller's parameters.
Figure 2. Architecture of a RBF NN with SGD learning algorithm
A. Hardware Implementation of System Identification
based on REF NN However, Gaussian function is one of the most important
This section shows a digital hardware implementation of parts which need to be solved due to its nonlinear
RBF NN for system identification. characteristic. The exponential formula e-x is computed by
using Taylor series expansion. The equation is shown as
The RBF NN adopted here is a three-layer architecture
follows.
and comprised of one input layer, one hidden layer and one
output layer, which is demonstrated in Fig.2. Moreover, the !"(xo) - o z
f (x ) = f(xo)+f'(xo)(x -xo)+ (x x )
learning algorithm herein is based on the stochastic gradient 2!
descent (SGD) method which has advantage of being faster (8)
(x ) (x )
computation than the others. In RBF NN, the input layer is + f(3) 0 (x X0 ) 3 + f(4) 0 (x X0 ) 4
_ _

mapped on hidden layer via the nonlinear activated function 3! 4!


or radial basic functions (known as neurons), whereas the
+ j<5) (xo) (x -xo)5 +.....
connection from the hidden layer to output layer performs a 5!
linear transformation. The input layer has nl inputs The fifth order polynomial equation within the vicinity of

by Xl ' x2 , .. , Xllj and its vector form is represented by Xo is considered to expand as follows.

f(x)= e-x =ao +a,(x-xo)+az(x-xo)2 + (9)


(5)

104
2017 International Conference on System Science and Engineering (ICSSE)

with Q24 format and 2's complement operation. In Fig.3, the


f() X
ao = Xo = e- o (10) steps sO�s21 execute the calculation of neuron which
performs the Gaussian function and the computation of
at = Xo
f'() = -e-x0 (11) neuron output; the steps s22�s34 execute the neural updated
a2 = f"(xo) = e-xo /2 (12) parameters. The operation of each step in Fig. 3 is 20 ns (50
MHz). However, total 22 steps need 440ns operation time
a
3
= f (3) (x)
o = _e-xo /6 (13)
for computing the forward process.
f ( )(x)
4
a4 = o = e-xo /24 (14)
In the learning algorithm, the main inputs are previous
a5 = f(5)(X)
O = _e-xo 1120 (15) weight wj; (k) , previous node centers C;(k) , previous node
In computation, only fifth order expansion in (9) is not
enough to obtain an accuracy approximation due to the variances O";(k), learning rate f.1, errore) and the neuron
reason that the large error will be occurred when the input x outputs ¢; as well as the outputs are the current
is far from x ' To solve this problem, the combination of
o
weight wj;(k + 1), current node centers Ci(k + 1) and
look-up table (LUT) technique and Taylor series expansion
technique is conduced. To set up the LUT, several specific current node variances 0"; (k + 1). The circuit design of the
values for Xo within the range I � x � 0 are firstly chosen; learning algorithm is presented in Fig. 3 which uses four
then the parameters of a to a in (10) to (15) are multipliers, four adders, two dividers and manipulates 13
o s
steps machine to carry out the overall Stochastic Gradient
computed. Those data included by x ' a to a will be
o o s Descent-based learning algorithm. In Fig. 3, the steps S22�S2S
stored in LUT. At the next, when it needs to compute e-x in execute the weights update; the steps S26 � S34 perform the
(9), the X which is most approximate to input x, and its tuning of node centers and the node variances adjustment.
o
However, total 13 steps need 260ns operation time for
related a to a will be selected from LUT then perfonn the
o s computing the SGD-based learning algorithm.
computing task.
B. Hardware Implementation ofREF-PI Controller

A [mite state machine is employed to implement the


REF NN-based PI controller is shown in Fig.4, PI
parameters are tuned based on the Jacobian transformation
(the infonnation from the REF NN identification). The steps
So � S4 execute the Kp, K; gain calculation and their update
for system control adjustment; steps Ss � Ss present the
process of PI control.
s"
I I I I

X \ : e: K;: el: U;
Forward computa on and Jacobian UPdated eights
Irle�
..,
I
1 dK.
-

X
I

+
I

I
KI
X
I
I
I +
U;

I I I
}-----;-----;-------i---=--'---f-'
lY--c--l!r;. (T,(k+ t) I
I
I I
I.facob;am
I
I
Cj2lk+1) I

5,

Updated variances and neuron centers Figure 4. Hardware design of the adaptive REF NN-based PI Controller

Figure 3. FSM of hardware design of ith neuron computation and its


updated parameters
Finally, based on the Altera FPGA kit (DE2-Cyclone IV­
EP4CE1l5F29C7) which has 114,480 logic elements and
In realization, a REF NN with three inputs, five neurons 532 Embedded Multiplier 9-bit elements, the hardware
and one output structure (3-5-1 REF NN) is taken as a resource usages in the proposed algorithms are listed as
design to evaluate the proposed method. The inputs are the follows:
system inputs, the centers and variances of three neurons, • REF NN-based PI controller:
weights, and the outputs are system outputs. To reduce the - Total logic elements: 5241114,480 (1%)
digital hardware resource usage, a finite state machine - Embedded Multiplier 9-bit elements: 2/532 «1%)
(FSM) is employed to model the REF NN, presented in Fig. • REF NN for identifying dynamic system:
3 which manipulates 35 steps machine to carry out the - Total logic elements: 41,3lOI114,480 (36%)
overall computation. The data type adopts 32-bit length with - Embedded Multiplier 9-bit elements: 136/532 (26%)

105
2017 International Conference on System Science and Engineering (ICSSE)

IV. SIMULAnON RESULTS


The Simulink/ModelSim co-simulation architecture is
presented in Fig. 5 regarding as the dynamic identification
and adaptive RBF-PI control of PMSM drive system.
-400 Speed Reference

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8


" work-3inModeISim ...__

RBF Neural (a) time (5)


Network
Identification

-400 Speed Reference

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8

(b) time (5)

Figure 6. Speed responses by tracking reference model under the step


input command for (a) conventional PI control and (b) REF-PI Control

V. CONCLUSION
In this paper, an adaptive RBF-based PI controller is
successfully demonstrated by using Simulink and
Figure 5. Simulinkl ModelSim co-simulation architecture for the dynamic ModelSim. In realization, a sequential execution using FSM
identification and adaptive RBF-PI control of the PMSM drive system is applied to model the computing process of RBF-PI for
reducing the FPGA resource usage. Under the proposed
The PMSM, IGBT-based inverter and speed command design method, the execution time and FPGA resource usage
are performed in Simulink, and the RBF-PI speed/current for computing a RBF-PI spend only 180ns and 524 Les,
controllers and the identification (ill) system based on respectively. It not only does not loss any control
a 3-5-1 RBF NN are executed in ModelSim by three works, performance for the overall system, but also can greatly save
which is described using VHDL code. the FPGA resource usage. At last, some simulation results
The work-I, work-2 and work-3 of ModelSim in Fig. 5 demonstrates that under the reference model, the speed of
perform the function of the adaptive RBF NN-based PI PMSM can quickly track the prescribed dynamic response
speed controller (work-I), the function of current controller, accurately after the proposed controller has been conducted.
coordinate transformation and space vector pulse width
modulation (SVPWM) (work-2), as well as the function of REFERENCES
identifying the dynamic of PMSM drive (work-3). In [I] J.W. Jung, Y.S. Choi, V.Q. Leu & H.H. Choi, "Fuzzy PI-type current
controllers for permanent magnet synchronous motors", lET Electric
simulation, the three works in Fig.5 are implemented in
Power Applications, vol. 5, Iss. I, pp. 143-152, 2011.
digital hardware design using VHDL. Moreover, in the [2] Y.S. Kung, M.H. Tsai, "FPGA-Based Speed Control IC for PMSM
Simulink, the SimPowerSystem blockset can provide the Drive With Adaptive Fuzzy Control", fEEE Transactions on Power
components of PMSM and the inverter and it also can Electronics, vol. 22, No. 6, pp.2476-2486, Nov. 2007.
[3] M. D. Ercegovac, T. Lang, J. H. Moreno, Introduction to Digital
generate stimuli to ModelSim and analyze the simulation's
Systems, 1998.
responses. [4] D. A. Patterson, J. L. Hennessy, Computer Organization and Design:
The Hardware/Software Interface, 5'h edition, 2013.
The reference model is referred as the second order [5] N. P. Thanh, Y. S. Kung, S. C. Chen, H. H. Chou, "Digital Hardware
transfer function with the step values input varied from Implementation of a Radial Basis Function Neural Network,"
0-72000-70-72000-70 rpm during 0.8s period (the overall Computer & Electrical Engineering, vo1.53, pp.106-121, 2015.

simulation time), the simulation results for the rotor speed [6] Y. S. Kung, N. P. Thanh, H. H. Chou, "Design and Implementation of
a Microprocessor-Based PI Controller for PMSM Drives," Applied
response, the output of RBF NN identification are shown in Mechanics and Materials, vol. 764-765, pp. 496-500, 2015.
Fig.6.
As the expected results, the proposed RBF-PI controller
for the PMSM drive, shown in Fig.6(b) is superior in all
aspects when compared with conventional PI controller
(Fig.6(a)).
The proposed RBF-PI controller gives a better dynamic
performance and the speed has quicker adapted to the
reference signal in comparison to the conventional PI
controller. The RBF-PI controller has the strong robustness
and satisfactory control performance.

106

Potrebbero piacerti anche