% Define the transfer functions kd = 1.5; tau = 1e2; G = tf(kd, [tau 1]); s = tf('s'); Gd = exp(-30*s); % Approximate the transportaion delay Gd by Pade approximation % Gd = pade(...) % Define shaping cost filters % ... % Define the system matrix P - model with % Inputs: exogenous signals (d), % control signals (u1 and u2) % Outputs: appropriate error signals % measured outputs (y1 and y2) P = []; % Find the minimal realization of P (just to reduce the order of the resulting controller) % P = minreal(P); % Call hinfsyn to find the optimal controller % K = hinfsyn(...); K = zeros(2); %% Plot the responses to the unit step on the disturbance input % Define the transfer function from inputs [d, u1, u2] to outputs [y1, y2, % u1, u2, y1, y2]. Only the last two inputs and outputs are used by the % controller hence after closing the loop the model has only one input (d) % and four inputs (y1, y2, u1 and u2). P_du2yu = [Gd*G Gd*G 0; Gd*G*G Gd*G*G Gd*G; 0 1 0;0 0 1; Gd*G Gd*G 0; Gd*G*G Gd*G*G Gd*G]; set(P_du2yu, 'InputName', {'d', 'u1', 'u2'},... 'OutputName', {'y1', 'y2', 'u1', 'u2', '_y1', '_y2'}); CL = lft(P_du2yu, K); figure(1) step(CL, 1000);