资源简介
PSO算法优化求解PID参数,算法是在基本PSO算法的惯性权重部分加入一个调节因子项,通过调节因子的调节,改善了算法的收敛性。仿真结果表明,IPSO算法可以更好地优化PID控制器的参数,使控制系统具有更好的控制性能。

代码片段和文件信息
%% Initialization
clear
clc
n = 50; % Size of the swarm “ no of birds “
bird_setp =50; % Maximum number of “birds steps“
dim = 2; % Dimension of the problem
c2 =1.2; % PSO parameter C1
c1 = 0.12; % PSO parameter C2
w =0.9; % pso momentum or inertia
fitness=0*ones(nbird_setp);
%-----------------------------%
% initialize the parameter %
%-----------------------------%
R1 = rand(dim n);
R2 = rand(dim n);
current_fitness =0*ones(n1);
%------------------------------------------------%
% Initializing swarm and velocities and position %
%------------------------------------------------%
current_position = 10*(rand(dim n)-.5);
velocity = .3*randn(dim n) ;
local_best_position = current_position ;
%-------------------------------------------%
% Evaluate initial population %
%-------------------------------------------%
for i = 1:n
current_fitness(i) = tracklsq(current_position(:i));
end
local_best_fitness = current_fitness ;
[global_best_fitnessg] = min(local_best_fitness) ;
for i=1:n
globl_best_position(:i) = local_best_position(:g) ;
end
%-------------------%
% VELOCITY UPDATE %
%-------------------%
velocity = w *velocity + c1*(R1.*(local_best_position-current_position)) + c2*(R2.*(globl_best_position-current_position));
%------------------%
% SWARMUPDATE %
%------------------%
current_position = current_position + velocity ;
%------------------------%
% evaluate anew swarm %
%------------------------%
%% Main Loop
iter = 0 ; % Iterations抍ounter
while ( iter < bird_setp )
iter = iter + 1;
for i = 1:n
current_fitness(i) = tracklsq(current_position(:i)) ;
end
for i = 1 : n
if current_fitness(i) < local_best_fitness(i)
local_best_fitness(i) = current_fitness(i);
local_best_position(:i) = current_position(:i) ;
end
end
[current_global_best_fitnessg] = min(local_best_fitness);
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 14694 2008-06-11 20:03 PSO算法优化求解PID参数 (2)\tunning PID by PSO\html\PSO.html
..A.SH. 9728 2008-06-11 20:36 PSO算法优化求解PID参数 (2)\tunning PID by PSO\html\Thumbs.db
文件 29696 2008-01-18 21:25 PSO算法优化求解PID参数 (2)\tunning PID by PSO\optsim1.mdl
文件 3718 2011-06-22 16:45 PSO算法优化求解PID参数 (2)\tunning PID by PSO\PSO.m
文件 723 2008-06-11 19:38 PSO算法优化求解PID参数 (2)\tunning PID by PSO\tracklsq.m
目录 0 2011-06-28 11:17 PSO算法优化求解PID参数 (2)\tunning PID by PSO\html
目录 0 2011-06-28 11:18 PSO算法优化求解PID参数 (2)\tunning PID by PSO
目录 0 2017-03-23 09:10 PSO算法优化求解PID参数 (2)
----------- --------- ---------- ----- ----
58559 8
- 上一篇:力控开发用 注册机
- 下一篇:jsencrypt.min.js
相关资源
- FPGA实现PID.v
- DV泵加罗茨泵独立控制系统PID.smart
- 大斜度定向井钻井设计优化及应用实
- 模糊PID控制 c
- zen_cart_1.3.9h_ 配置文件优化
- 课程设计蔬菜大棚自动控制系统,包
- 120项注册表优化键
- LED背光的设计与优化
- 机械最优化设计及应用实例
- 数据库查询优化算法
- 基于经济时间序列预测的露天矿开采
- Pareto-Beta跳扩散期权定价模型的校正
- SentinelRMSToolkitv2.0.rar
- 爱普生(EPSON)L3151 3153 3156 3157 3158不
- (温度PID)实验指导书(三菱)
- PLCS7-1200PID参数自整定
- PLCS7-1200PID闭环控制
- 锁相环回路滤波器设计优化
- RapidIO 2.2 Specification
- RapidIO_Rev_2.2_Specification
- 看大型金融机构如何用新一代VTL优化
- 注册表优化工具(Systweak RegClean Pro)
- DAC34H84 HD2 性能优化与 PCB 布局建议
- 金钗石斛低聚糖提取工艺优化及其抗
- 大峰露天矿开拓运输系统设计优化
- 基于DSP的大功率开关电源的设计方案
- 基于DSP的大功率开关电源设计
- 编译原理实验:词法分析,语法分析
- BLDC电机PID算法
- 自适应粒子群优化算法及其应用
评论
共有 条评论