function zpk and linmod

조회 수: 5 (최근 30일)
Rafaella Barrêto Campos
Rafaella Barrêto Campos 2024년 10월 10일
댓글: Rafaella Barrêto Campos 2024년 10월 16일
How are matrices A,B,C,D found?
How is the calculation done to find the transfer function gains?
Example:
X_trim =
0.0156566822191464
0.0795424262493709
196.412468864823
15.6561280499959
0
-3048
U_trim =
-0.091567106993385
[A,B,C,D]=linmod(modelName,X_trim,U_trim)
A =
x1 x2
x1 -0.7302 195.5
x2 -0.1373 -0.67
B =
u1
x1 -25.91
x2 -36.5
C =
x1 x2
y1 -0.7302 195.5
y2 0 1
D =
u1
y1 -25.91
y2 0
-25.905 s (s+276.1)
az: --------------------
(s^2 + 1.4s + 27.32)
-36.503 (s+0.6328)
q: --------------------
(s^2 + 1.4s + 27.32)

답변 (2개)

Sam Chak
Sam Chak 2024년 10월 10일
Once you have the state-space, you can apply the zpk() function to obtain the TF in zpk mode.
A = [-0.7302 195.5
-0.1373 -0.67];
B = [-25.91
-36.5];
C = [-0.7302 195.5
0 1];
D = [-25.91
0];
sys = ss(A, B, C, D)
sys = A = x1 x2 x1 -0.7302 195.5 x2 -0.1373 -0.67 B = u1 x1 -25.91 x2 -36.5 C = x1 x2 y1 -0.7302 195.5 y2 0 1 D = u1 y1 -25.91 y2 0 Continuous-time state-space model.
G = zpk(sys)
G = From input to output... -25.91 s (s+276.1) 1: -------------------- (s^2 + 1.4s + 27.33) -36.5 (s+0.6327) 2: -------------------- (s^2 + 1.4s + 27.33) Continuous-time zero/pole/gain model.
  댓글 수: 3
Rafaella Barrêto Campos
Rafaella Barrêto Campos 2024년 10월 10일
Yes, how find A,B,C,D?
Sam Chak
Sam Chak 2024년 10월 10일
편집: Sam Chak 2024년 10월 10일
I don't know the algorithm used in the linmod.m file. However, the state-space matrices A, B, C, D are obtained by computing the Jacobian with respect to the trim condition.

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


Aquatris
Aquatris 2024년 10월 11일
Here explains how it is done. Basically you have your function that describes the relation between states and inputs. If they are nonlinear functions, you use Jacobian to linearize the relation at a particular operating point, depicted with x_trim and u_trim in your example.
Once you have a state space representation, then you can convert it to a transfer function. From the transfer function, finding the zeros poles and gain are a simple mathematical manipulation to make the transfer function look like this
  댓글 수: 8
Rafaella Barrêto Campos
Rafaella Barrêto Campos 2024년 10월 14일
Would you like to understand how the matrices A,B,C,D are calculated?
Rafaella Barrêto Campos
Rafaella Barrêto Campos 2024년 10월 16일
Loading these files generates two transfer functions, one az and the other q. I would like to know how the calculation of matrices A, B, C and D is done?

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

카테고리

Help CenterFile Exchange에서 Dynamic System Models에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by