scieee AI-readable full text Open interactive document viewer

Efficient implementation with FIR filters of operators based on B-splines to represent and classify signals of one and two dimensions

Ferrer Arnau, Luis Jorge,Parisi Baradad, Vicenç

Full text

2012 Barcelona Forum on Ph.D. Research in Information and Communication Technology 1 Efficient implementation with FIR filters of operators based on B-splines to represent and classify signals of one and two dimensions Author: Lluís Ferrer-Arnau, Thesis Advisor: Vicenç Parisi-Baradad contact email: [email protected] I. Introduction Digital signals have a lot of advantages: facility in storage, compression, easy to operate numerically, but they have disadvantages, too. For example, operations relative to differential calculus like derivatives, integration, etc., are not well defined. In this thesis a way to solve this problem is presented. First, digital signals are converted into a continuous signal using polynomial spline interpolation, and then, the derivatives and others operators are calculated in the same way as in the continuous signals. Another main objective is to find the most efficient way to implement these operators with digital FIR filters. The splines are curves or functions defined piecewise by polynomials of different degrees. The splines of order 1 are straight lines that connect the different samples. The junction points of the polynomial are called knots and at this point the splines have the characteristic of having continuity in the curve as well as in derivatives up to one order less than the spline. For example with cubic splines the continuity in the knots of polynomials is insured up to the second derivative. In Fig.1 it’s shown an example of interpolation with linear splines. Fig. 2 shows the same points but interpolated with cubic splines. As it can be seen with cubic splines a curve much smoother than with linear splines is achieved. In the case of cubic splines, to find each coefficient of each spline polynomial is necessary to solve a system of three equations per point to interpolate. In this thesis we proposed to solve this by applying a digital FIR filter. One of the first reference works on the spline is [1]. At first, it was applied in the field of graphic design and basically to define continuous curves, interpolating or approximating specific points, without needing that these points be evenly spaced. It was in early 1990's when Michael Unser, professor and director of research group "Biomedical Imaging group" of the Federal Polytechnic School of Lausanne, who developed much of the mathematical theory to apply B-splines in signal processing [2], [3]. This imply to have equidistant samples and normalized period (T=1). The B-spline function of order zero is a rectangle defined in the real domain between [-0.5 and +0.5]. The B-spline of order n is a function that has compact support and can be generated by convolving the B- spline of order zero n+1 times with itself. Any polynomial spline can be represented by a linear combination of B- spline functions displaced. In figures 3 and 4 the B- splines functions of order 0, 1, 2 and 3 respectively are shown. Figure 3. B-spline of order 0 (left), and order 1 (right). Figure 4. B-spline of order 2 (left), and order 3 (right). II. Methodology applied Spline interpolation needs to solve a large set of equations. In this thesis we show how to implement operators based on B-splines using digital FIR filters. As an example of magnitude, interpolating 16 samples would involve solving a linear system of 48 equations, and interpolating 100 samples implies solving a system of 300 equations. In this paper we have solved this equation system for different numbers of samples, and experimentally, by simple observation, we have concluded that the polynomial coefficients can be calculated using the discrete convolution between the Figure 1. Example of interpolation with linear splines. Figure 2. Example of interpolation with cubic splines. samples and coefficients that can be represented perfectly by an anticausal FIR filter. The inverse matrix method was used to solve the equation system. To find the stability of the solution the equation system has been solved for different numbers of samples. Table I shows the result of the filter coefficients to calculate the first derivative with cubic splines in periodic form, interpolating between 16 and 32 samples respectively. In this thesis we apply this method of solving the corresponding equation system to find the most efficient implementation with FIR filters of the different operators based on B-splines. Another objective is to detect the exact localization of the singulars points of a signal, which typically are associated with the maximums of the first derivative or the zero crossings of the second derivative. These points may not match the sampling points. To avoid the high frequency components of the signal, first it’s necessary to filter the signal. In this thesis we proposed to use the B-spline function to filter and to calculate the derivatives. In Fig. 5 is shown a B- spline of order 4 and its first derivative, formed with B- splines of order 3, and its second derivative, formed with B-splines of order 2. III. Results, conclusions and applications In this work we propose a procedure to obtain a temporal and frequency representation of the operators that are applied to calculate the derivatives of different orders of discrete signals, based on cubic splines. In Fig. 8 the continuous representation of the first derivative of the discrete signal of the Fig. 6, calculated using filters based on cubic splines, is shown. We also propose [4] a way of obtaining the FIR approximation of the cubic spline interpolator. By using only 10 coefficients (10 additions and 5 multiplications), the accuracy is as high as 99.9 %. One of the many applications of converting a discrete signal into a continuous signal is to be able to calculate the exact frequency of a signal by determining its zero crossings. These operations are usually needed in a lot of fields, like power quality measurements, nonintrusive load monitoring, etc. Figure 6. Example of discrete signal obtained by sampling a continuous sine wave of 50 Hz. The sampling frequency is 400 Hz. Figure 7. Continuous signal obtained by interpolating with cubic splines the discrete signal of Fig. 6. In this continuous representation is possible to determinate the exact zero crossings and the exact frequency. Figure 8. The continuous representation of the first derivative of the discrete signal of the Fig. 6. IV. References [1] C. de Boor, A practical guide to splines. New York: Springer-Verlag, 1978. [2] M. Unser, A. Aldroubi and M. Eden, "B-spline signal processing: Part I-theory," IEEE Trans. Signal Processing, vol. 41, no. 2, pp. 821-833, 1993. [3] M. Unser, A. Aldroubi and M. Eden, "B-spline signal processing: Part II-efficient design and applications," IEEE Trans. Signal Processing, vol. 41, no. 2, pp. 834-848, 1993. [4] Ll. Ferrer-Arnau, R. Reig-Bolaño, P. Marti-Puig, A. Manjabacas, V. Parisi-Baradad, “Efficient cubic spline interpolation implemented with FIR filters”, International Journal of Computer Information Systems and Industrial Management Applications. ISSN 2150-7988, vol. 5, pp. 098-105, 2012 with16knots with32knots k=0 0 0 k=+/‐1+/‐0,80384757 0,803847577 k=+/‐2‐/+ ‐0,21539028 ‐0,215390309 k=+/‐3+/‐0,057713549 0,057713659 k=+/‐4‐/+ ‐0,015463918 ‐0,015464328 k=+/‐5+/‐0,004142121 0,004143654 k=+/‐6‐/+ ‐0,001104566 ‐0,001110289 k=+/‐7+/‐0,000276141 0,000297501 Table I. Coefficients of the first derivative operator based on cubic splines. Figure 5. B-spline of order 4 and its first derivative (top right of the figure), and its second derivative (bottom right of the figure).