You are on page 1of 4

2013 IEEE Conference on Systems, Process & Control (ICSPC2013), 13 - 15 December 2013, Kuala Lumpur, Malaysia

Implementation of FPGA based Model Predictive


Control for MIMO Systems
a
SajinGopi,b, *V.M. Vaidyan, and cM.V. Vaidyan
a, c
Department of Electrical Engineering
National Institute of Technology Calicut
b
Department of Computer Engineering,
King Khalid University, Abha,
Kingdom of Saudi Arabia
*varghese86@gmail.com

Abstract—In conventional ways of fast responding and high performance.


performing model predictive control using Field Programmable Labview-FPGA based approach was used for
Gate Arrays (FPGA), the approaches developed are applicable implementing direct digital control and solving Quadratic
only to Single Input Single Output System (SISO). Many real Programming (QP) problem online. Labview-FPGA is a
time systems are Multiple Input Multiple Output (MIMO)
systems and loop interaction is a major concern and has to be
platform provided by National Instruments with which FPGAs
reduced in control of MIMO systems. Also, direct digital control can be programmed using LabVIEW.
with ability to solve the Quadratic Programming (QP) problem Rest of the paper is organized as follows. In Section
online, which can be applied to complex systems with fast II, a brief review of the constrained MPC problem and
response time and/or embedded applications and with limited Dynamic Matrix Algorithm (DMA) is given. A MIMO-Stirred
computational resource for supervisory control approach, is tank process is explained in Section III. Rapid prototyping
required in many complex industrial MIMO systems. A novel environment developed for the MPC algorithm in FPGA
direct digital control of Model predictive controller with FPGA implementation is described in Section IV. The results of the
for a MIMO system which considers and reduces loop interaction
developed MPC are demonstrated in Section V for a MIMO
and which can also be implemented with very less investment is
proposed here. The system was modeled from first principles and process. Finally, Section VI concludes the paper.
then simulated in Labview environment for MIMO system.
Implementation of the system and response was verified for a II. MODEL PREDICTIVE CONTROL AND
stirred tank system. The proposed system has good performance DYNAMIC MATRIX CONTROL ALGORITHM
in terms of reduction in loop interaction which is a major Model predictive control is a very good option in control of
concern in implementation of controller for MIMO systems. Also, MIMO systems as it considers model restrictions.
direct digital control of MIMO system instead of supervisory The process to be controlled can be described by a
control was accomplished. discrete-time, deterministic linear state-space model
Keywords: Predictive control, Field Programmable Gate represented as:
Arrays, Process Control (1)
(2)
I. INTRODUCTION
where X, U and Y denote state, control input and controlled
Field Programmable Gate Array (FPGA) is a suitable candidate output.
for high speed industrial control applications| [1]-[9]. Model Finding an optimum control input that can minimize
Predictive Controller has been implemented on FPGA due to an infinite horizon performance measure is the main goal of
FPGA’s fast response and performance [10], [11]. But, the the control action. It is done as below:
main limitation in these approaches is that they are applicable
∑ (3)
for only SISO systems. But, in real industrial applications
many systems are Multi Input Multi Output systems where where the norm terms in the objective function are defined as
loop interactions are to be minimized 0[12]-[14]. Model follows:
Predictive Control can be usually used for control of MIMO (4)
systems as it takes model restrictions into account [15]-[26]. The assumption that all variables are written in terms of
The ability to solve the Quadratic Programming (QP) problem deviations from a desired steady-state is implicit in the
online become critical when applying MPC to complex representation. A proportional controller with a gain matrix
systems with fast response time and/or embedded applications calculated from the solution of a matrix Ricatti equation is the
where computational resource may be limited. Implementation solution of the LQR problem.
of direct digital control of MIMO systems with MPC on (5)
FPGA’s is critical for faster response control and higher In Dynamic Matrix Algorithm (DMA) control algorithm

978-1-4799-2209-3/13/$31.00 ©2013 IEEE 21


2013 IEEE Conference on Systems, Process & Control (ICSPC2013), 13 - 15 December 2013, Kuala Lumpur, Malaysia

considering the present state of the plant as the initial state, the 2.243e 006 2.243e 006
B
current control action is obtained by solving finite horizon of 0.01094 0
optimal open loop control problem 4876 0
C
The convolution model of the output of a plant is given as 4876 1.33
0 0
below: D
0 0
∑ ∆ (6) Step response of the above model shows that if the rate of
From the above relation, predicted output of the plant is as hot water flow is increased by a step then both the temperature
follows: of the water and height of water in tank increases
∑ ∆ 1 (7) exponentially. Also, if rate of cold water flow is increased by a
step, temperature of the water decreases exponentially and the
where U is the input and p is the prediction horizon,y he
mathematical model is very close to the defined system.
predicted output , y represents the actual output,.
From above relation, dynamic matrix is:
IV. PROTOTYPING ENVIROMENT FOR MPC IN
0 … 0
FPGA
0 … 0
(8)
A. Developed Programs for MPC implementation in FPGA
… for Stirred Tank Process.
So every time the output predicted is compared with the Block Diagram representation of the algorithm is given in
actual output computed from mathematical model and error is Fig. 1. The MPC program is developed in LABVIEW-FPGA
calculated. and is translated in to BIT file and implemented in Hardware.
So error can be given as: Fig. 2 shows the DMC algorithm developed in Labview-
9 FPGA. Algorithm for optimization of error developed in
10 Labview-FPGA is given in Fig. 3
:
:

Minimizing the overall error for every input is the goal of


the algorithm.
The Objective function can be defined as follows:
Objective function ∑ (11)
where, e is the error, p is the prediction horizon in the Fig 1 Block diagram representation of algorithm
i instant.
Input signals U are computed such that it will assure
minimum error signal in the prediction horizon region and the
predicted output will be very close to the actual input.

III. MIMO SYSTEM – STIRRED TANK PROCESS

A stirred tank system consists of one main tank and two


different types of liquid that will flow in to it. The mixing
operation will take place inside the tank. After mixing process
is over, water will flow out of it. One inlet pipe contains hot
water of temperature,T having flow rate, F .Other inlet pipe Fig 2 DMC algorithm developed in Labview-FPGA
contains cold water having temperature,T and flow rate,F .
Two parameters, level Hand temperature, T are defined for the
mixed water in the tank.
Two parameters are to be controlled, temperature of the
mixed water (T) and height of the water (H) level in tank.
Variables to be controlled are rate of flow of cold water,F and
rate of flow of hot water, F . The disturbances are Temperature
of the cold water, T and temperature of the hot water, T . The Fig 3 Optimization of error with Labview-FPGA
mathematical model of the tank system is computed from
above values of and the state space equation of the stirred tank B. Software simulation
system is as follows. To verify the performance of the MPC algorithm, its
0.008011 0 response is verified for step change in the process variable.
A
23.05 0.01431 Fig.4 shows the step response of the system for output

22
2013 IEEE Conference on Systems, Process & Control (ICSPC2013), 13 - 15 December 2013, Kuala Lumpur, Malaysia

variables, temperature and height if a step change in hot water control variable to predefined values and for system to be
flow is introduced. insensitive to disturbances.

Fig 8 Control signals

Fig.4 Step response of the output variables temperature and height for
a step change in hot water flow is introduced. As the variables in the
Dynamic Matrix Algorithm were assigned as integers, response has
VI. CONCLUSION
minor quantization noise. But the controller has good performance in Model Predictive Controllers using FPGA’s are conventionally
terms of reduction of loop interaction which is a major concern in used in controlling Single Input Single Output Systems. But,
MIMO systems. many systems in industrial applications are Multiple Input
Multiple Output Systems and have loop interactions. The
C. Hardware in loop simulation proposed novel approach of Model Predictive Controller using
Hardware in loop test of the controller designed in FPGA is FPGA uses a Dynamic Matrix Algorithm approach and solves
done by simulating the plant in LABVIEW platform. For problems associated with control of MIMO systems with
verifying the performance of the setup a step change is given to FPGA. The performance of the approach was evaluated based
hot water flow and the response obtained is analyzed. on the reduction of loop interaction which is a major concern in
MIMO systems. Results of testing on Stirred Tank system
show the system has good performance in terms of reduction of
loop interaction. The approach also achieves direct digital
control with ability to solve the Quadratic Programming (QP)
problem online and can be applied to complex systems with
fast response time and/or embedded applications where
computational resource may be limited for supervisory control
approach.
Fig. 5 Step response for hardware in loop simulation
Fig. 5 illustrates the output when a step change is given and REFERENCES
the time taken to reach that new set point.
[1] E. Monmasson and M. Cirstea, "Guest editorial special section on field
V. TESTING THE MPC-FPGA IN STIRRED TANK programmable gate arrays (FPGAs) used in industrial control systems",
SYSTEM IEEE Trans. Ind. Electron., Vol. 55, No. 4, pp.1499 -1500, 2008.

[2] L. Vachhani , K. Sridharan and P. K. Meher, "Efficient FPGA realiza-


To evaluate the performance of MPC in FPGA, it was imple- tion of CORDIC with application to robotic exploration", IEEE Trans.
mented for a stirred tank system. To verify the performance of Ind. Electron., Vol. 56, No. 12, pp.4915, 2009.
the controller, a step change was given to a set point and the
[3] H. Tanaka , K. Ohnishi , H. Nishi , T. Kawai , Y. Morikawa , S. Ozawa
output response to that step change was verified. and T. Furukawa , "Implementation of bilateral control system based on
acceleration control using FPGA for multi-DOF haptic endoscopic sur-
gery robot", IEEE Trans. Ind. Electron., Vol. 56, No. 3, pp.618-627,
2009.

[4] E. Monmasson , M. W. Naouar and L. Idkhajine, "FPGA-based control-


lers for power electronics and drive applications", IEEE Ind. Electron.
Mag., Vol. 5, No. 1, pp.1 -13, 2011.

[5] M.W. Naouar , E. Monmasson , A. A. Naassani , I. Slama-Belkhodja


and N. Patin, "FPGA-based current controllers for AC machine
Fig 7 Step response of output variable drives—A review", IEEE Trans. Ind. Electron., Vol. 54, No. 4,
Fig.7 indicates the response of two output variables in this pp.1907 -1925, 2007.
case height of the water level in the mixed tank (H) and
[6] S. Karimi , A. Gaillard , P. Poure and S. Saadate, "FPGA-based real-
temperature of the water (T) in that tank. By using dynamic
time power converter failure diagnosis for wind energy conversion sys-
matrix control algorithm control signal in Fig. 8 was generated tems", IEEE Trans. Ind. Electron., Vol. 55, No. 12, pp.4299 -4308,
to overcome the effect of this disturbance. This generated 2008.
control signal is given back to the plant to bring back the

23
2013 IEEE Conference on Systems, Process & Control (ICSPC2013), 13 - 15 December 2013, Kuala Lumpur, Malaysia

[7] L. Idkhajine , E. Monmasson , M.W. Naouar , A. Prata and K. Boualla- [24] Y. Zhang, W. Xie, Z. Li, Y. Zhang, "Model Predictive Direct Power
ga, "Fully integrated FPGA-based controller for synchronous motor Control of a PWM Rectifier With Duty Cycle Optimization", IEEE
drives", IEEE Trans. Ind. Electron., Vol. 56, No. 10, pp.4006 -4017, Trans. Power Electr., Vol. 28, No.11,pp.5343 – 5351, 2013.
2009.
[25] .Rivera,V.Yaramasu, A. Llor, J. Rodriguez, B. Wu, M. Fadel, "Digital
[8] M. W. Naouar , A. A. Naassani , E. Monmasson and I. Slama- Predictive Current Control of a Three-Phase Four-Leg Inverter", IEEE
Belkhodja, "FPGA-based predictive current for synchronous machine Trans. Ind.Electr,,Vol. 60, No.11, pp.4903 – 4912, 2013.
speed drive", IEEE Trans. Power Electron., Vol. 23, No. 4, pp.2115 -
2126, 2008. [26] P. Cortes , A. Wilson , S. Kouro , J. Rodriguez and H. Abu-Rub "Model
predictive control of multilevel cascaded H-bridge inverters", IEEE
[9] F. Zhengwei , J. E. Carletta and R. J. Veillette, "A methodology for Trans. Ind. Electron., Vol. 57, No. 8, pp.2691 -2699, 2010.
FPGA-based control implementation", IEEE Trans. Control Syst. Tech-
nol., Vol. 13, No. 6, pp.977 -987, 2005.

[10] K.V. Ling, S.P. Yue and J.M. Maciejowski, “A FPGA Implementation of
Model Predictive Control”, Proceedings of the 2006 American Control
Conference, Minneapolis, Minnesota, USA, June 14-16, 2006.

[11] G. Knagge, A. Wills, A. Mills, and B. Ninnes,“ASIC and FPGA


implementation strategies for model predictive control”. In Proc.
European Control Conference, Budapest, Hungary, Aug. 2009

[12] A. Uppal, W. H. Ray, and A. B. Poore, “On the dynamic behavior of


contiuous stirred tank reactors”, Chem. Eng. Sci., Vol. 29, No. 4, pp.
967-985, 1974.

[13] A.W. Nienow, Stirred tank reactors, In: Ullmann’s encyclopedia of


industrial chemistry. WILEY-VCH, Weinheim 2010.

[14] A. Brucato, M.Ciofalo, F.Grisa, and R, Tocco, “On the simulation of


stirred tank reactors via computational fluid dynamics.” Chemical Engi-
neering Science, Vol. 55, No.2, pp. 291–302, 2000.
[15] E. Camacho, and C.BordonsModel predictive control. Berlin: Springer,
2004.

[16] D.Q. Mayne, J.B. Rawlings, C.V. Rao, and P.O.M. Scokaert. “Con-
strained model predictive control: Stability and optimali-
ty”,Automatica,Vol. 36, No.6, pp. 789–814, 2000.

[17] J. B. Rawlings, “Tutorial overview of model predictive control,” IEEE


Control Syst. Mag.,Vol. 20, No.3, pp. 38–52, 2000.

[18] C.E. Garcia, D.M. Prett, and M. Morari,“Model predictive control:


theory and practice-a survey”, Automatica, Vol. 25, No. 3, pp. 335-348,
1989.

[19] M.V. Kothare, V. Balakrishnan, andM. Morari, “Robust constrained


model predictive control using linear matrix inequali-
ties”,Automatica,Vol. 32, No. 10, pp. 1361-1379, 1996.

[20] P. Cortes , M. P. Kazmierkowski , R. M. Kennel , D. E. Quevedo and J.


Rodriguez "Predictive control in power electronics and drives", IEEE
Trans. Ind. Electron., Vol. 55, No. 12, pp.4312 -4324, 2008.

[21] C. Xia, M. Wang, Z. Song, T. Liu, "Robust Model Predictive Current


Control of Three-Phase Voltage Source PWM Rectifier With Online
Disturbance Observation", IEEE Trans.Ind. Inform.,Vol. 8, No. 3,pp.
459 - 471, 2012.

[22] J. Scoltock, T. Geyer,U.K..Madawala, "A Comparison of Model Predic-


tive Control Schemes for MV Induction Motor Drives", IEEE Trans.
Ind. Inform. , Vol. 9, No. 2, pp. 909 – 919, 2013.

[23] J. Rodriguez,M. P. Kazmierkowski, J.R. Espinoza, P.Zanchetta, H. Abu-


Rub,H.A. Young, C.A. Rojas, "State of the Art of Finite Control Set
Model Predictive Control in Power Electronics", ", IEEE Trans. Ind. In-
form., Vol. 9, No. 2, pp. 1003 - 1016 , 2013.

24

You might also like