Linearize and Transfer Function

조회 수: 12 (최근 30일)
Daniel Pérez Gutiérrez
Daniel Pérez Gutiérrez 2023년 3월 30일
편집: Paul 2023년 4월 3일
Hi! I want to Linearize a Matlab Function in Simulink and then get its transfer function to control the process.
How can I do that? This is the Simulink model: (The Matlab Function has 13 inputs and 7 outputs)
Thanks in advance!

답변 (1개)

Paul
Paul 2023년 4월 3일
Does linearize do what you need? It can be used to linearize a model or a specific block in a model. Not sure how well it works on models that contain Matlab Function blocks or on that type of block itself. Might depend on what's actually going on inside the Matlab Function block.
  댓글 수: 2
Daniel Pérez Gutiérrez
Daniel Pérez Gutiérrez 2023년 4월 3일
Yes It does, and I'm getting this matrix D of 7 rows and 13 columns:, that I believe it is because of the inputs and outputs of the Matlab Function Block.
With that, how can I get its transfer function?
The Matlab Function has the differential equations of a non-linear model of a yeast bioreactor.
Paul
Paul 2023년 4월 3일
편집: Paul 2023년 4월 3일
From the looks of the model, it seems like the block is actually computing the right-hand side of a vector difference equation of the form
x(k+1) = f(x(k),w(k))
and the vector input to the Matlab Function is
u = [w(k);x(k)]
with vector w being the first six inputs of u
If that's the case, then the output of linearize just for that block would be an ss object, call it sys, with sys.A = sys.B = sys.C = 0, and sys.D is the Jacobian of f evaluated at the linearization point. In this case the linearized model would be
x(k+1) = sys.D(:,1:6)*u(k) + sys.D(:,7:13)*x(k).
Therefore, in Matlab an LTI system of that model could be created as
Psys = ss(sys.D(:,7:13),sys.D(:,1:6),eye(7),0,Ts);
Psys assumes that the outputs of the model are x(k). However, the signals going in to Graficas are x(k+1). If x(k+1) is really the desired output, then I think we'd have
Psys = ss(sys.D(:,7:13),sys.D(:,1:6),sys.D(:,7:13),sys.D(:,1:6),Ts);

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

카테고리

Help CenterFile Exchange에서 Array and Matrix Mathematics에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by