PI Controller tuning

16 views (last 30 days)
Steven
Steven on 4 Apr 2012
Hi,
I have a second order Transfert Function that I would like to control with a PI. My problem is how to set the proportional gain (kp) and find the integration time (ti). Here come the details.
k1 = 3766; k2 = 8.66; m = 35; g = 9.81; %some constants
H = tf([k1-mg], [m k2 k1-mg]); % Open loop TF
C = tf([kp*ti 1], [ti 0]) % PI controller TF
According to specifications, maximum excess is 5% of final value, time to get 95% of final value is 30 sec and no steady state error at end.
Thus, without proceed by trial and error, I was wondering what's the direct way to do this. I know Matlab has several tools to deal with it (rlocus, margin, nyquist, etc.) I tried numerous way to set the poles in order to get around 0.7 of damping and to respect all my specifications, but it hasn't worked at all (my system was still to much oscillating and too long to get on track).
Thank you very much. Steven

Answers (2)

Steven
Steven on 8 Apr 2012
Any idea folks ?

Arkadiy Turevskiy
Arkadiy Turevskiy on 9 Apr 2012
If you have Control System Toolbox R2010b or later, you can use PID Tuner tool:
>>pidtool(H)
Use the slider to adjust controller performance to meet your requirements, then export controller to MATLAB workspace. Here is the design obtained with pidtool that meets your stated requirements:
>>>> C1
C1 =
1
Ki * ---
s
with Ki = 0.1
Continuous-time I-only controller.
Another option is to do tuning from command line:
>>C2=pidtune(H,'pi',0.1) % design PI controller with 0.1 rad/sec bandwidth
C2 =
1
Ki * ---
s
with Ki = 0.1
Continuous-time I-only controller.
>>step(feedback(C2*H,1)) %check step response to see reqts are met
For more details, take a look at this demo.
HTH.
Arkadiy

Community Treasure Hunt

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

Start Hunting!