Effacer les filtres
Effacer les filtres

Adaptive MPC Controllerの使い方について

35 vues (au cours des 30 derniers jours)
隆浩 鈴木
隆浩 鈴木 le 16 Juil 2024 à 5:36
Commenté : 隆浩 鈴木 le 17 Juil 2024 à 11:15
MPCを勉強中ですので至らない点があると思いますが質問させていただきます。Adaptive MPC Controllerに関する動画(Adaptive MPC Design with Simulink - File Exchange - MATLAB Central (mathworks.com))を参考にしています。
以下に示すのが、私がシミュレーションしているモデルです。ここで、State SpaceブロックのB行列の計算にもちいる変数(Tx)がtimeseriesの時系列データとなっています。そのため、MPC Controllerブロックではシミュレーションできないと認識しています。
以上の質問からそのように思い、Adaptive MPC Controllerでの実装を考えています。
そこで、この場合のAdaptive MPC Controllerの使用が正しいのかと、State Spaceブロックはどのように置き換えればよいのか教えていただきたいです。
下に、updateModelの中身と、Adaptive MPCのコントローラのプログラムを添付させていただきます。
function [A,B,C,D,U,Y,X,DX] = updateModel(Tx,mass)
% 状態空間モデルの行列を定義
A = [0, 1; 0, 0];
B = [0; Tx/mass];
C = [1, 0];
D = 0;
U = 0;
X = 0;
Y = 0;
DX = 0;
end
%適応MPCコントローラのプログラム
mass = 4.81; % 質量
Ts = 0.1; % サンプリング時間
char Tx = load('MPC','Tx');
A = [0 1; 0 0];
B = [0; Tx/mass];
C = [1 0];
D = 0;
% 状態空間モデルの定義
plantc = ss(A, B, C, D);
plantd = c2d(plantc, Ts);
% MPCオブジェクトの作成
mpcobj = mpc(plantd);
% 非因果状態を除去
mpcobj.Model.Plant = minreal(mpcobj.Model.Plant);
% シミュレーションの準備
assignin('base', 'mass', mass);
assignin('base', 'mpcobj', mpcobj);
assignin('base', 'A', A);
assignin('base', 'C', C);
assignin('base', 'D', D);
  4 commentaires
Toshinobu Shintai
Toshinobu Shintai le 17 Juil 2024 à 7:24
「線形の状態方程式のA行列が時間と共に変化する場合にMPCを設計するとき、Adaptive MPCを使用するべきか」という質問に関しましては、おっしゃる通りAdaptive MPCを使用するのがベターな選択です。
提示しましたデモモデルでも、A行列に車両速度が含まれており、速度によって可変な行列になっています。
隆浩 鈴木
隆浩 鈴木 le 17 Juil 2024 à 11:15
Shintai様
Adaptive MPCの使用に関して教えていただき、ありがとうございます。
デモモデル等を見ながら実装してみようと思います。
またわからない箇所が出たら質問させていただきます。

Connectez-vous pour commenter.

Réponses (0)

Produits


Version

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!