Menu

Error while running startMHE.m

2020-03-05
2020-03-09
  • Sophie Grammatikopoulos

    Hello,
    I am using MATLAB 2018b and GRAMPC_v2.2. I wanted to try out the MHE implementation in the "Reactor_CSTR" example. While running startMHE.m the attached error message occurs.

    What is puzzling the most is that the error occurs at various simulation times and sometimes does not occur at all.
    I implemented a workaround by changing the mfile “adapt_ylim” (so that the error message does not show up anymore) in order to find the core issue. I believe that the problem can be traced back to NaN-entries in the structure “grampcMHE”. An iteration before the first NaN-entries in e.g. “grampcMHE.rws.x” occur a few entries sometimes drastically increase in value and sometimes become infinite. I could image there is a numerical problem of some sorts, but I can not comprehend why and what I did wrong.

    I would be very appreciative of some guidance in this matter.
    Thank you very much.

     
  • Andreas Völz

    Andreas Völz - 2020-03-06

    Dear Sophie,

    thanks for reporting this issue. We are aware of this problem in the MHE example and guess that it is related to incorrect setting of the past controls in grampc.rws.u. I have attached a modified version of startMHE.m that solved the problem for one of our developers. Could you please test whether it solves the problem on your system too and report it here?

    Regards,
    Andreas Völz

     
  • Sophie Grammatikopoulos

    Hello Andreas,

    Thank you very much for your fast response. It really seems to solve the problem. I will test it further and update this discussion thread in case I encounter a problem.

    Regards,
    Sophie

     
  • Sophie Grammatikopoulos

    Hello Andreas,

    Thank you very much for your fast response. It really seems to solve the problem. I will test it further and update this discussion thread in case I encounter a problem.

    Regards,
    Sophie

     

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.