Error:Error evaluating 'InitFcn' callback of MPC block (mask) 'ControlSyst/MPC Controller1'. Callback string is 'impcblock_InitFcn' Caused by: You have connected a signal
23 次查看(过去 30 天)
显示 更早的评论
I would be highly appreciated if you help me to remove that bothering notification and run my simulation smoothly. Kindly note that I have attached the file to my query.
Best regards,
Moaaz
0 个评论
回答(1 个)
Githin George
2024-12-4,6:49
Hi Ahmad,
I have tried running the model with the “param_init” script that you have provided but it seems that “mpcobj” (MPC Controller) is not specified in the “MPC Controller Block” and I end up with another error.
But assuming that you have received an error message as shown below:
```
You have connected a signal to the "Measured Disturbance (md)" inport of the MPC block "ControlSyst/MPC Controller1",
but the MPC controller referred in this block does not have measured disturbance inputs.
```
I suspect that the error is originating because you haven’t provided the information related to the MPC signal types for the input and output signals in the LTI system object (plant) used for creating the “mpc” object, specifically for the “Measured Disturbance (md)”. You can refer to the function “setmpcsignals” to do so:
Note that the “Measured Disturbance” port is optional for the “MPC Controller Block” but the port is only valid assuming that the MPC Struct contains information related to the “Measured Disturbance” signals.
You may want to refer to the script in the following example for more information on the setup:
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Controller Creation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!