필터 지우기
필터 지우기

help for transfer function and your analysis

조회 수: 1 (최근 30일)
Camilo Mahnert Cataldo
Camilo Mahnert Cataldo 2023년 7월 20일
댓글: Aquatris 2023년 7월 22일
hi everyone, i have this script.
% state matrix
A = [0 1 0; -2 -3 0; 0 0 -4];
B = [0; 1; 2]; % B1, B2 y B3 en columnas diferentes
C = [1 0 0]; %
D = [0 0 0]; %
[num, den] = ss2tf(A, B, C, D);
% Crear el objeto de función de transferencia
sys_tf = tf(num, den);
It turns out that I want to manipulate the first variable to reach a certain set point. But I am interested in analyzing the behavior of the third variable from the manipulation of the first variable. How can I do it?
  댓글 수: 1
Aquatris
Aquatris 2023년 7월 22일
You might wanna use some control terminology to describe your problem so that it is not ambigous. What do you mean by 'first variable'? I am gonna guess you meant 'state #1'.
Do you want to see the effects of 1st state on the 3rd state? If so do you want it in open loop or closed loop?
If open loop, from your A matrix, you can clearly see that your 3rd state is decoupled from the 1st and 2nd states. Hence, whatever 1st and 2nd state does has no effect on the 3rd state. Write down your xd = Ax and see that xd(3) is not effected by x(1).
if closed loop, since this is a simulation case, close the loop with a controller and add the 3rd state as an output by appropriatly manipulating your C matrix. From there you can get a bode diagram.

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

답변 (1개)

Sam Chak
Sam Chak 2023년 7월 21일
It is possible to manipulate the first variable to reach a certain setpoint using PI Controller. However, the third state cannot be observed as shown in the analysis of the Observability matrix below.
A = [0 1 0;
-2 -3 0;
0 0 -4]; % state matrix
B = [0;
1;
2]; % B1, B2 y B3 en columnas diferentes
C = [1 0 0]; % output matrix
D = 0; % direct feedthrough
[num, den] = ss2tf(A, B, C, D);
% Crear el objeto de función de transferencia
Gp = tf(num, den)
Gp = s + 4 ---------------------- s^3 + 7 s^2 + 14 s + 8 Continuous-time transfer function.
% Attempt #1: Compensator
% s = tf('s');
% Gc = (s + 1)/(s^3 + 2*s^2 + 2*s)
% Attempt #2: PI controller
kp = 1;
ki = 1;
Gc = pid(kp, ki)
Gc = 1 Kp + Ki * --- s with Kp = 1, Ki = 1 Continuous-time PI controller in parallel form.
% closed-loop system
Gcl = minreal(feedback(Gc*Gp, 1))
Gcl = s + 1 --------------------- s^3 + 3 s^2 + 3 s + 1 Continuous-time transfer function.
step(Gcl, 20)
Ob = obsv(A, C)
Ob = 3×3
1 0 0 0 1 0 -2 -3 0
% Unobserved state
unobsv = length(A) - rank(Ob)
unobsv = 1

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by