Menu

Variable state setpoint

2019-03-15
2019-11-15
  • Andrea Bonanzinga

    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

     
  • Felix Mesmer

    Felix Mesmer - 2019-03-15

    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

     
  • Andreas Völz

    Andreas Völz - 2019-11-15

    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

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.