필터 지우기
필터 지우기

Is "ss" not acceptable in Simulink?

조회 수: 13 (최근 30일)
Tao Lu
Tao Lu 2015년 12월 6일
답변: Walter Roberson 2015년 12월 6일
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.

답변 (1개)

Walter Roberson
Walter Roberson 2015년 12월 6일
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

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by