{"id":19129760,"url":"https://github.com/mathworks/mpc_implementation_example","last_synced_at":"2025-07-07T00:36:05.847Z","repository":{"id":92436394,"uuid":"277985339","full_name":"mathworks/mpc_implementation_example","owner":"mathworks","description":"当サンプルモデルは、モデル予測制御（MPC）の設計と実装のワークフローを分かりやすく紹介するための資料です。 設計後、コード生成を行い、マイクロコントローラに実装するまでの流れを詳しくまとめています。","archived":false,"fork":false,"pushed_at":"2024-09-18T05:29:53.000Z","size":40059,"stargazers_count":42,"open_issues_count":0,"forks_count":9,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-12-11T20:23:08.036Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mathworks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"license.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-08T04:00:02.000Z","updated_at":"2024-12-03T15:10:47.000Z","dependencies_parsed_at":"2024-09-18T07:40:00.534Z","dependency_job_id":null,"html_url":"https://github.com/mathworks/mpc_implementation_example","commit_stats":null,"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks%2Fmpc_implementation_example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks%2Fmpc_implementation_example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks%2Fmpc_implementation_example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mathworks%2Fmpc_implementation_example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mathworks","download_url":"https://codeload.github.com/mathworks/mpc_implementation_example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230542287,"owners_count":18242332,"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":[],"created_at":"2024-11-09T06:08:24.847Z","updated_at":"2024-12-20T06:05:57.024Z","avatar_url":"https://github.com/mathworks.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# モデル予測制御　設計実装ワークフロー紹介\n# 目的\n\n当サンプルモデルは、モデル予測制御（MPC）の設計と実装のワークフローを分かりやすく紹介するための資料である。（サンプルモデルの使い方については、[こちら](https://github.com/mathworks/mpc_implementation_example/blob/master/MPC_imple_PJ_%E8%AA%AC%E6%98%8E%E8%B3%87%E6%96%99.pdf)を参照）\n\n\n特にマイクロコントローラに実装するときの検討事項について詳しくまとめている。\n\n# 必要なツールボックス\n\n本モデルでは、以下のツールボックスを利用する。ただし、インストールしていなくても、モデルを実行せず閲覧するだけであれば可能である。また、例題によっては使わないツールボックスもある。\n\n-  MATLAB® \n-  Simulink® \n-  Control System Toolbox™ \n-  Model Predictive Control Toolbox™ \n-  Simulink Control Design™ \n-  Simscape™, Simscape™ Multibody™ \n-  Symbolic Math Toolbox™ \n-  Navigation Toolbox™ \n-  Image Processing Toolbox™, Computer Vision Toolbox™ \n-  Automated Driving Toolbox™ \n-  MATLAB Coder™, Simulink Coder™, Embedded Coder® \n# 目次\n## 1.一般的な紹介資料\n\nMPCについて初学者であり、以下の資料を見ていない場合は、本サンプルモデルより先に以下の資料に目を通しておくこと。\n\n### ビデオ\n-  [モデル予測制御（MPC）とは？ Part1 ~ 基本的な考え方](https://www.youtube.com/watch?v=i68MkFz9L38) \n-  [モデル予測制御（MPC）とは？ Part2 ~ Model Predictive Control Toolbox例題](https://www.youtube.com/watch?v=47LzXHOXwtU) \n-  [応用 ~ アダプティブ・クルーズ・コントロールとセンサーフュージョン](https://www.youtube.com/watch?v=Nb3aTJ8Wgk8) \n### 技術紹介記事\n-  [モデル予測制御](https://jp.mathworks.com/discovery/model-predictive-control.html) \n### ホワイトペーパー\n\n以下の資料はMPCの技術的な資料である。ある程度ツールの使い方を理解した後に読むこと。\n\n-  [MPC高速化のための3つの方法](https://www.mathworks.com/content/dam/mathworks/white-paper/jp-3-ways-to-speed-up-model-predictive-controllers.pdf) \n## 2.線形MPC\n\n最初に線形MPCを使った例を紹介する。プラントモデルとして、単純なSISOの不安定システムを用いる。以下のライブエディターを開いて作業を開始すること（以降、同様にライブエディターを開いて確認していく）。\n\n\n[線形MPCコントローラの設計と実装](/MPC_imple_PJ/Linear/Linear_MPC_Design_md.md)\n\n## 3.陽的MPC\n\n線形近似されたDCモーターモデルに対して陽的MPCを設計し、実装する。線形MPCと陽的MPCの比較を行う。\n\n\n[陽的MPCコントローラの設計と実装](/MPC_imple_PJ/Explicit/Explicit_MPC_Design_md.md)\n\n## 4.適応MPC\n\n適応MPCの設計と実装について、4輪走行車両の制御を例に紹介する。プラントモデルとしては、等価二輪モデルを用いる。\n\n\n[適応MPCコントローラの設計と実装](/MPC_imple_PJ/Adaptive/Adaptive_MPC_Design_md.md)\n\n## 5.ゲインスケジュールMPC\n\n適応MPCで用いたプラントモデルと設計手法を転用し、ゲインスケジュールMPCを設計、実装する。\n\n\n[ゲインスケジュールMPCコントローラの設計と実装](/MPC_imple_PJ/Multiple/Multiple_MPC_Design_md.md)\n\n## 6.非線形MPC\n\n非線形MPCの設計と実装について、シンプルな車両モデルの運転制御を例に紹介する。\n\n\n[非線形MPCコントローラの設計と実装](/MPC_imple_PJ/Nonlinear/Nonlinear_MPC_design_md.md)\n\n## 7.適応MPCに内点法ソルバー適用\n\n適応MPCのソルバーとして、内点法を用いた場合の設計と実装について、4輪走行車両の制御を例に紹介する。プラントモデルとしては、等価二輪モデルを用いる。\n\n\n[適応MPCコントローラのQPソルバーの設定について検討](/MPC_imple_PJ/Adaptive/Adaptive_MPC_QP_investigation_md.md)\n\n## 8.マルチステージの非線形MPC\n\nマルチステージの非線形MPCは、コスト関数を予測ホライズンの各ステップごとに設定できる。それにより、通常の非線形MPCよりも高速に計算できる。\n\n\n[マルチステージ非線形MPCの設計と実装](/MPC_imple_PJ/Nonlinear/Nonlinear_MultiStage_MPC_design_md.md)\n\n## Ex.1.適応モデル予測制御による倒立制御走行ロボットの倒立制御\n\n適応MPCを用いて、倒立振子型の自律走行ロボットの制御を構築する。物理モデルをSimscape Multibodyで構築し、それを制御する。\n\n\n[適応モデル予測制御による倒立制御走行ロボットの倒立制御](/MPC_imple_PJ/InvertedPendulumRobot/InvertedPendulumRobot_design_md.md)\n\n## Ex.2.モデル予測制御ならびにカメラ画像によるターゲット認識を利用した衝突回避\n\n適応MPCを用いて、自律走行車両の制御を構築する。Automated Driving Toolboxを用いた走行環境から障害物を認識し、回避しながら走行制御を行う。\n\n\n[モデル予測制御ならびにカメラ画像によるターゲット認識を利用した衝突回避](/MPC_imple_PJ/obstacleAvoid/liveScriptForObstacleAvoid_md.md)\n\n# 過去バージョン\n\n過去のバージョンのファイル一式は、以下から得ることができる。ただし、過去のモデルには、古い時期に作成したサンプルしか含まれていないことに注意すること。\n\n\nGitHubからクローンしている場合には、以下の該当バージョンに戻すことで、過去バージョンファイルを得ることができる。\n\n\nR2024a: [v9.0](https://github.com/mathworks/mpc_implementation_example/archive/refs/tags/v9.0.zip)\n\n\nR2023b: [v8.0.1](https://github.com/mathworks/mpc_implementation_example/archive/refs/tags/v8.0.1.zip)\n\n\nR2023a: [v7.0](https://github.com/mathworks/mpc_implementation_example/archive/refs/tags/v7.0.zip)\n\n\nR2022b: [v6.0](https://github.com/mathworks/mpc_implementation_example/archive/refs/tags/v6.0.zip)\n\n\nR2022a: [v5.0](https://github.com/mathworks/mpc_implementation_example/archive/refs/tags/v5.0.zip)\n\n\nR2021b: [v4.0.2](https://github.com/mathworks/mpc_implementation_example/archive/refs/tags/v4.0.2.zip)\n\n\nR2021a: [v3.3.1](https://github.com/mathworks/mpc_implementation_example/archive/refs/tags/v3.3.1.zip)\n\n\nR2020b: [v2.2](https://github.com/mathworks/mpc_implementation_example/archive/refs/tags/v2.2.zip)\n\n\nR2020a: [v1.1.1](https://github.com/mathworks/mpc_implementation_example/archive/refs/tags/v1.1.1.zip)\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks%2Fmpc_implementation_example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmathworks%2Fmpc_implementation_example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmathworks%2Fmpc_implementation_example/lists"}