Nonlinear Greybox Object (idnlgrey) for Simulink realtime

1 visualizzazione (ultimi 30 giorni)
Hey everyone,
is there any built-in solution for usage of the simulink block "Nonlinear Grey-Box Model" for Simulink Real-Time (2015b). If I try to generate code, the error "Invalid parameters for S-function 'test_model_realtime/Nonlinear Grey-Box Model/Internal'. For code generation, S-function parameters must be one or two dimensional nonsparse numeric or character arrays unless the S-function uses a TLC file and has an mdlRTW function." occurs.
Thanks in advance!
  1 Commento
Sahithi Kanumarlapudi
Sahithi Kanumarlapudi il 13 Ago 2019
Could you be more clear on what you mean by any built-in solution for usage of the block.
And as far as the error message is concerned the might be something wrong with the parameters passed to the 'idlngrey' function

Accedi per commentare.

Risposte (1)

Rajiv Singh
Rajiv Singh il 20 Ago 2019
idnlgrey block does not support code generation. But there are workarounds depending upon why you need to generate code. If you are hoping to tune parameters of your model in deployed code, you are out of luck; you will need to write your own code for numerical optimization. If on the other hand if you just need to simulate the grey box model, you will need to write a C S function that implements the ODE function used by the idnlgrey model.
See:

Prodotti


Release

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by