PI Controller tuning
3 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(2 个)
Arkadiy Turevskiy
2012-4-9
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
HTH.
Arkadiy
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Programmatic Tuning 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!