I am trying to design an MPC Control for my project but it seems that the Simulink cannot linearize my model accurately due to the presence of an embe dded-MATLAB function block containing an if...else loop.
My model looks like this: (dunno how to upload photos. sry)
Embedded MATLAB -> Plant Model -> MPC--
And th function in the embedded MATLAB is
else Output =u;
After designing the MPC Controller, the linearized result for the MPC Controller was 0. So how shlould i go about doing it?