Professional Documents
Culture Documents
...
!..
ii
.
.
.
( )
.
Jonathan Currie
( )
.
iii
.
.
.
:
.
[ .]1
.
.
iv
[.]1
.
.
.
.
.
.
:
.
Model
.Predictive Controllers
.
.
:
.
Model Predictive Control
.
vi
.
MATLAB/Simulink MPC TOOL
.
.
PI
.
.
.
.
.
2011/7/3 /21432/
vii
iv ....................................................................................................................................................
vi .....................................................................................................................................
viii .................................................................................................................................
xi ..............................................................................................................................................
1....................................................................................................................
1-1 2 ............................................................................................................................................
2-1 2 .............................................................................................................................
1-2-1 5 ...........................................................................................................................
2-2-1 5 ..........................................................................................................................
3-1 11........................................................................................................................... IDCOM
4-1 12...................................................................................... (DMC) Dynamic Matrix Control
5-1 13................................................................... (QDMC) Quadratic Dynamic Matrix Control
6-1 14......................................................................................... Predictive Functional Control
15............................................................................................
1-2 16...........................................................................................................................................
2-2 16.................................................................................................................................
1-2-2 18..............................................................................................................
2-2-2 19..................................................................................................
3-2-2 19...............................................................................................................
4-2-2 21............................................................................................................................
5-2-2 21..............................................................................................................................
6-2-2 22..................................................................................................................................
7-2-2 () 22...........................................................................................................
viii
3-2 23.........................................................................................
1-3-2 25.....................................................................................................................
1-1-3-2 27............................................................................................
2-3-2 28.........................................................................................................................
1-2-3-2 29............................................................................................
2-2-3-2 29.......................................................................................................
3-2-3-2
31.........................................................................
35.....................................................................
37...............................................................
5-2 38..........................................................................................................................
1-5-2 38........................................................................................................ GPC
1-1-5-2 38......................................................................................................
2-1-5-2 41.........................................................................................
3-1-5-2 41.......................................................................................................................
4-1-5-2 42...........................................................................................
2-5-2 43.............................................................................
1-2-5-2 44.......................................................
6-2 47........................................................................................................................
1-6-2 47....................................................................................................................
1-1-6-2 47......................................................................................................
2-1-6-2 48.......................................................................................................................
3-1-6-2 49......................................................................................................................
ix
2-6-2 51.....................................................................................................
52........................................................................................
1-3 53...........................................................................................................................................
2-3 53..................................................................................................................
3-3 56........................................................................................................
4-3 61.........................................................................................................................
1-4-3 61....................................................................................................
2-4-3 62.......................................................................................
3-4-3 63.......................................................................................................................
67.......................................................................................................................
1-4 68...........................................................................................................................................
2-4 69.........................................................................................................................
1-2-4 69.................................................................................
1-1-2-4 69...........................................................................................................
2-1-2-4 71.......................................................................................................
2-2-4 71................................................................................
1-2-2-4 71...................................................................................................................
2-2-2-4 72....................................................................................................................
3-2-4 73................................................................................
1-3-2-4
73.............................................................................................
2-3-2-4 74..............................................................................................
4-2-4 76.............................................................................................
1-4-2-4 76............................................................................................
2-4-2-4 76..............................................................................................
78...................................................................................................................
81
.
:
:
Toeplitz :Hankel
:
xi
Toeplitz:
Hankel :
xii
Toeplitz :
xiii
Introduction to Predictive Control
Introduction to Predictive Control
1-1:
.
.
.
.
2-1
( )1-1 .
]2[ Kalman
( )
.
Kalman
.
1-1
Kalman [:]2
][1-1
][1-2
.1
:
][1-3
||
||
||
||
||
|| :
||
||
:
||
||
.
(
) Kalman [:]2
.
1-2-1 :
(
)
. :
][1-4
][1-5
) (Estimator
.
2-2-1 :
:
][1-6
.Ricatti
Kalman ) (LQG
).(LQR
( )
[ .]2
( )
(Constraints) 1
[ ]2
[:]2
:System Constraints
.
:Process Nonlinearities
.
:Model Uncertainty
.
.
:
.
1
.
.
( )
.prediction horizon
.
.
( )
. ( ) (
)
. ( )2-1 .
.
) (MPC .
2-1
[ ]2
[ .]3 ( )3-1
.
( )4-1
[.]2
.
.
3- 1
4- 1
3-1 :IDCOM
Richalet
Model Predictive Heuristic Control
( 1)MPHC IDCOM
.Identification and Command :
.
.
.
.
10
Richalet
) Manipulated Variables (MVs
) . Disturbance Variables (DVs
) .Controlled Variables (CVs ) (FIR
:
][1-7
.
( )N .
.
.
.
.
[:]4
][1-4
11
Richalet
:
.1 : .
.2 : .
.3 : .
.4 : .PID
.
.
.
.
.
150000 [.]2
12
:
][1-8
.Dynamic Matrix
) (offline .
.
[ ]2
[:]4
][1-9
.
.
13
.
.
QDMC
[ ]2
.
12 .
14
Model Predictive Controllers-Generalized
Predictive Control (GPC)
15
Model Predictive Controllers
)Generalized Predictive Control (GPC
1-2:
MPC
.
.
.
)Generalized Prediction Control (GPC
.
2-2 :
:
.
16
( )
:
.
.
( .)...
.
(
).
.
.
.
.
.
( )
17
.
( )
[ ]4 ( )1-2
.
1-2
1-2-2 :
18
2-2-2 :
. .
( )
.
.
[ ] 7
( )Offline
.
3-2-2 :
.
.
.
19
.
[ ]7
.
.
4-2-2 :
( )
) .
(
.
.
( )
.
(.)2-2
20
2-2
:
.
.
(
)
.
5-2-2 :
( )
.
.
.
21
6-2-2:
.
PID
[ ]7
.
.
.
.
7-2-2 () :
.
22
.
.
.
.1
: Hard Constraints
. Soft Constraints
.
.
3-2 :
2
1
.
2 [.]7
23
.
[.]7
(
...)
[:]7
( )
.
( )
.
(
) .
( )
.
24
[ ]7
LPF
.
.
.
FIR
.1
.
.
.2
1-3-2 :
:
1
. .
2 [ ]7 .
25
[]
[]
][2-1
]
[]
[]
:
][2-2
( )
.
.
.
.
:
1 .
:
.
26
1-1-3-2 :
. :
:
. :
][2-3
:
][2-4
:
]
] [
:
][2-5
:
}
27
][2-6
:
]
] [
2-3-2 :
CARIMA1
:
][2-7
:
.
.
.
:
1
28
][2-8
:
1-2-3-2 :
] [2-4 ].[2-5
2-2-3-2 :
.
] [2-7
29
][2-9
.
:
3-2-3-2
.1
. :
[
]
[.]7
.2
.
.3
.4
.FIR
.5
3-3-2 :FIR
:
30
1-3-3-2 :Impulse response
:
][2-10
][2-11
.
.
:
][2-13
31
4-2 :
.
.
.
:
][2-14
:
( .
) Toeplitz
32
1-4-2 :
:1
][2-15
:
][2-16
] [2-15 ] [2-16 :
][2-17
][2-18
][2-19
] [2-17:
] [2-15 ] [2-18:
}
( ) D=0
.
33
]} [2-20
][2-21
]
[
][
][2-22
[
:
][2-23
2-4-2 :
diophantine
[ ] 7
.
.
34
1-2-4-2 CARIMA
] [2-9
:
][2-24
:
][2-25
:
] [2-25 :
] [2-24
][2-26
d.o.f.
:
][2-27
] [2-27 ].[2-15
] [2-15 ] [2-16 ] [2-18 ] [2-27
... ] [2-27
35
.1 ] [2-26
( ) :
.2 :
]
]
][2-28
]
[ ]
[]
[
]
[
]
.3 ( Toeplitz/Hankel ) ][2-28
:
][2-29
.4 ] [2-29 :
36
][2-30
:
][2-31
:
2-2-4-2 CARIMA
.
:
][2-32
2 3 4 :
][2-33
:
][2-34
:
37
5-2 :
(
) .
.
GPC
.
1-5-2 :GPC
GPC
.
1-1-5-2 :
GPC
38
][2-35
(.)3-2
( )4-2
:
][2-36
3 -2
.
1
39
4 -2
:
][2-37
:
][2-38
40
- .
2-1-5-2 :
] [2-14
][2-39
|
]
]
] [2-36
)
][2-40
[
]
3-1-5-2 :
.
] [2-38 .
41
:
][2-41
:
][2-42
:
][2-43
:
][2-44
. ] [2-38
Quadratic Program
4-1-5-2 :
] [2-38
. (
) .
42
[.]7
2-5-2 :
.
( ) .
.
1 :
43
()
:
][2-46
1
.
:
][2-47
( )
.
.
.
1-2-5-2 :
:
( ) .
.
44
] [
][2-48
[ ]
[]
] [2-46
:
: ] [2-48 ] [2-23
] [2-37 :
][2-49
:
] [
:
:
]
][2-50
:
][2-51
:
]
:
]
45
]]
][2-52
[]
] [
:
]
] [2-51 1
.
:
] [2-52 ] [2-48 :
][2-53
] [
] [2-48
2 ] [2-15
1 .
2 d .x
46
6-2 :
.
.
.
1-6-2 :
.
.
( )
.
1-1-6-2 :
] [2-42
:
47
][2-54
][
][
:
][2-55
:
][2-56
2-1-6-2 :
:
][2-57
] [
:
][2-58
.
:
48
][2-59
] [
] [
] [2-57 :
][2-60
:
][2-61
3-1-6-2 :
] [2-31
:
][2-62
[.]7
:
][2-63
49
:
][2-64
2-6-2 :
] [2-63
:
] [2-49
][2-65
MATLAB
Active set algorithms .Interior point QP algorithms ( )5-2
Active set
50
( ) .1
[ ]5 [.]8
.
MATLAB
1
Active set algorithms .
51
Designing a Model Predictive Controller
Of a DC Motor
52
Designing a Model Predictive Controller
Of a DC Motor
1-3:
.
:
.
PI .
MATLAB/Simulink
MATLAB-MPC .JMPC
.
.
2-3 :
( .)1-3
:
][3-1
53
1-3
:
][3-2
]:[3-1
][3-3
]:[3-3
][3-4
:
][3-5
:
][3-6
54
][3-7
:
][3-8
MATLAB/Simulink
(.)2-3
2-3 MATLAB/Simulink
()3-3
(.)4-3
3-3
55
4-3
3-3 :
:
][3-9
:
.
P-PI
PI .
PI
56
][3-10
()
:
][3-11
][3-12
][3-13
][3-14
( .)5-3
( )6-3 ( )7-3 .
5-3 PI
57
6-3
7-3
PI
P-PI .
P :
][3-15
58
][3-16
][3-17
PI :
][3-18
][3-19
][3-20
][3-21
( .)8-3 ( )9-3
( )10-3 .
8-3 PI P-PI
59
9-3 P-PI
11-3 PI
60
4-3 :
.
Kalman
.
] [2-52
.
1-4-3 :
MATLAB/Simulink
:
;]Ac=[-Ra/La, -Cmphi/La ; Cmphi/J ,-B/J
;]Bc=[1/La 0;0 -TL/J
;]Cc=[1 0;0 1
;]Dc=[0 0;0 0
] [2-48 :
;)[Ap,Bp,Cp,Dp]=c2d(Ac,Bc,Cc,Dc,ts
;)[m1,n1]=size(Cp
;)[n1,n_in]=size(Bp
;)A_e=eye(n1+m1,n1+m1
;A_e(1:n1,1:n1)=Ap
;A_e(n1+1:n1+m1,1:n1)=Cp*Ap
;)B_e=zeros(n1+m1,n_in
;B_e(1:n1,:)=Bp
;B_e(n1+1:n1+m1,:)=Cp*Bp
;)C_e=zeros(m1,n1+m1
61
;)C_e(:,n1+1:n1+m1)=eye(m1,m1
2-4-3 :
] [2-23
] [2-22
] [2-40 .
] [2-49
. ] [2-52
][3-1
:
][3-2
[ .] 6 :
;n=n1+m1
;h(1,:)=C_e
;P(1,:)=C_e*A_e
for k=2:Nu
;h(k,:)=h(k-1,:)*A_e
62
;P(k,:)= F(k-1,:)*A_e
end
;v=h*B_e
;)H=zeros(Nu,Ny
% Declare the dimension of H
;H(:,1)=v
% First column of H
for i=2:Ny
H(:,i)=[zeros(i-1,1);v(1:Nu-i+1,1)]; % Toeplitz matrix
end
;)BarRs=ones(Nu,1
;H_H= H'*H
;H_P= H'*P
;H_R=H'*BarRs
:
;))DeltaU=inv(H_H+Lambda*eye(Nu,Nu)*(H_R*r(k)-H_P*X(k
;)deltau=DeltaU(1,1
% First element of the control law
3-4-3 :
.
.
1
. :
% Initial value of state variables
% Initial value of state feedback
% Number of simulation samples
)% Set point (here of speed
% u(k-1) =0
1
;)[n,n_in]=size(B_e
;]xm=[0;0
;)Xf=zeros(n,1
;N_sim=200
;r=ones(N_sim,1)*209.4
;u=0
63
;y=0
;for k=1:N_sim
;)DeltaU=inv(H_H+Lambda*eye(Nu,Nu))*(H_R*r(k)-H_P*Xf
;)deltau=DeltaU(1,1
;u=u+deltau
;u1(k)=u
;y1(k)=y
;xm_old=xm
;xm=Ap*xm+Bp*u
;y=Cp*xm
;]Xf=[xm-xm_old;y
end
(
) .
MATLAB/Simulink
Jonathan Currie
.
MATLAB/Simulink
64
1-3
C
(.)2-3
65
Simulink
:
.
.
.
66
Results and Discussion
67
Results and Discussion
1-4:
.
.
:
()
.
() ( )speed weight=10
.
() ( .)speed weight=0.1
.
.
68
2-4 :
1-2-4 :
( )2 :
1-1-2-4 :
( )1-4 (.)2-4
1-4
2-4
69
( )5A .
2-1-2-4 :
( ) w=10 rad/sec ( )3-4
(.)4-4
3-4
4-4
70
2-2-4 :
1-2-2-4 :
.
( )5-4 (.)6-4
5-4
6-4
71
.
2-2-2-4 :
.
. ( )7-4
(.)8-4
7-4
8-4
72
3-2-4 :
1-3-2-4
( )9-4 (.)10-4
9-4
11-4
73
2-3-2-4 :
( )11-4 ( )12-4 ( )13-4 (.)14-4
:J(new)=10J
11-4
12-4
74
:J(new)=0.5J
13-4
14-4
75
4-2-4 :
1-4-2-4 :
.
. ( )15-4
.
15-4
2-4-2-4 :
( )16-4 .
76
17-4
77
.
.
Generalized Predictive Control
.
.
.
.
.
78
.
.
.
.
. .
79
:
.1
.
.2
.
.3 .
.4
.
.5
.
.6
.
80
References
81
http://www.maorielectrical.com
Contents
................................................................................................... 73
Contents
2-3-2-1 Disturbance Model ....................................................................................................... 29
2-3-2-2 Integral Action .............................................................................................................. 29
2-3-2-3 General Rules for Choosing
...................................................................................... 30
................................................................................ 35
.............................................................................. 37
Contents
Contents
Introduction .......................................................................................................................................... iv
Purpose of the Project ....................................................................................................................... vi
Contents ............................................................................................................................................... viii
Sempol Guide ........................................................................................................................................ xi
Introduction to Predictive Control ......................................................................................................... 1
1-1 Introduction .................................................................................................................................. 2
1-2 Why MPC? .................................................................................................................................... 2
1-2-1 First Step ............................................................................................................................ 5
1-2-2 Second Step ....................................................................................................................... 5
1-3 IDCOM Algorithm ....................................................................................................................... 10
1-4 (DMC) Dynamic Matrix Control Algorithm ................................................................................... 12
1-6 (QDMC) Quadratic Dynamic Matrix Control Algorithm ................................................................ 13
1-7 Predictive Functional Control Algorithm ...................................................................................... 14
Model Predictive Controllers GPC ...................................................................................................... 15
2-1 Intrducttion ................................................................................................................................. 16
2-2 Basic Concepts ............................................................................................................................ 16
2-2-1 Depending on Prediction ..................................................................................................... 18
2-2-2 Model Based Prediction ....................................................................................................... 19
2-2-3 Choosing the Optimal Control Law ....................................................................................... 19
2-2-4 Reseeding Horizon ............................................................................................................... 20
2-2-5 Safe Performance ................................................................................................................ 21
2-2-6 Tuning .................................................................................................................................. 22
2-2-7 System Constraints .............................................................................................................. 22
2-3 Models Used Iin Predictive Control .............................................................................................. 23
2-3-1 State Space Models ............................................................................................................. 25
2-3-1-1 Disturbance Model ....................................................................................................... 27
2-3-2 Transfer Function Models ..................................................................................................... 28
Acknowledgment
Acknowledgment
This work was the result of a combination of efforts that have gathered
to present all the details and results achieved.
I would like to thank all the people who helped me along the way to
reach this point. Special thanks to my supervisor Dr. Abdulkader
Joukhadar who was the source of many ideas in this research.
Also, I give special thanks to Mr. Jonathan Currie who was a great help
to me, always answering my questions without hesitation.
Abstract
Abstract