Abstract
In this paper a simple method of the fractional-order linear digital filter response calculation is proposed. The fractional-order linear digital filter description is based on the fractional-order linear time-invariant difference equation and related fractional-order discrete transfer function.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
Digital filters (DF) are a very important part of digital signal processing [1]. It refers to signals varying with time (considered further as 1D signals) as well as varying in space (considered further as 2D signals).The mentioned signals usually include errors due to different reasons from which one can mention the imperfection of measuring devices or sensors so the separation of the signal from the errors is necessary. In 1D signals case many different synthesis methods of DFs are developed [2, 3]. Similar methods are used to filter 2D signals represented mainly by digital images [4–6]. The mentioned techniques base on the classical calculus in the discrete version, where derivatives are replaced by differences and integrals by sums. In 1D, as well as in 2D DF description, the discrete convolution is used.
Successful applications of the fractional calculus [7–11] in the era of universal digitalization cause the expansion of discrete applications in various fields of science and technology. A substitution of the left fractional-order derivative by a fractional-order backward difference (FOBD) leads to the fractional-order (FO) difference equation (DE) [12]. In the linear time-invariant FODE case one can evaluate the FO discrete transfer function (FODTF). Such FODEs and FODTFs will be used in the 1D and 2D FODFs description.
The main result of the paper is the simplicity of mentioned filters outputs evaluation by Matlab. No specialized toolbox is needed. First, the 1D-FODF is synthetised and applied to filter the measured real signal. The signal filtration effects are shown via their discrete frequency characteristics. Then, it is shown that the 1D-FODF is helpful in FO image filtering. 2D-FODF characterised by multidirectional mask supported by 1D-FODF may be useful in the discrete image filtering. An immense progress in the digital processors calculation abilities proves that one can cross the usually used \(3 \times 3\) and \(5 \times 5\) masks in the pixel convolution evaluation [13]. A supplementary advantage of the paper is the indication that there is an additional possibility to shape the FODF frequency characteristics by releasing integer orders. Supplementary order coeffcients lead to better filtration effects.
The paper is organised as follows. In Sect. 2 fundamental notions related to the FOBD, coefficients function \(a^{(\mu )}(k)\) of one discrete-variable k, FODE and FOTF are given. Section 3 contains a proposal of the 1D-FODF synthesis. Considerations are supported by numerical examples in Sect. 4 where real measured signal filtration effects are presented due to the very simple calculation method. The next section contains a definition of multidirectional mask serving to filter a digital image. The 2D-FODF output for a given image is presented.
2 Mathematical preliminaries
The fundamental notion used in the FOF-1DF description is the FOBD in the so-called Grünvald–Letnikov form [12]. Its definition is given below.
where
The left and right subscripts in \(^{GL}_{k_0}{\varDelta }^{(\mu )}_kf(k)\) denote the FOBD evaluation range, respectively. The left and right superscripts stand for the FOBD form (Gr\({\ddot{\mathrm {u}}}\)nwald–Letnikov) and order \((\mu )\), respectively. \((\mu )\) indicates that the FOBD is not raised to the \(\mu \) power. Without loss of generality from this point on one assumes \(k_0=0\). It can be proved [12] that for \(0<(\mu )<2\)
Assuming \(f(k)=0\) for \(k<0\) and zero initial conditions one can prove that the one-sided \(\mathscr {Z}\)-Transform of the FOBD is as follows
where \(\mathscr {Z}\left\{ f(k)\right\} =F(z)\).
The description of linear fractional-order digital 1D and 2D filters considered in this paper bases on the FOBD. One considers the FO commensurate difference equation (FODE) of the form
where \(0<\mu \leqslant 1\)—FO, \(p \geqslant q\), \(A_i,B_j\)-constant coefficients, \(A_p=1\), y(k), u(k)—filter output and filtered signal, respectively. The considered form means that the processed signal sample depends only on present and past samples. No forward shift of samples is admitted. One assumes
FODE (5) can be equivalently expressed in a vector form
from which one immediately gets the solution
Applying the one-sided \(\mathcal {Z}\)-Transform with zero initial conditions to both sides of (7) one evaluates the FO discrete transfer function (FODTF)
where \(\bar{A}_j=\sum ^{p}_{i=0}A_ia^{(i\nu )}\left( p-j\right) \) for \(j=0,1,\cdots ,p\) and \(\bar{B}_j=\sum ^{q}_{i=0}B_ia^{(i\nu )}\left( q-j\right) \) for \(j=0,1,\cdots ,q\). The approximation in (9) represented by the substitution of \(+\infty \) by relatively large number L. This is justified noting that coefficients \(a^{(\nu )}(k)\) strongly diminish for growing k. Performing a long division of numerator and denominator polynomials one gets the form
with \(g(0),g(1),g(2),\ldots \) being the consecutive values of the filter Dirac pulse response.
3 Linear time-invariant digital FOF frequency characteristics
For \(p=1,q=0\) from (9) one gets
It is worth mentioning that for the above TFs there are related DEs
The FOF can be considered as l connected in series simple filters (11)
where \(i=1,2,\ldots ,l\) and \(0<\mu _i \leqslant 1\) resulting in the FOFTF
A serial connection is depicted in Fig. 1.
The FODF properties are characterized by the same mathematical tools as the classical integer-order ones. Here, two fundamental ones can be mentioned: the FODF unit step response and the discrete frequency characteristics set [2, 3]. In the following numerical example one presents an example of the FODF characteristics.
Consider the FODFs of the FOs \(i\mu =1.2\) for \(\mu =1.2\) and \(i=1,2,3\) with \(A_0=0.01\) and \(B_0=A_0+\sum ^{L}_{i=0}a^{(\mu )}(i)\). Their fundamental frequency characteristics of the FOFs: the discrete Bode magnitude (left) and phase (right) plots are presented in Fig. 2 together with the IOF ones simulated for \(\mu =m=1\), respectively. In Fig. 3 (left) appropriate Nyquist plots are presented.
The considered FODFs characteristics relations with the colors of plots are indicated in the Table 1 given below.
The selected FO Nyquist and related Bode plots reveal growing maximum of amplitudes due to the order \(i\mu \) for \(i=1,2,3\). One can see that very small extrema in the Bode magnitude plots are no more visible in the Nyquist characteristics. Moreover, this shows a commonly known relation to the unit step responses of the integer order systems.
4 FOF response calculation
The 1D-FODF solution in Matlab is particularly simple. Consider any measured type of a digital signal. It may be voltage, current, position or speed. For its measured values sequence \(u=[u(0) u(1) \cdots u(k_{max})]\) and chosen L one evaluates two polynomials represented by their coefficients
Then, in the Matlab program, the FODF responses for \(l=1,2,3\) have the form
The three filters unit step responses are plotted in Fig. 3 (right). Very small (almost invisible), but growing maxima (due to growing l) in the Bode magnitude plots in Fig. 2 (left) induce the overshoots in the unit step responses.
Now one presents the filtration effects of the FOFs considered in the previous section. For the discrete signal presented in Fig. 4 one obtains responses presented in Fig. 5. Even better information concerning the filtration effects is given in Figs. 6 and 7 where the Bode magnitude characteristics of the measured signal (left) and the first filter output (right) are plotted, respectively. It can be seen clearly that the filtered signal includes information related to the velocity-position effect. The algorithm is valid for any measured signals, for instance: machanical, electrical, biological [14].
The satisfactory filtration effect is obtained for three FOFs connected in series. The high frequency noise is eliminated. The classical integer-order filters show weaker filtration effects. This is due to the restrictions to the integer orders only.
5 2D-FOF definition
5.1 2D-FOF directions definition
On a discrete plane (2D discrete space) one defines so-called Bresenham circles [15]. A circle is characterised by center \(c(k_1,k_2)\) and radius r. All discrete points (pixels) containing the continuous circle centered in the middle of \(x(k_1,k_2)\) belong to the discrete circle of radius r. Four discrete circles of consecutive radii \(r=1,\ldots ,5\) are presented in Figs. 8 and 9. Inside the black discrete circles there are white continuous circles of appropriate radii.
The sum of all discrete circles of consecutive radii \(r=1,2,\ldots ,r_{max}\) with the same center \(c(k_1,k_2)\) forms a discrete disc. If the same discrete point is related to two different radii the lower has the priority. Hence, one defines a matrix with elements being the radii (defining the discrete distance from the center). Such an exemplary distance matrix is presented below for \(r_{max}=5\) (on the left). Here, in all distance matrix corners radii \(r=6,7>r_{max}\) appeared. They are extracted by putting \(\infty \). A simplified distance matrix is given in (16) as a right matrix.
5.2 2D-FOF definition
For a given radius \(r_{max}\) and 1D-FOF Dirac pulse response values \(g(0),g(1),g(2),\cdots , g(r_{max})\) one defines a matrix containing Dirac pulse response values related to the distance from the disk center. The matrix in question, denoted as \(\mathbf {M}\left[ g(r_{max})\right] \) for \(r_{max}=5\) is given below. This matrix is a mask [4, 6]
Now, one assumes that a 2D signal (a discrete image) is represented by a matrix \(\mathbf {U}\) of dimensions \(m \times n\) where \(m,n \gg r_{max}\).
Then the processed discrete point (pixel) is calculated according to the fomula
Introducing a notation suitable for Matlab [1], \(rmax=r_{max}\), \(mm=\mathbf {M}\left[ g(r_{max})\right] \)
formula (20) is calculated in one command
A particularly simple filtration effect calculation is obtained for (6) with \(p=1,q=0\), \(A_0=0,B_0=1\) and \(\mu =-\nu \) where \(0<\nu \leqslant 2\)
The image of “The Small Dog” and its 3D plot are presented in Fig. 10 left and right, respectively. For 1D-FOF (13) with \(\mu =0.5\), \(L=5\), \(A_0=0.5\), \(B_0=0.7\) the filtration effects are given in Fig. 11 left and right, respectively. The filtered image is clearly blurred. The noise is largely removed.
To compare the 2D-FODF proposed in this paper the effects of the following filtering results are presented. In Fig. 12 the “gaussian” filter application (left) and its 3D plot is given.
In Fig. 13 the “unsharp.m” Matlab function is applied. The results are presented in Fig. 13.
The filtering results are usually subjected to subjective human evaluation, rather than to the objective criteria, but one should emphasise that the FODF parameters are not optimized due to theassumed performance criterion.
6 Conclusions
In classical IOF (15) there are two parameters to select: FO \(\mu \) and the coefficient \(A_0\). The FODF demands an additional parameter to select FO \(0<\nu <1\). The parameter and order selectin can be performed due to ISE criterion. The FODF response calculation is more complicated but such filters offer much greater opportunities to shape the dynamics of the 2D-FOF output. The main competitive advantage of the FOF over the IOF is steeper slope and sharper slump of the magnitude plots.
References
Weeks M (2011) Digital signal processing using Matlab and Wavelets. Jones and Bartlett Publishers, Sudbury
Ifeachor EC, Jervis BW (1993) Digital signal processing: a practical approach. Addison-Wesley, Harlow
Proakis JG, Manolakis DG (2007) Digital signal processing: principles, algorithms, and applications. Prentice Hall, Upper Saddle River
Bose T (2004) Digital signal and image processing. Wiley, New York
Pitas I (2000) Digital image processing. Algorithms and applications. John Wiley & Sons, Inc., New York
Pratt WK (1991) Digital image processing. Wiley, New York
Das S, Pan I (2012) Fractional order signal processing: introductory concepts and applications. Springer, Heidelberg
Miller KS, Ross B (1993) An introduction to the the fractional calculus and fractional differential equations. A Wiley-Interscience Publications, New York
Ortigueira MD (2011) Fractional calculus for scientists and engineers. Springer Science & Business Media, Berlin
Ortigueira MD, Machado JAT (2015) What is a fractional derivative? J Comput Phys 293:4–13
Podlubny I (1999) Fractional differential equations. Academic Press, London
Ostalczyk P (2016) Discrete fractional calculus: selected applications in control and image processing, vol 4. World Scientific, Singapore
Machado JAT (2015) Generalized convolution. Appl Math Comput 257:34–39
Ionescu C, Machado JAT, de Keyser R (2011) Fractional-order impulse response of the respiratory system. Comput Math Appl 62(3):845–854
Bresenham J (1965) Algorithm for computer control of a digital plotter. IBM Syst J 4(1):25–30
Acknowledgments
The research was supported by the Polish National Science Centre in 2013–2015 as a research Project (DEC-2012/05/B/ST 6/03647).
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
Open Access This article is distributed under the terms of the Creative Commons Attribution 4.0 International License (http://creativecommons.org/licenses/by/4.0/), which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.
About this article
Cite this article
Ostalczyk, P.W. Fractional-order linear digital 1D and 2D filter response calculation using Matlab. Int. J. Dynam. Control 5, 51–60 (2017). https://doi.org/10.1007/s40435-016-0227-0
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s40435-016-0227-0