Research Article

A Bat-Inspired Sparse Recovery Algorithm for Compressed Sensing

Algorithm 3

A Bat-Inspired Sparse Recovery Algorithm for CS.
Input: Sensing matrix , measurement vector , sparsity level , termination threshold , maximum allowed iterative number .
Output: The estimated signal
Fitness function:
Initialization: Initialize the positions and velocities of bats (Section 3.2).
Termination condition: If or , terminated the iteration.
Iteration:
Step 1: A set is formed with elements selected randomly from the best solution , define .
Step 2: If , a set consists of elements selected randomly from the set , update . If , the set consists of elements selected randomly from the set , update .
Step 3: The position of the -th bat is a set composed of the indices corresponding to the maximum absolute values in .
Step 4: If , select an optimal solution from the best solutions set and then replace elements of this solution with other elements in .
Step 5: Calculate the new fitness .
Step 6: If , adjust and .
Step 7: If , update the best solutions set . If , update the best solution .
Step 8: If termination condition is satisfied, stop iteration; otherwise, continue.