How to pass external time-varying parameters to nonlinear MPC models?
7 ビュー (過去 30 日間)
古いコメントを表示
I have now established a MIMO nonlinear mpc model using the mpc toolbox, and my state function requires external input of parameters, which are time-varying and known. I don't know how to pass external variable parameters to a state function ,What should I do?
As far as I know, 'options. Parameters' can only be transferred to a fixed value, like this:
...
demand = 2000;
supply = 1000;
nloptions = nlmpcmoveopt;
nloptions.Parameters = {demand, supply};
x0=[0;80;50;60;40;50;29;70;40];
u0=[80;80;80;80;80;80;80;80];
[~,~,Info] = nlmpcmove(nlobj,x0,u0,[],[],nloptions);
...
And if I have the following requirements, how should I achieve them?
The prediction time domain and control time domain are both 5, and within these 5 control intervals, the external parameter demands of the state function are [2000 3000 4000 3000 1000]
If you follow the above code, the incoming demand remains unchanged
0 件のコメント
採用された回答
Emmanouil Tzorakoleftherakis
2023 年 5 月 23 日
編集済み: Emmanouil Tzorakoleftherakis
2023 年 5 月 24 日
Hello,
There are two ways of doing this:
1) With Nonlinear MPC, you can set your time-varying parameters as measured disturbances and provide them at runtime. See an example here. In your case, pay attention to the dimensions of the MD signal - you should provide the entire vector if you want 'previewing' meaning that each element in the vector will correspond to a specific time step
2) Use linear time-varying MPC and provide a sequence of A,B,C,D matrices for your entire horizon. Each set of matrices will be calculated based on the values you want. See a couple of examples here:
Hope this helps
12 件のコメント
Emmanouil Tzorakoleftherakis
2023 年 5 月 27 日
Can you please post these in a separate thread? That way they will be more discoverable is someone has similar questions. Also, please clarify what you mean when you say "I tried to derive the state for some time in the future by the obtained Info.MVopt and my state function". Do you mean you integrated your state function with, e.g., ode45 separately? Did you use the appropriate integration step?
Thanks
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Simulation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!