Maybe a mistake in the documentation of function ''robgain''
2 views (last 30 days)
Show older comments
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)
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);
tf(S)
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)
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);
tf(S)
Please check other documentatins which also use this sensitivity function.
Best regards.
0 Comments
Accepted Answer
Paul
on 19 Aug 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))
tf(S(2,2))
5 Comments
Paul
on 19 Aug 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
on 19 Aug 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.)
More Answers (0)
See Also
Categories
Find more on Classical Control Design in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!