%% Design 2-DOF PID Controller
% Design a 2-DOF PID Controller for the plant given by the transfer function:
% G\left(s\right) = {1 \over {{s^2} + 0.5s + 0.1}}.
% Use a target bandwidth of 1.5 rad/s.

wc = 1.5;
G = tf(1,[1 0.5 0.1]);
C2 = pidtune(G,'PID2',wc)

% Using the type 'PID2' causes pidtune to generate a 2-DOF controller, represented as a pid2 object. The display confirms this result. The display also shows that pidtune tunes all controller coefficients, including the setpoint weights b and c, to balance performance and robustness.
% Copyright 2012 The MathWorks, Inc.