필터 지우기
필터 지우기

How to pass external time-varying parameters to nonlinear MPC models?

조회 수: 14 (최근 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

채택된 답변

Emmanouil Tzorakoleftherakis
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
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 CenterFile Exchange에서 Code Generation에 대해 자세히 알아보기

제품


릴리스

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by