资源简介
基于分数阶PID控制器算法优化方法,分数阶PID控制优化的源代码,具有参考意义
代码片段和文件信息
function [ ]=pso
popsize=60; %微粒数60‘
MAXITER=60; %执行次数60次
dimension=5; %5维
runno=10;
xmin1=0.01;xmin2=0.01;xmin3=0.01;xmin4=0.01;xmin5=0.01; %x(ij)的范围
xmax1=10;xmax2=10;xmax3=10;xmax4=10;xmax5=10;
vmax1=(xmax1-xmin1)/2;vmax2=(xmax2-xmin2)/2;vmax3=(xmax3-xmin3)/2;
vmax4=(xmax4-xmin4)/2;vmax5=(xmax5-xmin5)/2;
c1=2;c2=2;
data2=zeros(runnoMAXITER);
sum2=0;G=zeros(runnodimension);st=0;
for run=1:runno
x1=(xmax1-xmin1)*rand(popsize1)+xmin1;
x2=(xmax2-xmin2)*rand(popsize1)+xmin2;
x3=(xmax3-xmin3)*rand(popsize1)+xmin3;
x4=(xmax4-xmin4)*rand(popsize1)+xmin4;
x5=(xmax5-xmin5)*rand(popsize1)+xmin5;
v1=2*vmax1*rand(popsize1)-vmax1;
v2=2*vmax2*rand(popsize1)-vmax2;
v3=2*vmax3*rand(popsize1)-vmax3;
v4=2*vmax4*ra
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 3051 2018-04-21 20:57 pso.m
评论
共有 条评论