operspec error: the simulation inputs must be specified as a vector of doubles

Hello,
I am currently trying to build a MPC simulink model following https://www.mathworks.com/help/mpc/ug/adaptive-mpc-control-of-nonlinear-chemical-reactor-using-successive-linearization.html, which relies on the "operspec" function.
I have encountered an error which says that " the simulation inputs must be specified as a vector of doubles" (See attached screen shots)
However, I have ensured that all the input to "operspec" are doubles. (see attached)
Does anyone know how I can resolve this problem?
The full model can be found on Github: https://github.com/christeefy/ECOstudioMPC, the offending file is AdaptiveInitBuilding.m
Thanks and god bless

답변 (1개)

Mingkai Wang
Mingkai Wang 2019년 11월 4일
편집: Mingkai Wang 2019년 11월 4일
Hi Bolin,
Sorry the previous explanation is not the reason. I found a "divided-by-zero" bug in my model, which hurts the calculation. The structure variable in the lookup table always gets a warning - It's actually innocent in terms of the calculation. Good luck!
Best
-------------------------------------------------------------------------------------------------------------------------------
I had the same problem. I finally got my model running by removing the structure variable in the model's lookup table block. I think this kind of variables cause trouble when calculating the derivatives during the trim or operation-point-finding. Maybe this could help.
Best

카테고리

도움말 센터File Exchange에서 General Applications에 대해 자세히 알아보기

질문:

2017년 9월 28일

편집:

2019년 11월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by