Research Article
Efficient and Accurate Optimal Linear Phase FIR Filter Design Using Opposition-Based Harmony Search Algorithm
Algorithm 2
OHS Algorithm.
Step 1. Set the parameters, , and . | Step 2. Initialize the HM with . | Step 3. Opposition based HM initialization. | for ( | for ( | // : Opposite of initial X 0 | end for | end for | // End of Opposition-based HM initialization. | Select HMS fittest individuals from set of as initial HM; HM being | the matrix of fittest X vectors | Step 4. Improvise a new harmony as follows: | Update by (14) and using (15). | for ( | for | if then | // | if then | // | end if | else | // | end if | end for | end for | Step 5. Update the HM as if | Step 6. Opposition based generation jumping | if // , : | Jumping rate | for ( | for ( | | // : minimum value of the jth variable in the current generation (gn) | // : maximum value of the jth variable in the current generation (gn) | Select fittest HM from the set of as current HM. | end for | end for | end if | // End of opposition-based generation jumping. | Step 7. If is completed, return the best harmony vector in the HM; otherwise go back to Step 4. |
|