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

4 views (last 30 days)
Justin Burzachiello
Justin Burzachiello on 4 Jul 2021
Commented: Star Strider on 4 Jul 2021
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 Comments
Star Strider
Star Strider on 4 Jul 2021
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.
.

Sign in to comment.

Answers (0)

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!