Error creating an FMU from a "Neural State Space Model" block

10 visualizzazioni (ultimi 30 giorni)
IBAN
IBAN il 29 Mag 2025
Risposto: Prathamesh il 28 Ago 2025 alle 9:55
We are not able to create an FMU from from a "Neural State Space Model" block. The error that appears is:
Error:Invalid "()" reference for the "IDNEURALSTATESPACE" model.
We can run the block in Simulink perfectly but when we click also "Refresh" in the FMU settings, this error appears.
We do not have any problem for example creating an FMU with "Stateful Predict" block.

Risposte (1)

Prathamesh
Prathamesh il 28 Ago 2025 alle 9:55
Hi @IBAN,
I understand that you are unable to create an FMU from "Neural State Space Model" block. The error you are getting is "Error:Invalid "()" reference for the "IDNEURALSTATESPACE" model".
  1. Using a MATLAB Function Block
  • Write the model's mathematical equations directly in MATLAB code within the block. The code generation tool can then easily translate this into C code for the FMU.
  • This method gives you full control and avoids any code generation issues with the original specialized block.
2. Using the Stateful Predict Block
  • he "Stateful Predict" block is part of the Deep Learning Toolbox, which is designed for robust code generation and FMU export. You can convert your trained model into a format that this block can use.
  • The "Stateful Predict" block is specifically built for deployment and is known to work for FMU creation.
Hope this helps.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by