Computational Intelligence and Neuroscience

Volume 2015 (2015), Article ID 638068, 7 pages

http://dx.doi.org/10.1155/2015/638068

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

Department of Computer and Communication, Shu-Te University, Kaohsiung 824, Taiwan

Received 5 October 2014; Revised 22 December 2014; Accepted 1 January 2015

Academic Editor: Rahib H. Abiyev

Copyright © 2015 Wei-Der Chang. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.

#### Abstract

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.

#### 1. 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 frequency-selective 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 group-delay equalization, complementary filter banks, multirate filtering, and other fields [2–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 all-pass 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 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.

#### 2. 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, is always set to be 1, are real coefficients, and . 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 bywhere , , and 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 such that the phase response achieves certain design specification. Moreover, this vector 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 is involved and it is difficult to solve. Thus, (3) always needs to be modified as another form for the phase response design [3–5]. However, the proposed method in this paper can directly use (3) for the phase response design of recursive all-pass filter.

#### 3. 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 () 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 and 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, , , 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, and are two positive acceleration coefficients that pull each particle toward the individual best and the global best positions, respectively, and and are two uniform distribution random numbers chosen from the interval . 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, is also a positive acceleration coefficient, and is a random number selected from the range 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 and in (5), number of particles (population size) , number of subpopulations , number of generations , inertia weight , and positive constants , , and in (8).

*Goal*. Derive a recursive all-pass digital filter with the phase response approaching the desired response .(1)Create an initial population consisting of particles from the interval randomly.(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.(5)Update each particle’s velocity and position using (8) and (7).(6)Go back to Step .

#### 4. 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 , , and , , 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 and , respectively; means the filter order and here it is chosen by . 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 and for the PSO and MPSO algorithm, and the number of subpopulations is simply set to only for the MPSO. To verify the algorithm’s robustness and efficiency, 20 independent runs with different initial conditions are executed for both algorithms. Final simulation results are listed in 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 and for the MPSO and and 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.