operspec error: the simulation inputs must be specified as a vector of doubles
조회 수: 9 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
답변 (1개)
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
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Model Predictive Control Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!