PID参数对系统的稳定性,可靠性以及快速响应具有重要意义.为了进一步优化PID控制器参数,选择樽海鞘算法(Salp Swarm Algorithm,SSA)优化不稳定系统的控制器PID参数,并将整定的结果与粒子群算法(Particle Swarm Optimization,PSO)优化结果进行对比.结果表明,改进后的算法能够提高系统的控制精度和响应速度.
%_________________________________________________________________________________
% Salp Swarm Algorithm (SSA) source codes version 1.0
%
% Developed in MATLAB R2016a
%
% Author and programmer: Seyedali Mirjalili
%
% e-Mail: [email protected]
%
% Homepage: http://www.alimirjalili.com
%
% Main paper:
% S. Mirjalili, A.H. Gandomi, S.Z. Mirjalili, S. Saremi, H. Faris, S.M. Mirjalili,
% Salp Swarm Algorithm: A bio-inspired optimizer for engineering design problems
% Advances in Engineering Software
% DOI: http://dx.doi.org/10.1016/j.advengsoft.2017.07.002
%____________________________________________________________________________________
% This function initialize the first population of search agents
function Positions=initialization(SearchAgents_no,dim,ub,lb)
Boundary_no= size(ub,1); % numnber of boundaries
% If the boundaries of all variables are equal and user enter a signle
% number for both ub and lb
if Boundary_no==1
Positions=rand(SearchAgents_no,dim).*(ub-lb)+lb;
end
% If each variable has a different lb and ub
if Boundary_no>1
for i=1:dim
ub_i=ub(i);
lb_i=lb(i);
Positions(:,i)=rand(SearchAgents_no,1).*(ub_i-lb_i)+lb_i;
end
end
[1]刘亚飞, 郝玉然, 韩超杰. 基于樽海鞘算法的PID参数优化[J]. 通信电源技术, 2020, 37(20):3.
部分理论引用网络文献,若有侵权联系博主删除。