1560
JOURNAL OF COMPUTERS, VOL. 8, NO. 6, JUNE 2013
MPC Controller Performance Evaluation and Tuning of Single Inverted Pendulum Device Chao Cheng Department of Automation, Beijing University of Chemical Technology, Beijing, China Email:
[email protected] Zhong Zhao1, Haixia Li Department of Automation, Beijing University of Chemical Technology, Beijing, China Email:
[email protected] Abstract—Inverted pendulum is a non-linear, multivariable and unstable device, a model predictive control (MPC) performance evaluation and tuning method for inverted pendulum device is proposed. MPC was designed to control the inverted pendulum device, and the minimum variance covariance constrained control (MVC3) was applied to evaluate the performance of the MPC controller and tune its parameters. The application results to a single inverted pendulum device have verified the feasibility and effectiveness of the proposed method. Index Terms—Inverted pendulum, Model Predict Control, Minimum Variance Covariance Constrained Control, Performance evaluation, Controller-tuning
I. INTRODUCTION Inverted pendulum is a non-linear, strongly coupled, multivariable and unstable system. Because it can effectively reflect a lot of key control problems, such as the stabilization, robustness, tracking performance, many control theories and control methods can be verified with the inverted pendulum experiment. Google Technology LTD [1] designed its LQR controller. D. Chatterjee et al. [2] described the swing-up and stabilization with a restricted cart track length and restricted control force using generalized energy control methods. M. Bugeja [3] presented a swing-up and stabilizing controller on inverted pendulum non-linear model. S.Y. Zhang [4] and Y. Fan et al. [5] designed the fuzzy controllers for inverted pendulum. L.X. Deng [6] designed a controller based on back stepping for inverted pendulum. Model Predictive Controllers (MPC) was proposed by J. Richalet et al. in 1978[7]. It is a model-based optimal control strategy [8]. Its ability to incorporate meaningful limits on manipulative as well as control variables has allowed the industry to move away from traditional regulation-type control and focus on the economics of operating point selection [9]. Model predictive control has been widely applied to process control [10]. On the 1, Corresponding author,
[email protected];
© 2013 ACADEMY PUBLISHER doi:10.4304/jcp.8.6.1560-1570
other hand, it is noted that less effort has been made on the performance monitoring of MPC applications, while the performance monitoring of conventional controllers has been well studied such as in Harris (1989) [11], Harris, Boudreau, and Macgregor (1996) [12], Huang, Shah, and Kwok (1997) [13], Huang and Shah (1999) [14], Jelali (2005) [15], Srinivasan, Rengaswamy, and Miller (2005) [16] [17], Xu, Lee, and Huang (2006) [18], Salsbury (2007) [19] and Bauer and Craig (2008) [20]. The Minimum Variance Covariance Constrained Control (MVC3) principle was proposed by R.E. Skelton et al. [21] as the solution of linear feedback control problem. For multivariable systems, D.J. Chmielewski* et al. [22] solved it with LQR method. In this work, the model predictive control (MPC) performance evaluation and tuning system has been developed by extended MVC3 and applied to a single inverted pendulum device. The application results have verified the feasibility and effectiveness of the developed system. II. THE MATHEMATIC MODEL OF LINEAR SINGLE INVERTED PENDULUM The linear single inverted pendulum can be described as a system composed of a cart and a homogeneous rod without air resistance and all kinds of frictions, as is illustrated in Fig. 1.
Figure 1. Linear single inverted pendulum model
Where, M , m , x , F , l , θ ,denote cart weight, rod weight, cart level displacement, force on cart, the length from the
JOURNAL OF COMPUTERS, VOL. 8, NO. 6, JUNE 2013
1561
axis of the rod angle to the center of rod mass, the angle of the rod from the vertical upward direction respectively. A. State Space Model of Linear Single Inverted Pendulum The method of this work is based on linear constant state space model as: x = Ax + Bu . y = Cx + Du
(1)
The mathematical model of single inverted pendulum can be obtained by mechanism analysis [1], shown in (2), where, u , is cart angular velocity. x and θ , are the same as shown in Fig 1.
⎛ x ⎞ ⎛0 ⎜x⎟ ⎜ ⎜ ⎟ = ⎜0 ⎜θ ⎟ ⎜ 0 ⎜ ⎟ ⎜ ⎜ ⎟ ⎝θ ⎠ ⎝ 0
0⎞ ⎛ x ⎞ ⎛ 0⎞ ⎜ ⎟ 0 ⎟⎟ ⎜ x ⎟ ⎜⎜ 1 ⎟⎟ u + 0 0 1 ⎟ ⎜θ ⎟ ⎜ 0 ⎟ ⎟⎜ ⎟ ⎜ ⎟ 0 29.4 0 ⎠ ⎝⎜ θ ⎠⎟ ⎝ 3 ⎠
1 0
0 0
AB
(
observability matrix Uo = C CA
(2)
2) Minimization problem of LMI: The problem can be stated as a optimality problem that minimize the largest eigenvalue, λ , of the matrix G ( x ) under inequality constraint H ( x ) < 0 [24]: min λ s.t. G ( x ) < λ I . H (x) < 0
s.t. F ( x ) < 0
,
x ( k + 1) = Ax ( k ) + Bu( k ) + Ew ( k )
)
T
)
and were
obtained and then rank criterion was employed to analysis its controllability and observability. It has been proved that the system as (2) has both controllability and observability. C. Stability Analysis of Single Inverted Pendulum The extended MVC3 performance evolution and MPC tuning system is based on the stabilization system. Hence, Stability analysis is necessary. The poles of the inverted pendulum as (2) are ( 5.4222 −5.4222 0 0 ) , where positive real root appears. It shows that the system as (2) is instable and this requires a stabilizer before designing a MPC controller for the generalized controlled system [23]. III. MPC PERFORMANCE EVOLUTION AND TUNING METHODE BASED ON EXTENDED MVC3 A. Introductions of LMI and Lemmas • About LMI: Assume a linear matrix inequality (LMI) can be stated as: F ( x ) = F0 + x1F1 + ⋅⋅⋅ + xm Fm < 0 .Where, variable x constitutes a convex set, LMI can be solved using the method of convex optimization problem [24]. 1) Feasible solution of LMI:
© 2013 ACADEMY PUBLISHER
.
where, c T x is object function. • Lemmas: Consider a linear time-invariant state-space system:
An −1B CAn −1
s.t.F ( x ) < tI
min c T x
B. Controllability & Observability Analysis of Single Inverted Pendulum The controllability and observability of a system is prerequisite for analysis and controller design. Here,
(
min. t
Another expression is as:
⎛x⎞ ⎜ ⎟ ⎛ x ⎞ ⎛ 1 0 0 0⎞ ⎜ x ⎟ ⎛ 0⎞ + ⎜ ⎟u y=⎜ ⎟=⎜ ⎟ ⎝θ ⎠ ⎝ 0 0 1 0 ⎠ ⎜θ ⎟ ⎝ 0 ⎠ ⎜⎜ ⎟⎟ ⎝θ ⎠
Controllability matrix Uc = B
If there exists x makes, F ( x ) < 0 , established, then the LMI is feasible [24].This can be expressed using the following formulation:
y ( k ) = Cx ( k )
,
(3)
where, x(k ) , u ( k ) , y ( k ) are state variable, manipulative variable and control output variable respectively, A , B , C and E are process model matrix, w ( k ) denotes stationary, Gaussian noise with zero mean and covariance as ∑ w . State feedback controller can be expressed as: u ( k ) = Kx ( k ) .
(4)
Then, the closed-loop system can be written as: x ( k + 1) = ( A + BK )x ( k ) + Ew ( k ) .
(5)
Lemma1: LMI of MVC3 [22]: For system (5), ∃ stabilizing K and ∑ x ≥ 0 s.t. ∑ yi , i = 1... p ( A + BK ) ∑ x ( A + BK )T + E ∑ w E T = ∑ x T ∑ y i = ϕi C ∑ x C ϕi 2 ∑ y i < yi , i = 1… p
If and only if ∃ W , X > 0 and Y , i = 1... p s.t. ⎡ X − E∑ w ET ⎢ T ⎣⎢ ( AX + BW )
AX + BW ⎤ ⎥>0 X ⎦⎥
Yi ϕi CX ⎤ ⎡ ⎢ ⎥>0 T T X ⎥⎦ ⎣⎢ ( CX ) ϕi
1562
JOURNAL OF COMPUTERS, VOL. 8, NO. 6, JUNE 2013
Yi ⎡ ⎢ T T ⎣ (CX ) ϕi
Yi < yi2 , i = 1… p ,
where, K is the linear state feedback gain; ∑x is the state variables covariance; ∑ yi is the i th variable of output
⎡ Uj ⎢ T T ⎣⎢W ϕ j
covariance ∑ y ; yi2 is constraint of ∑ yi . Lemma2: Schur complements [25]: For symmetric matrix:
⎡S S = ⎢ 11 ⎣ S 21
S 12 ⎤ S 22 ⎥⎦
1) S < 0 2) S11 < 0 , S22 − S T 12 S −111S12 < 0 3) S22 < 0 , S11 − S12 S −122 S T 12 < 0 .
m
∑ qi ∑ yi + ∑ rj ∑u j
∑ x , K ,Y i ,U j i =1
j =1
(6)
s.t. ( A + BK ) ∑ x ( A + BK )T + E ∑ w E T = ∑ x (7)
∑ yi = ϕi C ∑x C T ϕi
(8)
∑u j = ϕ j K ∑ x K T ϕ j
(9)
∑ yi < yi 2 , i = 1... p ∑u j < u j 2 , j = 1...m .
(10) (11)
The main design target of the extended MVC3 is obtaining linear feedback gain K to make object function (6) minimum, additionally, to make the steady-state control outputs and the covariance of manipulative variables satisfy a set of bounds respectively. The above problem can be converted to a convex form of LMI as follows. Theorem 1: If and only if ∃W , X ≥ 0 and Yi , U j , i = 1... p , j = 1...m s.t. p
min
m
∑ qiY i + ∑ rjU j
X ,W ,Y jU j i =1
⎡ X − E ∑w E T s.t. ⎢ T ⎢⎣ ( AX + BW )
© 2013 ACADEMY PUBLISHER
(14)
ϕ jW ⎤
⎥>0 X ⎥⎦
(15)
Yi < yi 2 , i = 1... p
(16)
U j < u j 2 , j = 1...m
(17)
k →∞
B. Extended MVC3Problem and Its LMI Solution In this work, constraints on manipulative variables were included in the MVC3 scheme. The extended MVC3 can be described as: min
⎥>0 X ⎦
Then, u = Kx( k ) = WX −1x ( k ) is the extended MVC3 linear feedback controller of system (2), satisfying covariance constraints. Proof: If the closed-loop system (2) is stable, the steady state covariance matrix can be expressed T as ∑ x = lim {E[x ( k )x ( k )]} , and ∑ x satisfies (7). From
The following three conditions are equivalent:
p
ϕ i CX ⎤
j =1
AX + BW ⎤ ⎥>0 X ⎥⎦
(12)
(13)
the definition of covariance, it is easily to get the expression ∑ yi = ϕi C ∑x C T ϕi , ∑u j = ϕ j K ∑x K T ϕ j , where, ∑ yi < y i
2
∑ u j < u j .From Lemma 1, 2
,
∃∑ x < X , Makes the state covariance constraint (7) is
equivalent to LMI (13). Let ϕ i CXC T ϕ i < Yi , i = 1,… p ,
ϕ j KXK T ϕ j < U j , j = 1,… m , and Yi < yi 2 , i = 1... p , U j < u j 2 , j = 1...m .Then: p
m
p
m
i =1
j =1
i =1
j =1
∑ qi ∑ yi + ∑ rj ∑u j ≤ ∑ qiYi + ∑ rjU j . p
m
i =1
j =1
Then, minimizing the function ∑ qiYi + ∑ rjU j will ensure
the
object
p
m
i =1
j =1
function ∑ qi ∑ yi + ∑ rj ∑ uj be
minimized too. Still use Lemma 1, (14)-(17) can be derived. From the definition of extended MVC3 problem, controller feedback solution K ∗ can be solved by K ∗ = W ∗ X ∗−1 with LMI. Where, W ∗ and X ∗ denote the optimal solution matrices of the extended MVC3 problem. Conditions (14)-(17) are exactly that required to determine the feasibility of the extended MVC3 problem. If the problem turns out to be infeasible, then the bounding region defined by yi 2 and u j 2 terms should be enlarged. C. Performance Evolution Based on Extended MVC3 For closed-loop system (5) the multi-variable form of LQG performance benchmarks can be defined as J LQG = E( y T Qy ) + λ E( u T Ru) . In order to evaluate controllers under constrains, the covariance constrains are included in the LQG performance evaluation benchmarks. New performance evolution is exactly an advanced
JOURNAL OF COMPUTERS, VOL. 8, NO. 6, JUNE 2013
1563
MVC3 problem. After deformation, the problem can be solved by technology of LMI: If and only if ∃W , X ≥ 0 , λ > 0 and Yi , U j , i = 1... p , j = 1...m and the following optimization as (18) can be solved, p
m
min ∑ qiY i +λ ∑ rjU j
X ,Y ,U ,W i =1
(18)
j =1
s.t. (13)-(17). Then, according to the change of λ , optimized curve of control outputs variance Var ( y ) and manipulative variable variance Var ( u ) can be obtained. This optimized curve can be used as the benchmark to evaluate controller performance. According to optimization objective function: J = E( y T Qy ) + λ E( uT Ru)
= Trace(Q ∑ y +λ R ∑u ) = QTrace(C ∑x C T ) + λ RTrace( K ∑x K T )
.
Let CXC < Y , KXK < U , thus, minimizing QTrace(Y ) + λ RTrace(U ) can ensure J be minimized too. Object function can be rewritten as m
i =1
j =1
J MVC 3 = ∑ qiY i + λ ∑ rjU j . (13)-(17) can be obtained as
the same as LMI of advanced MVC3. The MVC3 benchmark curve is the lower limit of the controller performance. That is, all linear controllers can only be located in operating area above the curve. Comparing actual run-time steady state outputs and manipulated variables covariance with the MVC3 benchmark cure, closer distance means better performance. In practice, a benchmark p
m
i =1
j =1
u ( k ) = Kx ( k )
be −1
K = −( B PB + R ) B PA T
T
,
,
then, where,
P = AT PA − AT PB ( B T PB + R ) −1 B T PA + Q .
• LQG control problem LQG control problem can be described as: 1 T T T ∑ E[ y ( k ) Qy ( k ) + u( k ) Ru( k )] u ( k ) T →∞ T k =0
(20)
min lim
s.t.
x ( k + 1) = Ax ( k ) + Bu( k ) + Ew ( k ) , y ( k ) = Cx ( k )
where feedback controller can be solved by K = −( B T PB + R ) −1 BT PA , here, P, Q is the same as the solution of infinite horizon MPC. Rewrite the object function in (21) as, 1 T T T ∑ E[ y ( k ) Qy ( k ) + u( k ) Ru( k ) T →∞ T k =0
T
p
i =1
controller
J = lim
≤ QTrace(CXC T ) + λ RTrace( KXK T ) T
p
Let Q = C T DC,( D = ∑ qiϕiϕiT ) , and let feedback
J MVC 3 = ∑ qiY i + ∑ rjU j can be calculated as λ = 1 , then,
judge controller performance by the ratio η which is the value of benchmark J MVC 3 divided by actual operation
= lim E[ y ( k )T Qy ( k ) + u( k )T Ru( k )] k →∞
{
= Trace Q ∑ y + R ∑ u p
m
i =1
j =1
.
}
= ∑ qiϕi ∑ y ϕiT + ∑ rjϕ j ∑u ϕ j T
• Extended MVC3 control problem without constraints Extended MVC3 control problem can be described as: p
m
min ∑ qiY i + ∑ rjU j ∑ x i =1
(21)
j =1
s.t. ( A + BK ) ∑ x ( A + BK )T + E ∑ w E T = ∑ x
ϕi C ∑ x C Tϕ i T = Yi , i = 1
p
ϕ j K ∑x K T ϕ j T = U j , j = 1… m .
steady state covariance J arh . η closes to 1 means better performance.
The goal is to get a feedback gain matrix K by minimize
D. Extended MVC3 and Infinite Horizon MPC
the objective function ∑ qiY i + ∑ rjU j .
• Solution of infinite horizon MPC For linear system, solving infinite horizon MPC is equivalent to solving the LQR control problem as follows, ∞
min ∑ x( k )T Qx ( k ) + u( k )T Ru ( k ) u ( k ) k =0
s.t.
x ( k + 1) = Ax ( k ) + Bu( k ) . y ( k ) = Cx ( k )
© 2013 ACADEMY PUBLISHER
(19)
p
m
i =1
j =1
Assumption 1. R > 0 , Q ≥ 0 . Assumption 2.The pairs ( A, B ) and ( A, Q ) is stabilizable and detectable, respectively. Assumption 3.The pair ( A, G ∑ w G T ) is controllable. Let hypotheses 1-3 hold; then the solution to of MVC3 problem as (21) is coincident with the solution of infinite horizon MPC as (19). Hypotheses 1-2 indicate that the solutions of problems (19) and (20) are unique and stabilizing. Hypotheses 1-3 ensure that the solution of problem (21) is unique and stabilizing. From the construction of problem (20), it is equivalent to problem (21), in the sense that the linear feedback generated by
1564
JOURNAL OF COMPUTERS, VOL. 8, NO. 6, JUNE 2013
(21) is the solution to problem (20). Finally, certainty equivalence between problems (20) and (19) completes the proof. Theorem 2: Let hypotheses 1-3 hold; then the solution of K ∗ , to problem (12)-(17) is coincident with the solution of appropriate weighted infinite horizon MPC problem (19). Proof. Problem (6)-(11) can be exactly restated as the existence of Lagrange multiplier, λi , γ j , s.t. p m ⎧ ⎫ { ∑ qiY i + ∑ rjU j + ⎪ ⎪ K ,∑ min x ≥0,Yi ,U j i =1 j =1 ⎪ ⎪ m ⎪p 2 2 ⎪ λi (Y i − yi ) + ∑ γ j (U j − u j )}⎪ ⎪i∑ j =1 =1 ⎪⎪ ⎪⎪ max ⎨ ( A + BK ) ∑x ( A + BK )T ⎬ . (22) λi ≥0,γ j ≥ 0 s. t . ⎪ ⎪ + E ∑ w E T = ∑x ⎪ ⎪ ⎪ ⎪ T T ϕi C ∑x C ϕi = Yi ⎪ ⎪ ⎪ ⎪ T T ϕ j K ∑x K ϕ j = U j ⎪⎩ ⎪⎭
If rewrite the minimization objective function as: p
min
m
{ ∑ ( qi + λi )Y i + ∑ ( rj + γ j )U j }
K ,∑ x ≥0,Yi ,U j i =1
j =1
p
m
− ∑ λi yi − ∑ γ j u j 2
i =1
, 2
j =1
then, it is clear that the above three assumptions are satisfied for all values of λ i ≥ 0, γ j ≥ 0 .This indicates that all λ i , γ j dependent solutions, K ∗ (λi , γ j ) ,coincide with the solution to some infinite horizon MPC problem ( λi = qi + λi , γ i = rj + γ j ). Because of the variance constraints (16) and (17), MVC3 problem cannot be equivalent to the infinite horizon MPC problem (19). Theorem 2 shows that introducing variance constraints to MVC3 problem (21), is exactly the reason to adjust the MPC controller weight matrix, Q , R . Theorem 2 guarantees that the MVC3 problem would generate a linear feedback K ∗ (λi , γ j ) such that there exists a feasible solution for infinite horizon MPC problem. Unfortunately, the exact form of this infinite horizon MPC problem is unclear, unless the MVC3 solution procedure provides us with the optimal Lagrangians λi , γ j . But, weighted matrix Q , R of infinite horizon MPC can be solved by given feedback gain, K . Then, it can be updated with the Riccati equation. E. LQR Inverse-Optimal Control and Its LMI Method LQR inverse-optimal control can be described as: If ∃P ≥ 0 , Q ≥ 0 , R > 0 , P1 > 0 and symmetric matrices, T1 , T2 that min P , P1 ,T1 ,T2 ,Q , R
© 2013 ACADEMY PUBLISHER
ρ1 + ρ 2
(23)
where,
⎡ T1 s.t. ⎢ T ⎣ S1
S1 ⎤ ⎥>0 I1 ⎦
(24)
⎡ T2 ⎢ T ⎣ S2
S2 ⎤ ⎥>0 I2 ⎦
(25)
AT P1 A − P1 − Q < 0
(26)
T1 < ρ1 I1
(27)
T2 < ρ 2 I 2 ,
(28)
S1 = ( A + BK )T P( A + BK ) − P + Q + K T RK
,
S2 = RK + BT PBK + BT PA .Then, through the solution of LQR inverse-optimal Control, Q , R ,can be obtained. LQR inverse-Optimal Control [27] is described as: ∃P ≥ 0 , Q ≥ 0 , R > 0 , P1 > 0 , s.t. AT PA − P − K T RK − K T BT PBK + Q = 0
(29)
RK + BT PBK + BT PA = 0
(30)
AT P1 A − P1 < Q ,
(31)
where, (31) ensures that ( A, Q ) is detectable. As (29) cannot be converted to the LMI form, it can be constructed as, ⎡ T1 ⎢ T ⎣ S1
S1 ⎤ ⎥>0 I1 ⎦
S1 = AT PA − P − K T RK − K T BT PBK + Q , T1 ≤ ρ1 I1
where, T1 is symmetric matrix; ρ1 is a scalar; I1 is a unit matrix of appropriate dimension. From LMI theory ⎡ T1 S1 ⎤ is equivalent and Lemma 2, ⎢ T ⎥>0 I1 ⎦ ⎣ S1 to T1 − S1S1T > 0 , that is ρ1 I1 > S1S1T .Then, approximate solution of equation (29), R , P , can be gotten through choosing a small enough ρ1 . Similarly, ⎡ T2 ⎢ T ⎣ S2
S2 ⎤ ⎥>0 I2 ⎦
S2 = RK + BT PBK + BT PA T2 ≤ ρ 2 I 2
Equation (26) is the rewriting of (31). Then, the LMI form of LQR inverse-Optimal Control can be gotten. Equations (29)-(31) are constructed to LMI form to get parameters Q , R . However, Matrix Q here is nondiagonal matrix, practical application is inconvenience.
JOURNAL OF COMPUTERS, VOL. 8, NO. 6, JUNE 2013
1565
From LMI and ARE equivalence relation [28], S1 is equal to: S1 = A PA + A PBK + ( BK ) PA + BK P( BK ) T
T
T
The feedback gain is obtained as: K = ( −17.4150 −13.0612 60.9383 11.0204 ) .
(33)
T
− P + Q + K T RK
The generalized system matrix after stabilization is as follows:
.
= ( A + BK )T P ( A + BK ) − P + Q + K T RK
Therefore, LMI form of (23)-(28) can be gotten and the solution of Q is diagonal matrix. F. MPC Tuning Based on Extended MVC3 Consider system (3), outputs and manipulative variable constraints are as y i ( k ) < yi and u j ( k ) < u j , respectively, where, y i ( k ) is i th element of y ( k ) and u j ( k ) is j th element of u ( k ) . When the MPC controller is put into operation, extended MVC3 performance evaluation criteria is used to monitor controller performance. If the performance evolution index η is below the thresholdψ , weighted parameter R can be updated with extended MVC3 to improve the robustness of the controlled system. The block diagram of MPC tuning is shown in Fig. 2.
⎛x⎞ ⎛ 0 1 0 0 ⎞ ⎛ x ⎞ ⎛ 0⎞ ⎜x⎟ ⎜ ⎜ ⎟ 0 1 0 ⎟⎟ ⎜ x ⎟ ⎜⎜ 1 ⎟⎟ ⎜ ⎟=⎜ 0 u + ⎜θ ⎟ ⎜ 0 0 0 1 ⎟ ⎜θ ⎟ ⎜ 0 ⎟ ⎜ ⎟ ⎜ ⎜ θ ⎟ ⎝ −512 −384 −136 −20 ⎟⎠ ⎜⎜ θ ⎟⎟ ⎜⎝ 3 ⎟⎠ ⎝ ⎠ ⎝ ⎠ ⎛x⎞ ⎜ ⎟ ⎛ x ⎞ ⎛ 1 0 0 0⎞ ⎜ x ⎟ ⎛ 0⎞ y=⎜ ⎟=⎜ + ⎜ ⎟u ⎟ ⎝θ ⎠ ⎝ 0 0 1 0 ⎠ ⎜θ ⎟ ⎝ 0 ⎠ ⎜⎜ ⎟⎟ ⎝θ ⎠
.
(34)
The following MPC controller performance evaluation, tuning system based on extended MVC3 was built on the stabilized generalized system (34). • Discretization Since the derivation of the above extended MVC3 algorithm is based on discrete state space model (3), discretization of system (34) and constructing a suitable noise are needed. Use command sys=c2d(A,B,Ts) in Matlab, here Ts = 1s , and consider the noise to be stationary, Gaussian White-noise processes, the following system can be obtained as: ⎛ x ( k + 1) ⎞ ⎛ 0.2584 0.1707 0.0306 0.0017 ⎞ ⎜ x ( k + 2) ⎟ ⎜ −0.8519 −0.3805 −0.0556 −0.0027 ⎟ ⎜ ⎟=⎜ ⎟ ⎜ θ ( k + 1) ⎟ ⎜ 1.3646 0.1716 −0.0181 −0.0023 ⎟ ⎜ ⎟ ⎜ ⎟ 2.2534 0.4863 0.0282 ⎠ ⎝ θ ( k + 2) ⎠ ⎝ 1.1850 ⎛ 0⎞ ⎛ x ( k ) ⎞ ⎛ 0.2319 ⎞ ⎜ ⎟ ⎜ x (k + 1) ⎟ ⎜ 0.1757 ⎟ ⎟ u( k ) + ⎜ 1 ⎟ w( k ) ⎟+⎜ ×⎜ ⎜ 0⎟ ⎜ θ ( k ) ⎟ ⎜ −1.3885 ⎟ ⎟ ⎜ ⎟ ⎜ ⎟ ⎜ ⎝1⎠ ⎝ θ (k + 1) ⎠ ⎝ 0.1646 ⎠
Figure 2. Block diagram of MPC controller-tuning
IV. MPC CONTROLLER PERFORMANCE EVALUATION AND TUNING SYSTEM IN SINGLE INVERTED PENDULUM CONTROL
⎛ x(k ) ⎞ ⎜ ⎟ ⎛ x( k ) ⎞ ⎛ 1 0 0 0 ⎞ ⎜ x( k + 1) ⎟ = y (k ) = ⎜ , (35) ⎟ ⎜ ⎟ ⎝ θ (k ) ⎠ ⎝ 0 0 1 0 ⎠ ⎜ θ (k ) ⎟ ⎜ ⎟ ⎝ θ ( k + 1) ⎠ where, ∑ w = 0.01 .
A. Model Preprocessing
B. MPC Tuning Design
• Stabilizer design The single inverted pendulum is unstable system, while, tuning system of infinite MPC require a stable controlled object. Hence a stabilizer u = − Kx + v is needed. For the inverted pendulum system (2), Use command K = acker(A, B, P) in Matlab, to configure closed-loop pole to:
• MPC controller For system (35), choose the initial objective function of extended MVC3 as J = Y1 + Y2 + U ,where R = 1, Q = diag (1,1) ,output variance bounds as yi = 0.3, i = 1, 2 , manipulative variable variance bounds to be u = 0.8 .Using the command of LMI toolbox in Matlab ,the MPC controller weight matrix of the nominal model (35), R = 0.0167 , Q = diag (0.0204, 0.1234, 0.0007, 0.0160) can be gotten.
P = ( −8 −8 −2 + 2i −2 − 2i ) .
© 2013 ACADEMY PUBLISHER
(32)
1566
JOURNAL OF COMPUTERS, VOL. 8, NO. 6, JUNE 2013
• Mismatch model In order to create performance degradation condition, A disturbance, ΔA was added to the nominal model (2), to construct a man-made mismatch model as, 1 0 0 ⎞ ⎛ 0 ⎜ 0 0 1 0 ⎟⎟ A ' = A + ΔA = ⎜ . (36) ⎜ 0 0 0 1 ⎟ ⎜ ⎟ ⎝ −600 −300 −100 −30 ⎠ • MPC tuning parameters Based on the extended MVC3 algorithm combined with LQR inverse optimal, the MPC controller matrixes of above mismatch model can be gotten. R = 0.0388 , Q = diag (0.0706 0.0002 0.0357 0.000) Through MVC3 performance evaluation, controller performance declining was detected. If it dropped below threshold, ψ , (here, ψ is set to 0.8), then, weight parameter of manipulated variable in MVC3, R ,is updated by R ' = R + ξ I ,(here,ψ is set to 0.5). Repeat the MPC weight matrix calculation process to update Q , R , the new MPC controller parameters as R = 0.0952 , Q = diag (0.1703 0.0006 0.0552 0.0000) can be gotten. Apply the new controller parameters to operation to restore the desired operational performance. V. SIMULATION AND ANALYSIS OF MPC CONTROLLER A. Simulation and Comparison of MPC Controller and the LQR Controller • Simulation of LQR controller LQR controlled system in the Simulink of Matlab was shown in Fig. 3. Parameter of LQR block was set to K = ( −31.623 −20.151 72.718 13.155 ) , which was provided by Googol Technology LTD.
Figure 3. Simulation block of LQR control loop
• Simulation of MPC controller MPC controlled system in the Simulink was shown in Fig. 4, where, parameter of Acker block was set to stabilizer feedback gain. Weighted matrixes of MPC block were set the parameters calculated by the nominal model.
Figure 4. Simulation block of MPC control loop
• Analysis of simulations results Simulation curve charts of MPC controller and LQR controller are shown in Fig. 5, where, u denotes manipulative variable, which is cart angular velocity. angle, pos denote outputs, they are pendulum angle and cart position. The maximum deviation of MPC controller and LQR controller are shown in Table I and comparison bar chart is shown in Fig. 6.
MPC LQR
TABLE I. MAXIMUM DEVIATION COMPARISON u angle pos 0.8240 0.0096 0.0093 34.4589 0.3101 0.3533
Obviously, due to the introduction of steady state manipulative variable and outputs covariance constraint, MPC controller can make the maximum deviation significantly reduced than LQR controller, which greatly improved the system dynamic performance. B. Simulation of MPC Controller Tuning • Simulation of MPC controller tuning MPC controller tuning dynamic curves was obtained by replace original weight matrix Q , R of MPC controller with mismatched and Controller-tuned parameters, shown in Fig. 7, where, the legend (good, bad and tuned) means controller running under, nominal model, mismatch model and MPC controller tuned. Through curves, if using original controller parameters to control mismatch model, it would lead an increase on manipulative variable and outputs deviation. After adjusting controller parameters by controller tuning system, the deviation reduced to some extent. This proves the feasible of MPC controller tuning algorithm. • Extended MVC3 performance evaluation method The extended MVC3 performance evaluation curve is shown in Fig. 8. Set λ = 1 in the MVC3 performance evolution object function (18) and get p
m
benchmark J MVC 3 = ∑ qiY i + ∑ rjU j by LMI method, i =1
here,
J MVC 3 = 1.3217 × 10
j =1
−7
.Then
actual
run-time
variance was compared with this benchmark, get η
© 2013 ACADEMY PUBLISHER
JOURNAL OF COMPUTERS, VOL. 8, NO. 6, JUNE 2013
1567
0.35
40 MPC LQR
30
0.3 MPC LQR
0.3
MPC LQR 0.2
0.25 20
0.1 0.2
10
pos
angle
u
0
0.15 0.1
0
-0.1
0.05 -10
-0.2 0
-20
-30
-0.3
-0.05
0
20
40
-0.1
60
0
20
T
40
-0.4
60
0
20
T
40
60
T
Figure 5. Simulations curves charts of MPC and LQR control loop
35
0.35
0.4
30
0.3
0.35
25
0.25
20
0.2
0.3
pos
u
angle
0.25
15
0.15
10
0.1
0.2 0.15 0.1
5
0.05
0
MPC
0.05
0
LQR
MPC
1
0
LQR
MPC
2
LQR 3
Figure 6. Bar charts of MPC and LQR simulations curves maximum deviation
1.5
14 good bad tuned
x 10
-3
0.01 good bad tuned
12
1
good bad tuned 0.005
10 8
0 6 pos
u
angle
0.5
4
0
-0.005 2 0
-0.5
-0.01
-2 -1
0
20
40
60
-4
0
20
T
40
60
T
-0.015
0
20
40
60
T
Figure 7. Dynamic curves of nominal model, mismatch model and MPC controller-tuned
as: η1 =
J MVC 3 J arh1
= 0.9803 ; η2 =
© 2013 ACADEMY PUBLISHER
J MVC 3 J arh2
= 0.7551 ;
η3 =
J MVC 3 J arh3
= 0.9143 , where, J arh1 , J arh2 , J arh3 denote
1568
JOURNAL OF COMPUTERS, VOL. 8, NO. 6, JUNE 2013
11.5
x 10
-8
MVC3 curve good bad tuned
11
Var(Y)
10.5
10
9.5
9
8.5
8
Figure 10. Single inverted pendulum device 1
2
3
4
5 Var(U)
6
7
8
9 x 10
-8
3
Figure 8. MVC performance evolution curve
steady state error of good, bad, tuned. η1 ,η2 ,η3 denote their corresponding ratio. The bar chart is shown in Fig. 9. It confirms the correctness and feasibility of MPC tuning method. 1 0.9 0.8 0.7 0.6
Figure 11. MPC control loop
0.5 0.4 0.3 0.2 0.1 0
good
bad
tuned
Figure 9. Bar chart of performance evolution
VI. ACTUAL CONTROL ON THE DEVICE A. Construct MPC Controller The photo of single inverted pendulum device provided by Googol Technology LTD is shown in Fig.10. MPC controlled system was constructed on Matlab real-time control platform provided by Googol Technology LTD shown in Fig. 11. Parameters of k_acker block was set to stabilizer feedback gain and weight matrixes Q , R of MPC controller was set to which calculated from nominal model. Run-time curves were shown in Fig.12. Obviously, under the permission of variance constraints, MPC controller can reach steady state in a short period of time. B. Tuning Process Run the MPC controller tuning system, and preprocess manipulated variable u by limiting filter, the effect curves can be shown in Fig. 13.
© 2013 ACADEMY PUBLISHER
Figure 12. MPC run-time operating curves
Steady state variance of manipulative variable and outputs were calculated and shown in Fig. 14. Bar charts shows MPC controller performance has been restored and the tuning system is feasible. VII. CONCLUSION In this work, an extended MVC3 method and its LMI solution were applied to infinite MPC controller performance evaluation and parameters tuning system. Using extended MVC3 principle to monitor controlled system, if controller performance declined is detected, it can be improved by resetting MPC weighted matrixes with controller tuning algorithm. Simulation and device operation on single inverted pendulum device provided by Googol Technology LTD reaffirm the correctness of this system. Also, the introduction of LMI solution makes
JOURNAL OF COMPUTERS, VOL. 8, NO. 6, JUNE 2013
1
1569
-3.12
0.8
0.05 0.04
-3.125
0.6
0.03 -3.13
0.4
0.02 -3.135
0 -0.2
0.01 pos
angle
u
0.2
-3.14
0 -0.01
-3.145
-0.4
-0.02 -3.15
-0.6
-0.03 -3.155
-0.8 -1
0
200
400 T
600
800
-3.16
-0.04 0
200
400 T
600
800
-0.05 0
200
400 T
600
800
Figure 13. Real-time operating curves of MPC controller-tuning system
Figure 14. Steady state variance comparison bar charts
the system easy to extend and analysis, this will provide a new way for later controller performance evaluation and tuning research.
[4]
ACKNOWLEDGMENT This work is supported by National Science Foundation of China under Grant 60974065.
[5]
REFERENCES
[6]
[1] Experiment on Inverted Pendulum Device and Its Automatic Control. Googol Technology (Shenzhen), 2005. (in Chinese). [2] D. Chatterjee, A. Patra and H.K. Joglekar, “Swing-up and stabilization of a cart–pendulum system under restricted cart track length,” Systems & Control Letters, vol. 47:4, pp. 355–364, November 2002. http://dx.doi.org/10.1016/s0167-6911(02)00229-3. [3] M. Bugeja, “Non-Linear Swing-Up and Stabilizing Control of an Inverted Pendulum System,” EUROCON 2003.
© 2013 ACADEMY PUBLISHER
[7]
[8]
Computer as a Tool. The IEEE Region 8, vol. 2, pp. 437– 441, September 2003. S.y. Zhang, “A new fuzzy controller for stabilization of double inverted pendulum system,” Computer and Communication Technologies in Agriculture Engineering, vol. 1, pp. 300–303, June 2010. Y. Fan and Yi. Sang, “A Fuzzy Control Based on Information Integration for Double Inverted Pendulum,” 2011 Second International Conference on Digital Manufacturing &Automation, pp. 24–27, 2011. L.X. Deng and S.X. Gao, “The design for the controller of the linear inverted pendulum based on backstepping,” Electronic and Mechanical Engineering and Information Technology (EMEIT), vol.6, pp. 2892–2895, August 2011. J. Richalet, A. Rault and J. Testud, “Model predictive heuristic control: Applications to industrial process,” Automatic, vol.14:5, pp. 413–428, September 1978. http://dx.doi.org/10.1016/0005-1098(78)90001-8. S.J. Qin and T. A. Badgwell, “A survey of industrial model predictive control technology,” Control Engineering Practice, vol. 11:7, pp. 733–764, July 2003. http://dx.doi.org/10.1016/s0967-0661(02)00186-7.
1570
[9] J.L. Marchetti, D.A. Mellichamp and D.E. Seborg, “Predictive control based on discrete convolution models,” Industrial Engineering Chemistry Process Design Development, vol. 22:3, pp.488–495, July 1983. doi:10.1021/i200022a025. [10] J.M. Maciejowski, Predictive Control: with Constraints, Prentice Hall, October 2000. [11] T.J. Harris, “Assessment of Closed Loop Performance,” Canadian Journal of Chemical Engineering. vol. 67, pp. 856–861, 1989. [12] T.J. Harris, F. Boudreau and J.F. Macgregor, “Performance Assessment of Multivariable Feedback Controller,” Automatica. vol. 32:11, pp. 1505–1518, November 1996. http://dx.doi.org/10.1016/s0005-1098(96)00108-2. [13] B. Huang, S.L. Shah and E.K. Kwok, “Good, bad or optimal? Performance assessment of multivariable processes,” Automatica. vol. 33:6, pp. 1175–1183, June 1997. http://dx.doi.org/10.1016/s0005-1098(97)00017-4. [14] B. Huang and S.L. Shah, Performance assessment of control loops: Theory and Applications, Springer, 1999. [15] M. Jelali, “An overview of control performance assessment technology and industrial applications,” Intelligent Control Systems and Signal Processing, vol. 14:5, pp. 441–466, May 2006. http://dx.doi.org/doi:10.1016/j.conengprac.2005.11.005. [16] R. Srinivasan, R. Rengaswamy and R. Miller, “Control Loop Performance Assessment.1. A Qualitative Approach for Stiction Diagnosis,” Industrial & Engineering Chemistry Research. vol. 44:17, pp. 6708–6718, July 2005. [17] R. Srinivasan, R. Rengaswamy and R. Miller, “Control Loop Performance Assessment.2. Hammerstein Model Approach for Stiction Diagnosis,” Industrial & Engineering Chemistry Research. vol. 44:17, pp. 6719– 6728, July 2005. [18] F.W. Xu, K.H. Lee and B. Huang, “Monitoring control performance via structured closed-loop response subject to output variance/covariance upper bound,” Journal of Process Control, vol. 16:9, pp. 971–984, October 2006. http://dx.doi.org/10.1016/j.jprocont.2006.05.003. [19] T.I. Salsbury, “Continuous-time model identification for closed loop control performance assessment,” Control Engineering Practice. vol. 15:1, pp. 109–121, January 2007. http://dx.doi.org/10.1016/j.conengrac.2006.05.001. [20] M. Bauer, L.K. Craig, “Economic assessment of advanced process control-A survey and framework,” Journal of Process Control. vol. 18:1, pp.2–18, January 2008. [21] R.E. Skelton, T. Iwasaki and K.M. Grigoriadis, A Unified Algebraic Approach to Linear Control Design. Taylor&Francis, 1999. [22] D.J. Chmielewski* and A.M. Manthanwar, “On the Tuning of Predictive Controllers: Inverse Optimality and the Minimum Variance Covariance Constrained Control Problem,” Industrial &Engineering Chemistry Research, vol. 43, pp. 7807–7814, October 2004. doi:10.1021/ie030686e. [23] C.T. Chen, Linear System Theory and Design. Oxford University Press, 2009. [24] S.Boyd, L.E. Ghaoui and E. Feron, “Linear Matrix Inequalities in Systems and Control Theory,” Proceedings Allerton Conference on Communication, Control and Computing, pp. 237–246, October 1993.
© 2013 ACADEMY PUBLISHER
JOURNAL OF COMPUTERS, VOL. 8, NO. 6, JUNE 2013
[25] A. Laub, “A Schur method for solving algebraic Riccati equations,” Automatic Control, vol. 24:6, pp. 913–921, December 1979. [26] F.W. Xu, B. Huang and S. Akande, “Performance Assessment of Model Predictive Control for Variability and Constraint Tuning,” Industrial & Engineering Chemistry Research, vol. 46:4, pp. 1208–1219, January 2007.doi:10.1021/ie060786v. [27] B.L.Vladimir, “About the inverse problem of optimal control,” Application Computer Math, vol. 2:2, pp. 90–97, 2003. [28] J. Li, H.O. Wang and S. Niemann, “On the Relations Between LMIs and AREs: Applications to Absolute Stability Criteria, Robustness Analysis and Optimal Control,” Automatica, vol. 32:10, pp. 1361–1379, 1996.
Chao Cheng was born in Shanxi, China, 1983. She received the bachelor degree in Beijing Institute of Fashion Technology in 2004. From August 2004 to January 2007, she worked as control engineer in Jiangsu Yangnong Chemical Group Co.,Ltd. She is currently a second grade postgraduate student in Department of Automation in Beijing University of Chemical Technology. Her research interests include MPC and other advanced control.
Zhong Zhao was born in Henan, China, 1970. He received bachelor degree in Zhejiang University in 1992 and master degree and Ph.D. from East China University of Science and Technology in 1995 and 1998 respectively. From 1998 to 2000, he worked as a postdoctol in Tsinghua University, from 2000 to 2002 as Senior Engineer in Honeywell Hi-Spec Solutions and Visiting fellow in Max-Planck-Institute. From 2002 to 2004 he employed as a lecturer by University of Saga, Japan. He is currently a professor in the Department of Automation, and deputy director of Institute of Automation in Beijing University of Chemical Technology, also, member of U.S. IEEE and Japan, SICE. His research interests are the advanced control of complex industrial processes, process monitoring, and multiscale process signal analysis.
Haixia Li was born in Gansu, China, 1984. She received her bachelor degree and master degree in Information Science and Technology Institute of Beijing University of Chemical Technology in 2007 and 2010 respectively. Her research direction is advanced control of industrial process.