Skip to content

Geovanaafs/ST-MPC

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

52 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dual-mode Set-Theoretic MPC (ST-MPC) for a polyhedral framework

This code shows how to implement, in a polyhedral framework, the dual-mode receding horizon controller developed in [Angeli et al., Automatica, 2008]. Such a controller, in the literature, is also called "Set-Theoretic MPC (ST-MPC)". Note that the mentioned article developed the control framework assuming an ellipsoidal modelling for disturbances and constraints. On the other hand, the proposed implementation is for a polyhedral framework (i.e., constraints and disturbance sets are polyhedral sets). Nevertheless, the underlying set-theoretic MPC concepts and the used MPC philosophy are the same. The implemented algorithm is described in, e.g., [Lucia et al., CONES, 2022], Section II.A.

Considered plant model and polyhedral framework

It is assumed that the plant is described by a discrete-time LTI model subject to state ($x$) and input ($u$) constraints, as well as bounded state disturbance $d$. All the constraints and disturbances sets are modelled as convex polyhedral sets.

$x_{k+1} = Ax_k + Bu_k + d_k,\quad$ $u_k \in \mathcal{U},$ $x_k\in \mathcal{X},$ $d_k\in \mathcal{D}$

What does ST-MPC? And how does it work?

ST-MPC solves a regulation problem for linear systems subject to state constraints, input constriants and bounded disturbances.

Most of the required computations are moved into an offline phase, leaving online a simple and convex optimization problem (MPC optimization problem with prediction horizon set to 1).

OFFLINE, the controller is built resorting to three main ingredients:

  • A stabilizing state-feedback controller for the unconstrained and disturbance-free plant model. In the proposed implementation, such a controller is a standard LQR (u=Kx).
  • The smallest Robust Positively Invariant (RPI) region $\mathcal{T}^0$ associated with the closed-loop system and complying with the prescribed constraints and disturbances. In the provided code, the smallest RPI set is computed resorting to the algorithm developed in [Rakovic et al, TAC, 2005]. Note that $\mathcal{T}^0$ is the smallest set such that $\forall x\in \mathcal{T}^0:$ $(A+BK)x\in \mathcal{T}^0$ and $Kx\in \mathcal{U}$
  • A family of $N>0$ Robust One-step Controllable Sets (ROSC) $\mathcal{T}^{i} = \lbrace x \in \mathcal{X}: \exists u \in \mathcal{U}: Ax + Bu + d \in \mathcal{T}^{i-1}, \forall d \in \mathcal{D} \rbrace$ (also known as Robust Backward Reachable Sets) recursively built starting from the smallest RPI region $\mathcal{T}^0$. The recursive computation of ROSC sets can be terminated when the desired state-space region of initial conditions is covered, or the set's growth saturates (for the presence of constraints and disturbances). Note that the RPI region is associated with an index = 0, while the ROSC sets have an index (>=1) increasing with the number of iterations.

ONLINE, the controller takes the following steps:

  • Find the set with the smallest index containing the current state.
  • If the set index is zero, then the terminal controller (u=Kx) is used.
  • Else, the control input u is obtained solving a convex constrained optimization problem which imposes that the robust one-step evolution of the system goes into a set whose associated index is one unit smaller than the current one.

ST-MPC properties

  • The strategy is recursively feasible. In other words, if the strategy admits a solution at t=0, then an admissible solution will be found for any successive iteration of the algorithm.
  • For any admissible initial state condition, the state trajectory reaches the RPI region in a finite number of steps where it remains confined.

For which kind of control problem is ST-MPC useful ?

In short, ST-MPC is suitable for applications requiring a computationally low demanding controller capable of dealing with hard constraints and disturbances.

In the literature, the ST-MPC idea (or extentions of it) has been used to solve (or partially solve) different control problems (partial list):

Matlab implementation and required packages

This code has been developed and tested for Matlab R2020b. It assumes that the MPT3 toolbox (including the Yalmip package) is correctly installed in Matlab.

Example in the code

The example is developed by assuming a toy mass-spring-damper model (2 states, 1 input) subject to state and input constraints and bounded disturbances. For control design purposes, the model is discretized.

spring_damper

Run the simulation

  • Run the file "main.m"
  • When requested, press any button to go from the offline phase to the online phase. The request to press a button will appear (at the end of the offline phase) in both the title of the current Figure and in the Command Window

Expected simulation outcome (figures)

ROSC_SETSandTrajectory

Input_constraints

SetMembership_Index

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • MATLAB 100.0%