Hi everyone,
I'm using the GRAMPC framework on Simulink in order to perform a simple longitudinal vehicle control.
I'd like to know if it's possible to provide to the S-Function block, containing grampc_run_Sfct.c, a set of desired velocity setpoints for each sample time of the entire time horizon and not a constant reference value. If yes, how can I do it?
I'm looking forward for an answer and thanks a lot
Best regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
the function arguments / parameters xdes and udes are constant over the entire prediction horizon. In order to achieve your goal, you have to add your velocity setpoints to the userparam, then you can use them in your cost function instead of xdes. You can take a look at "examples\Reactor_CSTR\probfct_REACTOR_CSTR_MHE.c" where a similar problem was solved this way.
Regards,
Felix
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 is possible to pass the desired velocity setpoints for each sample time of the horizon via userparam to the cost functions.
Regards,
Andreas
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 is possible to
pass the desired velocity setpoints for each sample time of the horizon via
userparam to the cost functions.
Hi everyone,
I'm using the GRAMPC framework on Simulink in order to perform a simple longitudinal vehicle control.
I'd like to know if it's possible to provide to the S-Function block, containing grampc_run_Sfct.c, a set of desired velocity setpoints for each sample time of the entire time horizon and not a constant reference value. If yes, how can I do it?
I'm looking forward for an answer and thanks a lot
Best regards
Hi Andrea,
the function arguments / parameters xdes and udes are constant over the entire prediction horizon. In order to achieve your goal, you have to add your velocity setpoints to the userparam, then you can use them in your cost function instead of xdes. You can take a look at "examples\Reactor_CSTR\probfct_REACTOR_CSTR_MHE.c" where a similar problem was solved this way.
Regards,
Felix
Hello Andrea,
for your information, the userparam vector has been added as additional input to the S-function in version 2.2 of GRAMPC. Thus, it is possible to pass the desired velocity setpoints for each sample time of the horizon via userparam to the cost functions.
Regards,
Andreas
Hi Andreas,
thank you for the information!
Regards,
Andrea
Il giorno ven 15 nov 2019 alle ore 16:15 "Andreas Völz" avoelz@users.sourceforge.net ha scritto: