Min-Max Design of FIR Digital Filters by Semidefinite Programming

In this article we consider two problems: FIR (Finite Impulse Response) approximation of IIR (Infinite Impulse Response) filters and inverse FIR filtering of FIR or IIR filters. By means of Kalman-Yakubovich-Popov (KYP) lemma and its generalization (GKYP), the problems are reduced to semidefinite programming described in linear matrix inequalities (LMIs). MATLAB codes for these design methods are given. An design example shows the effectiveness of these methods.


Introduction
Robustness is a fundamental issue in signal processing; unmodeled dynamics and unexpected noise in systems and signals are inevitable in designing systems and signals.Against such uncertainties, min-max optimization, or worst case optimization is a powerful tool.In this light, we propose an efficient design method of FIR (finite impulse response) digital filters for approximating and inverting given digital filters.The design is formulated by min-max optimization in the frequency domain.More precisely, we design an FIR filter which minimizes the maximum gain of the frequency response of an error system.
This design has a direct relation with H ∞ optimization [1].Since the space H ∞ is not a Hilbert space, the familiar projection method cannot be applied.However, many studies have been made on the H ∞ optimization, and nowadays the optimal solution to the H ∞ problem is deeply analysed and can be easily obtained by numerical computation.Moreover, as an extension of H ∞ optimization, a minmax optimization on a finite frequency interval has been proposed recently [2].In both optimization, the Kalman-Yakubovich-Popov (KYP) lemma [3,4,5] and the (generalized) KYP lemma [2] give an easy and fast way of numerical computation; semidefinite programming [6].Semidefinite programming can be efficiently solved by numerical optimization softwares.
In this article, we consider two fundamental problems of signal processing: FIR approximation of IIR (infinite impulse response) filters and inverse FIR filtering of FIR/IIR filters.Each problems are formulated in two types of optimization: H ∞ optimization and finite-frequency min-max one.These problems are reduced to semidefinite programming in a similar way.For this, we introduce state-space representation.Semidefinite programming is obtained by the generalized KYP lemma.We will give MATLAB codes for the proposed design, and will show design examples.

Preliminaries
In this article, we frequently use notations in control systems.For readers who are not familiar to these, we here recall basic notations and facts of control systems used throughout the article.We also show MATLAB codes for better understanding.
Let us begin with a linear system G represented in the following state-space equation or state-space representation [7]: (1) G : The nonnegative number k denotes the time index.The vector , and D ∈ R are assumed to be static, that is, independent of the time index k.Then the transfer function G(z) of the system G is defined by The transfer function G(z) is a rational function of z of the form To convert a state-space equation to its transfer function, one can use the above equations or the MATLAB command tf.On the other hand, to convert a transfer function to a state-space equation, one can use realization theory which provides methods to derive the state space matrices from a given transfer function [7].An easy way to obtain the matrices is to use MATLAB or Scilab with the command ss.
Example 1.We here show an example of MATLAB commands.First, we define state-space matrices: >G=ss(A,B,C,D,1); This defines a state-space (ss) representation of G with the state-space matrices The last argument 1 of ss sets the sampling period to be 1.The first command defines the variable z of Z-transform with sampling period 1, and the second command defines the following transfer function: To convert this to state-space matrices A, B, C, and D, use the command ss as follows: Sampling time (seconds): 1 Discrete-time model.
These outputs shows that the state-space matrices are given by with sampling time 1.Note that the state-space representation in Example 1 is minimal in that the state-space model describes the same input/output behavior with the minimum number of states.Such a system is called minimal realization [7].
is the maximum value of the frequency response gain G(e jω ) .
We then introduce a useful notation, called packed notation [8], describing the transfer function from state-space matrices as By the packed notation, the following formulae are often used in this article: Next, we define stability of linear systems.The state-space system G in ( 1) is said to be stable if the eigenvalues λ 1 , . . ., λ n of the matrix A lie in the open unit circle D = {z ∈ C : |z| < 1}.Assume that the transfer function G(z) is irreducible.Then G is stable if and only if the poles of the transfer function G(z) lie in D. To compute the eigenvalues of A in MATLAB, use the command eig(A), and for the poles of G(z) use pole(Gz).
The H ∞ norm is the fundamental tool in this article.The H ∞ norm of a stable transfer function G(z) is defined by This is the maximum gain of the frequency response G(e jω ) of G as shown in Fig. 1.The MATLAB code to compute the H ∞ norm of a transfer function is given as follows: >> z=tf('z',1); >> Gz=(z-1)/(z^2-0.5*z);>> norm(Gz,inf) ans =

1.3333
This result shows that for the stable transfer function H ∞ control or H ∞ optimization is thus minimization of the maximum value of a transfer function.This leads to robustness against uncertainty in the frequency domain.Moreover, it is known that the where u 2 is the ℓ 2 norm of u: .
The H ∞ norm optimization is minimization of the system gain when the worst case input is applied.This fact implies that the H ∞ norm optimization leads to robustness against uncertainty in input signals.

H ∞ Design Problems of FIR Digital Filters
In this section, we consider two fundamental problems in signal processing: filter approximation and inverse filtering.The problems are formulated as H ∞ optimization by using the H ∞ norm mentioned in the previous section.

FIR approximation of IIR filters.
The first problem we consider is approximation.In signal processing, there are a number of design methods for IIR (infinite impulse response) filters, e.g., Butterworth, Chebyshev, Elliptic, and so on [9].In general, to achieve a given characteristic, IIR filters require fewer memory elements, i.e., z −1 , than FIR (finite impulse response) filters.However, IIR filters may have a problem of instability since they have feedbacks in their circuits, and hence, we prefer an FIR filter to an IIR one in implementation.For this reason, we employ FIR approximation of a given IIR filter.This problem has been widely studied [9].Many of them are formulated by H 2 optimization; they aim at minimizing the average error between a given IIR filter and the FIR filter to be designed.This optimal filter works well averagely, but in the worst case, the filter may lead a large error.To guarantee the worst case performance, H ∞ optimization is applied to this problem [10].The problem is formulated as follows: Problem 1 (FIR approximation of IIR filters).Given an IIR filter P (z), find an FIR (finite impulse response) filter Q(z) which minimizes where W is a given stable weighting function.
The procedure to solve this problem is shown in Section 4.
3.2.Inverse filtering.Inverse filtering, or deconvolution is another fundamental issue in signal processing.This problem arises for example in direct-filter design in spline interpolation [11].
Suppose a filter P (z) is given.Symbolically, the inverse filter of P (z) is P (z) −1 .However, real design is not that easy.
Example 2. Suppose P (z) is given by Then, the inverse Q(z) := P (z) −1 becomes which is stable and causal.Then suppose then the inverse is This has the pole at |z| > 1, and hence the inverse filter is unstable.On the other hand, suppose , which is noncausal.
By these examples, the inverse filter P (z) −1 may unstable or noncausal.Unstable or noncausal filters are difficult to implement in real digital device, and hence we adopt approximation technique; we design an FIR digital filter Q(z) such that Q(z)P (z) ≈ 1.Since FIR filters are always stable and causal, this is a realistic way to design an inverse filter.Our problem is now formulated as follows: Problem 2 (Inverse filtering).Given a filter P (z) which is necessarily not bistable or bi-causal (i.e., P (z) −1 can be unstable or noncausal), find an FIR filter Q(z) which minimizes where W is a given stable weighting function.
The procedure to solve this problem is shown in Section 4.

KYP Lemma for H ∞ Design Problems
In this section, we show that the H ∞ design problems given in the previous section are efficiently solved via semidefinite programming [6].For this purpose, we first formulate the problems in state-space representation reviewed in Section 2. Then we bring in Kalman-Yakubovich-Popov (KYP) lemma [3,4,5] to reduce the problems into semidefinite programming.

4.1.
State-space representation.The transfer functions (P (z) − Q(z)) W (z) and (Q(z)P (z) − 1) W (z) in Problems 1 and 2, respectively, can be described in a form of ( 5) where for Problem 1 and for Problem 2. Therefore, our problems are described by the following min-max optimization: (6) min where F N is the set of N -th order FIR filters, that is, To reduce the problem of minimizing ( 6) to semidefinite programming, we use statespace representation for T 1 (z) and T 2 (z) in (5).5), that is, Also, a state-space representation of an FIR filter Q(z) is given by ( 7) where By using these state-space matrices, we obtain a state-space representation of T (z) in ( 5) as ( 8) Note that the FIR parameters α 0 , α 1 , . . ., α N depend affinely on C and D, and are independent of A and B. This property is a key to describe our problem into semidefinite programming.

4.2.
Semidefinite programming by KYP lemma.The optimization in ( 6) can be equivalently described by the following minimization problem: To describe this optimization in semidefinite programming, we adopt the following lemma [3,4,5]: is stable, and the state-space representation {A, B, C, D} of T (z) is minimal1 .Let γ > 0. Then the following are equivalent conditions: (1) T ∞ ≤ γ.
(2) There exists a positive definite matrix X such that By using this lemma, we obtain the following theorem: Theorem 1.The inequality (9) holds if and only if there exists X > 0 such that where A, B, C(α N :0 ), and D(α 0 ) are given in (8).
By this, the optimal FIR parameters α 0 , α 1 , . . ., α N can be obtained as follows.Let x be the vector consisting of all variables in α N :0 , X, and γ2 in (10).The matrix in (10) is affine with respect to these variables, and hence, can be rewritten in the form where M i is a symmetric matrix and x i is the i-th entry of x.Let v ∈ {0, 1} L be a vector such that v ⊤ x = γ 2 .Our problem is then described by semidefinite programming as follows: By this, we can effectively approach the optimal parameters α N :0 by numerical optimization softwares.For MATLAB codes of the semidefinite programming above, see Section 7.

Finite Frequency Design of FIR Digital Filters
By the H ∞ design discussed in the previous section, we can guarantee the maximum gain of the frequency response of T = (P − Q)W (approximation) or T = (QP − 1)W (inversion) over the whole frequency range [0, π].Some applications, however, do not need minimize the gain over the whole range [0, π], but a finite frequency range Ω ⊂ [0, π].Design of noise shaping ∆Σ modulators is one example of such requirement [12].In this section, we consider such optimization, called finite frequency optimization.We first consider the approximation problem over a finite frequency range.These problems are also fundamental in digital signal processing.We will show in the next section that these problems can be also described in semidefinite programming via generalized KYP lemma.

Generalized KYP Lemma for Finite Frequency Design Problems
In this section, we reduce the problems given in the previous section to semidefinite programming.As in the H ∞ optimization, we first formulate the problems in state-space representation, and then derive semidefinite programming via generalized KYP lemma [2].
6.1.State-space representation.As in the H ∞ optimization in Section 4, we employ state-space representation.Let T (z) = P (z) − Q(z) for the approximation problem or T (z) = P (z)Q(z) − 1 for the inversion problem.Then T (z) can be described by T (z) = T 1 (z) + Q(z)T 2 (z) as in (5).Then our problems are described by the following min-max optimization: (11) min Let {A i , B i , C i , D i }, i = 1, 2 be state-space matrices of T i (z).By using the same technique as in Section 4, we can obtain a state-space representation of T (z) as ( 12) where α N :0 = [α N , . . ., α 0 ] is the coefficient vector of the FIR filter to be designed as defined in (7).
(2) There exist symmetric matrices Y > 0 and X such that By using this lemma, we obtain the following theorem: (the solution of Problem 1), say Q 1 (z), shows the lower H ∞ norm than the finitefrequency min-max design (the solution of Problem 3), say Q 2 (z).On the other hand, in the frequency band [0, π/2], Q 1 (z) shows the larger error than Q 2 (z).

Conclusion
In this article, we consider four problems, FIR approximation and inverse FIR filtering of IIR filters by H ∞ and finite-frequency min-max, which are fundamental in signal processing.By using KYP and generalized KYP lemmas, the problems are all solvable via semidefinite programming.We show MATLAB codes for the programming, and show examples of designing FIR filters.