www.gusucode.com > control 案例程序 matlab源码代码 > control/ExtractCoefficientsFromStandardForm2DOFPIDControllerExample.m

    %% Extract Coefficients from Standard-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 standard-form 2-DOF PID controller that has random coefficients.
%%

% Copyright 2015 The MathWorks, Inc.

rng('default');    % for reproducibility
C2 = pidstd2(rand,rand,rand,rand,rand,rand);  
%%
% Extract the PID coefficients, filter divisor, and setpoint
% weights.
[Kp,Ti,Td,N,b,c] = pidstddata2(C2);