?作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。
??个人主页:Matlab科研工作室
??个人信条:格物致知。
更多Matlab仿真内容点击??
智能优化算法 神经网络预测 雷达通信 无线传感器 电力系统
信号处理 图像处理 路径规划 元胞自动机 无人机
? 内容介绍
在本文中,提出了一种称为基于 PID 的搜索算法(PSA)的元启发式算法,用于全局优化。该算法基于增量PID算法,通过不断调整系统偏差将整个群体收敛到最优状态。PSA 经过数学建模和实施,可在广泛的搜索空间中实现优化。PSA用于解决CEC2017基准测试函数和六个约束问题。通过与近年来提出的七种元启发法进行比较,验证了PSA的优化性能。Kruskal-Wallis、Holm 和 Friedman 检验验证了 PSA 在统计显着性方面的优越性。结果表明,PSA能够较好地平衡勘探与开采,具有较强的优化能力。
? 部分代码
?%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % PID-based search algorithm (PSA) source codes version 1.0 % % Developed in: MATLAB 9.13 (R2022b) % % Programmer: Yuansheng Gao % % Original paper: Yuansheng Gao, % PID-based search algorithm: A novel metaheuristic % algorithm based on PID algorithm % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ? % fun : @YourFunction % nvars : number of decision/design variables % lb : lower bound of decision variables % % ub : upper bound of decision variables % % PSA will return the following: % x : best solution found % fval : objective function value of the found solution ? clc clear close all %% Inputs PopSize = 50; % Population size MaxIter = 500; % Maximum iterations FunctionName = 'F3'; % Function number: F1~F23 %% Run PSA [lb,ub,nvars,fun] = GetFunctionsDetails(FunctionName); [x,fval,ConvergenceCurve] = PSA (fun,nvars,lb,ub,PopSize,MaxIter); %% Plot result % function topology figure('Position',[500 400 700 290]) subplot(1,2,1); func_plot(FunctionName); title('Function Topology') xlabel('x_1'); ylabel('x_2'); zlabel([FunctionName,'( x_1 , x_2 )']) ? % Convergence curve subplot(1,2,2); semilogy(ConvergenceCurve,'Color','r') title('Objective space') xlabel('Iteration'); ylabel('Best score obtained so far'); ? ? ?
? 运行结果


