**4. KYP lemma for** *H*<sup>∞</sup> **design problems**

In this section, we show that the *H*<sup>∞</sup> design problems given in the previous section are efficiently solved via *semidefinite programming* (Boyd & Vandenberghe, 2004). 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 (Anderson, 1967; Rantzer, 1996; Tuqan & Vaidyanathan, 1998) 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

$$T(z) = T\_1(z) + Q(z)T\_2(z),\tag{2}$$

where

6 Digital Signal Processing

*Inverse filtering*, or *deconvolution* is another fundamental issue in signal processing. This problem arises for example in direct-filter design in spline interpolation

Suppose a filter *P*(*z*) is given. Symbolically, the inverse filter of *P*(*z*) is *P*(*z*)−1. However, real

*<sup>P</sup>*(*z*) = *<sup>z</sup>* <sup>+</sup> 0.5

*<sup>Q</sup>*(*z*) = *<sup>P</sup>*(*z*)−<sup>1</sup> <sup>=</sup> *<sup>z</sup>* <sup>−</sup> 0.5

*<sup>P</sup>*(*z*) = *<sup>z</sup>* <sup>−</sup> <sup>2</sup>

*<sup>Q</sup>*(*z*) = *<sup>P</sup>*(*z*)−<sup>1</sup> <sup>=</sup> *<sup>z</sup>* <sup>−</sup> 0.5

*This has the pole at* |*z*| > 1*, and hence the inverse filter is unstable. On the other hand, suppose*

*<sup>P</sup>*(*z*) = <sup>1</sup>

*<sup>Q</sup>*(*z*) = *<sup>P</sup>*(*z*)−<sup>1</sup> <sup>=</sup> *<sup>z</sup>* <sup>−</sup> 0.5,

By these examples, the inverse filter *P*(*z*)−<sup>1</sup> 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

**Problem 2** (Inverse filtering)**.** *Given a filter P*(*z*) *which is necessarily not bi-stable or bi-causal (i.e.,*

*<sup>Q</sup>*(*ejω*)*P*(*ejω*) <sup>−</sup> <sup>1</sup>

*W*(*ejω*) ,

 

*P*(*z*)−<sup>1</sup> *can be unstable or noncausal), find an FIR filter Q*(*z*) *which minimizes*

*ω*∈[0,*π*]

(*QP* − 1)*W*<sup>∞</sup> = max

The procedure to solve this problem is shown in Section 4.

*where W is a given stable weighting function.*

*<sup>z</sup>* <sup>−</sup> 0.5 ,

*<sup>z</sup>* <sup>−</sup> 0.5 ,

*<sup>z</sup>* <sup>−</sup> 0.5 .

*<sup>z</sup>* <sup>+</sup> 0.5 ,

*<sup>z</sup>* <sup>−</sup> <sup>2</sup> .

**3.2 Inverse filtering**

design is not that easy.

*then the inverse is*

*then the inverse is*

*which is noncausal.*

formulated as follows:

(Nagahara & Yamamoto, 2011).

**Example 2.** *Suppose P*(*z*) *is given by*

*Then, the inverse Q*(*z*) := *P*(*z*)−<sup>1</sup> *becomes*

*which is stable and causal. Then suppose*

$$T\_1(z) = P(z)W(z), \quad T\_2(z) = -W(z)\_\prime$$

for **Problem 1** and

$$T\_1(z) = -W(z), \quad T\_2(z) = P(z)W(z).$$

for **Problem 2**. Therefore, our problems are described by the following min-max optimization:

$$\min\_{Q(z)\in\mathcal{F}\_N} \|T\_1 + QT\_2\|\_{\infty} = \min\_{Q(z)\in\mathcal{F}\_N} \max\_{\omega\in[0,\pi]} \left| T\_1(e^{j\omega}) + Q(e^{j\omega})T\_2(e^{j\omega}) \right|,\tag{3}$$

where F*<sup>N</sup>* is the set of *N*-th order FIR filters, that is,

$$\mathcal{F}\_N := \left\{ \mathcal{Q}(z) : \mathcal{Q}(z) = \sum\_{i=0}^N \alpha\_i z^{-i}, \alpha\_i \in \mathbb{R} \right\}. \ .$$

To reduce the problem of minimizing (3) to semidefinite programming, we use state-space representations for *T*1(*z*) and *T*2(*z*) in (2). Let {*Ai*, *Bi*, *Ci*, *Di*} (*i* = 1, 2) are state-space matrices of *Ti*(*z*) in (2), that is,

$$T\_i(z) = \mathbf{C}\_i (zI - A\_i)^{-1} B\_i + D\_i =: \begin{bmatrix} \frac{A\_i \mid B\_i}{\mathbf{C}\_i \mid D\_i} \end{bmatrix} (z), \quad i = 1, 2.1$$

Also, a state-space representation of an FIR filter *Q*(*z*) is given by

$$Q(z) = \sum\_{n=0}^{N} a\_n z^{-n} = \begin{bmatrix} 0 & 1 & 0 & \dots & 0 \\ 0 & 0 & 1 & \ddots & \vdots \\ 0 & 0 & \ddots & \ddots & 0 \\ & 0 & 0 & \ddots & \ddots & 0 \\ \vdots & \vdots & \ddots & 0 & 1 \\ 0 & 0 & \dots & 0 & 0 \\ \hline a\_N a\_{N-1} & \dots & a\_2 & a\_1 \end{bmatrix} (z) =: \begin{bmatrix} A\_q \ \begin{bmatrix} B\_q \end{bmatrix} \end{bmatrix} (z),\tag{4}$$

where *<sup>α</sup>N*:1 := *α<sup>N</sup> αN*−<sup>1</sup> ... *α*<sup>1</sup> .

 *P ej<sup>ω</sup>* − *Q ej<sup>ω</sup>* 

*γ*

minimized over the finite frequency range Ωlow = [0, *ω*low].

**5. Finite frequency design of FIR digital filters**

the approximation problem over a finite frequency range.

*V*Ω(*P* − *Q*) := max

can also formulate the inversion problem over a finite frequency range.

*V*Ω(*QP* − 1) := max

Ω ⊂ [0, *π*]*, find an FIR filter Q*(*z*) *which minimizes*

*find an FIR filter Q*(*z*) *which minimizes*

generalized KYP lemma.

Section 7.

*ω*

*ω*low

0 *π*

Fig. 2. Finite frequency approximation (**Problem 3**): the gain of the error *<sup>P</sup>*(*ejω*) <sup>−</sup> *<sup>Q</sup>*(*ejω*) is

Min-Max Design of FIR Digital Filters by Semidefinite Programming 201

where *Mi* is a symmetric matrix and *xi* is the *<sup>i</sup>*-th entry of *<sup>x</sup>*. Let *<sup>v</sup>* <sup>∈</sup> {0, 1}*<sup>L</sup>* be a vector such that *vx* = *γ*2. Our problem is then described by semidefinite programming as follows:

minimize *vx* subject to *M*(*x*) ≤ 0. By this, we can effectively approach the optimal parameters *α*0, *α*1,..., *α<sup>N</sup>* by numerical optimization softwares. For MATLAB codes of the semidefinite programming above, see

By the *H*<sup>∞</sup> 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 (Nagahara & Yamamoto, 2009). In this section, we consider such optimization, called *finite frequency optimization*. We first consider

**Problem 3** (Finite frequency approximation)**.** *Given a filter P*(*z*) *and a finite frequency range*

Figure 2 illustrates the above problem for a finite frequency range Ω = Ωlow = [0, *ω*low], where *<sup>ω</sup>*low <sup>∈</sup> (0, *<sup>π</sup>*]. We seek an FIR filter which minimizes the gain of the error *<sup>P</sup>*(*ejω*) <sup>−</sup> *<sup>Q</sup>*(*ejω*) over the finite frequency range <sup>Ω</sup>, and do not care about the other range [0, *<sup>π</sup>*] \ <sup>Ω</sup>. We

**Problem 4** (Finite frequency inversion)**.** *Given a filter P*(*z*) *and a finite frequency range* Ω ⊂ [0, *π*]*,*

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

*ω*∈Ω 

*<sup>P</sup>*(*ejω*) <sup>−</sup> *<sup>Q</sup>*(*ejω*)

*<sup>Q</sup>*(*ejω*)*P*(*ejω*) <sup>−</sup> <sup>1</sup>

 .

> .

*ω*∈Ω 

By using these state-space matrices, we obtain a state-space representation of *T*(*z*) in (2) as

$$T(z) = \begin{bmatrix} A\_1 & 0 & 0 \\ 0 & A\_2 & 0 \\ 0 & B\_q \mathbf{C\_2} & A\_q \\ \hline \mathbf{C\_1} & \mathfrak{a\_0} \mathbf{C\_2} & \mathfrak{a\_{N:1}} \begin{bmatrix} B\_1 \\ B\_0 D\_2 \end{bmatrix} \\ \end{bmatrix} (z) =: \begin{bmatrix} A & \mid & B \\ \hline \mathbf{C(a\_{N:0})} \big| D(a\_0) \end{bmatrix} (z). \tag{5}$$

Note that the FIR parameters *α*0, *α*1,..., *α<sup>N</sup>* 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 (3) can be equivalently described by the following minimization problem:

$$\begin{aligned} \text{minimize } & \gamma \text{ subject to } Q(z) \in \mathcal{F}\_N \text{ and} \\ & \max\_{\omega \in [0, \pi]} \left| T\_1(e^{j\omega}) + Q(e^{j\omega}) T\_2(e^{j\omega}) \right| \le \gamma. \end{aligned} \tag{6}$$

To describe this optimization in semidefinite programming, we adopt the following lemma (Anderson, 1967; Rantzer, 1996; Tuqan & Vaidyanathan, 1998):

**Lemma 1** (KYP lemma)**.** *Suppose*

$$T(z) = \begin{bmatrix} \frac{A \mid B}{C \mid D} \end{bmatrix} (z)^l$$

*is stable, and the state-space representation* {*A*, *<sup>B</sup>*, *<sup>C</sup>*, *<sup>D</sup>*} *of T*(*z*) *is minimal*1*. Let <sup>γ</sup>* <sup>&</sup>gt; <sup>0</sup>*. Then the following are equivalent conditions:*

*1. T*<sup>∞</sup> ≤ *γ.*

*2. There exists a positive definite matrix X such that*

$$
\begin{bmatrix}
A^\top XA - X & A^\top XB & \mathbf{C}^\top \\
B^\top XA & B^\top XB - \gamma^2 & D \\
\mathbf{C} & D & -1
\end{bmatrix} \le 0.
$$

By using this lemma, we obtain the following theorem:

**Theorem 1.** *The inequality (6) holds if and only if there exists X* > 0 *such that*

$$
\begin{bmatrix}
\boldsymbol{A}^{\top}\boldsymbol{X}\boldsymbol{A} - \boldsymbol{X} & \boldsymbol{A}^{\top}\boldsymbol{X}\boldsymbol{B} & \boldsymbol{C}(\boldsymbol{a}\_{N:0})^{\top} \\
\boldsymbol{B}^{\top}\boldsymbol{X}\boldsymbol{A} & \boldsymbol{B}^{\top}\boldsymbol{X}\boldsymbol{B} - \gamma^{2} & \boldsymbol{D}(\boldsymbol{a}\_{0}) \\
\boldsymbol{C}(\boldsymbol{a}\_{N:0}) & \boldsymbol{D}(\boldsymbol{a}\_{0}) & -1
\end{bmatrix} \leq \boldsymbol{0},\tag{7}
$$

*where A, B, C*(*αN*:0)*, and D*(*α*0) *are given in (5).*

By this, the optimal FIR parameters *α*0, *α*1,..., *α<sup>N</sup>* can be obtained as follows. Let *x* be the vector consisting of all variables in *αN*:0, *X*, and *γ*<sup>2</sup> in (7). The matrix in (7) is *affine* with respect to these variables, and hence, can be rewritten in the form

$$M(\mathfrak{x}) = M\_0 + \sum\_{i=1}^{L} M\_i \mathfrak{x}\_{i\nu}$$

<sup>1</sup> For minimality of state-space representation, see Section 2 or Chapter 26 in (Rugh, 1996).

8 Digital Signal Processing

Note that the FIR parameters *α*0, *α*1,..., *α<sup>N</sup>* 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.

The optimization in (3) can be equivalently described by the following minimization problem:

minimize *γ* subject to *Q*(*z*) ∈ F*<sup>N</sup>* and

*T*1(*ejω*) + *Q*(*ejω*)*T*2(*ejω*)

To describe this optimization in semidefinite programming, we adopt the following lemma

 *A B C D* (*z*)

*is stable, and the state-space representation* {*A*, *<sup>B</sup>*, *<sup>C</sup>*, *<sup>D</sup>*} *of T*(*z*) *is minimal*1*. Let <sup>γ</sup>* <sup>&</sup>gt; <sup>0</sup>*. Then the*

*AXA* − *X AXB C <sup>B</sup>XA BXB* <sup>−</sup> *<sup>γ</sup>*<sup>2</sup> *<sup>D</sup> C D* −1

*AXA* − *X AXB C*(*αN*:0) *<sup>B</sup>XA BXB* <sup>−</sup> *<sup>γ</sup>*<sup>2</sup> *<sup>D</sup>*(*α*0) *C*(*αN*:0) *D*(*α*0) −1

By this, the optimal FIR parameters *α*0, *α*1,..., *α<sup>N</sup>* can be obtained as follows. Let *x* be the vector consisting of all variables in *αN*:0, *X*, and *γ*<sup>2</sup> in (7). The matrix in (7) is *affine* with

> *L* ∑ *i*=1

*Mixi*,

*M*(*x*) = *M*<sup>0</sup> +

<sup>1</sup> For minimality of state-space representation, see Section 2 or Chapter 26 in (Rugh, 1996).

*T*(*z*) =

 (*z*) =:

 *A B C*(*αN*:0) *D*(*α*0)

> 

> > ≤ 0.

<sup>≤</sup> *<sup>γ</sup>*. (6)

≤ 0, (7)

(*z*). (5)

By using these state-space matrices, we obtain a state-space representation of *T*(*z*) in (2) as

*T*(*z*) =

**Lemma 1** (KYP lemma)**.** *Suppose*

*following are equivalent conditions:*

*2. There exists a positive definite matrix X such that*

*1. T*<sup>∞</sup> ≤ *γ.*

 

**4.2 Semidefinite programming by KYP lemma**

*A*<sup>1</sup> 0 0 *B*<sup>1</sup> 0 *A*<sup>2</sup> 0 *B*<sup>2</sup> 0 *BqC*<sup>2</sup> *Aq BqD*<sup>2</sup> *C*<sup>1</sup> *α*0*C*<sup>2</sup> *αN*:1 *D*<sup>1</sup> + *α*0*D*<sup>2</sup>

> max *ω*∈[0,*π*]

(Anderson, 1967; Rantzer, 1996; Tuqan & Vaidyanathan, 1998):

 

**Theorem 1.** *The inequality (6) holds if and only if there exists X* > 0 *such that*

respect to these variables, and hence, can be rewritten in the form

By using this lemma, we obtain the following theorem:

 

*where A, B, C*(*αN*:0)*, and D*(*α*0) *are given in (5).*

 

Fig. 2. Finite frequency approximation (**Problem 3**): the gain of the error *<sup>P</sup>*(*ejω*) <sup>−</sup> *<sup>Q</sup>*(*ejω*) is minimized over the finite frequency range Ωlow = [0, *ω*low].

where *Mi* is a symmetric matrix and *xi* is the *<sup>i</sup>*-th entry of *<sup>x</sup>*. Let *<sup>v</sup>* <sup>∈</sup> {0, 1}*<sup>L</sup>* be a vector such that *vx* = *γ*2. Our problem is then described by semidefinite programming as follows:

minimize *vx* subject to *M*(*x*) ≤ 0.

By this, we can effectively approach the optimal parameters *α*0, *α*1,..., *α<sup>N</sup>* by numerical optimization softwares. For MATLAB codes of the semidefinite programming above, see Section 7.

#### **5. Finite frequency design of FIR digital filters**

By the *H*<sup>∞</sup> 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 (Nagahara & Yamamoto, 2009). In this section, we consider such optimization, called *finite frequency optimization*. We first consider the approximation problem over a finite frequency range.

**Problem 3** (Finite frequency approximation)**.** *Given a filter P*(*z*) *and a finite frequency range* Ω ⊂ [0, *π*]*, find an FIR filter Q*(*z*) *which minimizes*

$$V\_{\Omega}(P - Q) := \max\_{\omega \in \Omega} \left| P(e^{j\omega}) - Q(e^{j\omega}) \right|.$$

Figure 2 illustrates the above problem for a finite frequency range Ω = Ωlow = [0, *ω*low], where *<sup>ω</sup>*low <sup>∈</sup> (0, *<sup>π</sup>*]. We seek an FIR filter which minimizes the gain of the error *<sup>P</sup>*(*ejω*) <sup>−</sup> *<sup>Q</sup>*(*ejω*) over the finite frequency range <sup>Ω</sup>, and do not care about the other range [0, *<sup>π</sup>*] \ <sup>Ω</sup>. We can also formulate the inversion problem over a finite frequency range.

**Problem 4** (Finite frequency inversion)**.** *Given a filter P*(*z*) *and a finite frequency range* Ω ⊂ [0, *π*]*, find an FIR filter Q*(*z*) *which minimizes*

$$V\_{\Omega}(QP-1) := \max\_{\omega \in \Omega} \left| Q(e^{j\omega})P(e^{j\omega}) - 1 \right|.$$

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.

*where*

*that*

*<sup>M</sup>*1(*X*, *<sup>Y</sup>*) = *<sup>A</sup>XA* <sup>+</sup> *YAe*−*jω*<sup>0</sup> <sup>+</sup> *<sup>A</sup>Yejω*<sup>0</sup> <sup>−</sup> *<sup>X</sup>* <sup>−</sup> <sup>2</sup>*<sup>Y</sup>* cos *<sup>r</sup>*,

Min-Max Design of FIR Digital Filters by Semidefinite Programming 203

**Theorem 2.** *The inequality (10) holds if and only if there exist symmetric matrices Y* > 0 *and X such*

By this theorem, we can obtain the coefficients *α*0,..., *α<sup>N</sup>* of the optimal FIR filter by semidefinite programming as mentioned in Section 4. MATLAB codes for the semidefinite

In this section, we give MATLAB codes for the semidefinite programming derived in previous sections. Note that the MATLAB codes for solving **Problems 1** to **4** are also available at the

http://www-ics.acs.i.kyoto-u.ac.jp/~nagahara/fir/ Note also that to execute the codes in this section, Control System Toolbox (Mathworks, 2010), YALMIP (Löfberg, 2004), and SeDuMi (Sturm, 2001) are needed. YALMIP and SeDuMi are free softwares for solving optimization problems including semidefinite programming which

% H-infinity optimal approximated FIR filter Q(z) which minimizes

*M*1(*X*, *Y*) *M*2(*X*, *Y*) *C*(*αN*:0) *M*2(*X*, *Y*) *M*3(*X*, *γ*2) *D*(*α*0) *C*(*αN*:0) *D*(*α*0) −1

*<sup>M</sup>*3(*X*, *<sup>γ</sup>*2) = *<sup>B</sup>XB* <sup>−</sup> *<sup>γ</sup>*2, *<sup>ω</sup>*<sup>0</sup> <sup>=</sup> *<sup>ω</sup>*<sup>1</sup> <sup>+</sup> *<sup>ω</sup>*<sup>2</sup>

*where M*1*, M*2*, and M*<sup>3</sup> *are given in (11), A, B, C*(*αN*:0)*, and D*(*α*0) *are given in (9).*

By using this lemma, we obtain the following theorem:

 

**7. MATLAB codes for semidefinite programming**

**7.1 FIR approximation of IIR filters by** *H*<sup>∞</sup> **norm**

function [q,gmin] = approxFIRhinf(P,W,N); % [q,gmin]=approxFIRhinf(P,W) computes the

% the maximum frequency gain of (P-Q)W. % This design uses SDP via the KYP lemma.

% P: Target stable linear system in SS object % W: Weighting stable linear system in SS object % N: Order of the FIR filter to be designed

% q: The optimal FIR filter coefficients

programming are shown in Section 7.

following web site:

is treated in this chapter.

% J(Q) = ||(P-Q)W||,

% gmin: The optimal value

%

%

%

% Inputs:

% Outputs:

*M*2(*X*, *Y*) = *AXB* + *YBe*−*jω*<sup>0</sup> , *M*2(*X*, *Y*) = *AXB* + *YBejω*<sup>0</sup> ,

<sup>2</sup> , *<sup>r</sup>* <sup>=</sup> *<sup>ω</sup>*<sup>2</sup> <sup>−</sup> *<sup>ω</sup>*<sup>1</sup>

 ≤ 0, <sup>2</sup> .

(11)

#### **6. 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*<sup>∞</sup> optimization, we first formulate the problems in state-space representation, and then derive semidefinite programming via *generalized KYP lemma* (Iwasaki & Hara, 2005).

#### **6.1 State-space representation**

As in the *H*<sup>∞</sup> 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 (2). Then our problems are described by the following min-max optimization:

$$\min\_{Q(z)\in\mathcal{F}\_N} V\_\Omega \left( T\_1 + Q T\_2 \right) = \min\_{Q(z)\in\mathcal{F}\_N} \max\_{\omega\in\Omega} \left| T\_1(e^{j\omega}) + Q(e^{j\omega}) T\_2(e^{j\omega}) \right|. \tag{8}$$

Let {*Ai*, *Bi*, *Ci*, *Di*}, *i* = 1, 2 be state-space matrices of *Ti*(*z*). By using the same technique as in Section 4, we can obtain a state-space representation of *T*(*z*) as

$$T(z) = \begin{bmatrix} A & B \\ \hline \mathbb{C}(\mathfrak{a}\_{N:0}) \mathop{\mid} D(\mathfrak{a}\_0) \end{bmatrix} (z), \tag{9}$$

where *αN*:0 = [*αN*,..., *α*0] is the coefficient vector of the FIR filter to be designed as defined in (4).

#### **6.2 Semidefinite programming by generalized KYP lemma**

The optimization in (8) can be equivalently described by the following problem:

$$\text{minimize } \gamma \text{ subject to } Q(z) \in \mathcal{F}\_N \text{ and }$$

$$\max\_{\omega \in \Omega} \left| T\_1(e^{j\omega}) + Q(e^{j\omega})T\_2(e^{j\omega}) \right| \le \gamma \tag{10}$$

To describe this optimization in semidefinite programming, we adopt the following lemma (Iwasaki & Hara, 2005):

**Lemma 2** (Generalized KYP Lemma)**.** *Suppose*

$$T(z) = \begin{bmatrix} A \mid B \\ \hline C \mid D \end{bmatrix} (z)$$

*is stable, and the state-space representation* {*A*, *B*, *C*, *D*} *of T*(*z*) *is minimal. Let* Ω *be a closed interval* [*ω*1, *ω*2] ⊂ [0, *π*]*. Let γ* > 0*. Then the following are equivalent conditions:*


$$
\begin{bmatrix}
\begin{matrix}
M\_1(X,Y) & M\_2(X,Y) & \mathbb{C}^\top \\
\overline{M\_2}(X,Y)^\top & M\_3(X,\gamma^2) & D \\
\mathbb{C} & D & -1
\end{matrix} \end{bmatrix} \le 0\_\prime
$$

*where*

10 Digital Signal Processing

In this section, we reduce the problems given in the previous section to semidefinite programming. As in the *H*<sup>∞</sup> optimization, we first formulate the problems in state-space representation, and then derive semidefinite programming via *generalized KYP lemma*

As in the *H*<sup>∞</sup> 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 (2). Then our problems are

> max *ω*∈Ω

 

> ≤ 0,

*T*1(*ejω*) + *Q*(*ejω*)*T*2(*ejω*)

 

(*z*), (9)

<sup>≤</sup> *<sup>γ</sup>* (10)

. (8)

*Q*(*z*)∈F*<sup>N</sup>*

Let {*Ai*, *Bi*, *Ci*, *Di*}, *i* = 1, 2 be state-space matrices of *Ti*(*z*). By using the same technique as in

 *A B C*(*αN*:0) *D*(*α*0)

where *αN*:0 = [*αN*,..., *α*0] is the coefficient vector of the FIR filter to be designed as defined in

minimize *γ* subject to *Q*(*z*) ∈ F*<sup>N</sup>* and

*T*1(*ejω*) + *Q*(*ejω*)*T*2(*ejω*)

To describe this optimization in semidefinite programming, we adopt the following lemma

 *A B C D* (*z*)

*is stable, and the state-space representation* {*A*, *B*, *C*, *D*} *of T*(*z*) *is minimal. Let* Ω *be a closed interval*

*M*1(*X*,*Y*) *M*2(*X*, *Y*) *C M*2(*X*, *Y*) *M*3(*X*, *γ*2) *D C D* −1

**6. Generalized KYP lemma for finite frequency design problems**

*V*<sup>Ω</sup> (*T*<sup>1</sup> + *QT*2) = min

*T*(*z*) =

The optimization in (8) can be equivalently described by the following problem:

*T*(*z*) =

[*ω*1, *ω*2] ⊂ [0, *π*]*. Let γ* > 0*. Then the following are equivalent conditions:*

Section 4, we can obtain a state-space representation of *T*(*z*) as

**6.2 Semidefinite programming by generalized KYP lemma**

max *ω*∈Ω 

**Lemma 2** (Generalized KYP Lemma)**.** *Suppose*

 *T*(*ejω*) <sup>≤</sup> *<sup>γ</sup>.*

*2. There exist symmetric matrices Y* > 0 *and X such that*

 

(Iwasaki & Hara, 2005).

(Iwasaki & Hara, 2005):

*1. V*Ω(*T*) = max*ω*∈[*ω*1,*ω*2]

(4).

**6.1 State-space representation**

min *Q*(*z*)∈F*<sup>N</sup>*

described by the following min-max optimization:

$$\begin{aligned} M\_1(X,Y) &= A^\top XA + YA e^{-j\omega\_0} + A^\top Y e^{j\omega\_0} - X - 2Y \cos r, \\ M\_2(X,Y) &= A^\top XB + YB e^{-j\omega\_0}, \quad \overline{M}\_2(X,Y) = A^\top XB + YB e^{j\omega\_0}, \\ M\_3(X,\gamma^2) &= B^\top XB - \gamma^2, \quad \omega\_0 = \frac{\omega\_1 + \omega\_2}{2}, \quad r = \frac{\omega\_2 - \omega\_1}{2}. \end{aligned} \tag{11}$$

By using this lemma, we obtain the following theorem:

**Theorem 2.** *The inequality (10) holds if and only if there exist symmetric matrices Y* > 0 *and X such that*

$$
\begin{bmatrix}
\overline{M\_1}(X,Y) & M\_2(X,Y) & C(\mathfrak{a}\_{N:0})^\top \\
\overline{M\_2}(X,Y)^\top & M\_3(X,\gamma^2) & D(\mathfrak{a}\_0) \\
\overline{C(\mathfrak{a}\_{N:0})} & D(\mathfrak{a}\_0) & -1
\end{bmatrix} \le 0,
$$

*where M*1*, M*2*, and M*<sup>3</sup> *are given in (11), A, B, C*(*αN*:0)*, and D*(*α*0) *are given in (9).*

By this theorem, we can obtain the coefficients *α*0,..., *α<sup>N</sup>* of the optimal FIR filter by semidefinite programming as mentioned in Section 4. MATLAB codes for the semidefinite programming are shown in Section 7.

#### **7. MATLAB codes for semidefinite programming**

In this section, we give MATLAB codes for the semidefinite programming derived in previous sections. Note that the MATLAB codes for solving **Problems 1** to **4** are also available at the following web site:

```
http://www-ics.acs.i.kyoto-u.ac.jp/~nagahara/fir/
```
Note also that to execute the codes in this section, Control System Toolbox (Mathworks, 2010), YALMIP (Löfberg, 2004), and SeDuMi (Sturm, 2001) are needed. YALMIP and SeDuMi are free softwares for solving optimization problems including semidefinite programming which is treated in this chapter.

#### **7.1 FIR approximation of IIR filters by** *H*<sup>∞</sup> **norm**

```
function [q,gmin] = approxFIRhinf(P,W,N);
% [q,gmin]=approxFIRhinf(P,W) computes the
% H-infinity optimal approximated FIR filter Q(z) which minimizes
% J(Q) = ||(P-Q)W||,
% the maximum frequency gain of (P-Q)W.
% This design uses SDP via the KYP lemma.
%
% Inputs:
% P: Target stable linear system in SS object
% W: Weighting stable linear system in SS object
% N: Order of the FIR filter to be designed
%
% Outputs:
% q: The optimal FIR filter coefficients
% gmin: The optimal value
%
```
% H-infinity optimal (delayed) inverse FIR filter Q(z) which minimizes

Min-Max Design of FIR Digital Filters by Semidefinite Programming 205

% J(Q) = ||(QP-z^(-n))W||,

% gmin: The optimal value

[A1,B1,C1,D1]=ssdata(T1); [A2,B2,C2,D2]=ssdata(T2);

%% FIR filter to be designed Aq = circshift(eye(N),-1);

%% Semidefinite Programming

A = [A1, zeros(n1,n2), zeros(n1,N); zeros(n2,n1), A2, zeros(n2,N);

zeros(N,n1),Bq\*C2, Aq];

X = sdpvar(NN,NN,'symmetric');

alpha\_N1 = sdpvar(1,N); alpha\_0 = sdpvar(1,1); gamma = sdpvar(1,1);

Bq = [zeros(N-1,1);1];

B = [B1;B2;Bq\*D2];

NN = size(A,1);

%

%

%

end

% Inputs:

% Outputs:

if nargin==3 n=0

T2 = P\*W;

%% Initialization z = tf('z'); T1 = -z^(-n)\*W;

n1 = size(A1,1); n2 = size(A2,1);

Aq(N,1) = 0;

% the maximum frequency gain of (QP-z^(-n))W. % This design uses SDP via the KYP lemma.

% P: Target stable linear system in SS object % W: Weighting stable linear system in SS object % N: Order of the FIR filter to be designed

% q: The optimal FIR filter coefficients

% n: Delay (this can be omitted; default value=0);

```
%% Initialization
T1 = P*W;
T2 = -W;
[A1,B1,C1,D1]=ssdata(T1);
[A2,B2,C2,D2]=ssdata(T2);
n1 = size(A1,1);
n2 = size(A2,1);
%% FIR filter to be designed
Aq = circshift(eye(N),-1);
Aq(N,1) = 0;
Bq = [zeros(N-1,1);1];
%% Semidefinite Programming
A = [A1, zeros(n1,n2), zeros(n1,N);
     zeros(n2,n1), A2, zeros(n2,N);
     zeros(N,n1),Bq*C2, Aq];
B = [B1;B2;Bq*D2];
NN = size(A,1);
X = sdpvar(NN,NN,'symmetric');
alpha_N1 = sdpvar(1,N);
alpha_0 = sdpvar(1,1);
gamma = sdpvar(1,1);
M1 = A'*X*A-X;
M2 = A'*X*B;
M3 = B'*X*B-gamma;
C = [C1, alpha_0*C2, alpha_N1];
D = D1 + alpha_0*D2;
M = [M1, M2, C'; M2', M3, D; C, D, -gamma];
F = set(M < 0) + set(X > 0) + set(gamma > 0);
solvesdp(F,gamma);
%% Optimal FIR filter coefficients
q = fliplr([double(alpha_N1),double(alpha_0)]);
gmin = double(gamma);
```
#### **7.2 Inverse FIR filtering by** *H*<sup>∞</sup> **norm**

```
function [q,gmin] = inverseFIRhinf(P,W,N,n);
% [q,gmin]=inverseFIRhinf(P,W,N,n) computes the
```
12 Digital Signal Processing

%% Initialization

n1 = size(A1,1); n2 = size(A2,1);

Aq(N,1) = 0;

[A1,B1,C1,D1]=ssdata(T1); [A2,B2,C2,D2]=ssdata(T2);

%% FIR filter to be designed Aq = circshift(eye(N),-1);

%% Semidefinite Programming

A = [A1, zeros(n1,n2), zeros(n1,N); zeros(n2,n1), A2, zeros(n2,N);

zeros(N,n1),Bq\*C2, Aq];

X = sdpvar(NN,NN,'symmetric');

C = [C1, alpha\_0\*C2, alpha\_N1];

%% Optimal FIR filter coefficients

M = [M1, M2, C'; M2', M3, D; C, D, -gamma];

F = set(M < 0) + set(X > 0) + set(gamma > 0);

q = fliplr([double(alpha\_N1),double(alpha\_0)]);

function [q,gmin] = inverseFIRhinf(P,W,N,n); % [q,gmin]=inverseFIRhinf(P,W,N,n) computes the

alpha\_N1 = sdpvar(1,N); alpha\_0 = sdpvar(1,1); gamma = sdpvar(1,1);

Bq = [zeros(N-1,1);1];

B = [B1;B2;Bq\*D2];

NN = size(A,1);

M1 = A'\*X\*A-X; M2 = A'\*X\*B;

M3 = B'\*X\*B-gamma;

D = D1 + alpha\_0\*D2;

solvesdp(F,gamma);

gmin = double(gamma);

**7.2 Inverse FIR filtering by** *H*<sup>∞</sup> **norm**

T1 = P\*W; T2 = -W;

```
% H-infinity optimal (delayed) inverse FIR filter Q(z) which minimizes
% J(Q) = ||(QP-z^(-n))W||,
% the maximum frequency gain of (QP-z^(-n))W.
% This design uses SDP via the KYP lemma.
%
% Inputs:
% P: Target stable linear system in SS object
% W: Weighting stable linear system in SS object
% N: Order of the FIR filter to be designed
% n: Delay (this can be omitted; default value=0);
%
% Outputs:
% q: The optimal FIR filter coefficients
% gmin: The optimal value
%
if nargin==3
    n=0
end
%% Initialization
z = tf('z');
T1 = -z^(-n)*W;
T2 = P*W;
[A1,B1,C1,D1]=ssdata(T1);
[A2,B2,C2,D2]=ssdata(T2);
n1 = size(A1,1);
n2 = size(A2,1);
%% FIR filter to be designed
Aq = circshift(eye(N),-1);
Aq(N,1) = 0;
Bq = [zeros(N-1,1);1];
%% Semidefinite Programming
A = [A1, zeros(n1,n2), zeros(n1,N);
     zeros(n2,n1), A2, zeros(n2,N);
     zeros(N,n1),Bq*C2, Aq];
B = [B1;B2;Bq*D2];
NN = size(A,1);
X = sdpvar(NN,NN,'symmetric');
alpha_N1 = sdpvar(1,N);
alpha_0 = sdpvar(1,1);
gamma = sdpvar(1,1);
```
B = [B1;-Bq];

NN = size(A,1);

g = sdpvar(1,1);

M3r = B'\*P\*B-g;

solvesdp(F,g);

gmin = double(g);

%

% Inputs:

C = [C1, alpha\_N1]; D = D1 - alpha\_0;

omega0 = (Omega(1)+Omega(2))/2; omegab = (Omega(2)-Omega(1))/2;

P = sdpvar(NN,NN,'symmetric'); Q = sdpvar(NN,NN,'symmetric');

M2r = A'\*P\*B+Q\*B\*cos(omega0);

M21i = -Q\*B\*sin(omega0); M22i = B'\*Q\*sin(omega0);

M = [Mr, Mi; -Mi, Mr];

M1i = A'\*Q\*sin(omega0)-Q\*A\*sin(omega0);

F = set(M < 0) + set(Q > 0) + set(g > 0);

q = fliplr([double(alpha\_N1),double(alpha\_0)]);

function [q,gmin] = inverseFIRff(P,Omega,N,n); % [q,gmin]=inverseFIRff(P,Omega,N,n) computes the

% P: Target stable linear system in SS object % Omega: Frequency band in 1x2 vector [w1,w2] % N: Order of the FIR filter to be designed

Mr = [M1r,M2r,C';M2r',M3r,D;C,D,-1];

%% Optimal FIR filter coefficients

**7.4 Inverse FIR filtering by finite-frequency min-max**

M1r = A'\*P\*A+Q\*A\*cos(omega0)+A'\*Q\*cos(omega0)-P-2\*Q\*cos(omegab);

Min-Max Design of FIR Digital Filters by Semidefinite Programming 207

% Finite-frequency optimal (delayed) inverse FIR filter Q(z) which minimizes

Mi = [M1i, M21i, zeros(NN,1);M22i, 0, 0; zeros(1,NN),0,0];

% J(Q) = max{|Q(exp(jw)P(exp(jw))-exp(-jwn)|, w in Omega}.

% This design uses SDP via the generalized KYP lemma.

% n: Delay (this can be omitted; default value=0);

% the maximum frequency gain of QP-z^(-n) in a frequency band Omega.

alpha\_N1 = sdpvar(1,N); alpha\_0 = sdpvar(1,1);

```
M1 = A'*X*A-X;
M2 = A'*X*B;
M3 = B'*X*B-gamma;
C = [C1, alpha_0*C2, alpha_N1];
D = D1 + alpha_0*D2;
M = [M1, M2, C'; M2', M3, D; C, D, -gamma];
F = set(M < 0) + set(X > 0) + set(gamma > 0);
solvesdp(F,gamma);
%% Optimal FIR filter coefficients
q = fliplr([double(alpha_N1),double(alpha_0)]);
gmin = double(gamma);
```
#### **7.3 FIR approximation of IIR filters by finite-frequency min-max**

```
function [q,gmin] = approxFIRff(P,Omega,N);
% [q,gmin]=approxFIRff(P,Omega,N) computes the
% Finite-frequency optimal approximated FIR filter Q(z)
  which minimizes
% J(Q) = max{|P(exp(jw))-Q(exp(jw))|, w in Omega}l.
% the maximum frequency gain of P-Q in a frequency band Omega.
% This design uses SDP via the generalized KYP lemma.
%
% Inputs:
% P: Target stable linear system in SS object
% Omega: Frequency band in 1x2 vector [w1,w2]
% N: Order of the FIR filter to be designed
%
% Outputs:
% q: The optimal FIR filter coefficients
% gmin: The optimal value
%
%% Initialization
[A1,B1,C1,D1]=ssdata(P);
n1 = size(A1,1);
%% FIR filter to be designed
Aq = circshift(eye(N),-1);
Aq(N,1) = 0;
Bq = [zeros(N-1,1);1];
%% Semidefinite Programming
A = blkdiag(A1,Aq);
```
14 Digital Signal Processing

M1 = A'\*X\*A-X; M2 = A'\*X\*B;

M3 = B'\*X\*B-gamma;

D = D1 + alpha\_0\*D2;

solvesdp(F,gamma);

gmin = double(gamma);

which minimizes

%

%

%

% Inputs:

% Outputs:

%% Initialization

n1 = size(A1,1);

Aq(N,1) = 0;

C = [C1, alpha\_0\*C2, alpha\_N1];

%% Optimal FIR filter coefficients

M = [M1, M2, C'; M2', M3, D; C, D, -gamma];

F = set(M < 0) + set(X > 0) + set(gamma > 0);

q = fliplr([double(alpha\_N1),double(alpha\_0)]);

**7.3 FIR approximation of IIR filters by finite-frequency min-max** function [q,gmin] = approxFIRff(P,Omega,N); % [q,gmin]=approxFIRff(P,Omega,N) computes the

% P: Target stable linear system in SS object % Omega: Frequency band in 1x2 vector [w1,w2] % N: Order of the FIR filter to be designed

% q: The optimal FIR filter coefficients

% gmin: The optimal value

[A1,B1,C1,D1]=ssdata(P);

Bq = [zeros(N-1,1);1];

A = blkdiag(A1,Aq);

%% FIR filter to be designed Aq = circshift(eye(N),-1);

%% Semidefinite Programming

% Finite-frequency optimal approximated FIR filter Q(z)

% the maximum frequency gain of P-Q in a frequency band Omega.

% J(Q) = max{|P(exp(jw))-Q(exp(jw))|, w in Omega}l.

% This design uses SDP via the generalized KYP lemma.

```
B = [B1;-Bq];
NN = size(A,1);
omega0 = (Omega(1)+Omega(2))/2;
omegab = (Omega(2)-Omega(1))/2;
P = sdpvar(NN,NN,'symmetric');
Q = sdpvar(NN,NN,'symmetric');
alpha_N1 = sdpvar(1,N);
alpha_0 = sdpvar(1,1);
g = sdpvar(1,1);
C = [C1, alpha_N1];
D = D1 - alpha_0;
M1r = A'*P*A+Q*A*cos(omega0)+A'*Q*cos(omega0)-P-2*Q*cos(omegab);
M2r = A'*P*B+Q*B*cos(omega0);
M3r = B'*P*B-g;
M1i = A'*Q*sin(omega0)-Q*A*sin(omega0);
M21i = -Q*B*sin(omega0);
M22i = B'*Q*sin(omega0);
Mr = [M1r,M2r,C';M2r',M3r,D;C,D,-1];
Mi = [M1i, M21i, zeros(NN,1);M22i, 0, 0; zeros(1,NN),0,0];
M = [Mr, Mi; -Mi, Mr];
F = set(M < 0) + set(Q > 0) + set(g > 0);
solvesdp(F,g);
%% Optimal FIR filter coefficients
q = fliplr([double(alpha_N1),double(alpha_0)]);
gmin = double(g);
7.4 Inverse FIR filtering by finite-frequency min-max
function [q,gmin] = inverseFIRff(P,Omega,N,n);
% [q,gmin]=inverseFIRff(P,Omega,N,n) computes the
% Finite-frequency optimal (delayed) inverse FIR filter Q(z) which minimizes
% J(Q) = max{|Q(exp(jw)P(exp(jw))-exp(-jwn)|, w in Omega}.
% the maximum frequency gain of QP-z^(-n) in a frequency band Omega.
% This design uses SDP via the generalized KYP lemma.
%
% Inputs:
% P: Target stable linear system in SS object
% Omega: Frequency band in 1x2 vector [w1,w2]
% N: Order of the FIR filter to be designed
```

```
% n: Delay (this can be omitted; default value=0);
```
M1i = A'\*Q\*sin(omega0)-Q\*A\*sin(omega0);

F = set(M < 0) + set(Q > 0) + set(g > 0);

q = fliplr([double(alpha\_N1),double(alpha\_0)]);

in the frequency band [0, *π*/2], *Q*1(*z*) shows the larger error than *Q*2(*z*).

Mi = [M1i, M21i, zeros(NN,1);M22i, 0, 0; zeros(1,NN),0,0];

Min-Max Design of FIR Digital Filters by Semidefinite Programming 209

By the MATLAB codes given in the previous section, we design FIR filters for **Problems 1** and **3**. Let the FIR filter order *N* = 8. The target filter is the second order lowpass Butterworth filter with cutoff frequency *π*/2. This can be computed by butter(2,1/2) in MATLAB. The weighting transfer function in **Problem 1** is chosen by an 8th-order lowpass Chebyshev filter, computed by cheby1(8,1/2,1/2) in MATLAB. The frequency band for **Problem 3** is Ω = [0, *π*/2]. Figure 3 shows the gain of the error *E*(*z*) := *P*(*z*) − *Q*(*z*). We can see that the *H*<sup>∞</sup> optimal filter (the solution of **Problem 1**), say *Q*1(*z*), shows the lower *H*<sup>∞</sup> norm than the finite-frequency min-max design (the solution of **Problem 3**), say *Q*2(*z*). On the other hand,

<sup>0</sup> 0.5 <sup>1</sup> 1.5 <sup>2</sup> 2.5 <sup>3</sup> −110

Fig. 3. The gain of the error *<sup>E</sup>*(*z*) = *<sup>P</sup>*(*z*) <sup>−</sup> *<sup>Q</sup>*(*z*) for *<sup>H</sup>*<sup>∞</sup> optimization (solid) and

Frequency (rad/sec)

π/2

H∞ norm = −34.2 (dB)

H∞ norm = −22.5 (dB)

Mr = [M1r,M2r,C';M2r',M3r,D;C,D,-1];

%% Optimal FIR filter coefficients

−100 −90 −80 −70 −60 −50 −40 −30 −20

−72.4 (dB)

−85.6 (dB)

finite-frequency min-max optimization (dash)

Error (dB)

M21i = -Q\*B\*sin(omega0); M22i = B'\*Q\*sin(omega0);

M = [Mr, Mi; -Mi, Mr];

solvesdp(F,g);

gmin = double(g);

**8. Examples**

```
%
% Outputs:
% q: The optimal FIR filter coefficients
% gmin: The optimal value
%
if nargin==3
    n=0
end
%% Initialization
z = tf('z');
T1 = -z^(-n);
T2 = P;
[A1,B1,C1,D1]=ssdata(T1);
[A2,B2,C2,D2]=ssdata(T2);
n1 = size(A1,1);
n2 = size(A2,1);
%% FIR filter to be designed
Aq = circshift(eye(N),-1);
Aq(N,1) = 0;
Bq = [zeros(N-1,1);1];
%% Semidefinite Programming
A = [A1, zeros(n1,n2), zeros(n1,N);
     zeros(n2,n1), A2, zeros(n2,N);
     zeros(N,n1),Bq*C2, Aq];
B = [B1;B2;Bq*D2];
NN = size(A,1);
omega0 = (Omega(1)+Omega(2))/2;
omegab = (Omega(2)-Omega(1))/2;
P = sdpvar(NN,NN,'symmetric');
Q = sdpvar(NN,NN,'symmetric');
alpha_N1 = sdpvar(1,N);
alpha_0 = sdpvar(1,1);
g = sdpvar(1,1);
C = [C1, alpha_0*C2, alpha_N1];
D = D1 + alpha_0*D2;
M1r = A'*P*A+Q*A*cos(omega0)+A'*Q*cos(omega0)-P-2*Q*cos(omegab);
M2r = A'*P*B+Q*B*cos(omega0);
M3r = B'*P*B-g;
```

```
M1i = A'*Q*sin(omega0)-Q*A*sin(omega0);
M21i = -Q*B*sin(omega0);
M22i = B'*Q*sin(omega0);
Mr = [M1r,M2r,C';M2r',M3r,D;C,D,-1];
Mi = [M1i, M21i, zeros(NN,1);M22i, 0, 0; zeros(1,NN),0,0];
M = [Mr, Mi; -Mi, Mr];
F = set(M < 0) + set(Q > 0) + set(g > 0);
solvesdp(F,g);
%% Optimal FIR filter coefficients
q = fliplr([double(alpha_N1),double(alpha_0)]);
gmin = double(g);
```
#### **8. Examples**

16 Digital Signal Processing

% q: The optimal FIR filter coefficients

% gmin: The optimal value

[A1,B1,C1,D1]=ssdata(T1); [A2,B2,C2,D2]=ssdata(T2);

%% FIR filter to be designed Aq = circshift(eye(N),-1);

%% Semidefinite Programming

A = [A1, zeros(n1,n2), zeros(n1,N); zeros(n2,n1), A2, zeros(n2,N);

zeros(N,n1),Bq\*C2, Aq];

omega0 = (Omega(1)+Omega(2))/2; omegab = (Omega(2)-Omega(1))/2;

P = sdpvar(NN,NN,'symmetric'); Q = sdpvar(NN,NN,'symmetric');

C = [C1, alpha\_0\*C2, alpha\_N1];

M2r = A'\*P\*B+Q\*B\*cos(omega0);

M1r = A'\*P\*A+Q\*A\*cos(omega0)+A'\*Q\*cos(omega0)-P-2\*Q\*cos(omegab);

alpha\_N1 = sdpvar(1,N); alpha\_0 = sdpvar(1,1);

Bq = [zeros(N-1,1);1];

B = [B1;B2;Bq\*D2];

NN = size(A,1);

g = sdpvar(1,1);

M3r = B'\*P\*B-g;

D = D1 + alpha\_0\*D2;

%

%

end

T2 = P;

% Outputs:

if nargin==3 n=0

%% Initialization z = tf('z'); T1 = -z^(-n);

n1 = size(A1,1); n2 = size(A2,1);

Aq(N,1) = 0;

By the MATLAB codes given in the previous section, we design FIR filters for **Problems 1** and **3**. Let the FIR filter order *N* = 8. The target filter is the second order lowpass Butterworth filter with cutoff frequency *π*/2. This can be computed by butter(2,1/2) in MATLAB. The weighting transfer function in **Problem 1** is chosen by an 8th-order lowpass Chebyshev filter, computed by cheby1(8,1/2,1/2) in MATLAB. The frequency band for **Problem 3** is Ω = [0, *π*/2]. Figure 3 shows the gain of the error *E*(*z*) := *P*(*z*) − *Q*(*z*). We can see that the *H*<sup>∞</sup> optimal filter (the solution of **Problem 1**), say *Q*1(*z*), shows the lower *H*<sup>∞</sup> norm than the finite-frequency 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*).

Fig. 3. The gain of the error *<sup>E</sup>*(*z*) = *<sup>P</sup>*(*z*) <sup>−</sup> *<sup>Q</sup>*(*z*) for *<sup>H</sup>*<sup>∞</sup> optimization (solid) and finite-frequency min-max optimization (dash)

**11** 

*Japan* 

Baba Tatsuro

*Toshiba Medical Systems Corporation* 

**Complex Digital Filter Designs for Audio** 

**Processing in Doppler Ultrasound System** 

A medical Doppler ultrasound system has a spectrum display that indicates the blood flow direction, whether the blood flows forward or away from a probe. It also has Doppler audio outputs. In particular, the latter is a special process peculiar to the Doppler ultrasound system and separates the blood flow direction and outputs from the left and right speakers. Owing to this function, the existence of a blood flow is quickly detectable. When changing conventional analog signal-processing into digital signal-processing, we researched many processing systems of Doppler audio. First, target performances, such as a response time and direction separation, were set up, and six kinds of digital signal-processing systems were examined. Further, we investigated some new anti-aliasing processing systems unique to Doppler ultrasound system. We compared three kinds of anti-aliasing processing systems. Consequently, we clarified that a complex IIR (infinite impulse response) filter

**2. Outline of Doppler ultrasound system and conventional analog signal-**

Recently, the diagnostic ultrasound system has been popular in many diagnostic fields, such as cardiac, abdomen, and so on. In Section 2.1, an example of diagnostic image and its principle are introduced. In Section 2.2, the phase shift system that is an example of

An example of diagnostic image of a carotid artery is shown in Fig. 1. The upper is a tomogram image and bottom is a spectrum Doppler image. This image expresses the time change of the flow velocity in the PWD (Pulse Wave Doppler) range gate set up in the central of a blood vessel in a tomogram. A horizontal axis and a vertical axis are the flow

Signal processing of the ultrasound echo signal is shown in Fig. 2. An ultrasonic wave is transmitted for every cycle of PRF (pulse repetition frequency: *fs*) in the transceiver processing part of Fig. 2(a), and a reflective echo is received. An ultrasonic beam is scanned in the transverse direction, and envelope detection of the received signal is carried out in the

system has an excellent response and a low calculation load.

**2.1 Outline of Doppler ultrasound system** 

representation of conventional analog signal-processing is introduced.

velocities corresponding to Doppler shift frequency and time, respectively.

range direction. This scanning constitutes the tomogram image.

**1. Introduction** 

**processing** 

#### **9. Conclusion**

In this chapter, we consider four problems, FIR approximation and inverse FIR filtering of FIR/IIR filters by *H*<sup>∞</sup> and finite-frequency min-max, which are fundamental in signal processing. By using the 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.

#### **10. References**


Mathworks (2010). *Control System Toolbox Users Guide*. URL: *http://www.mathworks.com/products/control/*

