Using feedback() with time delay
Show older comments
Dear Matlab community,
I would expect the same step response in the plot in the following code, but the step response of G_y_r is unstable, while T_CL is stable.
The only difference is that T_CL is built using the feedback() function, while G_y_r is built manually.
Does someone have a hint why G_y_r has two internal delays ("Internal delays (seconds): 2.5e-05 2.5e-05"), while T_CL has only one?
It seems that feedback() is doing something special here?
Also, G_y_r has more internal state variables than T_CL.
It would be great if someone could clarify this!
Thanks and best regards,
Robert
%
C = tf([1.5, 47.12], [1.0, 0.0]);
G_delay = tf([1], [1], 'OutputDelay', 1.0 / 40.0e3);
P = tf([6773, 5.131e7], [1.0, 1.123e4, 5.193e7]);
H = tf([5.988e19], [1.0, 348900, 4.591e10, 2.7e15, 5.988e19]);
% build closed-loop using feedback()
T_CL = minreal(feedback(P * C * G_delay, H));
% build closed-loop manually
G_y_r = minreal((P * C * G_delay) / (1.0 + P * C * G_delay * H));
%
T_CL, G_y_r
%
figure;
hold on;
step(T_CL, '-b');
step(G_y_r, '*r');
grid on;
legend('T_{CL}', 'G_{y, r}', ...
'Location', 'best');
Accepted Answer
More Answers (0)
Categories
Find more on Interactive and Graphical Tuning 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!