DESIGNING AN ARFITICIAL NEURAL NETWORK MODEL PREi.c LIVE CONTROLLER FOR MIMO PROCESSES USING ATMEGA 128 THIET KE BO DIEU KHIEN DU BAO DU'A MO HJNH MANG NO-RON \H.\N TAO CHO HE NHIEU CHl
Trang 1DESIGNING AN ARFITICIAL NEURAL NETWORK MODEL PREi).c LIVE CONTROLLER FOR MIMO PROCESSES USING ATMEGA 128
THIET KE BO DIEU KHIEN DU BAO DU'A MO HJNH MANG NO-RON \H.\N TAO
CHO HE NHIEU CHl£u B A N G ATMEGA 128
Phan Xuan Minh, Doan Van Due
Hanoi University of Science and
Technology-ABSTRACT
In this paper, one method to design an Artificial Neural Network Model Predictive Controki (ANNMPC) for MIMO processes Is presented The optimization problem Is solved by two methods Nonlinear Optimization (NO) and Nonlinear Prediction 8, Linearization (NPL) The proposed controki
Is implemented on a developed kit using Microcontroller Atmega 128 The obtained controller is the: used to control a simulator of a Distillation Column plant with two inputs and two outputs Tht experimental results demonstrate the usefulness of ANNMPC for MIMO processes
Keywords: Artihclal Neural Network Model Predictive Control (ANNMPC), Multi-Layer Perceptron (MLP), Multiple Input Multiple Output (MIMO), Nonlinear of Optimization (NO), Nonlinear Prediction and Linearization (NPL), Genetic Algonthm (GA), Distillation Column
TOM TAT
Bai bio trinh biy vi mdt phwang phip thiit ki bd diiu khiin dw bio dwa md hinh mang naron
nhin tao cho cic ddl twgng nhiiu diu vio nhiiu diu ra Bii toin tdi wu hoi dwgc thwc hien bing tiai phwang phip: til wu phi tuyin (NO), dw bio phi tuyin va tuyin tinh hoi (NPL) Thuat toin diiu ktiik
di xuit dwoc di dat tren vi diiu khiin Atmega 128 vi dwgc kiim chirng bing md hinh thip chwng dt hai via hai ra Cic kit qua thwc nghiem cho thiy khi ning u'ng dung cua bd diiu khiin ANNMPC cfio ddi twgng nhiiu chiiu
I INTRODUC TION
In recent vears the MPC for MIMO
Svslems has received much attention to
universal approximation as artificial neural
network (.ANN) or Fuzzy Logic System The
ANN is used as a predictive model of MPC
because of the abilitv to approximate the
process dvnamic exactiv
The intelligent control algorithm is
implemented on the Atmega 128, one micro
controller chip of AlAlll A real experiment,
in vvhich the designed controller is used to
control a MIMO real-time simulation system
with two inputs and two outputs, is developed
The paper includes:
•^ Introduction
•^ Model Predictive Control for MIMO
processes based on Artificial Neural
Network
-^ Designing a ANNMPC using
mierocontroller Atmega 128
-^ Applving ANNMPC to control the real
Disiillalion Column plant simulator
>^ Conclusion
II MODEL PREDICTIVE CONTROL BASED ON ARTIFICIAL NEURAL NETWORK FOR MIMO PROCESSES 2.1 Structure of the neural model
To model the nonlinear dynamic characteristic of each MISO process, a structure
of NARX (Nonlinear AuloRegressive willi
exogenous input) is used
'7 ' T" • ; > ,
Figure 2 1 Structure oflhe SARX network
78
Trang 2The relationship between inputs and outputs of
the network is described as follows
v„,(A:) = (7„,(r„(A:))
Where
l i l ( f e - T "
(2.1)
^m(.k)
')
ui(fc-wr)
^'n,fk - l u )
"njfc-A/r-)
3m(fc - 1)
.(7^=R'^>'^^5:;]H.(.v-"-r-"+i)^^ ^ ^ 1
' " = 1 ".V- The "I-th output
T"'"" _ "I'l^e number of elements in the ^ -th
input"s TDL is not applied to the network of the
"^ -th output
N"
'"ei
The number of the elements in the "
th input's TDL of the network of the '" -th
output
^- ~ The number of the elements in the '" -th
output's TDL,
•'i/ ~ The number of inputs
''.V ~ The number of outputs
The relationship between inputs and outputs
can be rewritten as follows
y„Ak) = 9„,ixn,ii<)') :2.2)
where: ^n-ik) is an input vector of the network:
U i ( A - r ' " i )
^re(l<) =
Uj(fc-,V,fi)
u„Jk-z''•••'0
"n,(A-'v:;'''-)
y ^ ( / f - i )
v^(A'-A';")
When using Ml 1' network to model plant, we
have the relationship between inputs and
outputs of the neural network:
v.(v)=::.+5^Iii:(:)Wffl:{!,:)^.(^) + /fi"i:))
m = 1,2, , iLy
2.2 MPC algorithms based on the structure
of Artificial Neural Network [1,2,5]
The cost function:
Kk) = W'fik) -.y(;c)|f, + \lAUik)\\l
Constraints:
(2.4)
Y„ ,<?(,k)<Y„„,
AY„., < AYik) < AV^,,
where
Au(,k\k) AU(k) = \
Aii(k + N,- Ijfc)
dlm(zlt/(fc)) = n^,V^
dim(,l./p) = n,.; size(AO = iiyN^ X n,.Wp
dim(r.,„*) = dim(f/,„ax J = dim(Af/,„,„,)
= dim(AC/_,) = n„^,
y inin 1
^ i n i n / n '
; >™ =
^ i n a x !
-^max ny
d i i n ( L p
L =
= n^;size(L) =
i p 0 0
0 0
0 0 i p
mm
A } ' =
mm
" m m 1
_ " m , n „ „ _
;M ^
^ max
A ^ ' n m l
Av„„„„
Mp 0 0
0 - 0
0 0 i W p
" , „ a M
_ « m a , x „ „ _
• AY =
' max
'•
4v„aM
_Av
Trang 3dim(y™„,v,) = d i m ( } ; , , , ) = dim(Ar„,„ ,^)
= dm(A)-,,,, ) = « iV,,
v'-'fik + llfc) '
Y'''f(,k)= ••
y'-'fik + Nplk)
dim(Y'''f(k)) = n.,\'.,
m + l\k)
Y(k} = :
y(k-i-N^\k)
dim(K(fe)) = r!, ,V„
?y(.k-i-p\k)
?{k + pifc) =
[?,,Xk + p\k)
?„ik + p\k) = v.^{k-i-pm + d„m
d„:(k) = v^(k)-Y„(k\k-i)
m = 1.2, ,11,
(2.5) (2.6)
rf^(fc) = V„ (fc) - ifin: + ^ tlt;,(i)/„(z„„ (fr)) I (2.7)
Z„, (fc) = /ll.'„, (I, : ) V „ (k) + IB,,, ( 0 (2.8)
PC
Digital
inpuls
Analog
inpuls
probes
(0-5\')
1
RTC
Microcontroller unit
i
,
Kc> board
— •
Digilal outputs Analog outputs probes (0-5V)
;
LCD
III DESIGN AN ANNMPC BASED C ATMEGA128 MICRO-CONTROLLER
• Hardware design
^ Microcontroller unit: Using AtmegaL microcontroller
•^ Digital input/output port: Digital sign; logic 0-5'V
'/ Two input/output probes
•/ Connect PC by RS232
•^ LPT programming port
•^ Analog board : Four standard sigm used: 0-5V 0-1 OV, 0-20mA, 4-20iiiA
• Software design
•^ Interface on PC using the Visual C+* language
•^ Software on Atmegal2!
microcontroller using the AVR Studio compiler
Analog inpul probes (from sensors 5V' 0-lOV 0-20mA 4-20mA)
Analog outputs probes (to actuators 0-5\'
0-lOV 0-20mA, 4-20mA)
Analog inpuls (to CPU Board 0-5V)
Analog outputs (to CPU Board 0-5V)
Figure 3.1 Diagrams of the CPU Board and Analog Board
The sampling time 7", is chosen as lOsec After identifv'ing the plant, we ha» structures of networks with each of outputs [4]
I\ APPLYING ,4NNMPC IN REAL-TIME
SIMLLATION OF A DISTILLATION
COLI MN PLANT
Consider the distillation column plant as
shown in Figure 4 I with the parameters at an
operating point being given in fable 4.1
80
Trang 4''able 4.1 Parameters oflhe Distillation Column plant at the operating point
\
40
M
41
N,,
21
F
1
Z F
0.5
qF
1
a 1.5
D 0.5
L 2.706
V 3.206
X D
0.99
X B
0.01
M, 0.5
TL
0.063
Figure 4.1 Control system of the Distillation
Figure 4.3 Results wilh Ml\ '-NPL algorillmi ('""'c - 3- •"•'F
and MPC-S'O algorithm (^c = 2,A'„ = W.M.^
fable 4.2 Parameters oflhe structure with each
10, Ml = 1,M2 = 0.1, i l = 0.5 L2 0.5
, Af, 2 , i i = 1 5 , i 2 = I S
>f output.'
V ' i
1 ^ '
-I
1
1
AT'
>
NZ'^
3 '' 1 3
A""
9
9
We implement the MPC controller for
he distillation column plant (The plant is
iniulaled on Mallab Simulink and connected
real-time to the controller via Card Ni-PCI 6014)
Two algorithms MPC-NO & MPC-NPL are installed on the Atmegal28 chip The Distillation Column plant, which is simulated
on Matlab/Simulink, is connected to the MPC controller via Ni-PCI 6014 using Toolbo.x Real-Time Windows Target The structure of the control svstem are shown in Figure 4.2 and the experiment results are given in Figure 4.3
Trang 5V CONCLUSION
In this paper, we have presented one
method to design an ANNMPC using MLP
with the structure of NARX network for MIMO
processes (two inputs/two outputs), and
successfullv implemented the intelligent
algorithm on the microcontroller Atmega 128,
An experiment with a distillation column plant
simulator (connected real-time the ANNMPC
controller via Card Ni-PCI 6014) is utilized lo illustrate the applicabilitv and effectiveness of the proposed controller
In the next research, a ne« microcontroller with higher perfonnances will
be used to implement MPC-GA for MIMO processes Studying of stability and robustness
of the closed-loop control system with ANNMPC is beina carried out
REFERENCES
ChenWah Sit; Application of Artificial Neural Network - Genetic Algorithm In Inferential Estimation and Control of a Distillation Column; Chemical and Natural Resource Engineering, 05.11.2007
Yahya Chetouani; Using Artificial Neural Network for the modeling of Distillation Column; Int Jounal of Computer Application 2007
S Skogestad: Dynamics and Control of Distillation Column; Trans IChemE 9-1997
Maciej Lawrynczuk; Suboptimal Nonlinear Predictive Control Based on MLP and RBF Neutal Models with Measured Disturbance Compensation Jounal of Automation; Mobile Robotic and Intelligent Systems.m 20008
Maciej Lawrynczuk; Computational Efficiency of Suboptimal Nonlinear Predictive Control Vi'ith Neural Model; ISSN 11896-7094 2007 PIPS
Author's address: Phan Xuan Minh -Tel.: (+84) 913.362.993, email: minhxp-ac(@mail,hut.edu.vn
Department of Automatic control School of Electrical Engineering Hanoi University of Science and Technology
No 1, Dai Co Viet Str., Hanoi, Vietnam,
82