Documentation Home Page ePHASORSIM Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

MATLAB Simulink is crashing

Page Content

In some situations, the MATLAB Simulink process crashes with and opens a crash reporting dialogue:

The MathWorks Crash Reporter.

Similarly, the simulation could also crash on the real-time target. In this case RT-LAB will detect the crash and resets the model. A detailed crash log can be obtained by logging into the real-time target via SSH and running the following command: coredumpctl gdbbt.

This guide proposes several steps and ideas to debug your ePHASORSIM model in case such crashes occur.

If your model contains one or more ePHASORSIM solver blocks, these crashes are usually caused by either of the user provided inputs:

  • An invalid input model

  • An invalid code in FMU components

 

As a debugging strategy we recommend to perform the following steps:

  1. Run the simulation offline in Simulink first, as it eases debuggability due to the locally present log files.

  2. Remove the solver block from your model to cross check that the crash is indeed caused by the ePHASORSIM solver.

  3. Try to replace the FMU by a native model,
    or alternatively, substitute the model by a known-good model (such as the phasor01_IEEE39 example) while keeping the FMU in the model

    • This will help you to identify whether the cause for the crash is the model itself or the FMU component.
      Use the following sections to debug either the model or the FMU.

Debug the input model

Debug the FMU components

  • Enabling the FMU loggers via the Solver mask:

    image-20240228-112921.png

    This will include a lot more debug information of the FMU components in the Simulink diagnostig view or IRTS.log file.

  • Try to compile the FMU components with debugging information:

    • In the FMUCreator a dedicated Debug checkbox needs to be selected:

    • Furthermore, in case of using OpenModelica, you can further include debugging symbols in the compiled FMU component which eases debugging with a debugger and shows function names in stack traces.

      To increase debugging information emitted by the OpenModelica compiler, add the line +debug=gendebugsymbols to the OpenModelica flags file at:
      C:\OPAL-RT\RT-LAB\[RT-LAB Version]\FMUCreator\FMUCreator\omFlag.cfg.

      Please also refer to the OpenModelica Users Guide (Debug flags Section) for further flags which can be specified here.

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter