Is "ss" not acceptable in Simulink?

8 visualizaciones (últimos 30 días)
Tao Lu
Tao Lu el 6 de Dic. de 2015
Respondida: Walter Roberson el 6 de Dic. de 2015
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.

Respuestas (1)

Walter Roberson
Walter Roberson el 6 de Dic. de 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

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by