General FIR Filter Design with Linear Phase in Passband by Water Cycle Algorithm

FIR filter is an important type of filter in the field of signal processing because of its inherent stability, simpler structure, and easier implementation on linear phase. WCA is used to solve FIR filter design with low magnitude error and linear phase in passband. This method uses WCA to optimize the filter coefficient based on the low magnitude errors in all frequency domains. Moreover, in the constraint conditions, the least group delay in passband is used for the optimization. The experiments testify this method has good performance on the passband error and group delay error in the passband. Therefore this method is an efficient algorithm for FIR filter optimization which can be used in the digital signal processing widely.


Introduction
FIR filter is an important type of filter in the field of signal processing because of its inherent stability, simpler structure, and easier implementation on linear phase [1]. The linear phase is an important property of filters in many applications. If the coefficients of a FIR filter are odd symmetry or even symmetry, this FIR filter has the linear phase. The linear phase in entire frequency domain can be easily achieved using the classic design method for FIR filters. However, the symmetric coefficients are not realized by all FIR design methods, especially in the methods based on the optimizing theories. Some optimization methods can obtain very good amplification-frequency characteristic, but not realize the linear phase. Therefore how to design an asymmetric coefficient FIR filter with excellent amplification-frequency characteristic and linear phase is an interesting study [2]

Principle of WCA
The same to other bionic algorithm, the idea of WCA is also inspired from nature. In our world, a river or stream is collected when water moves downhill.
This means that most rivers are formed high up in the mountains, where the snow or the glaciers melt. The rivers always flow downhill. On their downhill journey and eventually ending up to a sea, water is collected from rain and other streams. Therefore, streams flow to the rivers and rivers flow to the sea.
WCA begins with an initial population which is called raindrops. So at first we have rain. The best raindrop is chosen as a sea while some good raindrops are selected as the river. Besides the sea and the river, other unselected raindrops are defined as the stream which flow to the river and the sea. For the var N dimensional optimization problem, a raindrop is defined as an array of 1 var N × , which is described as follows: [ ] Raindrop In WCA, the cost of a raindrop is calculated by a cost function which is shown as follows: where n NS is the number of streams which flow to the particular rivers or sea.
In WCA, all streams and rivers flow to sea. Obviously sea is the best optimal point. A stream flows to the river along the connecting line between them using a randomly selected distance that is shown as follows: ( ) where C is a value between 1 and 2 and near 2 (best value is 2), d is the current distance between stream and river, respectively. X is a random number between 0 and C d × . C enables streams to flow in different directions towards the rivers.
Similarly, C also can be used for the water flow from river to sea. So, the new position for streams and rivers are shown as follows: where rand is random number between 0 and 1. If the solution from a stream is better than its connecting river, the positions of stream and river are exchanged each other. Similarly, if the solution from a river is better than sea, the positions of river and sea are exchanged each other. Therefore, a river should be considered as a locally optimal solution, while sea should be considered as the globally optimal solution.
Evaporation is a method to prevent the algorithm from rapid convergence (immature convergence). In WCA, the evaporation process causes the sea water to evaporate as rivers/streams flow to the sea. This method is proposed in order to avoid getting trapped in local optima. The following pseudo code shows how to determine whether or not river flows to the sea.

Conclusion
In this paper we use WCA to solve FIR filter design with low magnitude error and linear phase in passband. This method uses WCA to optimize the filter coefficient based on the low magnitude errors in all frequency domains. Moreover, in the constraint conditions, the least group delay in passband is used for the optimization. The experiments testify this method has good performance on the passband error and group delay error in the passband. Therefore this method is an efficient algorithm for FIR filter optimization which can be used in the digital signal processing widely.