Problem with idgray and ident tool
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi, I'm trying to use the system identification tool in order to obtain the space state model the mass spring damper 2Dof system, so i'm trying to work with the grey box model. this is my function
function [A,B,C,D]=identificazioneidgrey(m_1,m_2,b_1,b_2,k_1,k_2,Ts);
A1=[0 0 1 0;0 0 0 1];
A2=[((-k_1-k_2)/m_1) (k_2/m_1) (-(b_1+b_2)/m_1) (b_2/m_1);(k_2/m_2) (-(k_2/m_2)) (b_2/m_2) (-(b_2/m_2))];
A=[A1;A2];
B1=[0 0;0 0];
B2=[(1/m_1) 0;0 (1/m_2)];
B=[B1;B2];
C=[1 0 0 0;0 1 0 0];
D=[0 0;0 0];
end
and this is the idgrey model:
odefun='identificazioneidgrey';
m_1=1;
m_2=2;
b_1=1;
b_2=1;
k_1=1;
k_2=1;
parameters={'m_1','m_2','b_1','b_2','k_1','k_2'};
fcn_type='c';
sys=idgrey(odefun,parameters,fcn_type);
the problem is that in the work space i can't find sys, but only ans, inside ans:Empty linear greay-box model.
I want sys because i have to put it inside the ident tool. Where is the error? What can i do?
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Linear Model Identification에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!