Most PID tuning rules are based on first-order plus time delay assumption of the plant hence cannot ensure the best control performance. Using mordern optimization techniques, it is possible to tune a PID controller based on the actual transfer function of the plant to optimize the closed-loop performance.
This submission contains a function to perform optimal PID design based on four different performance indices, e.g. the ISE, the IAE, the ITSE and the ITAE. A published m-file provides two 4th-order examples to explain the usage and to show impact of using different performance indices.
The example file requires the znpidtuning function, which can be downloaded from http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=18561&objectType=FILE
How to run this file. I got error like below.
Warning: Escape sequence '\U' is not valid. See 'help sprintf' for valid escape sequences.
> In DynamicSystem.margin at 48
In optimPID at 52
In optimalpidtuning at 44
Error using DynamicSystem/margin (line 48)
Error: optimPID (line 52)
Error in optimalpidtuning (line 44)
C1=optimPID(G,3,1); % PID-Control, ISE index
please help me i am new to matlab
I tried using the optimPID function for a second-order system but I get the following error message: 'Error using fminusub (line 17)
Objective function is undefined at initial point. Fminunc cannot
Any help would be greatly appreciated.
We have tried this powerful tool at a University in Ecuador, where I come from. We would like to include the code applied for the Transfer Function of our Engineering Graduation Project, respecting all what says in the licensing file. But we also would like to know if there is more information behind the "optimPID" function development, so we can also include it as a reference.
Thank you very much!
Why your program hangs when I do this?
EDU>> clear all
it now hangs. I am using Matlab 2011a
Thanks for an interesting submission. If you are interested in designing and tuning PID controllers in MATLAB and Simulink, please take a look at new PID tuning capabilities shipped in Simulink Control Design in R2009b:
There is also a webinar on the subject:
and MATLAB Digest article:
Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.