Computational Intelligence and Neuroscience
Volume 2015 (2015), Article ID 638068, 7 pages
http://dx.doi.org/10.1155/2015/638068

Research Article

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

Wei-Der Chang

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 by

where , , 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.

Table 1: Objective function values evaluated for Example 1.

PSO algorithm
MPSO algorithm

Run 1

Run 2

Run 3

Run 4

Run 5

Run 6

Run 7

Run 8

Run 9

Run 10

Run 11

Run 12

Run 13

Run 14

Run 15

Run 16

Run 17

Run 18

Run 19

Run 20

Mean

Variance

Table 2: Digital filter coefficients derived by Run 1 of Example 1.

Filter coefficients
PSO algorithm
MPSO algorithm

Figure 1: Magnitude response of Example 1.

Figure 2: Trajectories of objective function (OF) for Run 1 of Example 1.

Figure 3: Phase responses for Run 1 of Example 1.

Figure 4: Phase response errors for Run 1 of Example 1.

Example 2. This example will design a recursive all-pass digital filter with a desired sinusoidal phase response expressed by

where and are given. Its corresponding magnitude response is shown in Figure 5. In the simulation, a digital recursive filter with is adopted and the population size and iterative number of the algorithms are set to and , respectively, for solving such a higher-order digital filter. Moreover, as given in Example 1, the number of subpopulations is chosen by 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.

Table 3: Objective function values evaluated for Example 2.

PSO algorithm
MPSO algorithm

Run 1

Run 2

Run 3

Run 4

Run 5

Run 6

Run 7

Run 8

Run 9

Run 10

Run 11

Run 12

Run 13

Run 14

Run 15

Run 16

Run 17

Run 18

Run 19

Run 20

Mean

Variance

Table 4: Digital filter coefficients derived by Run 1 of Example 2.

Filter coefficients
PSO algorithm
MPSO algorithm

Figure 5: Magnitude response of Example 2.

Figure 6: Trajectories of objective function (OF) for Run 1 of Example 2.

Figure 7: Phase responses for Run 1 of Example 2.

Figure 8: Phase response errors for Run 1 of Example 2.

5. 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 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.

Conflict of Interests

The author declares that there is no conflict of interests regarding the publication of this paper.

Acknowledgment

This work was partially supported by the Ministry of Science and Technology of Taiwan under Grant MOST 103-2221-E-366-004.

References

A. V. Oppenheim, R. W. Schafer, and J. R. Buck, Discrete-Time Signal Processing, Prentice-Hall, London, UK, 2nd edition, 1999.

S. S. Kidambi, “Weighted least-squares design of recursive allpass filters,” IEEE Transactions on Signal Processing, vol. 44, no. 6, pp. 1553–1557, 1996.

X. Zhang, “Design of IIR digital allpass filters based on eigenvalue problem,” IEEE Transactions on Signal Processing, vol. 47, no. 2, pp. 554–559, 1999.

M. Lang, “Allpass filter design and applications,” IEEE Transactions on Signal Processing, vol. 46, no. 9, pp. 2505–2514, 1998.

L. C. Su, Y. D. Jou, F. K. Chen, and C. M. Sun, “Neural type least squares design for IIR all-pass filters,” in Proceedings of the National Symposium on Telecommunications, pp. 147–150, Taipei, Taiwan, 2007.

J.-W. Horng, “Current conveyors based allpass filters and quadrature oscillators employing grounded capacitors and resistors,” Computers and Electrical Engineering, vol. 31, no. 1, pp. 81–92, 2005.

G. Stančić and S. Nikolić, “Digital linear phase notch filter design based on IIR all-pass filter application,” Digital Signal Processing, vol. 23, no. 3, pp. 1065–1069, 2013.

W. D. Chang, S. T. Pan, K. H. Cheng, and M. C. Hsu, “Optimal design of allpass digital filters using artificial bee colony,” in Proceedings of the Workshop on Synthesis and System Integration of Mixed Information Technologies, pp. 159–162, Beppu, Japan, 2012.

J. Kennedy and R. Eberhart, “Particle swarm optimization,” in Proceedings of the IEEE International Conference on Neural Networks, vol. 4, pp. 1942–1948, Perth, Australia, November-December 1995.

M. A. Abido, “Optimal design of power-system stabilizers using particle swarm optimization,” IEEE Transactions on Energy Conversion, vol. 17, no. 3, pp. 406–413, 2002.

W.-D. Chang and S.-P. Shih, “PID controller design of nonlinear systems using an improved particle swarm optimization approach,” Communications in Nonlinear Science and Numerical Simulation, vol. 15, no. 11, pp. 3632–3639, 2010.

J.-S. Chiou, S.-H. Tsai, and M.-T. Liu, “A PSO-based adaptive fuzzy PID-controllers,” Simulation Modelling Practice and Theory, vol. 26, pp. 49–59, 2012.

M. A. Cavuslu, C. Karakuzu, and F. Karakaya, “Neural identification of dynamic systems on FPGA with improved PSO learning,” Applied Soft Computing Journal, vol. 12, no. 9, pp. 2707–2718, 2012.

B. Vasumathi and S. Moorthi, “Implementation of hybrid ANNPSO algorithm on FPGA for harmonic estimation,” Engineering Applications of Artificial Intelligence, vol. 25, no. 3, pp. 476–483, 2012.

W.-D. Chang, “Volterra filter modeling of nonlinear discrete-time system using improved particle swarm optimization,” Digital Signal Processing, vol. 22, no. 6, pp. 1056–1062, 2012.

C. Zhang, M. Wu, and L. Luan, “An optimal PSO distributed precoding algorithm in QRD-based multi-relay system,” Future Generation Computer Systems, vol. 29, no. 1, pp. 107–113, 2013.

S. J. Nanda and G. Panda, “Automatic clustering algorithm based on multi-objective Immunized PSO to classify actions of 3D human models,” Engineering Applications of Artificial Intelligence, vol. 26, no. 5-6, pp. 1429–1441, 2013.

Z. Liu, H. Cao, X. Chen, Z. He, and Z. Shen, “Multi-fault classification based on wavelet SVM with PSO algorithm to analyze vibration signals from rolling element bearings,” Neurocomputing, vol. 99, pp. 399–410, 2013.

Y. Wang, B. Li, T. Sun, K. Jiang, and X. Wang, “A modified PSO algorithm for aero-engine non-linear programming model,” in Proceedings of the 8th World Congress on Intelligent Control and Automation (WCICA '10), pp. 4069–4073, Jinan, China, July 2010.

S. Mondal, D. Chakraborty, R. Kar, D. Mandal, and S. P. Ghoshal, “Novel particle swarm optimization for high pass FIR filter design,” in Proceedings of the IEEE Symposium on Humanities, Science and Engineering Research (SHUSER '12), pp. 413–418, June 2012.

S. Mukherjee, R. Kar, D. Mandal, S. Mondal, and S. P. Ghoshal, “Linear phase low pass FIR filter design using improved particle swarm optimization,” in Proceedings of the IEEE Student Conference on Research and Development (SCOReD '11), pp. 358–363, Cyberjaya, Malaysia, December 2011.