Maybe a mistake in the documentation of function ''robgain''

6 visualizaciones (últimos 30 días)
Hongrui
Hongrui el 18 de Ag. de 2024
Comentada: Steven Lord el 19 de Ag. de 2024
Please refer to this documentation: robgain
as well as this system:
In the example "Robust Performance of Closed-Loop System", it says that "Create a model of the controller, and build the closed-loop sensitivity function, S. The sensitivity measures the closed-loop response at the plant output to a disturbance at the plant input."
The corresponding codes are:
k = ureal('k',10,'Percent',40);
delta = ultidyn('delta',[1 1]);
G = tf(18,[1 1.8 k]) * (1 + 0.5*delta);
C = pid(2.3,3,0.38,0.001);
S = feedback(1,G*C);
tf(S)
ans = s^4 + 1002 s^3 + 1810 s^2 + 1e04 s + 4.337e-15 ----------------------------------------------- s^4 + 1002 s^3 + 8691 s^2 + 5.145e04 s + 5.4e04 Continuous-time transfer function.
However, when I refer to the documentation of feedback, it seems that the code feedback(1,G*C) actually refers to the closed-loop response at the plant input, instead of that at the plant output. I use the function connect to prove this:
G.InputName = 'e2';
G.OutputName = 'y';
C.InputName = 'e1';
C.OutputName = 'u';
S1 = sumblk("e1 = r - y");
S2 = sumblk("e2 = u + d");
inputs = {'d'};
outputs = {'e2'};
S = connect(G,C,S1,S2,inputs,outputs);
Warning: The following block inputs are not used: r.
tf(S)
ans = From input "d" to output "e2": s^4 + 1002 s^3 + 1810 s^2 + 1e04 s ----------------------------------------------- s^4 + 1002 s^3 + 8691 s^2 + 5.145e04 s + 5.4e04 Continuous-time transfer function.
The preceding two results are the same, which prove my assumption.
To measure the closed-loop response at the plant output to a disturbance at the plant input, the codes should be:
S = feedback(G,C);
tf(S)
ans = From input "e2" to output "y": 18 s^2 + 18000 s ----------------------------------------------- s^4 + 1002 s^3 + 8691 s^2 + 5.145e04 s + 5.4e04 Continuous-time transfer function.
or in the "connect" version
G.InputName = 'e2';
G.OutputName = 'y';
C.InputName = 'e1';
C.OutputName = 'u';
S1 = sumblk("e1 = r - y");
S2 = sumblk("e2 = u + d");
inputs = {'d'};
outputs = {'y'};
S = connect(G,C,S1,S2,inputs,outputs);
Warning: The following block inputs are not used: r.
tf(S)
ans = From input "d" to output "y": 18 s^2 + 18000 s ----------------------------------------------- s^4 + 1002 s^3 + 8691 s^2 + 5.145e04 s + 5.4e04 Continuous-time transfer function.
Please check other documentatins which also use this sensitivity function.
Best regards.

Respuesta aceptada

Paul
Paul el 19 de Ag. de 2024
Hi Hongrui,
I agree that the statement on the doc page for that example is incorrect. At the bottom of the page you can click on one of the stars to rate the page, and then (I think) a dialog box will pop up where you can type in some feedback.
Keep in mind that, for this example, the command
feedback(1,G*C)
yields the closed loop transfer function from d to e2 AND from r to e1 (referring to your diagram) as those transfer functions are the same. So the example could be viewed as the sensitivity function at the plant input (in response to a disturbance at the plant input) OR the sensitivity function at the plant output (in response to a disturbance at the plant output).
k = ureal('k',10,'Percent',40);
delta = ultidyn('delta',[1 1]);
G = tf(18,[1 1.8 k]) * (1 + 0.5*delta);
C = pid(2.3,3,0.38,0.001);
S = feedback(1,G*C);
G.InputName = 'e2';
G.OutputName = 'y';
C.InputName = 'e1';
C.OutputName = 'u';
S1 = sumblk("e1 = r - y");
S2 = sumblk("e2 = u + d");
inputs = {'d','r'};
outputs = {'e2','e1'};
S = connect(G,C,S1,S2,inputs,outputs);
tf(S(1,1))
ans = From input "d" to output "e2": s^4 + 1002 s^3 + 1810 s^2 + 1e04 s ----------------------------------------------- s^4 + 1002 s^3 + 8691 s^2 + 5.145e04 s + 5.4e04 Continuous-time transfer function.
tf(S(2,2))
ans = From input "r" to output "e1": s^4 + 1002 s^3 + 1810 s^2 + 1e04 s + 4.337e-15 ----------------------------------------------- s^4 + 1002 s^3 + 8691 s^2 + 5.145e04 s + 5.4e04 Continuous-time transfer function.
  5 comentarios
Paul
Paul el 19 de Ag. de 2024
Hi Chris,
That's an interesting comment. I don't see a link on the "contact_us" page that seems explicitly appropriate for comments on documenation, which I think is the only issue at hand. Which one would you suggest? Any idea how much longer it takes if going through the doc page rating?
Steven Lord
Steven Lord el 19 de Ag. de 2024
To report a bug in the documentation to the Support staff using the link Cris posted select the Product Usage area (as it is an "Errors or performance issues" with the documentation.)

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by