i am not clear on what you are trying to implement.
My issue was running the nl-opt toolbox on dedicated hardware (PXI)
I never succeeded in implementing matlab code to the PXI, due to toolbox dependencies.
Thus i resorted to do all my programming in C code, with the NL-opt toolbox.
For implementing NMPC within matlab i suggest to either code from scratch (build own optimizer and MPC algorithm), use the matlab optimization toolbox (thus only coding the MPC part) or look for a NMPC toolbox (i believe this exist).
But for implementing NMPC on dedicated PXI hardware, i suggest to avoid matlab and build your code in C.
Thanks for your answer. But for this state, my problem is haw used NLOP library to optimized the Nonlinear model predictive control problem in Simulink. I have used s-function for coding the MPC part AND NLOP library for optimisation. Please if you have any information tell me. Thank you.
If i understand correctly you are trying to implement C code in simulink using the s-function block.
i have no experience in exporting the nlopt library to matlab, and i suggest you try the mathworks forums for more help.
or try to use matlab toolboxes for your optimization, i believe either matlab or the community will have already ported most if not all of the algoritmhs available in the NL Opt library
Best of luck.
Thanks for the reply,
When you are used Nl-opt toolbox in C code for solving the optimisation problem of nonlinear predictive control, you have used "NLOPT_GN_ISRES" NLOPT algorithm?