Is "ss" not acceptable in Simulink?
13 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Dear all:
In my simulink, I have a controller which relies on the discrete Ad, Bd, Cd, Dd matrix of a continuous state-space. The continuous state-space matrix Ac, Bc, Cc, Dc are changing for every time step depending on the system states and inputs, which means Ad, Bd, Cd, and Dd are changing with each time step too. In simulink, I use the Matlab fcn, but when running, it shows error:
The 'ss' class does not support code generation.
Function 'MATLAB Function' (#35.1334.1351), line 109, column 33: "ss(Ac,Bc,Cc,Dc)" Launch diagnostic report.
Can anyone help me with this? Thank you.
0 commentaires
Réponses (1)
Walter Roberson
le 6 Déc 2015
You would get that when you use ss() if you attempted to use Rapid Acceleration mode or tried to generate code for a target.
The MATLAB Function block is primarily for blocks of code that can have code generated in order to run more quickly. If you are using a MATLAB Function block because you just want to call into MATLAB routines, then the Interpreted MATLAB block would be more appropriate.
If you do need Rapid Acceleration mode or need to generate code for a target, you will need to change the way you control the device in your release.
Note that current versions of the Model Predictive Control toolbox appear to allow ss to be used for code generation; see http://www.mathworks.com/help/mpc/ug/code-generation-with-simulink-coder.html
0 commentaires
Voir également
Catégories
En savoir plus sur Sources dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!