**7. MPC-LQR for LPV Models**

*7.1. Attraction Sets and Terminal Set*

The inclusion of LMIs to ensure robust stability to the MPC paradigm often leads to a conservative performance of the control of the system. Therefore, to steer the system into a desired equilibrium state in the presence of disturbance or uncertainty, a series of terminal sets can be defined. In [32] a set of shrinking ellipsoids is determined using a decay rate, which can vary the speed of the system and the stability determined by similar stability conditions to the ones shown in Section 6, to steer the states to the equilibrium point. However, the determination of the decay rate and the constructions of the ellipsoids make this algorithm too slow for real-time applications and is rather implemented as an offline algorithm. In [33] a set of ellipsoidal sets are defined to predict the behavior of the system in the presence of bounded disturbances and uncertain bounded parameter changes. In [34] a path of ellipsoids is defined to predict the possible behavior of the scheduling parameter along the prediction horizon. In all three approaches, the goal of the ellipsoidal sets is that the states reach a terminal set or a terminal point, where a state-dependent stationary gain is applied to the system instead of the MPC law.

In this work, the future scheduling parameter is not known but predicted using the RLS algorithm presented in Section 3; therefore, the ellipsoids to build do not consider a variation on the scheduling parameter but rather the prediction error generated by the RLS algorithm. To generate the optimal desired trajectory to the setpoint, a path must be defined from every possible initial state to the terminal ellipsoidal set.

To steer the system into the desired terminal set, a term *JTS* is added to the cost function *J* presented in (17). *JTS* is defined as the following:

$$J\_{TS} = \left(\mathbf{x}(k + N\_p) - (\mathbf{x}\_{ds} + \mathbf{x}\_{dist})\right)^T \mathbf{L}\left(\mathbf{x}(k + N\_p) - (\mathbf{x}\_{ds} + \mathbf{x}\_{dist})\right) - E(\rho\_1) \tag{33}$$

where *<sup>E</sup>*(*ρ*1) = <sup>∑</sup>*k*+*Np i*=*k* - *<sup>ρ</sup>*1(*i*) <sup>−</sup> *<sup>γ</sup>*(*<sup>i</sup>* <sup>−</sup> <sup>1</sup>)*T***Θ**(*<sup>i</sup>* <sup>−</sup> <sup>1</sup>) 2 represents the sum of the squared errors of the prediction of the future parameter values. **x**(*k* + *Np*) are the predicted states at the end of the prediction horizon, **x***ds* represents the desired state after *Np* steps, **x***dist* is the predicted effect of the disturbance on the states *Np* steps ahead and it was obtained by performing an open loop simulation of every possible disturbance from every initial set of states. Both **x***ds* and **x***dist* were computed offline and stored in a lookup table. **L** is a weighing matrix of appropriate dimensions. Therefore, (17) is redefined as:

$$f = \mathbf{X}^{T}\mathbf{Q}\_{\mathsf{c}}\mathbf{X} + \mathbf{U}^{T}\mathbf{R}\_{\mathsf{c}}\mathbf{U} + f\_{\mathsf{TS}}\tag{34}$$

However, the computation of every desired trajectory for every state needs to be computed offline and stored in a lookup table before the implementation of the MPC algorithm to increase execution speed.
