% 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');
Your code is just fine except for one tiny but a curicial point that is internally built-in solver step size related issue of the control toolbox. In fact, there is only one time delay. Here is the correct code that addresses solver step size in computing the systems' step responses. Now, your simulation results of the both systems converge perfectly well.
clc; clear variables % 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)); % disp('System T_CL: '); T_CL %#ok disp('System G_y_r: '); G_y_r %#ok % figure; hold on; dt = 1/1000; % Time step t=0:dt:.5; % Simulation time space step(T_CL, t, '-b'); step(G_y_r, t, '*r'); grid on; legend('T_{CL}', 'G_{y, r}', 'Location', 'best');
Matlabsolutions.com provides guaranteed satisfaction with a
commitment to complete the work within time. Combined with our meticulous work ethics and extensive domain
experience, We are the ideal partner for all your homework/assignment needs. We pledge to provide 24*7 support
to dissolve all your academic doubts. We are composed of 300+ esteemed Matlab and other experts who have been
empanelled after extensive research and quality check.
Matlabsolutions.com provides undivided attention to each Matlab
assignment order with a methodical approach to solution. Our network span is not restricted to US, UK and Australia rather extends to countries like Singapore, Canada and UAE. Our Matlab assignment help services
include Image Processing Assignments, Electrical Engineering Assignments, Matlab homework help, Matlab Research Paper help, Matlab Simulink help. Get your work
done at the best price in industry.