没有合适的资源?快使用搜索试试~ 我知道了~
首页Fractional Differential Equations in Matlab
资源详情
资源推荐
0
Fractional Derivatives, Fractional
Integrals, and Fractional Differential
Equations in Matlab
Ivo Petráš
Technical University of Košice
Slovak Republic
1. Introduction
The term fractional calculus is more than 300 years old. It is a generalization of the ordinary
differentiation and integration to non-integer (arbitrary) order. The subject is as old as the
calculus of differentiation and goes back to times when Leibniz, Gauss, and Newton invented
this kind of calculation. In a letter to L’Hospital in 1695 Leibniz raised the following question
(Miller and Ross, 1993): “Can the meaning of derivatives with integer order be generalized to
derivatives with non-integer orders?" The story goes that L’Hospital was somewhat curious
about that question and replied by another question to Leibniz. “What if the order will
be 1/2?" Leibniz in a letter dated September 30, 1695 replied: “It will lead to a paradox,
from which one day useful consequences will be drawn." The question raised by Leibniz for
a fractional derivative was an ongoing topic in the last 300 years. Several mathematicians
contributed to this subject over the years. People like Liouville, Riemann, and Weyl made
major contributions to the theory of fractional calculus. The story of the fractional calculus
continued with contributions from Fourier, Abel, Leibniz, Grünwald, and Letnikov.
Nowadays, the fractional calculus attracts many scientists and engineers. There are several
applications of this mathematical phenomenon in mechanics, physics, chemistry, control
theory and so on (Caponetto et al., 2010; Magin, 2006; Monje et al., 2010; Oldham and Spanier,
1974; Oustaloup, 1995; Podlubny, 1999). It is natural that many authors tried to solve the
fractional derivatives, fractional integrals and fractional differential equations in Matlab.
A few very good and interesting Matlab functions were already submitted to the MathWorks,
Inc. Matlab Central File Exchange, where they are freely downloadable for sharing among
the users. In this chapter we will use some of them. It is worth mentioning some addition to
Matlab toolboxes, which are appropriate for the solution of fractional calculus problems. One
of them is a toolbox created by CRONE team (CRONE, 2010) and another one is the Fractional
State–Space Toolkit developed by Dominik Sierociuk (Sierociuk, 2005). Last but not least we
should also mention a Matlab toolbox created by Dingyü Xue (Xue, 2010), which is based on
Matlab object for fractional-order transfer function and some manipulation with this class of
the transfer function. Despite that the mentioned toolboxes are mainly for control systems,
they can be “abused" for solutions of general problems related to fractional calculus as well.
10
www.intechopen.com
2 Will-be-set-by-IN-TECH
2. Fractional calculus fundamentals
2.1 Special functions
Here we should mention the most important function used in fractional calculus - Euler’s
gamma function, which is defined as
Γ(n)=
∞
0
t
n−1
e
−t
dt.(1)
This function is a generalization of the factorial in the following form:
Γ(n)=(n −1)!(2)
This gamma function is directly implemented in the Matlab with syntax []=gamma().
Another function, which plays a very important role in the fractional calculus, was in fact
introduced in 1953. It is a two-parameter function of the Mittag-Leffler type defined as
(Podlubny, 1999):
E
α,β
(z)=
∞
∑
k=0
z
k
Γ(αk + β)
, (α > 0, β > 0).(3)
The Mittag-Leffler function (3) can be expressed in the integral representation as
E
α,β
(z)=
1
2πi
C
t
α−β
e
t
t
α
−z
dt,(4)
the contour C starts and ends at −∞ and circles around the singularities and branch points of
the integrand.
There are some relationships (given e.g. in (Djrbashian, 1993; Podlubny, 1999)):
E
1,1
(z)=e
z
, E
1/2,1
(
√
z)=
2
√
π
e
−z
erfc(−
√
z),
E
2,1
(z)=cosh(
√
z), E
2,1
(−z
2
)=cos(z), E
1,2
(z)=
e
z
−1
z
.
For β
= 1 we obtain the Mittag-Leffler function in one parameter (Podlubny, 1999):
E
α,1
(z)=
∞
∑
k=0
z
k
Γ(αk + 1)
≡ E
α
(z).(5)
For the numerical evaluation of the Mittag-Leffler function (3) with the default accuracy set
to 10
−6
the Matlab routine [e]=mlf(alf,bet,c,fi), written by Podlubny and Kacenak
(2005) can be used. Another Matlab function f=gml_fun(a,b,c,x,eps0) for a generalized
Mittag-Leffler function was created by YangQuan Chen (Chen, 2008).
In Fig. 1(a) and Fig. 1(b) are plotted the well-known functions (e
z
and cos(z))computedvia
the Matlab routine []=mlf() created for the evaluation of the Mittag-Leffler function.
Another important function E
k
(t, λ; μ, ν) of the Mittag-Leffler type was introduced by
(Podlubny, 1999). The function is defined by
E
k
(t, λ; μ, ν)=t
μ k+ν−1
E
(k)
μ,ν
(λt
μ
), (k = 0, 1, 2, . . .),(6)
240
Engineering Education and Research Using MATLAB
www.intechopen.com
Fractional Derivatives, Fractional Integrals, and Fractional Differential Equations in Matlab 3
−2 −1 0 1 2
0
2
4
6
8
z
E
1,1
(z)
(a) E
1,1
(z),where−2 < z < 2
0 2 4 6
−1
−0.5
0
0.5
1
z
E
2,1
(−z
2
)
(b) E
2,1
(−z
2
),where0< z < 2π
Fig. 1. Mittag-Leffler function (3) for various parameters
where E
(k)
μ,ν
(z) is k-th derivative of the Mittag-Leffler function of two parameters given by
E
(k)
μ,ν
(z)=
∞
∑
i=0
(i + k)! z
i
i! Γ(μi + μk + ν)
, (k = 0, 1, 2, . . .).(7)
2.2 Fractional derivatives and integrals
Fractional calculus is a generalization of integration and differentiation to non-integer-order
fundamental operator
a
D
α
t
,wherea and t are the bounds of the operation and α ∈ R. The
continuous integrodifferential operator is defined as
a
D
α
t
=
⎧
⎪
⎨
⎪
⎩
d
α
dt
α
: α > 0,
1:α = 0,
t
a
(dτ)
α
: α < 0.
The three most frequently used definitions for the general fractional differintegral are: the
Grünwald-Letnikov (GL) definition, the Riemann-Liouville (RL) and the Caputo definition
(Miller and Ross, 1993; Oldham and Spanier, 1974; Podlubny, 1999). Other definitions are
connected with well-known names as for instance Weyl, Fourier, Cauchy, Abel, etc.
The GL definition is given as
a
D
α
t
f (t)=lim
h→0
h
−α
[
t−a
h
]
∑
j=0
(−1)
j
α
j
f (t − jh),(8)
where [.] means the integer part. The RL definition is given as
a
D
α
t
f (t)=
1
Γ(n − α)
d
n
dt
n
t
a
f (τ)
(t − τ)
α−n+1
dτ,for(n −1 < α < n),(9)
241
Fractional Derivatives, Fractional Integrals, and Fractional Differential Equations in Matlab
www.intechopen.com
4 Will-be-set-by-IN-TECH
where Γ(.) is the gamma function. The Caputo definition of fractional derivatives can be
written as
a
D
α
t
f (t)=
1
Γ(n − α)
t
a
f
(n)
(τ)
(t − τ)
α−n+1
dτ,for(n −1 < α < n). (10)
In this chapter we will consider mainly the GL, the RL, and the Caputo definitions. This
consideration is based on the fact that, for a wide class of functions, the three best known
definitions - GL, RL, and Caputo - are equivalent under some conditions (Podlubny, 1999).
As it was already mentioned, under the homogeneous initial conditions the
Riemann-Liouville and the Caputo derivative are equivalent. Let us denote the
Riemann-Liouville fractional derivative as
RL
a
D
α
t
t (t) and the Caputo definition as
C
a
D
α
t
f (t),
then the relationship between them is:
RL
a
D
α
t
t (t)=
C
a
D
α
t
f (t)+
n−1
∑
k=0
(t − a)
k−α
Γ(k − α + 1)
f
(k)
(a),
for f
(k)
(a)=0 (k = 0, 1, . . . , n − 1).
The initial conditions for the fractional-order differential equations with the Caputo
derivatives are in the same form as for the integer-order differential equations. It is an
advantage because applied problems require definitions of fractional derivatives, where there
are clear interpretations of initial conditions, which contain f
(a), f
′
(a), f
′′
(a),etc.
In addition, for approximation purpose we consider the Laplace transform method of the
fractional differintegral
a
D
α
t
. The Laplace transform of the join operator of order α for the GL,
RL and Caputo definitions, under the zero initial conditions is:
L{
0
D
α
t
f (t); s} = s
α
F(s). (11)
Laplace transform technique is considered as an efficient way in solving differential equations
with integer order and fractional order as well. For differential equations with fractional
order, the Laplace transform technique works effectively only for relatively simple equations,
because of the difficulties of calculating inversion of Laplace transforms. This problem was
solved by applying a numerical inverse Laplace transform algorithms in fractional calculus
(Sheng et al., 2011). Three numerical inverse Laplace transform algorithms in Matlab, named
invlap(), gavsteh(),andnilt(), were described there and tested.
The Laplace transforms for several known Mittag-Leffler type functions are summarized as
follows (Magin, 2006; Podlubny, 1999):
L{E
α
(−λt
α
)} =
s
α−1
s
α
+ λ
, L{t
α−1
E
α,α
(−λt
α
)} =
1
s
α
+ λ
, (12)
L{t
β−1
E
α,β
(−λt
α
)} =
s
α−β
s
α
+ λ
, L{E
k
(t, ±λ; α, β)} =
k!s
α−β
(s
α
∓λ )
k+1
.
2.3 Numerical methods for fractional calculus
There are many numerical methods appropriate for the fractional calculus computation. They
were described in several works and a good survey can be found in (Vinagre et al., 2000; 2003).
In the above-mentioned papers are described the time domain and frequency methods in
242
Engineering Education and Research Using MATLAB
www.intechopen.com
Fractional Derivatives, Fractional Integrals, and Fractional Differential Equations in Matlab 5
the form of IIR and FIR approximations together with illustrative examples. Some of the
mentioned frequency methods in both forms of approximation have been realized as the
Matlab routines in Duarte Valerio’s toolbox called ninteger (see detail review in (Valério, 2005)).
Also created in this toolbox was a Simulink block nid for fractional derivative and integral,
where the order of derivative/integral and method of its approximation can be selected.
2.3.1 Grünwald-Letnikov method
For numerical calculation of fractional-order derivatives we can use the relation (13) derived
from the GL definition (8). This approach is based on the fact that for a wide class of functions
the three definitions - GL (8), RL (9), and Caputo’s (10) - are equivalent if f
(a)=0. The relation
for the explicit numerical approximation of q-th derivative at the points kh, (k = 1,2,...) has
the following form (Dorˇcák, 1994; Podlubny, 1999):
(k−L
m
/h)
D
q
t
k
f (t) ≈ h
−q
k
∑
j=0
(−1)
j
q
j
f (t
k−j
)=h
−q
k
∑
j=0
c
(q)
j
f (t
k−j
), (13)
where L
m
is the “memory length", t
k
= kh, h is the time step of calculation and c
(q)
j
(j =
0, 1, . . . , k) are binomial coefficients. For their calculation we can use for instance the following
expression (Dorˇcák, 1994):
c
(q)
0
= 1, c
(q)
j
=
1 −
1 + q
j
c
(q)
j−1
. (14)
The binomial coefficients c
(q)
j
(j = 0,1,...,k) can be also expressed by using a factorial.
Writing the factorial as a gamma function (2), it allows the binomial coefficient to be
generalized to non-integer arguments. We can write the relations:
(−1)
j
q
j
=(−1)
j
Γ(q + 1)
Γ(j + 1)Γ(q − j + 1)
=
Γ(j − q)
Γ(−q)Γ(j + 1)
. (15)
Obviously, for this simplification we pay a penalty in the form of some inaccuracy. If f (t) ≤
M, we can easily establish the following estimate for determining the memory length L
m
,
providing the required accuracy ǫ:
L
m
≥
M
ǫ|Γ(1 −q)|
1/q
. (16)
The above-described numerical method is called Power Series Expansion (PSE) of a generating
function. It is important to note that PSE leads to approximation in the form of polynomials,
that is, the discretized fractional operator is in the form of FIR filter, which has only zeros
(Chen and Moore, 2002; Vinagre et al., 2003).
The resulting discrete transfer function, approximating fractional-order operators, can be
expressed in z-domain as follows:
0
D
±r
kT
G(z)=
Y(z)
F(z)
=
1
T
±r
PSE
1 − z
−1
±r
n
≈ T
∓r
R
n
(z
−1
), (17)
243
Fractional Derivatives, Fractional Integrals, and Fractional Differential Equations in Matlab
www.intechopen.com
剩余27页未读,继续阅读
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功