Azzera filtri
Azzera filtri

help for transfer function and your analysis

1 visualizzazione (ultimi 30 giorni)
Camilo Mahnert Cataldo
Camilo Mahnert Cataldo il 20 Lug 2023
Commentato: Aquatris il 22 Lug 2023
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 Commento
Aquatris
Aquatris il 22 Lug 2023
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.

Accedi per commentare.

Risposte (1)

Sam Chak
Sam Chak il 21 Lug 2023
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

Community Treasure Hunt

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

Start Hunting!

Translated by