SS2TF Error

조회 수: 24 (최근 30일)
Anthony Sirico
Anthony Sirico 2021년 1월 31일
답변: Paul 2021년 2월 1일
sysm s R1 R2 C1 C2
A = [-(R1+R2)/(C1*R1*R2) 1/(C1*R2); 1/(C2*R2) -1/(C2*R2)];
B = [1/(C1*R1); 0];
C = [0 1];
D = 0;
[n,d]=ss2tf(A,B,C,D);
After executing, i get:
Error using ss2tf (line 26)
The following error occurred converting from sym to double:
Unable to convert expression containing symbolic variables into double array. Apply 'subs' function first to substitute values for
variables.
Error in sstf (line 8)
[n,d]=ss2tf(A,B,C,D);
I am not familiar with subs, can someone explain?

답변 (2개)

madhan ravi
madhan ravi 2021년 1월 31일
State space representation should be with numerical values and it cnnot contain symbolic values.

Paul
Paul 2021년 2월 1일
If you want the numerical answer, then don't even bother with the symbolic stuff. Just assign values to the variables R1, R2, C1, and C2 and go from there.
If you really want the symbolic expression:
[num,den]=numden(C/(s*eye(2)-A)*B+D)
and then proceed from there.

카테고리

Help CenterFile Exchange에서 Control System Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by