Professional Documents
Culture Documents
), 2011
DOI: 10.1007/s12204-010-1086-z
YANG Nan (
),
XI Yu-geng ()
(Department of Automation, Shanghai Jiaotong University; Key Laboratory of System Control and Information Processing,
Ministry of Education, Shanghai 200240, China)
0 Introduction
Due to the capability of handing constraints explicitly, model predictive control (MPC) is the unique
category of optimal control algorithms which can
deal with multi-variable systems subject to input and
state/output constraints. Therefore, MPC has been
widely applied in industrial process control. However,
since the constrained optimization problem has to be
solved online, MPC should be implemented by high
performance computers, which restricts its application
from the eld control facilities and low-cost computation devices. Recently, the application of MPC has been
greatly extended due to the increasing requirements of
various application elds. Hence, more and more attention has been paid to MPC controller for eld control
facilities. The main problem is how to implement MPC
controller by using low-cost computation devices.
Field programmable gate array (FPGA) technology
has been developed very quickly in recent years as a
Received date: 2010-07-06
Foundation item: the National Science Foundation of
China (Nos. 60934007 and 61074060), the Postdoctoral Science Foundation of China (No. 20090460627),
the Postdoctoral Scientific Program of Shanghai
(No. 10R21414600), the Specialized Research Fund
for the Doctoral Program of Higher Education
(No. 20070248004) and the China Postdoctoral Science
Foundation Special Support (No. 201003272)
E-mail: dwli@sjtu.edu.cn
1 DMC Algorithm[7-8]
a1
0
.
..
.
.
.
A = aM
a1
.
.
..
..
aP aP M+1
At time k, assume the control input increment as
uM (k). By using dynamic matrix A, it can be obtained that
B0 = .
.
.
1
0 0
.
.
1 . . ..
.
.. . .
. 0
.
1 1
Quadratic
programming
Output
s.t.
Plant
(4)
Predictive y
model
(3)
Shift
Adjustment
Fig. 1
min J(k) =
s.t.
(5)
where
H = 2(AT QA + R),
dT = 2(P (k) yP M (k))T QA,
C = [B B A A]T ,
T
In addition, from the property of DMC, the feasible solution can be obtained according to the solution at last
time by moving it one time instant ahead.
2.2 Design of DMC on FPGA
Due to the advantages of exible design, parallel processing and low prices, FPGA is selected as the hardware platform to implement the DMC controller.
As described in Section 1, DMC algorithm is composed by predictive model, rolling horizon optimization,
and feedback/adjustment. It can be decomposed into
the following modules: shift and predictive, QP, adjustment, feedback, output. The structure is shown in
Fig. 2.
Shift and
predictive module
Quadratic
programming
Output
module
Plant
Adjustment
module
Fig. 2
Feedback
module
duce it.
Flash memory
A/D
D/A
CPU
GPIO
Process hardware
development
Matrix
calculator
Timer
Fig. 3
Hardware
platform
Software
development
Verificiation file
generatiom
Software
debug
Design
implementation
Software
profiling
Device
configuratiom
Device
configuratiom
Fig. 4
Step 1 Build an embedded system hardware platform. Table 1 shows the overall system resource utilization.
Step 2 Prepare the embedded software. Write a
software program which includes DMC algorithm and
interfaces to hardware module.
Step 3 Debug software and hardware. Prepare the
test program. Then, debug and optimize our design.
Step 4 Hardware-in-the-loop verication. Compare the results between MATLAB simulation and implemented DMC controller. If the errors exceed the
allowable error precision, redesign of the entire system
will be taken.
FF
(Percentage)
LUTs
(Percentage)
DSP48
(Percentage)
Slice
(Percentage)
FIFO16/RAMB16
(Percentage)
DCM
(Percentage)
System colck
7 234(66%)
9 128(83%)
13(40%)
3 854(70%)
33(91%)
1(25%)
100 MHz
FFFlat flop, LUTLook up table, FIFOFirst input first output, RAMBRAM blok, DCMDigital clock management
Control and
management
module
Operating module
Control
singal
Data
Control
singal
Storage module
Data
FPGA bus
Fig. 5
y2
2
s2 + 2s + 2
=
3
s2 + 4s + 8
1
s + 1 u1 .
1
u2
2
s + 2s + 5
Taking the sampling time T = 0.2 s, and choosing predictive horizon and control horizon as 10 and 2 respectively. The error precision is 10e6 and the constraints
are:
Table 2
2 u2 0.
And the references of the output are 0.8 and 0.6 respectively.
To compare DMC implemented by MATLAB and
0.8
y1
0
20 40 60 80 100
Sample times
MATLAB
tm /ms
te /ms
5.14
0.52
0.28
18.71
1.21
0.64
39.86
4.79
2.45
0.6
0.4
0.4
0.2
0.2
20 40 60 80 100
Sample times
20 40 60 80 100
Sample times
Fig. 6
0.5
0.5
1.0
1.5
2.0
20 40 60 80 100
0
Sample times
MATLAB
20 40 60 80
Sample times
1.5
100
1.0
20 40 60 80 100
Sample times
2.0
0
0.2
0.1
0.1
0.1
0.1
0.1
0.2
0
u1
0.2
u2
0.2
20 40 60 80 100
Sample times
FPGA
Fig. 7
u1
u2
u2
u1
u1
20 40 60 80 100
Sample times
FPGA
0.1
0.2
20 40 60 80 100
0
Sample times
MATLAB
Fig. 8
u2
y1
y2
0.2
0.2
t/ms
0.6
0.4
0.4
0.8
0.6
0.6
y2
y1
0.1
0.1
20 40 60 80 100
Sample times
0.2
0
0.2
20 40 60 80 100
0
Sample times
FPGA
20 40 60 80 100
Sample times
Error of u2 106
Error of u1 106
2
0
2
4
0
10
20
30
40 50 60
Sample times
Fig. 9
70
80
90
100
0
5
10
0
10
20
30
40 50 60
Sample times
70
80
90
100
When using hardware matrix calculator, the computing time of dierent iteration steps are shown in Table 3.
This table shows that when the system state is close to
the steady-state, the computing time is shorter. However, at the beginning of control, the computing time is
much longer. Therefore, the sampling time should be
determined by the computing time at the beginning.
Table 3
Iterations
0.58 (0.58)
0.56(2.81)
10
0.55(5.45)
40
0.42(16.8)
100
0.29(28.6)
5 Conclusion
This paper studies an MPC controllers implementation on FPGA. By using the FPGAs parallel process
capacity, proper design and resources utilization, the
DMC algorithm is implemented for small scale applications with limited computing capacity. Performance
testing shows that our design is more eective compared
to traditional implementations.
Considering the complexity of MPC algorithm and
the variety of FPGA systems, the design can be further
improved by increasing the percentage of algorithm implemented by hardware in the future research. Meanwhile, optimizing hardware layout and interconnection
by tools such as XILINX ISE can reduce signal delay
and race and hazard phenomenon, thus improve the
References
[1] Qin S J, Badgwell T A. A survey of industrial model
predictive control technology [J]. Control Engineering
Practice, 2003, 11(7): 733-764.
[2] Tian Xiang. Study of parallel computing system for
model predictive control [D]. Hangzhou: Department
of Optical Engineering, Zhejiang University, 2007 (in
Chinese).
[3] Russell T, Wayne B. Recongurable computing for
digital signal processingA survey [J]. Journal of
VLSI Signal Processing, 2001, 28(1-2): 7-27
[4] He Ming-hu, Ling KecK-Voon. Model predictive on
a chip [C]//2005 International Conference on Control and Automation. Budapest, Hungary: IEEE, 2005:
528-532.
[5] Leonidas G B, Panagiotis D V, Arnold M G, et al.
A co-processor FPGA platform for the implementation
of real-time model predictive control [C]//Proceedings
of the 2006 American Control Conference. Minneapolis, Minnesota, USA: IEEE, 2006: 1912-1917.
[6] He Ming-hua, Chen Chong, Zhang Xue-ying. FPGA
implementation of a recursive rank one updating matrix inversion algorithm for constrained MPC [C]//The
6th World Congress on Intelligent Control and Automation. Dalian, China: IEEE, 2006: 733-737.
[7] Xi Yu-geng. Predictive control[M]. BeijingNational
Defense Industry Press, 1993.
[8] Li De-wei, Xi Yu-geng, Qin Hui. An equivalent aggregation optimization strategy in model predictive control [J]. Acta Automatica Sinica, 2007, 33(3): 302-308.
[9] Chen Bao-lin. The optimization theory and algorithm
[M]. 2nd ed. Beijing: Tsinghua University Press, 2005:
415-422 (in Chinese).