Efficient Design of Digital FIR Differentiator using L 1-Method

In this paper, an efficient design of FIR digital differentiator using the L1-optimality criterion is proposed. We present a technique based on the modified Newton method to solve the design problem so that the optimal differentiator coefficients are obtained by minimizing the absolute error. The novel L1-error function leads to a flat response at low-frequencies. Extensive simulations are carried out to validate the proposed design. The superiority of the proposed design is evident by comparing it with other conventional design techniques such as, windowing, minimax and the least-squares approach.


Introduction
In recent years, design of digital differentiator has emerged as an important research area in the field of signal processing.Digital differentiators are used to extract information about rapid transients by computing the time derivatives of the signal.Digital differentiators are broadly applied in the field of radar and sonar applications [1], robotics and control engineering [2], [3], communication systems [4], biomedical signal processing [5], speech and image processing [6] and seismic systems [7].With these wide range of applications, the design of digital differentiators are extensively researched over a few decades.
The prevalent approaches to design digital differentiator are based on different interpolation and system approximation based techniques [8][9][10][11][12][13][14][15] and optimization based techniques [16][17][18][19][20][21].The design of digital differentiator based on system approximation is a four-step process.First, define a desired frequency response of the digital differentiator.Second, select the type of system (either (N − 1)th order FIR or IIR).Third, develop an optimality criterion in order to approximate the ideal response.In this work, the L 1 opti-mality criterion is adopted.Lastly, establish an analytical computational method to compute the optimal differentiator.In this paper, mathematical modelling for the design of the digital differentiator based on the type-4 FIR filter approximation using the L 1 -method is proposed.The FIR filter is considered due to its inherent stability and linear phase characteristics.The L 1 approach computes the L 1 -norm of the approximation function.The motivation of implementing the L 1 -method for the differentiator design, is due to its ability to produce the flattest response that approaches to the ideal one.The L 1 differentiator design is collated with other design techniques, namely windowing method, minimax design and the least-squares approach.The novelty of the presented paper is the integration of procured minimum absolute magnitude error and flatness in response using the L 1 method.
The rest of the paper is organized as follows.The problem formulation of L 1 differentiators is introduced in Sec. 2. In Sec. 3, mathematical modelling of the L 1 -algorithm for the design of type-4 FIR digital differentiator is described.The results obtained are pictured and analyzed in Sec. 4. Finally in Sec. 5, the proposed design is concluded with the advantageous observations.

Digital Differentiator Design Problem
The frequency response of the ideal (N − 1)th order digital differentiator is given by where sgn(ω) gives the Signum result of ω.The ideal differentiator is approximated to the (N − 1)th order FIR filter with impulse response {h(k), 0 ≤ k ≤ N − 1} in order to design a digital differentiator.
The frequency response of the (N −1)th order FIR filter to be designed is given by (2) Since the frequency response of the digital differentiator, H id (ω), is purely imaginary and odd, the coefficients will be antisymmetric {h(k) = −h(N − 1 − k)}.This implies that either a type-3 or a type-4 FIR filter can be used for designing of digital differentiator.In this paper, design of type-4 FIR digital differentiator is considered.The frequency response of type-4 FIR filter is given by where M = N/2 and d(k) = 2h(M − k), 1 ≤ k ≤ M are the filter coefficients.The absolute response is defined as With this type of filter the differentiator can be designed for the complete frequency range, since it has a zero at ω = 0 only.In order to obtain the digital differentiator, H id (ω), with the desired specifications, it is required to design the FIR filter by determining the optimal filter coefficients and approximating it with the ideal differentiator.An objective function in terms of the error between the ideal frequency response and the FIR filter response is developed.For this purpose, the absolute weighted error is minimized to obtain a set of optimized coefficients.The L 1 weighted error function is defined as where E(ω) = H id (ω) − H (ω) and W (ω) is the non-negative weighted function.For type-4 differentiator, the fitness function is written as In this paper, the problem is to compute the filter coefficients, d(k) on the minimization of the fitness function defined in (6).

Mathematical Framework for the Design of L 1 Differentiator
The L 1 algorithm developed for the design of FIR linear phase filters [22][23][24][25], is successful in optimizing the type-1 FIR filter coefficients and the designed filter yields a smallest overshoot around the discontinuity along with flattest response in the passband as compared to least-square, minimax and window technique.The L 1 algorithm for the design of (N − 1)th order type-4 FIR differentiator with antisymmetric coefficients is described in this section.
The algorithm demands for the evaluation of first and second order derivative of the error function defined in (6).The nth component of gradient (first-order derivative) at d is given by g n (d) = cos(nω), sgn(ε) (7) where sgn(ε) gives the Signum result of the function ε.
The second order derivative of the error function, known as the Hessian matrix is computed over the entire digital frequency.It takes one of the three forms according to the number of zeros, {z 1 , . . ., z t } of ε and is given by [22] where R is a t × M matrix with R mn = sin(nz m ) and z m denotes the zero of the error function ε, at the m-th position.Also and S = diag{s 1 , . . ., The modified Newton method generates a sequence of coefficients, d k , with number of iterations and v k is the Newton direction, given by It is assumed to be a descent direction.Here, g k is the gradient of error function at d k , α k is the step size and H k is the Hessian matrix of ε at the kth iteration.In order to solve v k , the descent direction involves the solution of the linear equations with M unknowns (the length of v k ).To reduce these computations, the special structure of the matrix H k in ( 8) is exploited based on the number of zeros of ε.The process flow chart is pictured in Fig. 1.The steps for the design of type-4 FIR differentiator based on L 1 criterion are summarized as: Step 1: Design the ideal frequency response of type-4 digital differentiator, defined in (1).Set M = N/2.
where z m is given by ( 9).This choice of initial solution vector is found to be optimal, verified by simulations.
Step 3: Determine the Hessian matrix H k (second order derivative of error function) of size M × M, based on the value of t, where t represents the number of zeros of ε and the zeros are considered to be simple [22].
(i) If t = 0 or some zeros are not simple, then set Hessian matrix as identity matrix, H = I.Otherwise, compute the diagonal matrix, S k .
(ii) To ensure that the constructed matrix, H k is positive definite, it is required the minimal distance between the zeros is beyond the threshold, µ.Moreover, to guarantee global convergence, the elements of diagonal matrix, S k is bounded by thresholds, δ 1 and δ 2 .Thus, if s min < δ 1 or δ 2 < s max , then set H = I.Otherwise, compute the matrix R k .
(iii) If t ≥ M, δ 1 ≤ s min , s max ≤ δ 2 and µ < min p,q, p q | cos(z p ) − cos(z q )|, then set Step 4: Determine the descent direction v k , a set of linear equations defined in (11), that obtains the unique solution and reduces the computational complexity by using the special structure of matrix H k .
Step 5: Algorithm stops if |(v k ) T g k | is less than the given threshold, ξ.
Step 6: Calculate step-size, α k according to the Armijo rule [22], to guarantee sufficient decrease of ε at the kth iteration.
Step 7: Update coefficients, set Step 8: The M coefficients are stored and the frequency response of designed (N − 1)th order type-4 FIR differentiator is calculated.

Design Examples
The extensive experimental studies are carried out using MATLAB with different orders digital differentiators.The applicability of the proposed design algorithm is demonstrated by three examples, 5th, 7th and 9th order differentiators.
The L 1 -method is formulated using the fact that the L 1 -error function is certainly differentiable and this modified Newton method is developed for computing the differentiator coefficients [22].The zeros of the differentiable L 1 -error function are replaced with a different set of zeros at each iteration in order to decrease the error.The method is build with some set of constants called the control parameters.Chosen values of these parameters are: = 10 −6 , σ = 10 −3 , β = 0.5, δ 1 = 10 −15 , δ 2 = 10 15 and µ = 10 −10 .For simplicity, W (ω) is set to 1.The coefficients of designed digital differentiator using the L 1 -method is listed in Tab. 1. Figure 2 shows the comparison of magnitude response of the 5th order digital differentiator designed using the window technique, minimax method, least-squares design and the proposed L 1 -method.It is remarked from Fig. 2, that the proposed differentiator based on L 1 -method outperforms all other employed techniques.In order to study the effect of order on the design methods, similar plots are shown in Figures 5 and 8 for 7th and 9th order, respectively.It can be stated that with the increase in order, the response of the differentiator is improved at higher frequencies also.
The absolute magnitude error for the 5th, 7th and 9th order differentiator using all the reported methods is depicted in Figs. 3, 6 and 9, respectively.It can be seen from all the curves, that over a wide range of frequency, the proposed L 1 -based differentiator exhibits least error.The absolute magnitude error for all design techniques are reported in Tab. 2, for the 5th, 7th and 9th order differentiators.The pole-zero plot guarantees the stability of the proposed differentiators with all poles inside the unit circle.Based on the observations, it is summarized that the proposed algorithm converges to the optimal solution for the digital differentiator design problem which depends on the initial values of the solution set.The designed FIR differentiator is stable as the location of all the poles are at origin.Furthermore, the properties of uniqueness, flattest response and differentiability of the fitness function, enhance the applicability of the proposed method for differentiator design problem.

Conclusion
This paper deals with the efficient design of FIR Digital differentiator using the L 1 -method.The algorithm is based on the modified Newton method and is applied to compute the optimal coefficients on account of minimizing the absolute L 1 -error.The results obtained clearly demonstrate the effective performance of the proposed method over the window technique, the minimax method and the least-squares approach design.It is concluded that, the L 1 -based differentiator yield the flattest response over a wide frequency band with a unique solution and least absolute magnitude error.The proposed differentiator may be applied in the applications such as detection of edges in images, reading seismic data and prediction of earthquakes, detecting peaks in ECG signals, etc.As a future avenue of research, the design of half-band differentiator will be an interesting problem to be considered.
Figures 4, 7 and 10 demonstrates the pole-zero plot for the 5th, 7th and 9th order digital FIR differentiators, respectively.
Fig. 7.Pole-zero plot for 7th order FIR digital differentiator designed using L 1 -method.
7.Pole-zero plot for 7th order FIR digital differentiator designed using L 1 -method.