Problem in using sensitivity function on mpc object
1 ビュー (過去 30 日間)
Hope you all are doing good. Im designing an MPC controller for the first time and have been following the documentation on Mathworks website about it for setting up weights and tuning them. In order to fine tune the weights as explained in the MPC documentation (https://www.mathworks.com/help/mpc/ug/tuning-weights.html) I've been following the link given below to use the sensitivity function:
But when I try to implement it on the mpc object ive created from the MPC designer, the sensitivity function outputs J=0 and all the other derivative terms are also 0. This is shown in the picture below.
Additional Details: My plant model is a nonlinear model but I'm linearizing it at a given operating point and discretizing it as well. Also I have 2 MV and 4 MD and 3 OVs Other than that ive followed the same exact code for using the sensitivity function (link given above) except for the generation of the plant model and adding constraints since I already have those implemented from the MPC designer.
Can anyone please explain what might be the issue?
Also any help on weight tuning would also be appreciated.