%% Convert Dynamic System to Standard-Form 2-DOF PID Controller
% Convert a two-input, one-output continuous-time dynamic system that represents a 2-DOF PID controller to a standard-form pidstd2 controller.
% The following state-space matrices represent a 2-DOF PID controller.

A = [0,0;0,-8.181];
B = [1,-1;-0.1109,8.181];
C = [0.2301,10.66];
D = [0.8905,-11.79];
sys = ss(A,B,C,D);

%
% Rewrite sys in terms of the standard-form PID parameters Kp, Ti, Td, and N, and the setpoint weights b and c.

C2 = pidstd2(sys)

% Copyright 2015 The MathWorks, Inc.