{"id":26221444,"url":"https://github.com/hiroishida/robust-tube-mpc","last_synced_at":"2025-04-09T06:12:21.717Z","repository":{"id":41190318,"uuid":"130529430","full_name":"HiroIshida/robust-tube-mpc","owner":"HiroIshida","description":"Example implementation for robust model predictive control using tube","archived":false,"fork":false,"pushed_at":"2021-01-29T22:12:10.000Z","size":750,"stargazers_count":488,"open_issues_count":9,"forks_count":100,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-04-09T06:12:17.403Z","etag":null,"topics":["convex","model-predictive-control","robust","tube"],"latest_commit_sha":null,"homepage":"","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HiroIshida.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-22T02:44:39.000Z","updated_at":"2025-04-09T05:39:00.000Z","dependencies_parsed_at":"2022-07-14T10:21:39.640Z","dependency_job_id":null,"html_url":"https://github.com/HiroIshida/robust-tube-mpc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiroIshida%2Frobust-tube-mpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiroIshida%2Frobust-tube-mpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiroIshida%2Frobust-tube-mpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HiroIshida%2Frobust-tube-mpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HiroIshida","download_url":"https://codeload.github.com/HiroIshida/robust-tube-mpc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247987285,"owners_count":21028895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["convex","model-predictive-control","robust","tube"],"created_at":"2025-03-12T16:20:23.288Z","updated_at":"2025-04-09T06:12:21.697Z","avatar_url":"https://github.com/HiroIshida.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Robust Model Predictive Control Using Tube\nThis repository includes examples for the tube model predictive control (tube-MPC)[1] as well as the generic model predictive control (MPC) written in MATLAB.\n\n## Requirement\n\n1) optimization_toolbox (matlab)\u003cbr\u003e\n2) control_toolbox (matlab)\u003cbr\u003e\n3) Multi-Parametric Toolbox 3 (open-source and freely available at http://people.ee.ethz.ch/~mpt/3/)\n\n## Feedback, bug reports, contributions\nIf you find this package helpful, giving a \"star\" to this repositry will be a happy feedback for me! If you find a bug, or have more broader kind of quession about tube MPC,please post that in the [issue page](https://github.com/HiroIshida/robust-tube-mpc/issues). I will try hard to respond to questions via e-mail but, I **strongly recommend** do it in the issue page. It's much easier for me to keep myself on track.\n\n## Usage\nSee `example/example_tubeMPC.m` and `example/example_MPC.m` for the tube-MPC and generic MPC, respectively. Note that every inequality constraint here is expressed as a convex set. For example, the constraints on the state `Xc` is specified as a rectangular, which is constructed with 4 vertexes. When considering a 1-dim input `Uc`, `Uc` will be specified by min and max value (i.e. `u∊[u_min, u_max]`), so it will be constructed by 2 vertexes. For more detail, please see the example codes.\n\n## Short introduction to the tube MPC\nAfter running `example/example_tubeMPC.m`, you will get the following figure sequence.\n![the gif file](/fig/tube_mpc.gif)\n\nNow that you can see that the green nominal trajectory starting from the bottom left of the figure and surrounding a \"tube\". At each time step, the nominal trajectory (green line) is computed online. \n\nLet me give some important details. The red region `Xc` that contains the pink region `Xc-Z` is the state constraint that we give first. However, considering the uncertainty, the tube-MPC designs the nominal trajectory to be located inside `Xc-Z`, which enables to put \"tube\" around the nominal trajectory such that the tube is also contained in `Xc-Z`. Of course, the input sequence associated with the nominal trajectory is inside of `Uc-KZ`. \n\n## Disturbance invariant set\nI think one may get stuck at computation of what paper [1] called \"disturbance invariant set\". The disturbance invariant set is an infinite [Minkowski addition](https://en.wikipedia.org/wiki/Minkowski_addition) `Z = W ⨁ Ak*W ⨁ Ak^2*W...`, where ⨁ denotes Minkowski addition. Because it's an infinite sum of Minkowski addition, computing Z analytically is intractable. In [2], Racovic proposed a method to efficiently compute an outer approximiation of Z, which seems to be heavily used in MPC community. In this repository, computation of Z takes place in the constructor of `DisturbanceLinearSystem` class. To understand how Z guarantee the robustness, running `example/example_dist_inv_set.m` may help you.\n\n## Maximum positively invariant set\nI used the maximal positively invariant (MPI) set `Xmpi` as the terminal constraint set. (Terminal constraint is usually denoted as Xf in literature). Book [3] explains the concept of the MPI and algorithm well in section 2.4. `Xmpi` is computed in the constructor of `OptimalControler.m`. Note that the MPI set is computed with `Xc` and `Uc` in the normal MPC setting, but in the tube-MPC the MPI set is computed with `Xc⊖Z`and `Uc⊖Z` instead.\n\n# Reference\n[1] Mayne, David Q., María M. Seron, and S. V. Raković. \"Robust model predictive control of constrained linear systems with bounded disturbances.\" Automatica 41.2 (2005): 219-224.\n[2] Rakovic, Sasa V., et al. \"Invariant approximations of the minimal robust positively invariant set.\" IEEE Transactions on Automatic Control 50.3 (2005): 406-410.\n[3] Kouvaritakis, Basil, and Mark Cannon. \"Model predictive control.\" Switzerland: Springer International Publishing (2016).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiroishida%2Frobust-tube-mpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhiroishida%2Frobust-tube-mpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiroishida%2Frobust-tube-mpc/lists"}