Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Abstract
We propose a new method for calculating fractal dimension (DF) of a signal y(t), based on
(n)
coefficients my , mean absolute values of its nth order derivatives (consecutive finite differences
(n)
for sampled signals). We found that logarithms of my , n = 2, 3, . . . , nmax , exhibited linear
dependence on n:
log m(n)
y ) = (slope)n + Yint
with stable slopes and Y -intercepts proportional to signal DF values. Using a family of
Weierstrass functions, we established a link between Y -intercepts and signal fractal dimension:
and calculated parameters A(nmax ) and B(nmax ) for nmax = 3, . . . , 7. Compared to Higuchi’s
algorithm, advantages of this method include greater speed and eliminating the need to choose
value for kmax , since the smallest error was obtained with nmax = 3.
283
November 8, 2005 14:52 00293
use kmax = 15, while some5 use kmax = 8 or evenly occupied: Dj = 1.01, 1.02, . . . , 1.99. Number
by EMORY UNIVERSITY on 07/30/15. For personal use only.
kmax = 16. Our suggestion6 for its optimal range of functions generated was N γNH = 3960.
was 8 < kmax < 18. In order to overcome this prob- For sampling frequency and signal duration we
lem, in this work we try to introduce a simple chose fs = 256 [samp/s] and T = 30 [s], resembling
and fast new method to calculate fractal dimen- a common biological signal. Similarity between a
sion, using averaged absolute values of signal first n rat ECoG signal and Weierstrass function gen-
derivatives (finite differences) in time domain. erated with these values of T and fs , having
very close fractal dimension values, is presented
2. CONSECUTIVE on Fig. 1. Therefore, number of samples for each
DIFFERENCES METHOD member of the family (1) in time was N = fs
FOR MEASURING SIGNAL T = 7680.
Since sample differences depend on signal
COMPLEXITY
amplitude, a preprocessing step, comprising sig-
2.1. Rationality of Consecutive nal amplitude normalization, is necessary for each
Differences Method signal sample wi :
It is well known that signals, recorded from a wi
linear process, y(t), are characterized by the fol- winor = N
,
lowing values of the first and second derivatives: 1
|wj |
y (1) (t) = 0, y (2) (t) = 0. If the signal complexity N
j=1
increases, any deviation from linearity is accom- N
panied by y (2) (t) = 0. If we accept the view that 1
where wi = wi − wj , i = 1, . . . , N.
a higher order polynomial function is required to N
j=1
model a more complex process, then n real numbers:
After normalization of amplitudes, for each of
m(n)
y = mean(abs(y
(n)
(t))) (n)
the 3960 Weierstrass functions, coefficients mW
should characterize complexity of a signal. It is of were calculated for n = 1, . . . , 7 and the resulting
(n) (n)
particular interest to observe my as the function relations, mW = f (n), drawn on semi-log plots.
(n) (n)
of the derivative order n: my = f (n), and study As an example, mW coefficients for the family of
its properties, depending on the types of signals. Weierstrass functions, characterized by γi = 2.2, is
presented on Fig. 2. Similar results were obtained
for other values of γi . It could be noticed that, start-
2.2. Coefficients m(n)
y for (n)
ing from n = 2, log [mW ] = f (n), were highly
Weierstrass Functions linear, for all values Dj . After performing linear
(n)
In order to explore which properties of the func- regressions of lines log [mW ] = f (n), we found
(n)
tion my = f (n) are correlated with signal that their slopes did not vary significantly, while
November 8, 2005 14:52 00293
Weier. f. value
2
1
0
−1
−2 D = 1.50
−3
0 0.5 1 1.5 2 2.5 3 3.5 4
2400
2200
2000
1800
Fractals 2005.13:283-292. Downloaded from www.worldscientific.com
1600
DF = 1.5059
by EMORY UNIVERSITY on 07/30/15. For personal use only.
1400
1200
0 0.5 1 1.5 2 2.5 3 3.5 4
Time (s)
Fig. 1 Weierstrass function, characterized by theoretical fractal dimension D = 1.50 (upper), and rat cerebral ECoG activity
with DF = 1.5059 (calculated by Higuchi’s algorithm, lower panel).
101
m(n)w
100
10−1
1 2 3 4 5 6 7
n
(n)
Fig. 2 Semi-log plot of mW , mean absolute value of the nth order derivative versus n. Lines were calculated for a family of
Weierstrass functions, characterized by γi = 2.2; Dj = 1.01, 1.02, . . . , 1.99. Each line within the family belongs to Weierstrass
functions with a different fractal dimension Dj . Out of 99 lines, only every tenth is shown for clarity.
Y -intercepts were directly proportional to theoret- For each value of γi , number of possible calibra-
ical fractal dimension values Dj = 1.01, . . . , 1.99 tion lines depend on the chosen maximal deriva-
of Weierstrass functions. Relationship between Y - tive order for linear regressions: n = 2, 3, . . . , nmax
intercepts and Dj could serve as a calibration line (obviously, nmax ≥ 3). For nmax = 3, these Nγ = 40
for calculating DF of any given signal. calibration lines are presented on Fig. 3.
November 8, 2005 14:52 00293
0 0
DF = A * Yint + B
−0.5 −0.5 A = 0.34458
B = 2.0956
1 −1 CC = 0.99977
−1.5 −1.5
Y-intercept
Y-intercept
2 −2
−2.5 −2.5
3 −3
−3.5 −3.5
Fractals 2005.13:283-292. Downloaded from www.worldscientific.com
by EMORY UNIVERSITY on 07/30/15. For personal use only.
4 −4
1 1.2 1.4 1.6 1.8 2 1 1.2 1.4 1.6 1.8 2
Dj Dj
(n)
Fig. 3 Left: Y -intercept of lines log(mW ) = f (n) versus Dj , theoretical fractal dimension of Weierstrass functions, for
nmax = 3. Each of the Nγ = 40 lines, within the family, was obtained from Weierstrass functions having one value of
γi = 1.1, 1.2, . . . , 5.0. Right: mean Y -intercept-DF calibration line, obtained for nmax = 3, by averaging Nγ = 40 calibration
lines from the left panel. Parameters of its linear regression and the coefficient of linear correlation are given in the upper left
quarter.
Since real signals are not characterized by an for calculating fractal dimension DF of any signal
intrinsic parameter γ, for each value of nmax , a with normalized amplitudes:
final calibration line could be computed by aver-
aging ordinates of the Nγ = 40 lines, each differ- DF = A(nmax )Yint + B(nmax ). (2)
ing in γi = 1.1, 1.2, . . . , 5.0. As an example, for Therefore, for a given signal y(t), procedure for
nmax = 3, this mean line is shown on the right calculating its DF would comprise the following
panel of Fig. 3, together with the results of its linear steps:
regression. For each value of nmax , mean calibration
line differed slightly in corresponding values of lin- 1. Normalize amplitudes.
(n)
ear regression parameters, A(nmax ) and B(nmax ). 2. Calculate coefficients my = mean(abs(y (n) (t))),
We calculated these values for nmax = 3, 4, 5, 6 and n = 1, . . . , nmax .
(n)
7, as well as CC(nmax ), corresponding coefficients 3. Perform linear regression log(mW ) = (slope)
of linear correlation: n + Yint , n = 1, . . . , nmax .
4. Apply formula (2): DF = A(nmax )Yint +B(nmax ).
nmax A(nmax ) B(nmax ) CC(nmax )
Since we are dealing with sampled signals, con-
3 0.34458 2.0956 0.99977
4 0.33864 2.1008 0.99964 crete software implementation of these steps should
5 0.33554 2.1070 0.99955 be based on consecutive calculation of finite differ-
6 0.33367 2.1133 0.99949 ences. For the signal y(t), with N samples and with
7 0.33247 2.1195 0.99945. normalized amplitudes, nth order consecutive finite
(n)
differences and corresponding coefficients my are
2.3. Procedure for Calculating calculated as:
Fractal Dimension Using (n) (n−1) (n−1)
yi = yi+1 − yi ; i = 1, . . . , N − n;
Consecutive Differences
N
−n
1 (n)
Results of linear regressions, calculated in previous n = 1, . . . , nmax ; m(n)
y = |yi |.
subsection, were used in order to suggest a formula N −n
i=1
November 8, 2005 14:52 00293
0.015
0.01
0.005
mean(LEγ)
0
−0.005
−0.01
−0.015
−0.02
1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2
Dj
0.02
0.015
mean(SEγ)
0.01
0.005
0
1 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9 2
Dj
Fig. 4 Mean linear (upper) and mean square (lower panel) errors, obtained by consecutively applying procedure from Sec. 2.3,
by varying nmax , to a family of Weierstrass functions, with predefined values of parameter γi = 1.1, 1.2, . . . , 5.0 and fractal
dimension Dj = 1.01, 1.02, . . . , 1.99. Curves differ in nmax = 3, . . . , 7, and each represents an average from Nγ = 40 values
of γi . Error lines for nmax = 3 are drawn thicker.
November 8, 2005 14:52 00293
−4
x 10
1
mean(LEγ,D)
0
−1
3 4 5 6 7
nmax
x 10−3
7.5
7
mean(SE γ,D)
6.5
6
Fractals 2005.13:283-292. Downloaded from www.worldscientific.com
5.5
by EMORY UNIVERSITY on 07/30/15. For personal use only.
5
4.5
3 4 5 6 7
nmax
Fig. 5 Mean linear (upper) and mean square (lower panel) errors, obtained by sequentially applying procedure from Sec. 2.3,
by varying nmax , to a family of Weierstrass functions with predefined values of parameter γi = 1.1, 1.2, . . . , 5.0 and fractal
dimension Dj = 1.01, 1.02, . . . , 1.99. Both lines represent averages from Nγ = 40 values of γi and NDF = 99 values of Dj .
For the purpose of determining optimal nmax , Under such experimental conditions, first brain
errors expressed with (3) and (4) should be aver- injury is expected to cause an increase in DF
aged over the whole range of fractal dimension val- values.9,10
ues Dj : The ECoG biosignals were converted at the sam-
1
pling rate of 256/sec. In case of Higuchi’s algo-
mean(LEγ, D) = LEγ [Dj , nmax ], (5) rithm, each biosignal was divided into 154 epochs
NDF (each 1.5625 sec). DF values were calculated for
j
1.8 1.8
1.6 1.6
DF
DF
1.4 1.4
Third brain injury Third brain injury
1.2 1.2
1 1
−45 −15 1 5 30 40 −45 −15 1 5 30 40
1.8 1.8
1.6 1.6
DF
DF
1.4 1.4
Fractals 2005.13:283-292. Downloaded from www.worldscientific.com
1 1
−20 −5 0 5 20 30 40 −20 −5 0 5 20 30 40
Time (min) Time (min)
Fig. 6 DF values of rat cerebral and cerebellar ECoG calculated by procedure from Sec. 2.3 (−∗ ), using nmax = 3, and
Higuchi’s algorithm (− − ∆), using kmax = 8, before and after brain injury. Brain injury occurred at time zero.
(characterized by only one DF value within the ana- The procedure should be executed for each window
lyzed interval). sequentially. The number of windows M , as well
A more realistic approach, however, should be as their length Nw , should be determined accord-
based on the fact that in many cases (especially ing to the following conditions: M Nw ≤ N <
in physiology) signals cannot be described with (M + 1)Nw . A series of resulting fractal dimension
one value of fractal dimension within this inter- values, DFw (m), could then be either plotted versus
val. Different methods have been developed11–13 in m (time), or statistically analyzed through calcula-
order to analyze these multifractal signals. Owing tion of their mean value, standard deviation and
to the well-known scaling and translational detect- the corresponding probability density distribution.
ing abilities of the wavelet transform (WT), Muzy Namely, if one denotes with nw number of win-
et al.11 were able to extract locally values of h, dows during which signal fractal dimension value
D(h) (Hölder exponent and the corresponding sin- was between DFw and DFw + ∆DFw , this distribu-
gularity spectrum) as well as the scaling exponent tion could be approximated by forming histograms
τ (q), which exhibited nonlinear dependence on q nw (DFw ). In case of a stationary monofractal sig-
(argument of the scaling partition function) for mul- nal, nw (DFw ) is usually characterized by a simple
tifractal signals. The method proved successful for bell-shaped profile, maximum position representing
a number of tested monofractal and multifractal the corresponding value of the signal fractal dimen-
signals (one with a deterministic recursive struc- sion. It is reasonable to assume that, for a given
ture; turbulence data). However, calculations were window length Nw , width of such a distribution
complex and authors have reported some ambigu- should be positively correlated with the amount
ities including choice of the analyzing wavelet and of external random influence on the signal fractal
appearance of extra WT modulus maxima. dimension. Hence, random DF variations could be
Our method may be easily adapted to analyze separated from those of the internal, nonlinear ori-
non-stationary data. Instead of applying the four gin by calculating mean value and standard devi-
steps from Sec. 2.3 to the whole signal, containing ation of DFw (m). Peng et al.13 approached this
N samples, the signal should be partitioned into problem using a detrending procedure. In case of
a set of M non-overlapping windows: (yw )m , m = non-stationary data, histogram profiles differ from
1, 2, . . . , M , each window containing Nw samples. a simple bell-shaped curve. Additional study is
November 8, 2005 14:52 00293
necessary to reveal quantitative relations between dimension, presented on Fig. 7. Part of this sig-
these multifractal histogram profiles and existing nal, including one of the artifact appearances, is
known fractal quantities, used by other authors.11,12 shown on the upper, while the resulting nw (DFw )
One of the starting points along this line might be histogram, consisting of two components, is drawn
an attempt to design a quantitative test whether on the lower panel.
a signal is monofractal, based on the deviation The last example refers to a signal, artificially
of a nw (DFw ) histogram profile from the simple composed by concatenating unequal time periods of
monofractal form. However, it is not yet clear how two monofractal signals, having close fractal dimen-
different measuring and external parameters influ- sion values (Weierstrass functions, Dj1 = 1.5, Dj2 =
ence these forms (e.g. even for reference monofrac- 1.55). In this case, nonlinear fitting of the nw (DFw )
tal signals such as Weierstrass functions, histogram histogram with two Gaussian components numeri-
widths strongly depend on window length Nw ). cally yielded approximative fractal dimension val-
Therefore, in our view, at this stage it is probably ues of the two monofractal components (Fig. 8).
more convenient to rely on already existing depen-
dencies, such as linearity of the scaling exponent
τ (q) as described by Muzy et al.11
Fractals 2005.13:283-292. Downloaded from www.worldscientific.com
5. CONCLUSION
by EMORY UNIVERSITY on 07/30/15. For personal use only.
2300
Signal value (arb. un.)
2200
2100
2000
1900
1800
1700
80 80.5 81 81.5 82 82.5 83
Time (s)
30
25
20
nw(DFw)
15
10
5
0
1.3 1.4 1.5 1.6 1.7 1.8 1.9 2
DFw
Fig. 7 Rat ECoG signal, with occasional external artifacts, analyzed as nonstationary multifractal data by partitioning it
into a series of windows (Nw = 400 samples) and fractal dimension values calculated for each window (DFw ) according to
the procedure described in Sec. 2.3. Upper panel: part of the signal in time domain, containing a typical artifact. Lower
panel: histogram, constructed by counting the number of windows, nw (DFw ), with fractal dimension values between DFw
and DFw + ∆DFw .
November 8, 2005 14:52 00293
16
14
nw(DFw)
12
10
2
Fractals 2005.13:283-292. Downloaded from www.worldscientific.com
by EMORY UNIVERSITY on 07/30/15. For personal use only.
0
1.42 1.44 1.46 1.48 1.5 1.52 1.54 1.56 1.58
DFw
Fig. 8 Analysis of an artificial bifractal signal, obtained by concatenating temporal periods of two monofractal signals,
having close fractal dimension values (Weierstrass functions, Dj1 = 1.5, Dj2 = 1.55). Six-parameter nonlinear fitting of the
histogram values (•) was performed with two Gaussian components (thin line — separate components; thick line — their
sum). Of all fitting results, only component positions (DFw1 ≈ Dj1 ; DFw2 ≈ Dj2 ) are indicated in the upper part of the plot.
In case of signals with various fractal dimen- DFw and DFw + ∆DFw , could be constructed and
sion (DF) values, these lines exhibited stable slopes, fitted with Gaussian (or other bell-shaped compo-
while their Y -intercepts were proportional to sig- nents) if the multifractal signal consists of a few
nal DF. A family of Weierstrass functions, with monofractal components.
theoretically known fractal dimension values Dj ,
j = 1.01, . . . , 1.99, was used in order to calibrate
ACKNOWLEDGMENTS
the method, i.e. link Y -intercepts with Dj :
This study was supported by the Ministry of Sci-
DF = A(nmax )Yint + B(nmax ).
ence and Environmental Protection of Republic of
Values of A(nmax ) and B(nmax ) were calculated for Serbia (project 1660).
nmax = 3, . . . , 7. We are grateful to Prof. Ljubisa Kocic, Univer-
When applied to the same family of Weierstrass sity of Nis, for his invaluable advices, suggestions
functions, both mean linear and square errors were and corrections while reading the manuscript in
minimal for nmax = 3. preparation.
Performance of the new method was compared
to that of Higuchi’s algorithm. Besides speed, an
REFERENCES
additional advantage was the elimination of choice
for optimal kmax . When applied to a set of rat 1. T. Higuchi, Approach to an irregular time series on
ECoG signals, recorded in experimental conditions the basis of the fractal theory, Physica D 31 (1988)
expected to cause an increase in DF values, both 277–283.
2. J. Ciszewski, W. Klonowski, R. Stepien,
methods yielded similar results. Mean difference of
W. Jernajczyk, A. Karlinski and K. Niedzielska,
the measured fractal dimension values, from 24 sig-
Application of chaos theory for EEG-signal analy-
nals, was 0.0176 ± 0.0300. sis in patients with seasonal affective disorder, Med.
In case of non-stationarities, the signal should be Biol. Eng. Comput. 37 (1999) 359–360.
partitioned into nonoverlapping windows and frac- 3. W. Klonowski, E. Olejarczyk and R. Stepien,
tal dimension values calculated for each of them Chaosity and dimensional complexity of EEG-
separately. Histogram of the number of windows, signal, Proc. 2001 Int. Symp. Nonlin. Theory Appl.
nw (DFw ), with fractal dimension values between (NOLTA’2001), 28 October–1 November 2001,
November 8, 2005 14:52 00293