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.
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?
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
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
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
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