| Algorithm 1 Optimization process of particle swarm algorithm |
|
Input: Velocity and friction data pair sequence Output: Optimal friction parameter set |
| 1. Initialize iterations t = 0, maximum iterations T
2: Initialize position permissible range xmin, xmax, Initialize velocity permissible range vmin, vmax 3: for particle i = 1 to N do 4: for dimension d = 1 to 6 do 5: Initialize position xid and velocity vid randomly within permissible range 6: end for 7: Initialize particle optimal position with xi 8: Calculate particle i fitness value 9: end for 10: Initialize global optimal position with the particle with the greatest fitness 11: for t = 0 to T do 12: for particle i = 1, N do 13: Calculate particle velocity according to 14: Update particle position according to 15: Update inertia factor 16: if position beyond permissible range then 17: Restores position in last iteration, Inverse velocity, Update position according to new velocity 18: end if 19: Calculate particle i current fitness value 20: if the fitness value is better than in history then 21: Set current fitness value as the 22: end if 23: end for 24: if the optimal fitness value is better than optimal particle in history then 25: Set optima fitness value as the 26: end if 27: if the optimal fitness value is less than the threshold twice break 28: end for 29: Save optimal fitness value as the optimal friction parameter set result |