A Semi-Continuous PWA Model Based Optimal Control Method for Nonlinear Systems

To alleviate the mode mismatch of multiple model methods for nonlinear systems when completely discrete dynamical equations are adopted, a semi-continuous piecewise affine (SCPWA) model based optimal control method is proposed. Firstly, a SCPWA model is constructed where modes evolve in continuous time and continuous states evolve in discrete time. Thanks to this model, a piecewise affine (PWA) system can switch at any time instant whereas mode switching only occurs at sample instants when a completely discrete PWA model is adopted, which improves the prediction accuracy of multi-models. Secondly, the switching condition is relaxed such that operating subspaces have overlaps and switching condition parameters are introduced. As a consequence, an optimal control problem with fixed mode switching sequence is established. Finally, a SCPWA model based model predictive control (MPC) policy is designed for nonlinear systems. The convergence of the MPC algorithm is proved. Compared with widely used mixed logical dynamic (MLD) model based methods, the proposed method not only alleviates mode mismatch, but also lightens the computing burden, hence improves the control performance and reduces the computation time. Some numerical examples are provided as well to show the efficiency of the method.


Introduction
Nonlinear systems, which are pervasive in daily life and industrial processes, have been studied deeply and extensively by scientists and engineers from different fields for a long time [1][2][3][4]. Though the nonlinear control technique is improving rapidly, a unified theory and technique has not overwhelming yet, due to the fact that the nonlinear system control problem is much more complex and difficult than that of the linear system. Firstly, it is not trivial work to derive an accurate model that is indispensable in some cases for nonlinear control systems [2,3]. Secondly, the design of nonlinear controllers is an intractable task even with an accurate model [4,5]. Traditionally, engineers always design a linear controller according to the linear model that is generated by linearizing the nonlinear system at an operating point. The linear controller works satisfactorily if only the system works in a neighborhood of the operating point. However, there are lots of industrial processes with large operating ranges and multiple operating conditions that exhibit strong nonlinearity [6], which always mean the conventional linear control theory and technique cannot get satisfactory control performance for these systems.
Multi-linear model methods are among the most promising ways to deal with nonlinear control systems [7][8][9][10][11][12][13][14][15][16][17][18][19], especially for systems with strong nonlinearity. In multi-linear model methods, nonlinear systems are approximated by multiple linear systems firstly, and then these linear systems are combined together according to some criterion. When multi-linear models are used to represent a nonlinear system, the mature linear control theory can be easily utilized to design linear controllers.
Generally speaking, multi-linear model methods fall into two categories: soft switching and hard switching. In soft switching methods [8][9][10], a global model is obtained by summing each local linear model in a different weight and the global controller is designed for the global model, or a linear controller is designed for each local model and the summation of these controllers in different weights is regarded as the global controller. While, in hard switching methods [14,16,18], a local linear controller is designed separately for the corresponding local linear model and then these controllers are scheduled according to some rules to get a global controller. Though a variety of linear control techniques can be used in multi-linear model methods, both general soft switching and hard switching methods may meet oscillation and/or slow adaptation when the system switch happens [15].
Scheduling of local controllers in a unified framework is considered as an efficient method to alleviate oscillation and slow adaptation [15]. In multi-model systems, each local linear subsystem is associated to a mode which is used to index the local linear model and can be defined as discrete state. Continuous states evolve according to discrete state and discrete state switches when continuous states meet some conditions. Obviously, continuous states and discrete states interact with each other, thus the multi-model system displays hybrid character and can be combined by a hybrid model in a unified framework [19]. As a result, a global optimal controller can be designed under the hybrid model and the overall control performance of the nonlinear system can be improved over the entire operating region [12,15,17].
As far as the optimal control of hybrid systems is concerned, algorithms to calculate optimal control actions can be classified into three categories, i.e., dynamic programming, indirect method, and direct method [20]. It is well known that dynamic programming will encounter the curse of dimensionality with the increase of dimension of the state and input space [21,22]. Indirect methods use the minimum principle to derive the necessary conditions that the optimal solution must meet, but the associated differential-algebra-equations (DAE) are difficult to solve because of the existence of costate variables [23][24][25]. Direct methods discretize the dynamical equations and transform the differential equations into difference equations, then resort to solving a nonlinear programming (NLP) or mixed-integer programming (MIP) problem [26,27]. Direct methods are becoming more and more popular, because they are easy to understand and there are many kinds of commercial software to solve the associated NLP or MIP efficiently. Among the direct methods for solving the optimal control problem of hybrid systems, mixed logical dynamic (MLD) model based approaches are very popular. According to [28], the MLD model is very convenient to describe multi-model systems and is widely used in hybrid system modeling and predictive control [29,30]. In MLD model based methods, both continuous dynamics and discrete dynamics are restricted to discrete time. To use direct methods, other discrete dynamic methods are adopted [15,31] as well. For example, in [15], finite element and collocation point method is used to reduce the number of optimization variables.
It is noteworthy that all the mentioned direct methods are of completely discrete strategies where both continuous dynamics and discrete dynamics evolve according to discrete time. Unfortunately, there exist two drawbacks, i.e., mode mismatch and the computation being time consuming. As we all know, continuous states, which evolve according to differential equations, can be discretized without loss information under some conditions. However, the modes i.e., discrete states, evolve according to event driven and their trajectories are piecewise constant. When the discretization strategy is posed on them, mode switching will have to occur at the sample instants inevitably. While in fact, it can happen at any instant. As a consequence, the mode mismatch comes out. Furthermore, the associated continuous dynamics evolution will disorder due to the hierarchy structure of the hybrid model where mode is in a dominant position. As a result, nonnegligible modeling errors will be inevitable [32,33]. When the discrete step is large or the considered system switches many times, mode mismatch will result in unsatisfied control performance. Though the mode mismatch can be weakened by reducing the discrete step, it will undoubtedly lead to a heavy computational load of the controller which will cause the controller's online implementation to fail.
To take advantage of the unified framework of a hybrid model and weaken the shortcomings of mode mismatch in obtaining an optimal numerical solution, a semi-continuous piecewise affine (SCPWA) model based optimal control method for nonlinear control systems is proposed. Firstly, linear subsystems are generated at the specified operating points [33]. Secondly, the multi-linear submodels are combined in a unified framework and transformed into a SCPWA system, where mode evolves in continuous time and continuous states evolve in discrete time. Thanks to the model, the mode can switch at any time instant whereas mode switching only occurs at sample instants when completely discrete PWA model is adopted, which improves the prediction accuracy of multi-model. As an outcome, superior control performance can be obtained.
Besides mode mismatch, the computation time consuming is another embarrassment in solving the optimal control problem for hybrid systems. For unfixed mode switching sequence cases, finding the optimal mode switching sequence is always of enumeration algorithm, such as branch and bound methods, logic-based methods, and decomposition methods [4,23]. All these enumeration methods are time consuming because the number of possible mode switching sequences is an exponential function of M, where M is the number of subsystems. Hence, the optimal controller is impossible to implement online if the number of subsystems and/or the prediction horizons are large enough. The computational efficiency can be sped up in fixed mode switching cases. However, to our best knowledge, the hybrid model based optimal control methods for nonlinear systems were solved as unfixed mode switching sequence cases when multi-model is considered [23,24,34]. In these cases, the mode switching conditions are of hard constraints, which are formulated by equalities. In fact, when multi-model methods are implemented, each operating subspace of subsystem is man-made and the boundaries between two subsystems can be altered to some degree. It is reasonable that there exists an overlap between adjacent operating subspaces. In this paper, mode switching conditions are relaxed such that neighboring operating subspaces have overlaps, which makes the mode switching conditions possess tolerance to some degree and allows our PWA model-based optimal control problem for nonlinear systems to be solved as a fixed mode switching sequence case. Thus, the computation will very efficient and guarantee the corresponding algorithm implementation online. Furthermore, parameters are introduced to decide the optimal mode switching conditions in the overlapping areas, which also improves the control performance further. As an outcome, a SCPWA model based MPC (model predictive control) policy is designed for nonlinear systems. The convergence of the MPC algorithm is proved. Compared with widely used MLD model based methods, the proposed method not only alleviates mode mismatch, but also lightens the computing burden, hence improves the control performance and reduces the computation time. Thus, the contributions of the paper are clear.
The rest of this paper is organized as follows. In Section 2, a multi-model system is constructed from a considered nonlinear system and a corresponding hybrid optimal control problem is established in a unified framework. In Section 3, we illustrate the adverse effect of mode mismatch by using a simple academic example and present the procedure to construct the SCPWA model. The reason why the proposed model can reduce the mode mismatch is analyzed theoretically. Furthermore, a SCPWA model based MPC controller and its convergence are also addressed in this section. In Section 4, a benchmark model is used to show the efficiency of the proposed method. The contribution is highlighted again in the conclusion.

PWA Model Based Optimal Control Problem for Nonlinear Systems
In this section, a PWA model based optimal control problem for nonlinear systems is formulated. At first, a nonlinear system is decomposed into a number of linear subsystems by expending the nonlinear system at specified operating points. Then, the multi-linear subsystems are combined as a PWA model under a unified framework. At last, a hybrid system model based optimal control problem is established for the considered nonlinear system. Consider a nonlinear process described by dynamical equations as follows: .
where x ∈ X, y ∈ Y, u ∈ U and X ∈ R n , Y ∈ R r , U ∈ R m are state, output, and input space, respectively. Both f and g are smooth nonlinear vector fields. As mentioned above, industrial processes always exhibit strong nonlinearity because of their multiple operating points and/or large operating range. Conventional linear control techniques using a single linear controller meet a lot of difficulties to control these nonlinear systems, thus using multiple linear systems to approximate nonlinear systems is an effective method when the linear submodels and their corresponding operating regions are chosen appropriately. Suppose η is the operating variable of system Equation (1), which is usually termed as scheduling variable as well, and is a variable or several variables that characterize the operating behavior and mark the operating levels of the process. Ω is full operating range of the system, which is the variation range of η. Assume the full operating range Ω has been partitioned into M disjoint subregions , and a multi-linear model bank can be acquired to approximate the nonlinear system: where . The multi-linear system Equation (2) can be reformulated by a PWA system as follows: . where In fact, when multi-linear model based approaches are adopted, the model decomposition, i.e., nonlinear systems are represented by multiple subsystems, is implemented firstly. To control the nonlinear system, these subsystems should be combined or scheduled by some rules. i ∈ I = {1, 2, . . . , M} is termed as mode that labels the corresponding subsystem and activates subregion Ω i which is referred to as operating subspace and used to describe the conditions that the scheduling variables have to satisfy in this mode. Apparently, the mode and scheduling variable interact with each other and the multiple model system presents hybrid character, Equation (3) can be reformulated by the general hybrid system description as following: In this hybrid model, the discrete state jumps when the scheduling variable reaches the boundary of operating subspace and the scheduling variable evolves according to the dynamics that is dominated by discrete state and the input.
For simplicity and without loss of generality, we assume that the scheduling variable is state x and the operating subspaces are polyhedrons, that is Ω i j = x|E i j ≤ F i j in this paper. Thus, a hybrid model based optimal control problem for the considered nonlinear system can be established as follows: Optimal Control Problem I: Consider a hybrid system formulated by Equation (4), given a fixed time interval [t 0 , t f ], find a mode switching sequence Ξ and a continuous input u ∈ U in each mode i j ∈ I such that the cost functional is the mode switching sequence, which is used to schedule the sequence of active subsystem. This means that the system switches from the mode i j to mode i j+1 at instant t j and mode i j is activated in Direct methods are mostly employed to solve the foregoing hybrid optimal control problem and the completely discrete model is always adopted in direct methods. As mentioned above, mode mismatch will deteriorate the associated numerical solution. Hence a SCPWA model based method is proposed to obtain an accuracy numerical solution in the next section.

Remark 1.
The selection of scheduling variables is always problem-dependent and empirical. It should change slowly and characterize operating condition. In practice, part of input, output, and/or state variables are always chosen as scheduling variables [35,36].

Main Results
In this section, an academic example is used to illustrate the adverse effect on mode mismatch firstly when complete discretization strategy, i.e., both continuous state and discrete state are discretized, is used. Secondly, to alleviate the mode mismatch, a SCPWA model is constructed. After that, an optimal control problem subject to SCPWA model with overlapping operating subspaces is established. Further, to accelerate the computing speed, a fixed mode switching sequence is chosen. Thereafter, a semi-continuous piecewise affine model based predictive control (SCPWA-MPC) policy is designed and its convergence is proven.

Mode Mismatch
Basically, to solve optimal control problem I numerically, complete discrete strategy is always employed. Suppose the continuous dynamics Equation (4) is completely discretized with a step T s , and a discrete time PWA system Equation (6) is obtained as follows: Optimal Control Problem II: Consider the complete discrete PWA system Equation (6), find the control input u(k) ∈ U, the state x ∈ X, the output y ∈ Y and the mode switching sequence where the N − 1 is the mode switching times, and t j = n j T s is switching instants.
In the original system Equations (4) and (5), the mode switching can happen at any instant. However, from Equations (6) and (7), it can be seen that the mode switching only occurs at discrete instants t j = n j T s , which results in mode mismatch. It is well known that continuous states evolve according to active mode in PWA systems. According to Equation (6), because mode mismatch exists, the succeeding states evolution may badly deviate true value which will give rise to bad performance. The following academic example is to illustrate the adverse effect of mode mismatch. An autonomous PWA system is given as follows: .
with initial state x(0) = 10. The solid line in Figure 1a is the analysis solution of x and the trajectory of mode is also shown in Figure 1b by a solid line. When the Euler discrete method is applied to the system with step T s = 0.3, the numerical solutions are plotted in Figure 1 by a dashed line. It can be seen that the mode trajectory of the numerical solution i(k) switches later than the real mode trajectory i(t). As a result, the associated continuous state trajectory in the next stage deviates from the analysis solution. The reason lies in discretization which makes the mode switching occur only at the sampling instant. In this example, the adverse effect of mode mismatch is obvious though the system switches only once. When PWA systems undergo multiple modes and/or switch several times, mode mismatch may result in significant trajectory error which will give rise to bad control performance.

Semi-Continuous PWA Model
To alleviate mode mismatch, a SCPWA model is constructed. It is proved that the proposed method will weaken the adverse effect of mode mismatch, hence achieve superior control performance.
A new variable θ and a linear mapping are introduced in the time interval [t 0 , t f ] such that where t N = t f . The linear mapping transforms the unknown switching instants t j into fixed switching instants j. As the operating subspace is of the polyhedron E i x ≤ F i , the switching condition can be formulated by E i x = F i . Thereby, the original hybrid system Equation (4) can be transformed into a fixed switching instants PWA system as follows: Since the switching instants are fixed, the discretization can be only posed on continuous states with respect to θ. Thus, a SCPWA system, where discrete continuous state dynamic equation and continuous discrete state equations coexist, can be obtained from Equation (10) as follows: Optimal Control Problem III: Consider the SCPWA system formulated by Equation (11), find the control input u(k) ∈ U, the state x(k) ∈ X, the output y(k) ∈ Y, and the mode switching sequence where L i j is a running cost function of mode i j , N − 1 is the number of mode switching during [t 0 , t f ].
In Equation (11), the continuous states x(k) evolve in discrete time and the mode i(k) evolves in continuous time that means the mode switching can occur at any instant, which distinguishes our model from the complete discrete models such as in [15,27,28].
Though both completely discrete model Equation (6) and SCPWA model Equation (11) are approximate models of Equation (4), there is a great difference between them. The mode switching instants are limited to be the sample instants t j = n j T s in Equation (6), whereas the subsystem can switch at any instant in Equation (11), i.e., t j ∈ [t 0 , t f ] is the continuous variable, which is the same as what Equation (4) formulates. Further, Equation (6) can be regarded to as a special case of Equation (11) and is covered by Equation (11). When we use Equation (11) as an approximate model to control the original nonlinear system, a better performance will be achieved.
A numerical example will verify the superiority of the SCPWA model comparing with the completely discrete PWA model in the sequel. However, due to the fact that the mode switching sequence should be determined, it is still time-consuming to calculate the optimal control with the proposed model Equation (11). To improve the computation efficiency and make the obtained optimal control able to be implemented online, a SCPWA based optimal control problem under a fixed mode switching sequence is established and addressed in next subsection.

SCPWA Based Optimal Control under Fixed Mode Switching Sequence
Basically, when multi-model approaches are adopted, each operating subspace of subsystems is assigned a priori. The adjacent operating subspaces are always supposed to have no intersection, which makes the switching between subsystems not only meet the oscillation but also take the risk of chattering. In fact, for nonlinear systems, the operating subspaces of each subsystem are man-made, and the survival regions of some subsystems can be shared with its adjacent subsystems in a range. In the sequel, we partition the operating space such that adjacent modes have overlapping operating subspace, i.e., Ω i ∩ Ω j Φ if i and j are adjacent modes.
As a benefit from the overlap between adjacent operating subspaces, the mode switching condition can be chosen in the overlap, which makes the number of feasible mode switching sequences reduce compared with the case with no overlap. For example, in Figure 2a, when operating spaces are partitioned with no overlap, judging from the trajectory of scheduling variable (blue solid line and red dashed line), the mode transition sequences are (1, 2, 1, 2, 1, 2) and (1, 2, 1, 2), respectively. However, when the operating subspaces are considered to have overlap, the mode switching sequences are both transformed to (1,2) or (1, 2, 1) according to different choices of mode switching conditions as shown in Figure 2b. This implies that several mode sequences can be substituted by one mode sequence if the switching condition is relaxed. Following the idea that choice of mode switching condition in overlap can decrease the number of feasible mode sequences, and motivated by the fact that the initial mode and the final mode are assigned a prior for a given optimal control problem in most industrial processes, a feasible mode switching sequence can be fixed in advance, and the optimal control problem III can be relaxed to a fixed mode switching sequence case involving a mode switching condition choice. Thus, a SCPWA-based optimal control with fixed mode switching sequence for nonlinear systems is constructed as following: Optimal Control Problem IV: Find the control input u(k), state x(k), output y(k), the switching instant sequence Γ = (t 1 , t 2 , . . . , t N ), and the parameters α i ∈ [α i , α i ], to minimize the cost function J(α, u, Γ, x, y) = N j=1 t j − t j−1 n j − n j−1 n j k=n j−1 +1 L i j (x(k), y(k), u(k)) (13) subject to where the mode switching sequence (i 1 , i 2 , . . . , i N ) is given a priori. In the optimal control problem IV, the physical meaning of determining of parameters α i ∈ [α i , α i ] is choosing the mode switching condition in the overlap under a given mode transition sequence to minimize the performance index.

Remark 2.
It must be pointed out that the fixed switching sequence is selected empirically and may not be the optimal one, hence the associated control performance may be not as good as that of the optimal sequence case.
On the other hand, due to the fact that the overlapping operating subspace and switching condition parameters are introduced, the associated control performance is better than that of a completely discrete model with the same mode switching sequence. In addition, with fixed switching sequence, computation time is reduced dramatically at the cost of worsening the control performance slightly.

Remark 3.
For the optimal control of PWA systems with overlapping operating subspace, there exists an optimal boundary in the overlapping region that determines the optimal mode switching condition between the adjacent modes. The optimal boundary can be found by Bellman optimality [17,37]. Basically, the boundary is a manifold that is difficult to obtain. Here for simplicity, the boundary is described by E i x = F i + α i , which is in accordance with the PWA formulation.
In summary, the proposed method takes into account both the model accuracy and computation speed. Compared with completely discrete PWA based optimal control methods, the SCPWA model approximates the nonlinear system more accurately. The fixed mode switching sequence reduces the computation time significantly. Additionally, the switching condition choice in the optimal control problem IV enhances the solution set, which means the obtained optimal control has superior performance. Thus, based on the optimal control problem IV, a SCPWA-MPC policy is designed and implemented to control the considered nonlinear system. What needs to be pointed out is that before SCPWA-MPC is implemented, the optimal parameters α * i should be determined first. Besides, when a large number of subsystems are needed to approximate nonlinear systems with fast and abrupt changes in behavior, the proposed method may encounter difficulties in scheduling these subsystems which is a common problem when multi-model methods are adopted.

SCPWA-MPC
MPC has been studied and applied for decades because it has the advantages such as the following: it can deal with multiple variables and various constraints problems conveniently [38]. At the same time, the receding horizon policy can overcome model error and uncertain disturbance efficiently. MPC algorithm solves an optimal control problem at sample instant k and only the first element u(1|k) of the obtained control sequence u(1|k), . . . , u(K|k) is implemented for a sample period T u . At next instant k + 1 the optimal control problem is repeated with the new measured information of state and/or output.
In this paper, the objective function formulated as P 0 (x − x e ) T Q(x − x e ) + (u − u e ) T R(u − u e )dt is used, where (x e , u e ) is a steady point of the system and Q, R are positive definite matrices of proper dimension. Therefore, the optimal control problem to be solved at instant k in SCPWA-MPC is formulated by minimizing the cost function subject to where u(l|k), l = n j−1 , . . . , n j , j = 1, . . . , N, is control input the at instant k. j means system is in jth stage and the mode i j is active.
Note that a terminal constraint x(n N |k) = x e is added. In fact, this constraint can be met when the prediction horizon is long enough and it will be used in the proof of the stability of SCPWA-MPC.
The alert reader may notice that the time scale in SCPWA is not the real time, and will wonder if the SCPWA-MPC is stable or not. Under a wild assumption, the following theorem 1 ensures the stability of the proposed SCPWA-MPC.

Assumption 1.
There is no Zeno behavior in the system Equation (11), which implies that there are finite numbers of mode switching. Theorem 1. The SCPWA-MPC controller can stabilize the system (11).
The optimal cost function at instant k is denoted as J * (k).
The input sequence u * (l|k) works for the time interval T uj = (t j − t j−1 )/(n j − n j−1 ), j = 1, . . . , N, l = n j−1 + 1, . . . , n j . T uj is also an optimization variable, which is different from the predetermined discrete step size T s in the completely discrete model, thus there exist two cases: T u1 ≥ T u and T u1 < T u .
(i) If T u1 ≥ T u , input u * (1|k) is implemented only for a sample period T u and the state evolves to x(k + 1). At instant k + 1, (u * (1|k), . . . , u * (n 1 |k), . . . ,u * (n N−1 + 1|k), . . . , u * (n N |k)) is a feasible input sequence with the cost function value J(k + 1), where u * (1|k) only works for T u1 − T u , and u * (n N−1 + 1|k) works for a duration T u + T uN . We have J(k Note that in this case, J * (k) is monotonically decreasing. (ii) If T u1 < T u , the input u * (1|k) is still implemented for a sample period T u . The cost function J * (·) may increase in this case which means J * (k + 1) > J * (k). However, under Assumption 1, the state will eventually cross the switching boundary and run in the next mode under finite steps. Finally, due to the terminal constraint, the state will reach the terminal mode and no switching will take place anymore, thus T u1 ≥ T u can be guaranteed eventually. Without loss of generality, it is supposed that after L steps the system comes into the destination mode. According to case (i), it means that J * (1), . . . , J * (L) may not be monotonous, but after the L steps, J * (k + 1) ≤ J * (k), k = L, L + 1, . . ., can be guaranteed.
In the sequence, superiority of the proposed method is verified by some numerical examples.

Numerical Example
In this section, we illustrate the effectiveness of the algorithm developed in Section 3. Matlab R2015a was used to run the programs and the configuration of the computer is as follows: OS: Windows 7, 64 bit; CPU: Intel Core i7-6700, 3.4 GH; RAM: 8.00 GB. Consider a benchmark model, continuous stirred tank reactor (CSTR) process with an irreversible, first-order reaction [39]. The system dynamics is described by the following nonlinear differential equations.
where x 1 , x 2 , and u are the dimensionless concentration, dimensionless reactor temperature, and dimensionless cooling jacket temperature, respectively. The parameters of Equation (17) are listed in Table 1. We must point out that all these parameters and variables have been processed and their physical meanings are detailed in literature [39]. Apparently, this system presents strong nonlinearity, and it is inappropriate to approximate the nonlinear system by a single linear model and a single linear controller does not perform well enough [13]. According to the rule to select the scheduling variable, the state x 1 can be chosen as the scheduling variable [15]. We can partition the operating space into three subspaces and obtain an affine model at the corresponding steady-state operating point in each subspace. The operating points and corresponding operating subspaces are labeled in Table 2.  The performance index in MPC is of the following quadratic form: The parameters of the cost function are shown in Table 3, where T s is the discretization step size, and P is prediction horizon. We show the efficiency of the SCPWA based MPC via two cases. In case study 1, the operation space is partitioned without overlaps and the mode switching sequence is to be optimized as well. Results reveal that the mode mismatch is reduced by using the SCPWA model and the control performance is improved. In case study 2, the operation space is partitioned with overlaps and mode switching sequence is fixed. Results show the computation speed is accelerated noticeably and control performance is guaranteed as well. As a completely discrete PWA model, MLD is used to compare with the proposed SCPWA model when the associated MPC controller is implemented.

Case-Study 1: Operating Subspaces without Overlaps
In this case, an operating point and a non-operating point are chosen as the start point, respectively. Firstly, OP 3 (x T = (0.8560, 0.8859)) and OP 1 (x T = (0.2354, 4, 7050)) are chosen as the start point and the set point, respectively. As shown in Figure 3a, both of the control policies can drive the nonlinear system to meet the set point rapidly. Comparing with the widely used MLD model, the SCPWA-based MPC has a superior control performance. The settling time of the SCPWA-based method is 4.5, while MLD-MPC is 5.5. The proposed method also has smaller overshoot than the MLD-MPC method. From Figure 3c, it can be seen that the mode trajectories of the SCPWA-based method and MLD-based method do not switch at the same instant because of mode mismatch, though both of the mode sequences are (3, 2, 1). The proposed method alleviates the mode mismatch, and as a result it leads to superior control performance.  Figure 4 shows the case that non-operating point (0.4, 4) is chosen as a start point and the set point is operating point OP 3 (x T = (0.8560, 0.8859)). As shown in the figures, though both of the obtained inputs can drive the system to meet the set point, the SCPWA-based MPC has a smaller settling time than MLD-based MPC. Besides, the input trajectory of SCPWA-based MPC changes more gently than that of MLD-MPC, which means it is more suitable to be implemented. As shown in Figure 4c, the subsystems do not switch at the same time according to the proposed method and the MLD method because of the existence of mode mismatch in the MLD method. However, the mode mismatch is mitigated in the SCPWA-based method and a better control performance is achieved.

Remark 4.
In the abovementioned case studies, comparing with the MLD-based method, the control performance of the proposed method is improved, but not significantly. The reasons are chiefly as follows: first, if the linear submodels and their corresponding operating subspace are selected properly, the nonlinear system can be approximated by the multi-model system very well. As hybrid models, both the MLD model and the SCPWA model can unite multiple submodels in a unified framework. They both have better control performance than soft-switching and hard-switching models [13]. In fact, the MLD-based MPC does possess a superior control performance. Under the circumstances, it is really valuable that the proposed method still improves the control performance. When two linear submodels are adopted to approximate the CSTR, the SCPWA model based method will have a more obvious superior control performance than MLD-based MPC. Second, in the CSTR process, the control input u, which is the dimensionless cooling jacket temperature, has a constraint of [−2, 2]. As can be seen in the case studies, both of the inputs obtained by the mentioned methods reach the upper bound or the lower bound at the beginning of running, which means that the two methods have the same input, hence the same output. With time evolution, when the inputs lie in the interior of admissible control set, the system almost achieves the set point. As a result, the control performance improvement of the proposed method is not obvious. If the constrain of u is relaxed to [−3, 3] or [−4, 4], we will find the control performance of the proposed method is improved more obviously compared with the MLD-based method. Limited by space, the simulation results are not presented here. Lastly, the feedback function in MPC has the effect to weaken model mismatch. When open loop control is simulated, respectively, the result indicates the SCPWA based method improves the control performance significantly.
Note that since the optimization of mode switching sequence is involved, the computation time for each iteration of the MPC is too long to implement online for both methods.

Case Study 2: Operating Subspaces with Overlaps
In this case, as is shown in Figure 5, the switching conditions are relaxed such that operating subspaces have overlaps. We chose α 1 ∈ [−0.05, 0.05], α 2 ∈ [−0.08, 0.02], which means the fixed switching conditions change from x 1 = 0.35 and x 1 = 0.78 to x 1 ∈ [0.3, 0.4] and x 1 ∈ [0.7, 0.8], respectively. The start point and set point are (0.4, 4) and OP 3 (x T = (0.8560, 0.8859)), respectively, which are the same as in case study 1. As is shown in Figure 4c, when switching conditions have no overlap, the optimal mode switching sequence is (2, 1, 2, 3). When overlaps are considered, since the start point lies in mode 2 and the set point lies in mode 3, a fixed mode switching sequence (2, 3) can be assigned. The optimal switching condition parameters are derived by solving an optimal control problem before the SCPWA-MPC is implemented, and we get α * 1 = 0.03 and α * 2 = −0.04.  Figure 6 demonstrates the open-loop model verification result for the SCPWA with α * 1 = 0.03 and α * 2 = −0.04 in the overlapping region of operating subspaces. The input signal is a pseudorandom-M sequence. The output trajectory of SCPWA is almost coincident with that of CSTR. It testifies that the operating space partition with α * 1 = 0.03, α * 2 = −0.04 in the overlapping region of operating subspaces is reasonable and the PWA model can still approximate the nonlinear system accurately. According to the obtained α * 1 = 0.03, α * 2 = −0.04 in the overlapping region of operating subspaces, the proposed SCPWA-MPC is implemented to the nonlinear system. As a comparison, the MLD method associated with operating subspaces without overlaps is also implemented to the CSTR. Figure 7a indicates that the two methods almost have the same control performance. It implies the proposed method is very useful, because in the proposed method the mode switching sequence is fixed, which results in the fact that the related optimal control problem can be solved very quickly and the MPC policy can be implemented online.
As we mentioned above, an important advantage of the SCPWA-MPC is its rapid computation speed. Figure 8 is the comparison of computation time between the SCPWA-MPC and MLD-MPC method with different discrete step sizes. The computation time of one iteration in MLD-MPC method is relevant to the step size under a given prediction horizon. When the discretization step size is 0.2, it almost needs hours for one iteration, but the computation time declines to 5 and 2 s if the step size enlarges to 0.4 and 0.8. The average computation time of one iteration in the proposed method is less than 0.2 s. What is worth pointing out is that commercial software CPLEX was used to solve the MLD-MPC and our method was solved by our designed program, though the program is not as efficient as the commercial software.
In addition, we find the equations of MLD may not hold at some discrete points when the discrete step size is large in the simulation, which means MLD-MPC will have no solution for some iteration. While the SCPWA-MPC always has a solution, this implies that the proposed method is more reliable than MLD-MPC in practical applications.

Conclusions and Future Work
In the paper, a SCPWA (semi-continuous piecewise affine) model based optimal control method was proposed to control a nonlinear system. The nonlinear system was approximated by multiple linear subsystems firstly, then these subsystems were combined into a PWA system and a corresponding optimal control problem was formulated. Completely discrete dynamical equations are always used to obtain numerical solution of the optimal control problem. As a result, mode mismatch is inevitable which will give rise to bad control performance. To alleviate the mode mismatch, a SCPWA model based optimal control method was proposed. The mode switching can happen at any time instant in this method. Moreover, to avoid using the implicit enumeration method, the subsystems switching condition is relaxed such that operating subspaces have overlaps. At the same time, additional parameters to determine the optimal switching condition in the overlapping areas were introduced. As a consequence, an optimal control problem with fixed mode switching sequence and SCPWA-MPC were established. Compared with widely used MLD model based methods, the proposed method not only alleviates mode mismatch, but also lightens the computing burden, hence improves the control performance and reduces the computation time. Besides, the numerical solution can be always obtained. Thus, the proposed method is more reliable and has more potential use than MLD model based methods in practical applications. In future work, designing a reasonable mode switching sequence and obtaining the optimal switching parameters will be our future missions.