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

7 ビュー (過去 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 Center および File ExchangeModel Order Reduction についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by