Hello everyone,
Could you please kindly let me know how to make more inputs appear in the Simulink Sfunction? We have four (t0, xk, xdes, udes), but I need to update my userparams in the Simulink. So, I need to have more SFunction inputs to realize my ODE formualtion, cost formulation, constraint specification, etc. I do change the grampc_runSfuc.c with more inputs as suggested, but after I recompile, no thing happened. The MPC_Subsystem block still only has four inputs.
THANKS !
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello everyonw,
This problem is also solved.
I guess we do not need to be 'constrained' by the Simulink template. In stead, we can use a new C-MEX Sfunc. After compile, initilization, and Run, all the port pins will appear.
I need to say: GRAMPC is really fast......
Thanks.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
for your information, the userparam vector has been added as additional input to the S-function in version 2.2 of GRAMPC. Thus, it should no longer be necessary to modify grampc_run_Sfct.c for your usecase.
Regards,
Andreas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello everyone,
Could you please kindly let me know how to make more inputs appear in the Simulink Sfunction? We have four (t0, xk, xdes, udes), but I need to update my userparams in the Simulink. So, I need to have more SFunction inputs to realize my ODE formualtion, cost formulation, constraint specification, etc. I do change the grampc_runSfuc.c with more inputs as suggested, but after I recompile, no thing happened. The MPC_Subsystem block still only has four inputs.
THANKS !
Hello everyonw,
This problem is also solved.
I guess we do not need to be 'constrained' by the Simulink template. In stead, we can use a new C-MEX Sfunc. After compile, initilization, and Run, all the port pins will appear.
I need to say: GRAMPC is really fast......
Thanks.
Hello Zejiang,
for your information, the userparam vector has been added as additional input to the S-function in version 2.2 of GRAMPC. Thus, it should no longer be necessary to modify grampc_run_Sfct.c for your usecase.
Regards,
Andreas