Digital filters find their applications in different areas. One area is power system protection where measurement systems involve faulted signals associated with DC decaying signals, harmonic and sub-harmonic components. To eliminate these unwanted components, a digital filter design based on multi-objective optimization technique to satisfy different specifications such as high speed response for a real-time application and frequency domain requirements.

### Digital filtering approach

A digital filter based solution is proposed to remove unwanted disturbances using digital filter design techniques. The filter time response must be included in the requirements. The present filtering application imposes different kind of specifications. On one hand, the time domain requirement where both a high speed and accurate system response are needed. On the other hand, the frequency domain requirements (DC, sub-synchronous and harmonic components elimination) which are the magnitude response within small bandwidth including sharp frequency edges as well as an approximately constant group delay in this band are required too. Usually the best optimum value of all the objective functions of this filter design can be obtained for some values of design variables. A compromise or a trade-off between the objective functions must be made to achieve a satisfactory filter design.

The considered recursive digital filter must satisfy three multi-objective functions. These functions are: 1) meet a specified or a desired magnitude response specification; 2) an approximately constant group delay; and 3) a minimum time response or settling time which involves a minimum phase or a group delay. The optimization approach considers the discrete-time transfer function which is formulated on the basis of some desired amplitude response and a stability margin parameter. A norm of the weighted error function is then minimized with respect to the transfer-function coefficients with a prescribed maximum pole radius referred to as stability margin. The stability margin parameter is varied to optimize the filter coefficients which minimizes mainly the magnitude response, satisfies the best approximately constant group delay and the lowest group delay that leads to minimum settling time or time delay of the system dynamic response.

### Filter transfer functions

In the general case an IIR filter can be described by its discrete-time difference equation

y\left[n\right]+{\displaystyle \sum _{i=1}^{2N-1}{c}_{i}y\left[n-1\right]}={\displaystyle \sum _{j=0}^{2M}{d}_{j}x\left[n-j\right]}

(1)

Where x[n] and y[n] are discrete-time input and output signals. Equation (1) can be transformed into the Z-domain and assuming c_{i} and d_{i} are real coefficients a second order form transfer function can be obtained, having 2 M conjugate zeros and 2 N conjugate poles; called second order sections (SOS), as:

H\left(z\right)={H}_{0}\frac{{\displaystyle {\prod}_{j=1}^{2M}{a}_{0j}+{a}_{1j}z+{z}^{2}}}{{\displaystyle {\prod}_{j=1}^{2N}{b}_{0j}+{b}_{1j}z+{z}^{2}}}

(2)

Where a_{ii} and b_{jj} are real coefficients and H_{0} is a positive multiplier constant. The polar formulation is also useful and is written as:

H\left(z\right)={H}_{0}\frac{{\displaystyle {\prod}_{j=1}^{2M}\left(z-{r}_{\mathit{aj}}{e}^{j{\theta}_{\mathit{aj}}}\right)\left(z-{r}_{\mathit{aj}}{e}^{-j{\theta}_{\mathit{aj}}}\right)}}{{\displaystyle {\prod}_{j=1}^{2N}\left(z-{r}_{\mathit{bj}}{e}^{j{\theta}_{\mathit{bj}}}\right)\left(z-{r}_{\mathit{bj}}{e}^{-j{\theta}_{\mathit{bj}}}\right)}}

(3)

Where r_{aj}, θ_{aj} and r_{bj},θ_{bj} are the radii and angles of the zeros and poles, respectively.

### Filter stability margin

As the poles are moved toward the origin (decreasing the pole radius), the system stability margin parameter increases and the system settling time decreases. This action, in fact, brings two required and important properties to the designed system. First, the system time or dynamic response is enhanced as settling time is decreased. Second, the system stability becomes more robust which is a very useful property, particularly in practical implementation. Indeed, the rounding or truncation of the filter coefficients may lead to an unstable implementation if the stability margin is too small. It is therefore desirable to approximate a given response by a transfer function with a prescribed maximum pole radius named stability margin as shown in Figure 1.

### Magnitude response objective function

The amplitude and the phase responses of a recursive filter is given by

M\left(x,\omega \right)=\left|H\left({e}^{\mathit{j\omega t}}\right)\right|,\phi \left(x,\omega \right)=arg\left(H\left({e}^{\mathit{j\omega t}}\right)\right)

(4)

Where ω is the frequency and x is a column vector with 2 M + 2 N + 1 elements and depend on the used formulation, that is a Cartesian form as

x=\left[{a}_{01}{a}_{11}{a}_{21}{b}_{01}{b}_{11}{b}_{21}\dots {b}_{2M}{H}_{0}\right]

(5)

Or in polar form as

x=\left[{\rho}_{a}{\rho}_{b}{H}_{0}\right]

(6)

Where

{\rho}_{a}=\left[{r}_{a1},{\theta}_{a1},\dots ,{r}_{\mathit{aM}},{\theta}_{\mathit{aM}}\right]

(7)

And

{\rho}_{b}=\left[{r}_{b1},{\theta}_{b1},\dots ,{r}_{\mathit{bN}},{\theta}_{\mathit{bM}}\right]

(8)

The superscript T denotes the transpose operation. An approximation error can be formulated as the difference between the actual amplitude response M(x, *ω*) and the desired amplitude or magnitude response *Μ*
_{
d
}(*ω*) as:

\mathrm{e}\left(\mathrm{x}\right)=\mathrm{M}\left(\mathrm{x},\omega \right)\u2012{{\rm M}}_{d}\left(\omega \right)

(9)

By sampling the error function e(x,ω_{i}), the actual and the desired amplitude responses M(x,ω_{i}) and M_{d}(ω) at frequencies: ω_{1}, ω_{2}, …, ω_{k}, the column error vector is constructed as:

\left[E\left(x\right)\right]={\left[{e}_{1}\left(x\right),{e}_{2}\left(x\right),\cdots ,{e}_{k}\left(x\right)\right]}^{T}

(10)

Where *e*
_{
i
}(*x*) = *M*(*x*, *ω*
_{
i
}) − *M*
_{
d
}(*ω*
_{
i
}) and {*ω*
_{
i
} : *i* = 1, 2, ⋯ *k*} is a dense set of frequencies which are distributed over in the pass-band and stop-band of the filter. A weighting or penalty error is included to control portions of the actual filter response curve that are most important to the filter response. This involves modifying the error to the form:

{\overline{e}}_{i}\left(x\right)=W\left(\omega \right)\phantom{\rule{0.32em}{0ex}}\left(M\left(x,{\omega}_{i}\right)-{M}_{d}\left({\omega}_{i}\right)\phantom{\rule{0.1em}{0ex}}\right)

(11)

Where *W*(*ω*) is a weighting piece wise constant function over all frequency space, which is assigned a positive value greater than one or less than one to increase or decrease the magnitude approximation in a given band.

A recursive filter can be designed by finding a point x=\widehat{x} in (11) such that

{\overline{e}}_{i}\left(x\right)\approx 0\phantom{\rule{0.12em}{0ex}}\mathrm{for}\phantom{\rule{0.24em}{0ex}}i=1,2,\cdots k

(12)

Such a point can be obtained when solving the optimization problem by minimizing the error function {\overline{e}}_{i}\left(x\right). The design of a recursive filter that approaches a specified response *M*
_{
d
}(*ω*
_{
i
}), can be performed by minimizing the error objective function in terms of Lp norm error which is formulated as:

\phantom{\rule{1em}{0ex}}\underset{x}{{\displaystyle min}}\phantom{\rule{1em}{0ex}}\mu \left(x\right)

(13)

Subject to *r*
_{
aj
} ≤ 1 − *δ*

Where

\mu \left(x\right)\phantom{\rule{0.5em}{0ex}}=\phantom{\rule{0.5em}{0ex}}{e}_{max}\left(x\right){\displaystyle \sum _{i=1}^{l}{W}_{i}\left(\omega \right)}{\left\{{\left[\frac{\left|{e}_{i}\left(x\right)\right|}{{e}_{max}\left(x\right)}\right]}^{\phantom{\rule{0.12em}{0ex}}p}\right\}}^{\frac{1}{p}}

(14)

And

{e}_{max}\left(x\right)=\underset{1\le i\le l}{max}\phantom{\rule{0.5em}{0ex}}\left({e}_{i}\left(x\right)\right)

The p is a positive integer. The spiral technique is used to minimize *μ*(*x*) for increasing values of p.

### Group-delay objective function

The group delay is derived from the phase relation, as given in equation (4), and is defined as:

\tau \left(x,\omega \right)\phantom{\rule{0.1em}{0ex}}=-\frac{\mathit{d\phi}\left(x,\omega \right)}{\mathit{d\omega}}

(15)

Where *φ*(*x*, *ω*) is the phase response of the filter, and stated as

\phi \left(x,\omega \right)\phantom{\rule{0.1em}{0ex}}=\phantom{\rule{0.1em}{0ex}}arg\left(H\left({e}^{\mathit{j\omega T}}\right)\right)

(16)

The group delay for a synthesized recursive filter is desired to be unchanged in the considered region on one hand. On the other hand, a minimum group delay is another required property needed in certain applications. In the present design, a constant group delay property is considered which is defined as:

\tau \left(x,{\omega}_{i}\right)={\tau}_{c}\phantom{\rule{0.12em}{0ex}}\mathrm{for}\phantom{\rule{0.24em}{0ex}}{\omega}_{i}\in {\omega}_{p}\phantom{\rule{0.12em}{0ex}}

(17)

Where *τ*
_{
c
} is constant, and *ω*
_{
p
} is the passband regions of the filter. In the present application *τ*
_{
c
} is an unknown but can be considered as the mean value over the passband region, which can be determined as:

{\tau}_{c,m}=\frac{1}{{n}_{k}}{\displaystyle \sum _{i=1}^{{n}_{k}}\tau \left({\overline{x}}_{m},{\omega}_{i}\right)}\phantom{\rule{0.12em}{0ex}}\mathrm{for}\phantom{\rule{0.12em}{0ex}}{\omega}_{i}\in {\omega}_{p}

(18)

Where {\overline{x}}_{m} is the optimal filter coefficient determined by minimizing the magnitude objective function for an m-th stability margin parameter.

The stability margin parameter is varied for discrete values, from which an optimal constant group delay is determined by minimizing the following objective error function:

\underset{m}{min}{E}_{\tau}\left(m\right)=\frac{1}{{\tau}_{c,m}}{\displaystyle \sum _{i=1}^{{n}_{k}}\left(\tau \left({\overline{x}}_{m},{\omega}_{i}\right)-{\tau}_{c,m}\right)}\phantom{\rule{0.12em}{0ex}}\mathrm{for}\phantom{\rule{0.12em}{0ex}}{\omega}_{i}\in {\omega}_{p}

(19)

The multi-objective optimization problem is solved by discretizing the stability margin parameter, the magnitude optimization algorithm is used to generate the corresponding filter coefficients’, in which basis the group delay is synthesized where a feasible and optimal solution can be obtained by minimizing the objective function (19).

The final multiobjective design is obtained by minimizing the sum combination of the errors in equations (14) and (19).