Phase Response Design of Recursive All-Pass Digital Filters Using a Modified PSO Algorithm

This paper develops a new design scheme for the phase response of an all-pass recursive digital filter. A variant of particle swarm optimization (PSO) algorithm will be utilized for solving this kind of filter design problem. It is here called the modified PSO (MPSO) algorithm in which another adjusting factor is more introduced in the velocity updating formula of the algorithm in order to improve the searching ability. In the proposed method, all of the designed filter coefficients are firstly collected to be a parameter vector and this vector is regarded as a particle of the algorithm. The MPSO with a modified velocity formula will force all particles into moving toward the optimal or near optimal solution by minimizing some defined objective function of the optimization problem. To show the effectiveness of the proposed method, two different kinds of linear phase response design examples are illustrated and the general PSO algorithm is compared as well. The obtained results show that the MPSO is superior to the general PSO for the phase response design of digital recursive all-pass filter.


Introduction
An all-pass filter means that its magnitude response is exactly equal to some constant value at all frequencies and independent of frequencies. The function of the all-pass filter is mainly to offer a phase modification without changing the magnitude on a given filter. It is rather useful in the theory of minimum-phase systems, in transforming frequencyselective low-pass filters into other frequency-selective forms, and in obtaining variable-cutoff frequency-selective filters [1]. Due to these advantages, the all-pass filter has been applied in many signal processing applications, including the groupdelay equalization, complementary filter banks, multirate filtering, and other fields [2][3][4][5][6][7][8]. A large number of methods for designing all-pass filter have been developed in recent years. In [2], for example, the author proposed a new design method for an all-pass filter where it has a least squares or an equiripple phase-error response. It is based on formulating a weighted error between the desired and the actual phase responses in a quadratic form. Filter coefficients can be solved by using a Toeplitz-plus-Hankel matrix. In [3], an IIR allpass filter with equiripple phase response was designed based on the eigenvalue problem and this design problem can be formulated as the representation of an eigenvalue problem via the Remez exchange algorithm. A Hopfield neural network was combined to the design of IIR all-pass digital filters [5]. In the case, filter coefficients can be evaluated by Hopfield neural networks in a parallelism manner in accordance with the error function that is formulated as a Lyapunov energy function. In addition, the authors developed a digital linear phase notch filter design scheme based on IIR all-pass filter. The designed filter can be realized by parallel connection of two IIR all-pass filters with approximately linear phase. Design algorithms exhibit fast convergence and easy initial values determination [7].
Unlike the above-mentioned design schemes, this paper attempts to utilize a modified particle optimization (MPSO) algorithm to solve the digital recursive all-pass filter design problem. This developed algorithm is a variant of the general PSO but it has a better searching capacity in solving optimized problems. The detailed description for such MPSO algorithm will be addressed later. The remainder of this paper is summarized as follows. Section 2 gives a brief description for the recursive all-pass digital filter. In Section 3, a modified 2 Computational Intelligence and Neuroscience PSO algorithm is introduced in detail and the MPSO-based design steps for all-pass digital filter are also given. Section 4 will provide two different kinds of examples to confirm the applicability of the proposed method and some comparisons with the general PSO are further made. Finally, a conclusion about the proposed method is simply described in Section 5.

Recursive All-Pass Digital Filter
Let us consider a recursive all-pass digital filter whose transfer function is expressed by where represents the order of the filter, 0 is always set to be 1, 1 , 2 , . . . , are real coefficients, and ( ) = ∑ =0 − . Let = Ω , where Ω denotes the digital frequency, substituting it into (1) to derive the frequency response. The following magnitude response can be easily obtained: It is seen from (2) that the magnitude response is equal to one at all frequencies; that is, it is independent of the filter coefficients. Furthermore, its phase response is derived by is a parameter vector consisting of all filter coefficients. This vector fully dominates the phase response behavior of the digital filter. In this paper, we want to design the parameter vector a such that the phase response achieves certain design specification. Moreover, this vector a is called the particle or individual of the PSO algorithm and many such particles then form a population. Some adjusting mechanisms are utilized on the full population. Moreover, it can be easily seen from (3) that a highly complicated nonlinear function arctan(⋅) is involved and it is difficult to solve. Thus, (3) always needs to be modified as another form for the phase response design [3][4][5]. However, the proposed method in this paper can directly use (3) for the phase response design of recursive all-pass filter.

Modified Particle Swarm Optimization (MPSO) Algorithm
Kennedy and Eberhart initially proposed the PSO algorithm in 1995 and recently it became one of the popular and efficient optimization algorithms [9]. Like most swarm intelligence algorithms, PSO is also a population-based search algorithm. It simulates the social behavior of organisms, such as fish schooling and bird flocking. Each fish or bird, viewed as a particle or an individual, represents a candidate solution to the optimized problem. By the velocity and position updating formulas, each particle moves through the search space toward the global solution. Based on the PSO algorithm, various engineering optimization applications have been successively developed and explored in recent years, such as power system stabilizer design [10], PID controller design [11,12], FPGA implementations [13,14], Volterra filter modeling [15], QRD-based multirelay system design [16], automatic clustering [17], multifault classification [18], and aeroengine nonlinear programming model [19]. Besides, the authors developed a novel PSO algorithm in which the inertia weight is modified to enhance its search capability [20]. The proposed method has successfully been applied in the high pass FIR digital filter design. Another design method for the low pass FIR digital filter with linear phase properties was also developed [21]. A new definition for the velocity vector and swarm updating of the PSO algorithm was proposed. At the beginning, PSO algorithm requires an objective function to judge the performance of the particle and also to guide the search direction of the algorithm. To solve the phase response design problem for the recursive all-pass digital filter, the objective function (OF) is defined by where is the desired phase response given by the designer, is the actual phase response of the all-pass digital filter as described by (3), and Ω min and Ω max are the integral lower and upper bounds, respectively. The algorithm is utilized to minimize this objective function OF to achieve the optimal phase response design. Each particle is changed according to the following velocity formula of (6) and position formula of (7) for original PSO algorithm: where denotes the th iteration of the algorithm, V , , and represent the velocity, position, and individual best position for the th particle with respect to the th dimension, respectively, represents the global best position with respect to the th dimension among the population, is called the inertia weight, 1 and 2 are two positive acceleration coefficients that pull each particle toward the individual best and the global best positions, respectively, and 1 and 2 are two uniform distribution random numbers chosen from the interval [0, 1]. The PSO algorithm uses these two updating mechanisms to achieve the optimization.
In this study, a modified PSO (MPSO) algorithm is taken into the phase response design of recursive all-pass digital filter [11,15]. The difference between the original and modification is to change the velocity formula. In the MPSO, the population needs to be further divided into some subpopulations at the beginning; for example, suppose that the initial population includes 50 particles and it will be divided into five subpopulations. Thus, the first subpopulation is composed of particles from number one to number ten, and the second then contains particles from number eleven to number twenty, and so forth. The best particle of each subpopulation needs to be recorded according to its objective function. Instead of the velocity formula of (6), the MPSO algorithm uses the following improved version: where is a new variable called the local best and represents the position of the best particle of the subpopulation where the th particle is located, 3 is also a positive acceleration coefficient, and 3 is a random number selected from the range [0, 1] uniformly. Design steps of MPSO-based for the phase response design of the recursive all-pass digital filter can be summarized in the following.

Data. Filter order
in (1) and (3), desired phase response and integral lower and upper bounds Ω min and Ω max in (5), number of particles (population size) Ps, number of subpopulations , number of generations , inertia weight , and positive constants 1 , 2 , and 3 in (8).
Goal. Derive a recursive all-pass digital filter with the phase response approaching the desired response .
(2) Divide the population into subpopulations by particle serial numbers.
(3) If a prescribed number of iterations are achieved, then the algorithm stops.
(4) Evaluate the objective function of (5) for each particle and record the related individual best, local best, and global best positions.

Simulation Results
In this section, we consider two different examples with linear phase design to show the applicability of our proposed method [2,5]. Some comparisons with the general PSO are also performed. In the PSO and MPSO, the variables of the algorithm are given by = 0.8, 1 = 2 = 0.5, and = 0.8, 1 = 2 = 3 = 0.5, respectively, for all of the following simulations. Example 1. In this example, the recursive all-pass filter is designed to approximate a desired Hilbert transformer whose phase response is given by where the lower bound and upper bound are set to Ω min = 0.04 and Ω max = 0.94 , respectively; means the filter order and here it is chosen by = 10. The magnitude response of such a recursive all-pass filter is plotted in Figure 1. In addition, the population size and number of generations are given by Ps = 20 and = 1000 for the PSO and MPSO algorithm, and the number of subpopulations is simply set to = 4 only for the MPSO. To verify the algorithm's robustness and efficiency, 20 independent runs with different initial conditions are executed for both 4 Computational Intelligence and Neuroscience    Tables 1  and 2 and shown in Figures 2-4, respectively. Table 1 lists the objective function values of 20 independent runs and it clearly reveals that the results by the MPSO are better than those by the PSO for most of independent runs. The mean and variance are evaluated by = 0.14269337 and 2 = 0.00035958 for the MPSO and = 0.16607883 and 2 = 0.00313722 for the PSO, respectively. To show the design outcomes, Figure 2 displays the convergence trajectories of the objective function for Run 1 of the proposed MPSO and PSO algorithms. As can be seen from Figure 2, the MPSO algorithm has a quicker convergence and lower objective function value than the PSO algorithm. Both phase responses and errors are further shown in Figures 3 and 4, respectively. A better simulation result can be obtained by the proposed  method. In addition, all of digital filter coefficients derived by Run 1 of the PSO and MPSO algorithm are listed in Table 2 for comparisons. Example 2. This example will design a recursive all-pass digital filter with a desired sinusoidal phase response expressed by (Ω) = 4 (cos Ω − 1) − 52Ω, Ω min ≤ Ω ≤ Ω max , (10) where Ω min = 0 and Ω max = are given. Its corresponding magnitude response is shown in Figure 5. In the simulation, a digital recursive filter with = 60 is adopted and the population size and iterative number of the algorithms are Computational Intelligence and Neuroscience set to Ps = 40 and = 2000, respectively, for solving such a higher-order digital filter. Moreover, as given in Example 1, the number of subpopulations is chosen by = 4 and 20 independent runs with different sets of initial conditions are also performed for certifying the robustness of the algorithm. Table 3 lists a comparison of the objective function values evaluated by the proposed MPSO and PSO for Run 1 to Run 20, respectively. Some of digital filter coefficients derived are listed in Table 4 for comparisons. Figures 6-8 then show the related design outcomes only for Run 1 of the PSO and proposed algorithm. Again, it can be concluded from these results that the proposed MPSO is superior to the general PSO in the phase response design of recursive all-pass digital filter.

Conclusions
This paper has developed a new design method for the phase response design of recursive all-pass digital filter. A modified PSO (MPSO) algorithm is suggested to design the filter coefficients such that the obtained phase response can approximate the desired response that is given previously. The difference between the MPSO and PSO is to modify the velocity updating formula of the algorithm. To improve the search capacity, a new factor of local-best particle for each subpopulation is introduced in the modified velocity formula. Finally, two different kinds of examples have been illustrated to verify the efficiency of the proposed method as compared 6 Computational Intelligence and Neuroscience  with the general PSO algorithm. Simulation results have sufficiently proven that the proposed MPSO has a better design outcome than the PSO in the phase response design of recursive all-pass digital filter.