%% Extract Coefficients from Parallel-Form 2-DOF PID Controller
% Typically, you extract coefficients from a controller obtained from another function, such as pidtune or getBlockValue. For this example, create a 2-DOF PID controller that has random coefficients.

rng('default');    % for reproducibility
C2 = pid2(rand,rand,rand,rand,rand,rand);

%
% Extract the PID coefficients, filter time constant, and setpoint weights.

[Kp,Ki,Kd,Tf,b,c] = piddata2(C2);

% Copyright 2015 The MathWorks, Inc.