Mathematical Problems in Engineering

Volume 2015, Article ID 982041, 10 pages

http://dx.doi.org/10.1155/2015/982041

## Fast Model Predictive Control Combining Offline Method and Online Optimization with K-D Tree

National Laboratory of Industrial Control Technology, College of Control Science and Engineering, Zhejiang University, Hangzhou 310027, China

Received 26 April 2015; Revised 5 July 2015; Accepted 22 July 2015

Academic Editor: Jean J. Loiseau

Copyright © 2015 Yi Ding et al. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

Computation time is the main factor that limits the application of model predictive control (MPC). This paper presents a fast model predictive control algorithm that combines offline method and online optimization to solve the MPC problem. The offline method uses a k-d tree instead of a table to implement partial enumeration, which accelerates online searching operation. Only a part of the explicit solution is stored in the k-d tree for online searching, and the k-d tree is updated in runtime to accommodate the change in the operating point. Online optimization is invoked when searching on the k-d tree fails. Numerical experiments show that the proposed algorithm is efficient on both small-scale and large-scale processes. The average speedup factor in the large-scale process is at least 6, the worst-case speedup factor is at least 2, and the performance is less than 0.05% suboptimal.

#### 1. Introduction

Model predictive control (MPC) is widely applied in the process control area because of its ability to handle constraints and MIMO systems. However, the computation burden in every control interval [i.e., solving a quadratic programming (QP) problem] limits the application of MPC within slow processes. Thus, accelerating the computation speed of the MPC is a popular theme in the control community.

Dealing with the QP problem in the MPC mainly has two approaches. The first approach is online optimization, where two algorithms are widely used (i.e., the interior-point method and the active-set method). A simple introduction of these methods is presented in [1]. Many researchers attempted to exploit the special structure of MPC and tailor the two algorithms to speed up the solving process. Previous authors exploited the sparsity and other structure features of MPC in [2, 3] to customize the interior-point method. QPSchur, which is a QP algorithm based on the active-set method, is proposed in [4] and focuses on large-scale MPC. Another online active-set strategy is described in [5] for the fast solution of parametric QPs in MPC; this strategy uses the information of the previous QP under the assumption that the QP problem only slightly changes. Besides the interior-point method and active-set method, other online methods include the Newton method [6] and dual gradient-projection method [7].

The second method is the explicit approach proposed by Bemporad et al. [8]. They showed that the solution to the QP problem in linear MPC is a piecewise affine function of the state variables. Thus, a look-up table can be prepared offline by partitioning the feasible region of the state variables. The online work only has two steps, namely, find the critical region (CR) of a certain point and perform simple calculations with corresponding parameters. The traditional optimization computation is avoided and computation time is decreased in this manner. However, the number of candidate CRs that should be checked for optimality increases exponentially in the number of inequality constraints, which is the major drawback of this method. Thus, several researchers propounded some improvements on explicit MPC. A suboptimal solution is computed using approximation in [9]. An algorithm extended to any convex parametric optimization problem is presented in [10]. The CR number is decreased by eliminating regions in [11] if the control law from a neighbor region can guarantee stability, which can also speed up the online searching.

Despite the developments in both online and offline methods, several problems with certain sizes and types still cannot be efficiently solved by the online method or the offline method alone. Several researchers have combined the explicit method and online optimization in recent years to implement fast MPC. The partial enumeration (PE) method is proposed in [12]. The PE method uses a table to store the recently searched CRs and combines it with the online method to achieve fast MPC for large-scale problems. However, the PE method is effective only when the disturbances change slowly and have small magnitude. This application limitation can be attributed to the table search being time consuming and the update method in PE tending to make the information in the table converge to several local areas. Thus, we propose a method that combines the explicit MPC and online optimization by using the k-d tree structure to obtain fast MPC for both small-scale and large-scale problems. The properties of our method guarantee that the proposed method is effective regardless of disturbance magnitude or setpoint changes.

The rest of this paper is organized as follows. Section 2 discusses several background theories used in our method. Section 3 presents the fast MPC algorithm based on k-d tree and online optimization. Section 4 applies the algorithm to two processes to verify the efficiency of our design. Finally, Section 5 concludes this paper.

#### 2. Background

##### 2.1. MPC Formulation

We consider a linear time-invariant system model in the state-space form as follows:where is the state; is the input; and matrices and are fixed matrices with appropriate dimensions. We consider the problem to regulate system (1) from the current state to the origin for simplicity. Reference [8] shows that the controller for a regulation problem can be extended for a trajectory tracking problem with some linear transformation. The following input and state constraints must be fulfilled at each control interval:where constant matrices and vectors , , , and are specified by the users. Here is the number constraints on inputs and is the number of constraints on states.

MPC computes the input at each control interval by solving the following constrained QP problem:where and are positive semidefinite matrices and is a positive-definite matrix. The prediction horizon and the control horizon is set as being equal to for simplicity. The terminal penalty weight matrix can be calculated by solving a Riccati equation for the unconstrained system.

Only the first control move is applied as input to system (1) after the solution of . The optimization problem ((3a), (3b), (3c), (3d), and (3e)) is solved again in the next control interval based on the assumption that the state is obtained. Thus, the* receding horizon control* is implemented.

##### 2.2. MPC Computation

By substituting , the optimization problem ((3a), (3b), (3c), (3d), and (3e)) can be rewritten aswhere is the current state and , , , , , and can be easily obtained [8]. The optimality (KKT) condition of the optimization problem in system ((4a), (4b)) is as follows: where denotes the active constraint indices and denotes the inactive constraint indices. Here , , and represent the row subvector/submatrix that corresponds to the active set .

The linear relation between the parameter and optimal solution in the explicit MPC strategy [8] is explicitly expressed based on the equations in system ((4a), (4b)). Equations (5a) and (5b) derive the following: At this point, we assume the linear independence of the rows in . We can then derive the affine function between the parameter and optimal values and as follows:where the coefficients , , , and can be computed as follows:The valid region of the formula in systems ((7a), (7b)) and ((8a), (8b), (8c), (8d)), namely, the “CR” in [8], is based on a certain active set defined by the inequality constraints in (5d) and (5e). We can derive the following inequalities by substituting from system ((7a), (7b)) to check whether a parameter instance is in the certain CR: We then define the feasible region of a specified QP problem as follows:Thus, can be partitioned into several CRs. Figure 1 is an illustration of the partition for a QP problem, where .