In PSO, the velocity of each particle reflects the distance traveled by this particle at each iteration. It depends on the previous best position found by the particle itself (particle memory) and on the previous best solution found the whole population (swarm memory). I hope this figure may help:
The “velocity equation” differs for all optimization. But, the concept is similar for all.
Consider the following example,
I am asking 10 peoples (including you) to find the x value to produce Max (y).
y=2*x^3-3*x^2-12*x+4 , -50=50
All the 10 students tells 10 different ‘x ‘values, each x values have one y values.
Next times, I am giving again one chance (i.e second iteration) to give a correct answer. Now all the 10 students will tell different x values. The change is X from (1st attempt) to 2nd attempt is called velocity increment.
i.e., initially you told x is 5, … in second attempt, you changed you ‘x’ values to near the best one by seeing other students y values for their x values.
(student whos x is produced best valueof ‘y’ compared to all 10 students may considered as a leader).
In second attempt, Assume that you said x is 8 (randomly) by considering other students x value. (i.e, you have changed your x value from 5 to 8 , i.e, the velocity increment is +3. This magical way of velocity increment is converted as an equation all optimization program. Where the self best and others (global) best is considered with some randomness.