Varying Parameter Automatically

3 views (last 30 days)
Alice Chin
Alice Chin on 16 Oct 2011
How to auto input the values of controller gain Kc, integral time τI, Derivative time τD of PID controller parameter when values of process gain Kp, time constant τ and time delay Ѳ are varying.
For example, I want to vary the parameter Kp, τ and Ѳ of the transfer function from 1-10 for each parameter automatically by using Cohen Coon tuning rule.

Answers (1)

Ashikur on 17 Oct 2011
%% Are you using simulink model? you can sweep using a loop.
%% For example 'kp' is your model parameter and named as 'kp'
kpSweep = 1:diff:10;
for i = 1:length(kpSweep)
kp = kpSweep(i);
[out params] = sim('your_system');


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!