A list,

Particle swarm Optimization (PSO) is an evolutionary computation technology. It comes from the study of predation behavior in flocks of birds. The basic idea of particle swarm optimization algorithm is to find the optimal solution through the cooperation and information sharing among individuals in the group. The advantage of PSO is that it is simple and easy to implement without many parameters adjustment. It has been widely used in function optimization, neural network training, fuzzy system control and other applications of genetic algorithms.

2. Analysis of particle swarm optimization

2.1 Basic Ideas

Particle swarm optimization (PSO) simulates a bird in a flock by designing a massless particle that has only two properties: speed and position. Speed represents how fast the bird moves, and position represents the direction of the bird. Each particle separately searches for the optimal solution in the search space, and records it as the current individual extreme value, and shares the individual extreme value with other particles in the whole particle swarm, and finds the optimal individual extreme value as the current global optimal solution of the whole particle swarm. All particles in a swarm adjust their speed and position based on the current individual extremum they find and the current global optimal solution shared by the whole swarm. The following GIF vividly shows the process of the PSO algorithm:



2 Update Rules

PSO initializes as a group of random particles (random solutions). Then find the optimal solution through iteration. At each iteration, the particle updates itself by tracking two “extreme values” (PBest, GBest). After finding these two optimal values, the particle updates its velocity and position by using the formula below.



The first part of formula (1) is called [memory term], which represents the influence of the magnitude and direction of the last speed. The second part of Formula (1) is called [self cognition term], which is a vector pointing from the current point to the particle’s own best point, indicating that the particle’s action comes from its own experience. The third part of Formula (1) is called [group cognition term], which is a vector from the current point to the best point of the population, reflecting the cooperation and knowledge sharing among particles. The particle is determined by its own experience and the best experience of its companions. Based on the above two formulas, the standard form of PSO is formed.



Formula (2) and Formula (3) are regarded as standard PSO algorithms.

3. Process and pseudocode of PSO algorithm

Ii. Source code

_________________________________________________________________________ % % % improved particle swarm optimization algorithm based on the Tent chaos mapping % _________________________________________________________________________ % % % usage Fobj = % __________________________________________ % @ YourCostFunction dim set fitness function % = number of your variables set dimension % Max_iteration = maximum number of generations Sets the maximum number of iterations % SearchAgents_no = number of search agents population % Lb =[lb1, lB2..., LBN] where LBN is the lower bound of variable n % ub=[ub1, uB2...,ubn] where ubn is the upper Clear all CLC close all SearchAgents_no= clear all CLC close all SearchAgents_no=10; % Population number Function_name='F4'; % Name of the test function that can be from F1 to F23 (Table 1.2.3 in the paper)Set fitness function Vmax=5; % Upper speed Vmin=- 5; % Speed limit Max_iteration=50; % number of evolutions a=0.5; % chaos coefficient c1 =1.49445; % Individual learning rate C2 =1.49445; % Load details of the selected Benchmark function [lb,ub,dim,fobj]=Get_Functions_details(Function_name); % Set boundaries and optimize function %lb% particle minimum % UB % Particle maximum % DIM % particle dimension [Best_pos_tent,pso_curve_tent,Best_score_tent]=psoNew(SearchAgents_no,Max_iteration,lb,ub,dim,fobj,Vmax,Vmin,a,c1,c2); % tent chaotic particle swarm [Best_pos pso_curve, Best_score] = pso (SearchAgents_no Max_iteration, lb, ub, dim, fobj, Vmax and Vmin and c1, c2); % Elementary particle group figure('Position'[269   240   660   290])
%Draw search space
subplot(1.2.1);
func_plot(Function_name);
title('Parameter space')
xlabel('x_1');
ylabel('x_2');
zlabel([Function_name,'( x_1 , x_2 )'])

%Draw objective space
subplot(1.2.2);
plot(pso_curve_tent,'Color'.'r')
hold on;
plot(pso_curve,'Color'.'b')
title('Objective space')
xlabel('Iteration');
ylabel('Best score obtained so far');

axis tight
grid on
box on
 
%
display(['The best solution obtained by Tent PSO is: ', num2str(Best_pos_tent)]);
display(['The best optimal value of The objective funciton found by Tent chaos strategy PSO is: ', num2str(Best_score_tent)]);
display(['The best solution obtained by PSO is : ', num2str(Best_pos)]);
display(['The best optimal value of The objective funciton found by Tent chaos strategy PSO is: ', num2str(Best_score)]);
Copy the code

3. Operation results

Fourth, note

Version: 2014 a