Page 16 - Algorithm Collections for Digital Signal Processing Applications using MATLAB
P. 16
4 Chapter 1
by B is to move the point which is the linear combination of OB, BB’. The
final decision taken by C is to move the point which is the linear
combination of OC, CC’ and CB’.
1.2 PSO Algorithm to Maximize the Function F (X, Y, Z)
1. Initialize the values for initial position a, b, c, d, e
2. Initialize the next positions decided by the individual swarms as a’, b’, c’
d’ and e’
3. Global decision regarding the next position is computed as follows.
Compute f (a’, b, c, d, e), f (a, b’, c, d, e), f (a, b, c’, d, e), f (a, b, c, d’, e)
and f (a, b, c, d, e’). Find minimum among the computed values. If f (a’,
b, c, d, e) is minimum among all, the global position decided regarding
the next position is a’. Similarly If f (a, b’, c, d, e) is minimum among all,
b’ is decided as the global position regarding the next position to be
shifted and so on. Let the selected global position is represented ad
‘global’
4. Next value for a is computed as the linear combination of ‘a’ , (a’-a) and
(global-a) (ie)
• nexta = a+ C1 * RAND * (a’ –a) + C2 * RAND * (global –a )
• nextb = b+ C1 * RAND * (b’ –b) + C2 * RAND * (global –b)
• nextc = c+ C1 * RAND * (c’ –c) + C2 * RAND * (global –c )
• nextd = d+ C1 * RAND * (d’ –d) + C2 * RAND * (global –d )
• nexte = e+ C1 * RAND * (e’ –e) + C2 * RAND * (global –e )
5. Change the current value for a, b, c, d and e as nexta, nextb, nextc, nextd
and nexte
6. If f (nexta, b, c, d, e) is less than f (a’, b, c, d, e) then update the value for
a’ as nexta, otherwise a’ is not changed.
If f (a, nextb, c, d, e) is less than f (a, b’, c, d, e) then update the value for
b’ as nextb, otherwise b’ is not changed
If f (a, b, nextc, d, e) is less than f (a, b, c’, d, e) then update the value
for c’ as nextc, otherwise c’ is not changed