How can I create a transfer function in terms of matrices and s ?

조회 수: 15 (최근 30일)
Justin Burzachiello
Justin Burzachiello 2021년 7월 4일
댓글: Star Strider 2021년 7월 4일
Hello. I want to create the following transfer function: for a general descriptor state-space model.
Now, I cannot directly convert the state space model into a transfer function since its dimensionality is too high. At least, that is what I believe. I recieve the error "unable to convert the model to a transfer function because of overflow" when I try tf_sys = tf(full(sys)), where sys = dss(A,B,C,D,E). I am trying to perform model-order reduction as a project, hence the high dimensionality.
% external data
LD = load('PEEC.mat')
A = LD.A;
B = LD.B;
C = B.';
E = LD.E;
% peec.mat has sparse matrices
sys = sparss(A,B,C,0,E);
% define s variables for tf
s=tf('s');
% create tf
tf = (C.') * inv(s*E - A) * B;
Now, my MATLAB has been calculating tf = ... for the past 10 minutes, so I am unsure if this works. Is this a valid way to constrcut a transfer function? If not, how can I create a transfer function where I do not know the rational formulation, but I do know it in terms of matrices and s ? I should note that my matrices are very large.
I have been basing my code in part on https://www.educba.com/transfer-functions-in-matlab/
  • Thank you
  댓글 수: 2
Paul
Paul 2021년 7월 4일
Is it really neccessary to convert your model into a transfer function (assuming it even exists)? Typically, a model in state space form is preferred for computations. The documentation has a short discussion on this topic: link. Having said that, if really needed to transform to frequency domiain, zpk might be the better way to go. And having said that, maybe the guidelines change altogether for descriptor systems.
Does your model have any structure you can exploit? For example, if E is non-singular and (block) diagonal, maybe you could break your problem up into smaller chunks.
Star Strider
Star Strider 2021년 7월 4일
Downloading the file and then:
A = LD.A;
B = LD.B;
C = B.';
E = LD.E;
% peec.mat has sparse matrices
figure
spy(sys)
produces:
See the Control System Toolbox spy function documentation for details on interpreting the plot.
.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

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

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by