periodic wavelet transforms and … wavelet transforms and periodicity detection john j....

39
PERIODIC WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO * AND G ¨ OTZ E. PFANDER Key words. Continuous wavelet transform, epileptic seizure prediction, periodicity detection algorithm, optimal generalized Haar wavelets, wavelet frames on . AMS subject classifications. 42C99, 42C40. Abstract. The theory of periodic wavelet transforms presented here was originally developed to deal with the problem of epileptic seizure prediction. A central theorem in the theory is the characterization of wavelets having time and scale periodic wavelet transforms. In fact, we prove that such wavelets are precisely generalized Haar wavelets plus a logarithmic term. It became apparent that the aforementioned theorem could not only be quantified to analyze seizure prediction, but could also provide a technique to address a large class of periodicity detection problems. An essential step in this quantification is the geometric and linear algebra construction of a generalized Haar wavelet associated with a given periodicity. This gives rise to an algorithm for peri- odicity detection based on the periodicity of wavelet transforms defined by generalized Haar wavelets and implemented by wavelet averaging methods. The algorithm detects periodicities embedded in significant noise. The algorithm depends on a discretized version W p ψ f (n, m) of the continuous wavelet transform. The version defined provides a fast algorithm with which to compute W p ψ f (n, m) from W p ψ f (n -1,m) or W p ψ f (n, m - 1). This has led to the theory of non–dyadic wavelet frames in l 2 ( ) developed by the second-named author, and which will appear elsewhere. 1. Introduction. Generalized Haar wavelets were introduced in [4]. The theory and some applications of these generalized Haar wavelets will be developed in this paper. In [3], the authors addressed a component of the problem of predicting epileptic seizures. A satisfactory solution of this problem would provide maximal lead time in which to predict an epileptic seizure [24, 25]. It was shown that spectrograms of electrical potential time series derived from brain activities of patients during seizure episodes exhibit multiple chirps consistent with the relatively simple almost periodic behavior of the observed time-series [6]. In the process, electrocorticogram (ECoG) data was used instead of the more common electroencephalogram (EEG) data. To obtain ECoG data, electrodes are planted directly on the cortex, eliminating some noise. To analyze the periodic components in these time-series, a redundant non– dyadic wavelet analysis was used, which the authors in [3] referred to as wavelet integer scale processing (WISP). The wavelet transform obtained with respect to the Haar wavelet showed, among other things, that the almost periodic behavior in the signal resulted in almost periodic behavior in both time and scale in the wavelet transform [4]. Mathematically, the non–normalized continuous Haar wavelet transform of a pe- riodic signal is periodic in time and in scale. Continuing the work in [3], we realized the origin of this phenomen, and verified the time–scale continuous wavelet trans- form periodicity of periodic signals for a large class of Haar-type wavelets which we * Department of Mathematics, University of Maryland, College Park, MD 20742-4015, USA, E- mail: [email protected]. Supported from DARPA Grant MDA-972011003 and from the General Research Board of the University of Maryland. Institut f¨ ur Angewandte Mathematik und Statistik, Universit¨at Hohenheim, 70593 Stuttgart, Germany, E-mail: [email protected] 1

Upload: hoangdieu

Post on 26-May-2018

228 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

PERIODIC WAVELET TRANSFORMS AND PERIODICITYDETECTION

JOHN J. BENEDETTO∗ AND GOTZ E. PFANDER†

Key words. Continuous wavelet transform, epileptic seizure prediction, periodicity detectionalgorithm, optimal generalized Haar wavelets, wavelet frames on Z.

AMS subject classifications. 42C99, 42C40.

Abstract. The theory of periodic wavelet transforms presented here was originally developedto deal with the problem of epileptic seizure prediction. A central theorem in the theory is thecharacterization of wavelets having time and scale periodic wavelet transforms. In fact, we provethat such wavelets are precisely generalized Haar wavelets plus a logarithmic term.

It became apparent that the aforementioned theorem could not only be quantified to analyzeseizure prediction, but could also provide a technique to address a large class of periodicity detectionproblems. An essential step in this quantification is the geometric and linear algebra construction of ageneralized Haar wavelet associated with a given periodicity. This gives rise to an algorithm for peri-odicity detection based on the periodicity of wavelet transforms defined by generalized Haar waveletsand implemented by wavelet averaging methods. The algorithm detects periodicities embedded insignificant noise.

The algorithm depends on a discretized version W pψf(n, m) of the continuous wavelet transform.

The version defined provides a fast algorithm with which to compute W pψf(n, m) from W p

ψf(n−1, m)

or W pψf(n, m − 1). This has led to the theory of non–dyadic wavelet frames in l2(Z) developed by

the second-named author, and which will appear elsewhere.

1. Introduction. Generalized Haar wavelets were introduced in [4]. The theoryand some applications of these generalized Haar wavelets will be developed in thispaper.

In [3], the authors addressed a component of the problem of predicting epilepticseizures. A satisfactory solution of this problem would provide maximal lead timein which to predict an epileptic seizure [24, 25]. It was shown that spectrograms ofelectrical potential time series derived from brain activities of patients during seizureepisodes exhibit multiple chirps consistent with the relatively simple almost periodicbehavior of the observed time-series [6]. In the process, electrocorticogram (ECoG)data was used instead of the more common electroencephalogram (EEG) data. Toobtain ECoG data, electrodes are planted directly on the cortex, eliminating somenoise. To analyze the periodic components in these time-series, a redundant non–dyadic wavelet analysis was used, which the authors in [3] referred to as waveletinteger scale processing (WISP). The wavelet transform obtained with respect to theHaar wavelet showed, among other things, that the almost periodic behavior in thesignal resulted in almost periodic behavior in both time and scale in the wavelettransform [4].

Mathematically, the non–normalized continuous Haar wavelet transform of a pe-riodic signal is periodic in time and in scale. Continuing the work in [3], we realizedthe origin of this phenomen, and verified the time–scale continuous wavelet trans-form periodicity of periodic signals for a large class of Haar-type wavelets which we

∗Department of Mathematics, University of Maryland, College Park, MD 20742-4015, USA, E-mail: [email protected]. Supported from DARPA Grant MDA-972011003 and from the GeneralResearch Board of the University of Maryland.

†Institut fur Angewandte Mathematik und Statistik, Universitat Hohenheim, 70593 Stuttgart,Germany, E-mail: [email protected]

1

Page 2: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

2 J. J. BENEDETTO AND G. E. PFANDER

call generalized Haar wavelets. These elementary observations and calculations arethe subject of Section 2. Section 3 is more mathematically substantive. In it wedescribe all integrable wavelets whose non–normalized continuous wavelet transformsare 1–periodic in both time and scale for all 1–periodic bounded measurable func-tions. Naturally, these wavelets include the generalized Haar wavelets, but they canalso have a well–defined logarithmic term. The main results, which are proved us-ing methods from harmonic analysis, are given on the real line R, but also have aformulation on d–dimensional Euclidean space Rd [21].

Motivated by the epileptic seizure problem, or more accurately the early detec-tion problem in our approach, and based on the results in Sections 2 and 3, we havedeveloped a method aimed at detecting periodic behavior imbedded in noisy environ-ments. This is the subject of Sections 4 and 5. In Section 4 we construct generalizedHaar wavelets that are optimal as far as detecting prescribed periodicities in givendata. The construction is geometric and invokes methods from linear algebra. We usethese optimal generalized Haar wavelets in Section 5 to design our wavelet periodicitydetection algorithm. The algorithm is based on averaging wavelet transforms, and itwill give perfect periodicity information, as far as pattern and period, for the case ofperiodic signals in non–noisy environments. The averaging strategy and use of opti-mal generalized Haar wavelets optimizes available information for detecting suspectedperiodicities in noisy data.

The implementation of the algorithm designed in Section 5 requires the computa-tion of discretized versions of the continuous wavelet transform. The redundancy insuch discretized versions offers robustness to noise, but more calculations are neededthan to compute a dyadic wavelet transform. In Section 6, we shall present a fastalgorithm which significantly reduces the number of these calculations in case theanalyzing wavelet is a generalized Haar wavelet.

Apropos this description of our paper, the readers who are only interested inapplicable periodicity detection techniques need only read the statements of Theorem3.1 and Theorem 4.2, and then go directly to Section 5, where Theorem 3.1 is invoked,and to Section 6. Our point of view and idea for periodicity detection has to becompared critically with other methods and, in particular, with a variety of spectralestimation techniques, e.g., see [14, 22].Notation. We employ standard notation from harmonic analysis and wavelet theory,e.g., see [2, 9, 15, 16, 28]. In order to avoid any confusion, we begin by reviewingsome of the notation herein in which different choices are sometimes made by others.

The Fourier transform of f ∈ L1(R) is f : R→ C where f(γ) =∫

f(t)e−2πitγ dt,R = R when considered as the domain of the Fourier transform and “

∫” designates

integration over R. F : L2(R) −→ L2(R) is the Fourier transform operator on L2(R).The Fourier series of a 1–periodic function ϕ : R 7→ C is denoted by S (ϕ) (γ) =∑

ϕ[m]e−2πimγ , where ϕ[m] =∫T ϕ(γ)e2πimγ dγ, T = R/Z is the quotient group, and

“∑

” designates summation over the integers Z. We shall also deal with TT = R/TZfor other values of T besides T = 1. A(R) and A(T) are the spaces of absolutelyconvergent Fourier transforms on R and absolutely convergent Fourier series on T,respectively.

R+ and R− are the sets of positive and negative real numbers in R; and R+

and R− are the sets of positive and negative real numbers in R. 1X denotes thecharacteristic function of the set X, and the Heaviside function H on R is 1(0,∞).| . . . | designates absolute value, Lebesgue measure, or cardinality; and the meaning

Page 3: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

PERIODIC WAVELET TRANSFORMS AND PERIODICITY DETECTION 3

will be clear from the context.Acknowledgement. We gratefully acknowledge fruitful conversations with JohnKitchen, Oliver Treiber, and Stephen Tretter. These discussions most often pertainedto the relationship between our periodicity detection method and classical spectralestimation methods. We also thank one of the anonymous referees for an invaluableand expert critique of our material concerning epilepsy.

2. Generalized Haar wavelets. We shall introduce the notion of generalizedHaar wavelets. There are two reasons to consider such wavelets. First, they allowa fast computation of a discretized version of the continuous wavelet transform bymeans of a recursive algorithm. This is the subject of Section 6. The second reason ispresented below in Propositions 2.3 and 2.5, where we obtain time–scale periodicityfor the non–normalized continuous generalized Haar wavelet transform of a periodicsignal.

The term wavelet does not possess a unique definition. The following definition(part a) is appropriate for our needs.

Definition 2.1. a. A wavelet is a complex valued function ψ ∈ L1(R) with onevanishing moment, i.e., ψ has the property that

∫ψ(t) dt = 0.

b. If ψ is a wavelet, the non–normalized continuous wavelet transform Wψ is themapping

Wψ : L∞(R) −→ Cb(R× R+)

defined by

Wψf(b, a) =∫

f(t)ψ( t−ba ) dt.

Cb(R×R+) is the space of complex–valued bounded continuous functions on R×R+.Similarly, if 1 ≤ p < ∞, then the Lp(R)–normalized continuous wavelet transform

W pψ is the mapping

W pψ : L∞(R) −→ C(R× R+)

defined by

W pψf(b, a) = a−1/p

∫f(t)ψ( t−b

a ) dt.

C(R× R+) is the space of complex–valued continuous functions on R× R+.Fundamental works on wavelet theory are due to Meyer [16], Daubechies [9], and

Mallat [15]. This paper is devoted to the theory and usefulness of wavelets describedin the following definition.

Definition 2.2. A generalized Haar wavelet of degree M is a wavelet with theproperty that there exist M ∈ R and si ∈ R such that ψ|[si,si+1) = ci ∈ C andMsi ∈ Z for all i ∈ Z.

Note that generalized Haar wavelets are bounded functions, and that their coef-ficients are summable, i.e., {ci}i∈Z ∈ l1(Z).

Page 4: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

4 J. J. BENEDETTO AND G. E. PFANDER

The first observation in our approach to periodicity detection and computationis the following fact.

Proposition 2.3. Let f ∈ L1(TT ), i.e., f is T–periodic and integrable on [0, T ],and let ψ be a generalized Haar wavelet of degree M . Then Wψf(b, a) is T–periodicin b and MT–periodic in a.

This result can be proved by a direct calculation. A similar calculation is carriedout in the proof of Proposition 2.5.

Example 2.4. We choose f ∈ L1(TT ) to be f(·) = sin(2π(γ ·+θ)), where γ, θ ∈ Rare fixed, and γ T ∈ Z \ {0}. If the generalized Haar wavelet is the centered Haarwavelet ψ = 1

[− 12 ,0)

+ 1[0,

12 )

, then ψ is of degree 2, and

Wψf(b, a) =2

πγsin2(πγa

2 ) cos(2π(γb + θ)), (2.1)

for all (b, a) ∈ R × R+. Clearly, the right side of (2.1) is T–periodic in b and 2T–periodic in a.

The graph of Wψf(b, a), for θ = 0 and γ = T = 1, is illustrated in Figure 2.1.

01

23

45

0

2

4

6

8

10−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

TIMESCALE

Fig. 2.1. Non–normalized Haar wavelet transform of a sine function.

Figure 2.2 illustrates the reason for periodicity in time. In fact, for a fixed scale,moving the wavelet by a full period across time does not change the innerproduct

〈f, ψ( ·−ba )〉 = Wψf(b, a).

Figure 2.3 illustrates the cancellations leading to periodicity in scale. These are dueto the fact that

∑ci = 0.

Proposition 2.3 implies that if the signal s has the particular form s(t) = Af(ct)for constants A and c, then the relative maxima of Wψs(b, a) form a lattice in time–scale space. The horizontal (time) distance between two neighboring vertices of the

Page 5: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

PERIODIC WAVELET TRANSFORMS AND PERIODICITY DETECTION 5

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1−1.5

−1

−0.5

0

0.5

1

1.5

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1−1.5

−1

−0.5

0

0.5

1

1.5

Fig. 2.2. Periodicity in time.

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

Fig. 2.3. Periodicity in scale is caused by cancellations in the continuous wavelet transform.

lattice is 1/c, and the vertical (scale) distance between two neighboring vertices isM/c. This regularity displays redundancy in the following way: each rectangle ofsize 1/c×M/c in the wavelet transform contains all of the information in the wholewavelet transform.

Additional structure of ψ can force additional features upon the wavelet transformof periodic functions, as can be seen in the following proposition. This approach willbe discussed further in Section 4.3.

Proposition 2.5. Let f ∈ L1(TT ), and let ψ be a generalized Haar wavelet ofdegree M .a. If ψ is even, i.e., ψ(−t) = ψ(t) for t ∈ R, then Wψf(b, a) = −Wψf(b,MT − a) for0 < a < MT .b. If ψ is odd, i.e. −ψ(−t) = ψ(t) for t ∈ R, then Wψf(b, a) = Wψf(b,MT − a) for0 < a < MT .

Proof. a. Since ψ is a generalized Haar wavelet of degree M and since ψ is even,there exist si ∈ R such that ψ|[s−(i+1),s−i) = ψ|[si,si+1) = ci, i ∈ Z and ci ∈ C, ands−i = −si for i ∈ Z.

Page 6: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

6 J. J. BENEDETTO AND G. E. PFANDER

We compute

Wψf(b,MT − a) + Wψf(b, a) =∫

f(t)ψ( t−bMT−a ) dt +

∫f(t)ψ( t−b

a ) dt

=∑

i≥0

ci

(∫ (MT−a)si+1+b

(MT−a)si+b

f(t) dt +∫ (MT−a)s−i+b

(MT−a)s−(i+1)+b

f(t) dt

+∫ asi+1+b

asi+b

f(t) dt +∫ as−i+b

as−(i+1)+b

f(t) dt

)

=∑

i≥0

ci

(∫ −asi+1+b+MT (si+1−si)

−asi+b

f(t) dt +∫ asi+b+MT (si+1−si)

asi+1+b

f(t) dt

+∫ asi+1+b

asi+b

f(t) dt +∫ −asi+b

−asi+1+b

f(t) dt

)

=∑

i≥0

ci

(∫ −asi+1+b+MT (si+1−si)

−asi+1+b

f(t) dt +∫ asi+b+MT (si+1−si)

asi+b

f(t) dt

)

=∑

i≥0

ci

(∫ MT (si+1−si)

0

f(t) dt +∫ MT (si+1−si)

0

f(t) dt

)

=∑

i≥0

ci2M(si+1 − si)∫ T

0

f(t) dt = M

∫ψ(t) dt

∫ T

0

f(t) dt = 0,

where the last step follows since∫

ψ(t) dt = 0.b. Since ψ is odd, there exist si ∈ R such that −ψ|[s−(i+1),s−i) = ψ|[si,si+1) = ci,

i ∈ Z and ci ∈ C, and s−i = −si for i ∈ Z.We compute

Wψf(b,MT − a)−Wψf(b, a) =∫

f(t)ψ( t−bMT−a ) dt−

∫f(t)ψ( t−b

a ) dt

=∑

i≥0

ci

(∫ (MT−a)si+1+b

(MT−a)si+b

f(t) dt−∫ (MT−a)s−i+b

(MT−a)s−(i+1)+b

f(t) dt

−∫ asi+1+b

asi+b

f(t) dt +∫ as−i+b

as−(i+1)+b

f(t) dt

)

=∑

i≥0

ci

(∫ MTsi+1−asi+1+b

MTsi−asi+b

f(t) dt−∫ −MTsi+asi+b

−MTsi+1+asi+1+b

f(t) dt

−∫ asi+1+b

asi+b

f(t) dt +∫ −asi+b

−asi+1+b

f(t) dt

)

=∑

i≥0

ci

(∫ −asi+1+b+MT (si+1−si)

−asi+1+b

f(t) dt−∫ asi+b+MT (si+1−si)

asi+b

f(t) dt

)

=∑

i≥0

ci

(∫ MT (si+1−si)

0

f(t) dt−∫ MT (si+1−si)

0

f(t) dt

)= 0.

Page 7: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

PERIODIC WAVELET TRANSFORMS AND PERIODICITY DETECTION 7

Note that in part b we did not explicitly use the fact that∫

ψ(t) dt = 0. Never-theless,

∫ψ(t) dt = 0 since ψ is odd.

3. Characterization of wavelets with periodic wavelet transforms. Thefollowing theorem completely classifies all wavelets which have the property that thenon–normalized wavelet transform of any periodic function f ∈ L∞(R) is periodicin scale. Recall that continuous wavelet transforms of periodic functions are alwaysperiodic in time.

Theorem 3.1. Let ψ ∈ L1(R). The following are equivalent:i. Wψf(b, a) =

∫f(t)ψ( t−b

a ) dt is 1–periodic in a for all f ∈ L∞(T). (P)ii. ψ(0) = 0 and ψ has the form

ψ(·) =∑

n∈Zen1(n,n+1)(·) +

n∈Zbn ln | · −n|,

where {bn}, {en − en−1} ∈ l1(Z) and {en − πi∑

k≤n bk} ∈ l2(Z).Remark 3.2. a. Our proof of Theorem 3.1 is classical and detailed to make it

readily accessible. Some distributional arguments may have saved a few lines, andsome of the lemmas could have been integrated with each other, but we have chosento exposit the proof as follows to exhibit each of the steps in elementary terms.

b. Theorem 3.1, as well as most results and remarks in this section, has a trivialgeneralization to S–periodic functions. In fact, if ψ ∈ L1(R) has the property thatWψf(b, a) is T–periodic in a for all f ∈ L∞(TS), then ψ defined by ψ(t) = ψ( S

T t) hasproperty (P). Hence ψ has the form

ψ(·) =∑

n∈Zen1(n,n+1)(·) +

n∈Zbn ln | · −n|,

where {bn}, {en− en−1} ∈ l1(Z) and {en−πi∑

k≤n bk} ∈ l2(Z). Consequently, ψ hasthe form

ψ(·) =∑

n∈Zen1( T n

S , T n+TS )(·) +

n∈Zbn ln

∣∣T ·−SnS

∣∣ ,

where {bn}, {en − en−1} ∈ l1(Z) and {en − πi∑

k≤n bk} ∈ l2(Z).To prove Theorem 3.1, we need to establish several lemmas (Lemma 3.3, Lemma

3.5, Lemma 3.6, Lemma 3.7, Lemma 3.10, and Lemma 3.11).Lemma 3.3. Let ψ ∈ L1(R). The following are equivalent:

i. Wψf(b, a) =∫

f(t)ψ( t−ba ) dt is 1–periodic in a for all f ∈ L∞(T).

ii. ψ(0) = 0 and there exists a continuous function ϕ on R, 1–periodic on R+ and1–periodic on R−, such that

∀γ ∈ R \ {0}, ψ(γ) =ϕ(γ)

γ.

Proof. i =⇒ ii. Let us assume Wψf(b, a) =∫

f(t)ψ( t−ba ) dt is T = 1 periodic in a

for all f ∈ L∞(T). Define

∀k ∈ Z, Sk(t) =∑

|n|≤k

(ψ( t−n−b

a )− ψ( t−n−ba+1 )

).

Page 8: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

8 J. J. BENEDETTO AND G. E. PFANDER

Then, for fixed b ∈ R and a ∈ R+, we obtain

0 = Wψf(b, a)−Wψf(b, a + 1)

=∑

n∈Z

∫ 1

0

f(t− n)(ψ

(t−n−b

a

)− ψ(

t−n−ba+1

))dt = lim

k→∞

∫ 1

0

f(t)Sk(t) dt. (3.1)

We can interchange the limit and the integral in (3.1) using the Lebesgue dominatedconvergence theorem on the partial sums Sk; in fact,

∀k ≥ 0, |Sk(t)| ≤∑

n∈Z

(|ψ( t−n−b

a )|+ |ψ( t−n−ba+1 )|

), (3.2)

where the right side of (3.2) is an element of L1(T) since ψ ∈ L1(R).The calculation in (3.1) shows that if Wψf is 1–periodic in scale for all f ∈ L∞(T),

then

S(t) =∑

n∈Z

(ψ( t−n−b

a )− ψ( t−n−ba+1 )

)= 0.

Thus, for all m ∈ Z, we have

0 = S[m] =∫ 1

0

n∈Z

(ψ( t−n−b

a )− ψ( t−n−ba+1 )

)e−2πimt dt (3.3)

=∑

n∈Z

(∫ 1

0

ψ( t−n−ba )e−2πimt dt−

∫ 1

0

ψ( t−n−ba+1 )e−2πimt dt

)

=∑

n∈Z

(∫ 1−b−na

0−b−na

ψ(u)e−2πim(au+n+b)a du

−∫ 1−b−n

a+1

0−b−na+1

ψ(u)e−2πim((a+1)u+n+b)(a + 1) du

)

=∫

ψ(u)e−2πim(au+b)a du−∫

ψ(u)e−2πim((a+1)u+b)(a + 1) du

= e−2πimb(aψ(ma)− (a + 1)ψ(m(a + 1))).

Interchanging the sum and the integral in (3.3) is justified by the Lebesgue dominatedconvergence theorem.

Because of (3.3), we have

aψ(ma)− (a + 1)ψ(m(a + 1)) = 0

for all a ∈ R+ and all m ∈ Z, and in particular ψ(0) = 0. If we let

ϕ(γ) = γψ(γ)

for γ ∈ R, and take m = 1, we obtain for γ ∈ R+ that

ϕ(γ)− ϕ(γ + 1) = γψ(γ)− (γ + 1)ψ(γ + 1) = 0.

Hence, ϕ(γ) = ϕ(γ + 1) for all γ ∈ R+. For γ ∈ R− and a = −γ > 0, we set m = −1and obtain

ϕ(γ)− ϕ(γ − 1) = 0.

Page 9: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

PERIODIC WAVELET TRANSFORMS AND PERIODICITY DETECTION 9

Thus, ϕ(γ) = ϕ(γ − 1) for all γ ∈ R−, and ii holds.ii =⇒ i. Conversely, if statement ii holds, we have for m > 0 that

aψ(ma)− (a + 1)ψ(m(a + 1)) = aϕ(ma)

ma− (a + 1)

ϕ(m(a + 1))m(a + 1)

=1m

(ϕ(ma)− ϕ(ma + m)) = 0,

since m, am > 0 and by the 1–periodicity of ϕ on R+. Similarly, for m < 0,

aψ(ma)− (a + 1)ψ(m(a + 1)) =1m

(ϕ(ma)− ϕ(ma + m)) = 0,

since now m, am < 0 and the 1–periodicity of ϕ on R− applies. Also, ψ(0) = 0 impliesS[0] = 0.

Hence, S[m] = 0 for all m ∈ Z. By the uniqueness theorem for Fourier transformswe have S = 0 in L1(T). Thus, the periodicity in scale follows, since

Wψf(b, a)−Wψf(b, a + 1) =∫ 1

0

f(t)S(t) dt = 0;

and i is obtained.Remark 3.4. a. Lemma 3.3 implies that if ψ satisfies property (P), then ψ has

the form

ψ(γ) =ϕ1(γ)

γ+ H(γ)

ϕ2(γ)γ

,

where ϕ1 and ϕ2 are 1–periodic on all of R, and H denotes the Heaviside function,i.e., H = 1(0,∞).

b. If ψ has property (P), then ψ(γ) = O( 1γ ) and ψ(γ) 6= o( 1

γ ) as |γ| → ∞. Inparticular, if ψ has property (P) then it is not absolutely continuous.

c. Equation (3.1) in the proof of Lemma 3.3 implies that, for fixed ψ ∈ L1(R)and fixed f ∈ L∞(T), Wψf is 1–periodic in scale if and only if

∫ 1

0

f(t)∑

n∈Z

(ψ( t−n−b

a )− ψ( t−n−ba+1 )

)dt = 0,

for all a ∈ R+ and all b ∈ R. This can be helpful if we are interested in picking out onespecific periodic component f ∈ L∞(T) in a signal that carries other periodic compo-nents besides f . The fact that for periodic g 6= f ∈ L∞(T) the wavelet transform ofg might not be periodic implies that the components of g in a signal get blurred inthe wavelet transform. This can be helpful to distinguish periodic signals of differentshapes.

Lemma 3.5 and Lemma 3.6 will be used to prove Lemma 3.7, and both Lemma3.6 and 3.7 are used explicitly in the proof of Theorem 3.1

Lemma 3.5. For all 0 < ε < 1 and γ ∈ R we have∣∣∣∣∣∫ 1

ε

ε

sin(2πtγ)t

dt

∣∣∣∣∣ ≤ 5π.

Page 10: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

10 J. J. BENEDETTO AND G. E. PFANDER

The proof is standard and is omitted.Before stating and proving Lemma 3.6, we shall recall a few facts from harmonic

analysis. Let w denote the Fejer kernel defined as

∀t ∈ R, w(t) =12π

(sin

(t2

)t2

)2

.

Clearly, w ∈ L1(R) ∩ C(1)(R) and w′ ∈ L1(R), since

w′(t) = sin( t2 )

[cos

(t2

)(

t2

)2 − sin(

t2

)(

t2

)2

],

and therefore w′(t) = O( 1t2 ), |t| → ∞. The Fourier transform w of w is

∀γ ∈ R, w(γ) = max{0, 1− |γ|}.

The de la Vallee–Poussin kernel v is then defined as

∀t ∈ R, v(t) = 4w(2t)− w(t).

Thus, v ∈ L1(R) ∩ C(1)(R) and v′ ∈ L1(R). Clearly,

v(γ) = 2w(γ2 )− w(γ),

and therefore v(γ) = 1 for γ ∈ [−1, 1] and v(γ) = 0 for γ /∈ [−2, 2]. Note that sincev, v′ ∈ L1(R) and

∀γ ∈ R, v′(γ) = iγv(γ),

we have γv(γ) ∈ A(R).Lemma 3.6. Let ψ ∈ L1(R) be such that for all γ ∈ R+, resp., for all γ ∈ R−,

ψ(γ) =ϕ(γ)

γ

with ϕ 1–periodic on R. Then ϕ ∈ A(T) and, hence, the Fourier Series S(ϕ)(γ) =∑

n∈Z bne−2πinγ , converges to ϕ absolutely and uniformly, i.e., {bn} ∈ l1(Z).Proof. Fix γ0 ∈ [1, 2), resp., γ0 ∈ [−2, 1). Define

∀t ∈ R, vγ0(t) = 18v( t

8 )e2πiγ0t.

Then, clearly,

vγ0(γ) = v(8(γ − γ0)),

γ ∈ R, vγ0(γ) = 1 for γ ∈ [γ0− 18 , γ0+ 1

8 ], and supp(vγ0) ⊆ [γ0− 14 , γ0+ 1

4 ] ⊆ [ 34 , 94 ] ⊆ R+,

resp., supp(vγ0) ⊆ R−. As before, γvγ0(γ) ∈ A(R).Since ψ ∈ A(R) we have vγ0(γ)ϕ(γ) = γvγ0(γ)ψ(γ) ∈ A(R). Therefore, by a

theorem of Wiener ([30], [2], page 202, [23], page 56), vγ0ϕ ∈ A(T). Since ϕ = vγ0ϕ ina neighborhood of γ0, we have ϕ ∈ Aloc(γ0)(T). This result holds for any γ0 ∈ [1, 2],

Page 11: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

PERIODIC WAVELET TRANSFORMS AND PERIODICITY DETECTION 11

resp., [−2,−1), and hence ϕ ∈ Aloc(T). By Wiener’s local membership theorem wehave ϕ ∈ A(T) [2], page 200, [23].

Therefore, we can write ϕ(γ) =∑

n∈Z bne−2πnγ with {bn} ∈ l1(Z) and the resultis proven.

Lemma 3.7. Let ψ ∈ L2(R) be such that

∀γ ∈ R \ {0}, F(ψ)(γ) =ϕ(γ)

γ,

where ϕ ∈ A(T). Then ψ has the form

ψ(·) =∑

n∈Zπian sgn(· − n) =

n∈Zcn1(n,n+1)(·), (3.4)

where {an} ∈ l1(Z) is the sequence of Fourier coefficients of ϕ and where {cn} ∈ l2(Z)is defined by cn = 2πi

∑k≤n an. The convergence on the right hand side of (3.4) is

pointwise for t /∈ Z, as well as in L2(R).Thus, for cn = 2πi

∑k≤n an, we have the F–pairing,

n∈Zcn1(n,n+1)(t) ←→

n∈Zane−2πinγ . (3.5)

Proof. Clearly, ψ ∈ L2(R) since ψ ∈ L2(R). Thus, we can apply the L2–inversionformula

ψ(t) = limN→∞

∫ N

−N

ψ(γ)e2πiγt dγ,

with convergence of this limit in L2(R). We also have

ϕ(γ) =∑

n∈Zane−2πinγ

with {an} ∈ l1(Z) since ϕ ∈ A(T). We obtain

ψ(t) = limN→∞

∫ N

−N

ψ(γ)e2πiγtdγ = limN→∞

∫1N≤|γ|≤N

(∑

n∈Zane−2πinγ

)e2πiγt dγ

= limN→∞

∫1N≤|γ|≤N

n∈Zan

e2πi(t−n)γ

γdγ = lim

N→∞

n∈Zan

∫1N≤|γ|≤N

e2πi(t−n)γ

γdγ

= limN→∞

n∈Zan

∫1N≤|γ|≤N

(cos(2π(t− n)γ)

γ+ i

sin(2π(t− n)γ)γ

)dγ

= i limN→∞

n∈Zan

∫1N≤|γ|≤N

sin(2π(t− n)γ)γ

= i∑

n∈Zan lim

N→∞

∫1N≤|γ|≤N

sin(2π(t− n)γ)γ

= i∑

n∈Zan

π for t > n0 for t = n−π for t < n

,

Page 12: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

12 J. J. BENEDETTO AND G. E. PFANDER

where the interchange of integration and summation is true, since {an} ∈ l1(Z)(Lemma 3.6), and where the last equation is a consequence of Lemma 3.5.

Further note that for t ∈ (k, k + 1) we have

ψ(t) =∑

n∈Zπian sgn(t− n) =

n≤k

πian −∑

n≥k+1

πian

=∑

n≤k

πian +∑

n∈Zπian −

n≥k+1

πian = 2πi∑

n≤k

an = ck.

Finally, we have ‖{cn}‖l2(Z) = ‖ψ‖L2(R) < ∞ and therefore {cn} ∈ l2(Z).The following theorem is a corollary of Lemmas 3.6 and 3.7.Theorem 3.8. Let ψ ∈ L1(R) be defined by

∀γ ∈ R, ψ(γ) =ϕ(γ)

γ,

where ϕ is 1–periodic on R and ψ(0) = 0. Then ψ is a generalized Haar wavelet ofdegree 1. In fact,

ψ(·) =∑

n∈Zπian sgn(· − n) =

n∈Zcn1(n,n+1)(·),

where

∀γ ∈ R, ϕ(γ) =∑

n∈Zane−2πinγ ,

and {cn} ∈ l1(Z), where

cn = 2πi∑

k≤n

ak.

Proof. By our hypotheses, Lemma 3.6 implies that ϕ ∈ A(T). The result thenfollows from Lemma 3.7. Since ψ ∈ L1(R), we obtain the fact that {cn} ∈ l1(Z) ⊆l2(Z) by the calculation

∑n∈Z |cn| = ‖ψ‖L1(R) < ∞.

To obtain the main result Theorem 3.1, restated ahead as Theorem 3.12, weneed two more lemmas (Lemma 3.10 and Lemma 3.11), the first of which requires afundamental property of Hilbert transforms stated in Theorem 3.9.

The Hilbert transform of a function f is formally defined by

H(f)(t) = limε→0

|t−u|≤ε

f(u)t− u

du.

For f ∈ L2(R) this limit exists for almost every t ∈ R. Proofs of this fact and thefollowing result can be found in [17, 2].

Theorem 3.9. H : L2(R) −→ L2(R) is a well-defined isometry. The Hilberttransform and the Fourier transform are related by the equation,

∀f ∈ L2(R), H(f) = F−1 (−i sgn(·) · (F(f))) .

Page 13: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

PERIODIC WAVELET TRANSFORMS AND PERIODICITY DETECTION 13

Lemma 3.10. Let ψ ∈ L2(R) have the property that

∀γ ∈ R, F(ψ)(γ) = H(γ)ϕ(γ)

γ,

where ϕ ∈ A(T). Then there exists {dn} ∈ l2(Z) and {bn} ∈ l1(Z) such that∑n∈Z bn = 0 and

ψ(·) = 12

n∈Zdn1(n,n+1)(·) +

n∈Zbn ln | · −n|

with pointwise convergence for t /∈ Z, as well as convergence in L2(R).Thus, if dn = 2πi

∑k≤n bk, we have the F–pairing

n∈Zdn1(n,n+1)(t) +

n∈Zbn ln |t− n| ←→ H(γ)

n∈Zbne−2πinγ . (3.6)

Proof. Let Θ(γ) = ϕ(γ)γ , where ϕ(γ) =

∑n∈Z bne−2πinγ . Clearly Θ ∈ L2(R).

Lemma 3.7 implies that

F−1(Θ) =∑

n∈Zdn1(n,n+1),

where

dn = 2πi∑

k≤n

bk

and {dn} ∈ l2(Z). Define

g = 12F−1(Θ)− 1

2iH(F−1(Θ)).

Clearly, g ∈ L2(R), and

F(g) = 12Θ− 1

2iF(F−1(−i sgn F(F−1(Θ)))) = 12Θ + 1

2 sgnΘ = HΘ.

Hence, g = F−1(HΘ). Further, for t /∈ Z, we compute

H(F−1(Θ))(t) = limε→0

|t−u|≥ε

∑n∈Z dn1(n,n+1)(u)

t− udu

= − limε→0

|x|≥ε

∑n∈Z dn1(t−n−1,t−n)(x)

xdx

= − 1π

n∈Zdn

∫ t−n

t−n−1

1x

dx = − 1π

n∈Z(dn − dn−1) ln |t− n|

= − 1π

n∈Z(2πi

k<n

ak − 2πi∑

k<n−1

ak) ln |t− n| = −2i∑

n∈Zbn ln |t− n|.

Therefore, for such t /∈ Z,

g(t) = 12F−1(Θ)(t)− 1

2iH(F−1(Θ))(t) = 12

n∈Zdn1(n,n+1)(t) +

n∈Zbn ln |t− n|.

Page 14: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

14 J. J. BENEDETTO AND G. E. PFANDER

Lemma 3.11. Let ψ ∈ L1(R) have the properties that ψ(0) = 0 and that fort /∈ Z,

ψ(t) =∑

n∈Zen1(n,n+1)(t) +

n∈Zbn ln |t− n|,

where {an}, {bn} ∈ l1(Z), and {cn} ∈ l2(Z) satisfy the conditions

an = 12πi (en − en−1)− 1

2bn,

and

cn = en − πi∑

k≤n

bk.

Then ψ ∈ L2(R).Proof. We shall prove this result in four steps.

i. There exists C1 such that |en| ≤ C1 for all n ∈ Z.The hypothesis

an = 12πi (en − en−1)− 1

2bn,

yields

2πi∑

1≤n≤N

an =∑

1≤n≤N

(en − en−1)− πi∑

1≤n≤N

bn = eN − e1−1 − πi∑

1≤n≤N

bn

for all N ≥ 1. Therefore, for all such N , we have

|eN − e0| = |πi∑

1≤n≤N

bn + 2πi∑

1≤n≤N

an| ≤ π(∑

1≤n≤N

|bn|+ 2∑

1≤n≤N

|an|)

≤ π(‖{bn}‖l1(Z) + 2 ‖{an}‖l1(Z)),

since {an} and {bn} ∈ l1(Z). Setting

C1 = π(‖{bn}‖l1(Z) + 2 ‖{an}‖l1(Z)) + |e0|,

we obtain

∀N ≥ 1, |eN | ≤ C1.

Clearly, the same bound holds for negative N and |e0|, and step i is complete.For n ∈ Z, define ∀t ∈ [n− 1

2 , n + 12 ],

gn(t) =∑

k 6=n

bk ln |t− k| = ψ(t)− bn ln |t− n| − en−11(n−1,n)(t)− en1(n,n+1)(t).

The sum converges pointwise.ii. There exists C2 such that |g′n| ≤ C2 on [n− 1

2 , n + 12 ] for all n ∈ Z.

Fix n ∈ Z. For k 6= n let

Sk(t) = bk ln |t− k|.

Page 15: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

PERIODIC WAVELET TRANSFORMS AND PERIODICITY DETECTION 15

Sk is continuously differentiable on the interval [n− 12 , n + 1

2 ], and

∀t ∈ [n− 12 , n + 1

2 ], |Sk′(t)| = |bk

1t− k

| ≤ 2|bk|.

Since {bn} ∈ l1(Z), we can define

hn(t) =∑

k 6=n

bk1

t− k

with uniform convergence on [n − 12 , n + 1

2 ]. Hence, gn is continuously differentiableon [n− 1

2 , n + 12 ] and g′n = hn. Letting C2 = 2 ‖{bn}‖l1(Z) we have

|g′n(t)| ≤ C2

for t ∈ [n− 12 , n + 1

2 ].iii. There exist N > 0 and C3 such that |gn| ≤ C3 on [n− 1

2 , n+ 12 ] for all n for which

|n| ≥ N .There exists N such that for all n ≥ N there is a tn ∈ [n − 1

2 , n − 14 ] for which

ψ(tn) ≤ 1. This statement holds since, if there were infinitely many nk with ψ(t) ≥ 1for all t ∈ [nk − 1

2 , nk − 14 ], we would obtain

∫|ψ(t)| dt ≥

k∈N

∫ nk− 14

nk− 12

dt = ∞,

which contradicts the hypothesis that ψ ∈ L1(R).Let |bn| ≤ C4 for all n ∈ Z, and set C5 = 1 + C4 ln 4 + 2C1. We obtain

|gn(tn)| = |ψ(tn)− bn ln |tn − n| − en−11(n−1,n)(tn)− en1(n,n+1)(tn)|≤ 1 + |bn| ln 4 + |en−1|+ |en| ≤ 1 + C4 ln 4 + 2C1 = C5.

Set C3 = C2+C5. Then, for all t∈[n−12 , n+1

2 ], there exists ξn∈[min{t, tn}, max{t, tn}],such that

|gn(t)| ≤ |gn(t)− gn(tn)|+ |gn(tn)| ≤ |(t− tn)g′n(ξn)|+ |gn(tn)| ≤ C3.

iv.{∫ n+ 1

2n− 1

2|ψ(t)|2 dt

}∈ l1(Z), and therefore ψ ∈ L2(R).

For n ∈ Z and t ∈ [n− 12 , n + 1

2 ], we define

gn(t) =∑

k 6=n

bk ln |t− k|+ en−11(n−1,n)(t) + en1(n,n+1)(t) = ψ(t)− bn ln |t− n|.

Hence, for |n| ≥ N , we obtain

∀t ∈ [n− 12 , n + 1

2 ], |gn(t)| ≤ C1 + C3.

We shall first show that{∫ n+ 1

2n− 1

2|gn| dt

}∈ l1(Z).To begin, note that

∫ n+ 12

n− 12

|bn ln |t− n|| dt = |bn|∫ 1

2

− 12

| ln |t|| dt = 2|bn|∫ 1

2

0

| ln |t|| dt = |bn|(ln 2 + 1),

Page 16: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

16 J. J. BENEDETTO AND G. E. PFANDER

and therefore{∫ n+ 1

2n− 1

2|bn ln |t− n|| dt

}∈ l1(Z). Since

∫ n+ 12

n− 12

|gn(t)| dt =∫ n+ 1

2

n− 12

|ψ(t)− bn ln |t− n|| dt

≤∫ n+ 1

2

n− 12

|ψ(t)| dt +∫ n+ 1

2

n− 12

|bn ln |t− n|| dt

and{∫ n+ 1

2n− 1

2|ψ(t)| dt

}∈ l1(Z), we obtain

{∫ n+ 12

n− 12|gn(t)| dt

}∈ l1(Z).

The following calculation concludes the verification of step iv:

∫ n+ 12

n− 12

|ψ(t)|2 dt =∫ n+ 1

2

n− 12

|gn(t) + bn ln |t− n||2 dt

≤∫ n+ 1

2

n− 12

|gn(t)|2 + 2|gn(t)bn ln |t− n||+ |bn ln |t− n||2 dt

≤ (C1 + C3)∫ n+ 1

2

n− 12

|gn(t)| dt

+2(C1 + C3)∫ n+ 1

2

n− 12

|bn ln |t− n||+ C4|bn|∫ 1

2

− 12

| ln |t||2 dt.

The elements on the right hand side form an l1(Z) sequence, and therefore{∫ n+ 12

n− 12|ψ(t)|2 dt

}∈ l1(Z) and ψ ∈ L2(R).

We can now complete the proof of the characterization theorem on R, which wasearlier stated as Theorem 3.1.

Theorem 3.12. Let ψ ∈ L1(R). The following are equivalent:i. Wψf(b, a) =

∫f(t)ψ( t−b

a ) dt is 1–periodic in a for all f ∈ L∞(T).ii. ψ(0) = 0 and ψ has the form

ψ(·) =∑

n∈Zen1(n,n+1)(·) +

n∈Zbn ln | · −n|,

where {bn}, {en − en−1} ∈ l1(Z), and {en − πi∑

k≤n bk} ∈ l2(Z).Proof. i =⇒ ii. We apply Lemma 3.3 and obtain

ψ(γ) =ϕ1(γ)

γ+ H(γ)

ϕ2(γ)γ

and ψ(0) = 0, where ϕ1 and ϕ2 are 1–periodic. By Lemma 3.6 we have ϕ1, ϕ1 +ϕ2 ∈A(T), and, hence, ϕ1, ϕ2 ∈ A(T). Let us write

ϕ1(γ) =∑

n∈Zane−2πinγ and ϕ2(γ) =

n∈Zbne−2πinγ .

Since ψ(0) = 0, we have that ψ, ϕ1(γ)γ , and H(γ)ϕ2(γ)

γ are bounded on R and of

order O( 1γ ), |γ| → ∞, and are therefore in L2(R). We can calculate ψ = F−1(ψ),

Page 17: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

PERIODIC WAVELET TRANSFORMS AND PERIODICITY DETECTION 17

using the linearity of F−1, Lemma 3.7, and Lemma 3.10:

ψ(t) = F−1

(ϕ1(γ)

γ

)(t) + F−1

(H(γ)

ϕ2(γ)γ

)(t)

=∑

n∈Zcn1(n,n+1)(t) +

n∈Z

12dn1(n,n+1)(t) +

n∈Zbn ln |t− n|

=∑

n∈Z(cn + 1

2dn)1(n,n+1)(t) +∑

n∈Zbn ln |t− n|,

where dn = 2πi∑

k≤n bk and cn = 2πi∑

k≤n ak. Let en = cn + 12dn.

Since {an}, {bn} ∈ l1(Z), and

an =1

2πi(cn − cn−1) =

12πi

(en − 12dn − en−1 + 1

2dn−1) = 12πi (en − en−1)− 1

2bn,

we obtain that {en − en−1} ∈ l1(Z).Further, since

∑n∈Z cn1(n,n+1) = F−1(ϕ1(γ)

γ ) ∈ L2(R), we have {cn} ∈ l2(Z),where

cn = 2πi∑

k≤n

ak =∑

k≤n

((ek − ek−1)− πibk) = en − πi∑

k≤n

bk.

Therefore, ii holds.ii =⇒ i. Let ψ ∈ L1(R) be of the form

ψ(t) =∑

n∈Zen1(n,n+1)(t) +

n∈Zbn ln |t− n|

with {bn} and {en − en−1} ∈ l1(Z), and {en − πi∑

k≤n bk} ∈ l2(Z). For n ∈ Z, set

an = 12πi (en − en−1)− 1

2bn,

cn = en−πi∑

k≤n bk, and dn = 2πi∑

k≤n bk. Then cn = en− 12dn and an = 1

2πi (cn−cn−1). ψ ∈ L2(R) by Lemma 3.11. Let

ψ1(t) =∑

n∈Zcn1(n,n+1)(t).

Then, ψ1 ∈ L2(R) since {cn} ∈ l2(Z) and ‖ψ1‖L2(R) = ‖{cn}‖l2(Z). Further, let

ψ2(t) = 12

n∈Zdn1(n,n+1)(t) +

n∈Zbn ln |t− n|.

Since ψ ∈ L2(R) and ψ1 ∈ L2(R), we have ψ2 = ψ − ψ1 ∈ L2(R).We can apply Lemma 3.7 to ψ1 and Lemma 3.10 to ψ2, and conclude that F(ψ1)

and F(ψ2) are 1–periodic on R+ and 1–periodic on R−. Hence,

ψ = F(ψ) = F(ψ1 + ψ2) = F(ψ1) + F(ψ2)

is 1–periodic on R+ and 1–periodic on R−. Since ψ(0) = 0, we can apply Lemma 3.3,and i follows.

Page 18: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

18 J. J. BENEDETTO AND G. E. PFANDER

Remark 3.13. a. It is easy to give a formal proof of Theorem 3.12 for thedirection i =⇒ ii. For this we combine Proposition 2.3 with a comparable calculationfor ψ ∈ L1(R) defined by

ψ(t) =∑

n∈Zbn ln |t− n|,

where∑

n∈Z bn = 0. In fact, noting that

ψ(

t−ba

)=

n∈Zbn ln |t− b− na| ,

we have

Wψf(b, a + 1) =∫ (∑

n∈Zbn ln |t− b− n(a + 1)|

)f(t) dt

=∑

n∈Zbn

∫ln |t− b− n(a + 1)| f(t) dt

=∑

n∈Zbn

∫ln |t− b− na| f(t + n) dt =

n∈Zbn

∫ln |t− b− na| f(t) dt

=∫ (∑

n∈Zbn ln |t− b− na|

)f(t) dt = Wψf(b, a).

b. There is no redundancy in the three conditions a. {bn} ∈ l1(Z); b. {en −en−1} ∈ l1(Z); c. {en − πi

∑k≤n bk} ∈ l2(Z).

To see this, first, let {en} = {0} and {bn} = { 1n2+1} for n ∈ Z. These sequences

satisfy a and b but not c. Next, the sequences {bn} and {en}, defined by {bn} = {0}and en = 1

n for n positive and odd and en = 0 otherwise, fulfill conditions a and c,but not condition b. Finally, the sequences {bn} and {en}, defined by {en} = {0} andbn = (−1)n 1

n for n positive and bn = 0 otherwise, satisfy b and c, but not a.In the following examples we shall construct wavelets ψ ∈ L1(R) which are not

piecewise constant, but which have the property that Wψf is 1–periodic in scale forevery f ∈ L∞(T).

Example 3.14. Consider

∀t ∈ R \ {0, 1}, ψ0(t) = ln |t| − ln |t− 1| = ln∣∣∣ tt−1

∣∣∣ .

This function clearly satisfies condition ii of Theorem 3.12, for, even though ψ0 /∈L1(R), we see that ψ0(0) = 0 in the sense of a Cauchy principal value, since 0 =∫ N

−N+1ψ0(t) dt for N ≥ 1.

Let us now construct ψ ∈ L1(R), with {bn} 6= {0}, for which condition ii issatisfied. In fact, set

ψ(t) =∑

|n|≥2

ln∣∣∣∣

n

n + 1

∣∣∣∣1(n,n+1)(t) + ln |t| − ln |t− 1|.

Then b0 = 1, b1 = −1, bn = 0 for n 6= 0, 1, and hence {bn} ∈ l1(Z). Further, lettingen = ln

∣∣∣ nn+1

∣∣∣ for |n| ≥ 2, we have

an = en − en−1 =(

ln∣∣∣∣

n

n + 1

∣∣∣∣− ln∣∣∣∣n− 1

n

∣∣∣∣)

= − ln∣∣∣∣(n + 1)(n− 1)

n2

∣∣∣∣ = − ln∣∣∣∣1−

1n2

∣∣∣∣

Page 19: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

PERIODIC WAVELET TRANSFORMS AND PERIODICITY DETECTION 19

for |n| ≥ 2, and, hence, {en − en−1} ∈ l1(Z). For |n| ≥ 3, we have

en − πi∑

k≤n

bk = en.

In order to show that ψ ∈ L1(R) observe that on the positive part of the real axis

∫ ∞

2

|ψ(t)| dt ≤ limN→∞

N∑n=2

ψ(n) = limN→∞

N∑n=2

(ln

∣∣∣∣n

n + 1

∣∣∣∣− ln∣∣∣∣n− 1

n

∣∣∣∣)

= ln 2.

A similar calculation holds for the negative part of the real axis and, therefore, ψ ∈L1(R). Finally, using the facts that

∫ N

−N+1ψ0(t) dt = 0 and

∫ N

−Nψ(t) − ψ0(t) dt = 0

for N ≥ 1, we obtain ψ(0) = 0.Thus, condition ii of Theorem 3.12 is satisfied, and so Wψf is 1–periodic in scale

for all f ∈ L∞(T).

−5 −4 −3 −2 −1 0 1 2 3 4 5−6

−4

−2

0

2

4

6

t (TIME)

Fig. 3.1. The wavelet ψ ∈ L1(R) of Example 3.14

Example 3.15. We shall construct ψ ∈ L1(R) satisfying condition ii of Theorem3.12 and which has the further property that in the representation of part ii, {en} ={0}, i.e., ψ contains no generalized Haar component.

Let

ψ(t) = ln |t + 1| − ln |t + 2|+ ln |t− 1| − ln |t− 2| = ln∣∣∣∣t2 − 1t2 − 4

∣∣∣∣ .

ψ is monotonically decreasing for |t| → ∞. Hence, we can apply the sum criteria toshow ψ ∈ L1(R). Note that

3≤|n|≤N

|ψ(n)| = 2 ln 4− 2 ln(

N+2N−1

),

and so∑

3≤|n||ψ(n)| = 2 ln 4.

Page 20: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

20 J. J. BENEDETTO AND G. E. PFANDER

−5 −4 −3 −2 −1 0 1 2 3 4 5−6

−4

−2

0

2

4

6

t (TIME)

Fig. 3.2. The wavelet ψ ∈ L1(R) of Example 3.15

4. Optimal generalized Haar wavelets. We shall construct generalized Haarwavelets to detect a specific periodic function f in a noisy signal s(t) = Af(ct)+N(t),t ∈ I ⊂ R. In fact, an optimal generalized Haar wavelet ψ is chosen so that we canidentify the periodic components of the wavelet transform W p

ψs.To apply averaging methods to detect bi–periodic behavior in W p

ψs (Section 5), wewant W p

ψf to be well–localized. This will result in a lattice pattern of relative maximain time–scale space. For a given periodic signal f , we shall show the existence of anoptimal generalized Haar wavelet, which guarantees these relative maxima to be aslarge as possible.

4.1. Construction of optimal generalized Haar wavelets. Before beingmore precise with respect to the term optimal generalized Haar wavelet, we need tointroduce certain restrictions.

We begin by letting M=1 and by fixing N ∈ N. We consider generalized Haarwavelets ψc with compact support and with the form

ψc|[n,n+1) = cn for n = 0, . . . , N − 1, c = (c0, c1, . . . , cN−1) ∈ CN . (4.1)

Additionally, we require

0 =∫

ψc(t) dt =N−1∑n=0

cn, (4.2)

and we normalize ψc so that

‖ψc‖L2(R) = ‖c‖l2(CN ) = 1. (4.3)

Equation (4.2) allows us to achieve the periodicity properties asserted in Propo-sition 2.3. Note that (4.2) is equivalent to the condition that

c ∈ H = {x ∈ CN :N−1∑n=0

xn = 〈x, (1, 1, . . . , 1, 1)〉 = 0}.

H is an N − 1 dimensional subspace, i.e., a hyperplane. Equation (4.3) is a standardnormalization constraint in constructing wavelets. For ψc it can be expressed as

c ∈ S2N−1 = {x ∈ CN : ‖x‖l2(CN ) = 1}.

Page 21: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

PERIODIC WAVELET TRANSFORMS AND PERIODICITY DETECTION 21

We shall design a wavelet which has a clear single peak in the (0, T ]× (0,MT ] =(0, T ] × (0, T ] cell of the wavelet transform. Theorem 4.2 shows how to achieve amaximal peak. We need the following adaptation of the Cauchy–Schwarz inequalityin order to prove Theorem 4.2.

Lemma 4.1. Let U be a k-dimensional subspace of CN . Let v ∈ CN and let PU

be the orthogonal projection of CN onto U. Then

|〈u, v〉| ≤ 〈 PU (v)‖PU (v)‖l2(CN )

, v〉

for all u ∈ U ∩ S2N−1.Theorem 4.2. Let p > 1 and f ∈ L∞(R), or let p ≥ 1, f ∈ L1(TT ), and suppose

each x ∈ R is a Lebesgue point of f . Let N ∈ N.a. There exists (b0, a0) ∈ R× R+ such that

a− 1

p

0 ‖PH(kb0,a0)‖l2(CN ) = max(b,a)∈R×R+

a−1p ‖PH(kb,a)‖l2(CN ) ,

where kb,a = (kb,a,0, . . . kb,a,N−1) ∈ CN is defined by

kb,a,n =∫ (n+1)a+b

na+b

f(t) dt

and PH is the orthogonal projection of CN onto the hyperplane H.b. For this (b0, a0) we set

c0 =PH(kb0,a0)

‖PH(kb0,a0)‖l2(CN )

.

The generalized Haar wavelet ψc0 satisfies (4.1),(4.2), and (4.3), and

|W pψc0 f(b0, a0)| ≥ |W p

ψcf(b, a)| (4.4)

for all (b, a) ∈ R× R+ and all ψc satisfying (4.1),(4.2),(4.3).Proof. i. Let us first fix (b, a) ∈ (0, T ] × (0, T ]. We want to construct cb,a ∈ CN

such that

|W pψcb,a f(b, a)| ≥ |W p

ψcf(b, a)| (4.5)

for all ψc satisfying conditions (4.1),(4.2),(4.3). After finding cb,a we shall choose the“optimal” (b0, a0) and let c = cb0,a0 .

For c ∈ CN we have

W pψcf(b, a) = a−

1p

N−1∑n=0

cn

∫ (n+1)a+b

na+b

f(t) dt.

Setting

kb,a,n =∫ (n+1)a+b

na+b

f(t) dt

Page 22: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

22 J. J. BENEDETTO AND G. E. PFANDER

and kb,a = (kb,a,0, . . . kb,a,N−1), we obtain

W pψcf(b, a) = a−

1p

N−1∑n=0

cnkb,a,n = a−1p 〈c, kb,a〉. (4.6)

Note that conditions (4.2) and (4.3) on ψc are equivalent to the following restrictionon c:

c ∈ {x ∈ CN :∑

xn = 0, ‖x‖l2(CN ) = 1, } = H ∩ S2N−1.

Given the vector kb,a we can optimize (4.6) by projecting kb,a onto the hyperplaneH and normalizing the result (Lemma 4.1), i.e., letting PH : CN −→ CN be theorthogonal projection of CN onto H, we obtain

cb,a =PH(kb,a)

‖PH(kb,a)‖l2(CN )

as the best choice of cb,a, and ψcb,a fulfills (4.5).Explicitly, we have

PH(kb,a) = kb,a − 1N

∫ Na+b

b

f(t) dt (1, 1, . . . , 1),

and therefore

cb,a,n =kb,a,n − 1

N

∫ Na+b

bf(t) dt

‖PH(kb,a)‖l2(CN )

,

n = 0, . . . , N − 1, are the optimal choices of values for the generalized Haar waveletin the case that b and a are fixed.ii. It remains to show the existence of (b0, a0) such that

|W p

ψcb0,a0

f(b0, a0)| ≥ |W pψcb,a f(b, a)| (4.7)

for all (b, a) ∈ R×R+, where cb0,a0 and cb,a are chosen as above. This, together with(4.5), will conclude the proof, see (4.9).

Since cb,a ∈ H, we have

|W pψcb,a f(b, a)| = |a− 1

p 〈cb,a, kb,a〉| = a−1p |〈cb,a, PH(kb,a)〉|

= a−1p

∣∣∣∣∣〈PH(kb,a)

‖PH(kb,a)‖l2(CN )

, PH(kb,a)〉∣∣∣∣∣ = a−

1p ‖PH(kb,a)‖l2(CN ) ,

and, hence, we need to show the existence of (b0, a0) such that

a− 1

p

0 ‖PH(kb0,a0)‖l2(CN ) ≥ a−1p ‖PH(kb,a)‖l2(CN )

for all (b, a) ∈ R× R+.To see this, first observe that ‖PH(kb,a)‖l2(CN ) is T periodic in b. This is the case

since kb,a is T periodic in b, i.e., for n = 0, . . . , N − 1, we have

kb+T,a,n =∫ (n+1)a+b+T

na+b+T

f(t) dt =∫ (n+1)a+b

na+b

f(u− T )du =∫ (n+1)a+b

na+b

f(u)du = kb,a,n.

Page 23: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

PERIODIC WAVELET TRANSFORMS AND PERIODICITY DETECTION 23

‖PH(kb,a)‖l2(CN ) is also T–periodic in a. In fact, we compute

‖PH(kb,a+T )‖2l2(CN )=N−1∑n=0

(∫ (n+1)(a+T )+b

n(a+T )+b

f(t) dt− 1N

∫ N(a+T )+b

b

f(t) dt

)2

=N−1∑n=0

(∫ (n+1)a+T+b

na+b

f(t) dt− 1N

∫ Na+b

b

f(t) dt− 1N

N

∫ T

0

f(t) dt

)2

=N−1∑n=0

(∫ (n+1)a+b

na+b

f(t) dt− 1N

∫ Na+b

b

f(t) dt

)2

= ‖PH(kb,a)‖2l2(CN ) .

Since a−1/p is monotonely decreasing for a → ∞ and by the periodicity of‖PH(kb,a)‖l2(CN ) in time and scale, it suffices to show the existence of (b0, a0) ∈[0, T ]× (0, T ] such that

a− 1

p

0 ‖PH(kb0,a0)‖l2(CN ) ≥ a−1p ‖PH(kb,a)‖l2(CN )

for all (b, a) ∈ [0, T ]× (0, T ].

Note that a−1p ‖PH(kb,a)‖l2(CN ) is continuous on [0, T ] × (0, T ]. We shall show

that, if p > 1 and f ∈ L∞(R), or if p ≥ 1, f ∈ L1(TT ), and each x ∈ R is a Lebesguepoint of f , then a−

1p ‖PH(kb,a)‖l2(CN ) has a continuous extension to [0, T ] × [0, T ],

and therefore it obtains a maximum on [0, T ]× [0, T ]. We shall further show that thismaximum is obtained at some (b0, a0) ∈ [0, T ] × (0, T ]. In fact, we shall verify thatfor all b ∈ R

lima→0+

a−1p ‖PH(kb,a)‖l2(CN ) = 0. (4.8)

The proof of (4.8) is divided into two cases. Recall that the nth entry in the vectorPH(kb,a) is given by a−

1p (kb,a,n − 1

N

∫ Na+b

bf(t) dt).

For the first case, let p > 1 and f ∈ L∞(R). For b ∈ R, we compute

0 ≤ lima→0+

∣∣∣∣∣a− 1

p (kb,a,n − 1N

∫ Na+b

b

f(t) dt)

∣∣∣∣∣

= lima→0+

a1− 1p

∣∣∣∣∣1a

∫ (n+1)a+b

na+b

f(t) dt− 1aN

∫ Na+b

b

f(t) dt

∣∣∣∣∣≤ lim

a→0+a1− 1

p (1 + N) ‖f‖L∞(R) = 0.

For the second case, let p ≥ 1, and let f ∈ L1(TT ) have the property that each

Page 24: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

24 J. J. BENEDETTO AND G. E. PFANDER

x ∈ R is a Lebesgue point of f . For p = 1 and for all b ∈ R we note that

lima→0+

a−1

(kb,a,n − 1

N

∫ Na+b

b

f(t) dt

)

= lima→0+

a−1

(∫ (n+1)a+b

na+b

f(t) dt− 1N

∫ Na+b

b

f(t) dt

)

= (n + 1) lima→0+

1(n + 1)a

∫ (n+1)a+b

b

f(t) dt− n lima→0+

1na

∫ na+b

b

f(t) dt

− lima→0+

1N

∫ Na+b

b

f(t) dt

= (n + 1) limh→0+

1h

∫ b+h

b

f(t) dt− n limh→0+

1h

∫ b+h

b

f(t) dt− limh→0+

1h

∫ b+h

b

f(t) dt = 0.

Using the addition property of limits in the third step of this calculation is a priorivalid for almost every b. This is the case since f ∈ L1(TT ), and therefore the limitlimh→0+

1h

∫ b+h

bf(t) dt exists for all Lebesgue points b ∈ R. Therefore, by hypothesis,

the limit exists everywhere.For p > 1 in this second case, we have a1− 1

p → 0 as a → 0+, and, hence,

lima→0+

a1− 1p

∣∣∣∣∣a−1

(kb,a,n − 1

N

∫ Na+b

b

f(t) dt

)∣∣∣∣∣ = 0.

In both cases, the componentwise convergence of lima→0+ a−1PH(kb,a), togetherwith the continuity of norms and the fact that‖av‖ = |a| ‖v‖, give (4.8).

Let (b, a) ∈ R × R+ and let ψc satisfy (4.1),(4.2),(4.3). Using (4.5) and (4.7) weobtain

|W p

ψcb0,a0

f(b0, a0)| = a− 1

p

0 ‖PH(kb0,a0)‖l2(CN )

≥ a−1p ‖PH(kb,a)‖l2(CN ) = |W p

ψcb,a f(b, a)| ≥ |W pψcf(b, a)|.(4.9)

Remark 4.3. Theorem 4.2 leads to the following construction algorithm foroptimal generalized Haar wavelets. First find b and a such that

a−1p ‖PH(kb,a)‖2l2(CN ) = a−

1p

N−1∑n=0

(kb,a,n − 1

N

∫ Na+b

b

f(t) dt

)2

= a−1p

N−1∑n=0

(∫ (n+1)a+b

na+b

f(t) dt− 1N

∫ Na+b

b

f(t) dt

)2

is maximal. Then let

cn = cb,a,n =kb,a,n − 1

N

∑N−1n=0 kb,a,n

‖PH(kb,a)‖l2(CN )

=

∫ (n+1)a+b

na+bf(t) dt− 1

N

∫ Na+b

bf(t) dt

‖PH(kb,a)‖l2(CN )

.

If a0 = T/N , ψcb,T/N

b,T/N fills out exactly one period of f . In this special case we have

1N

∫ NT/N+b

b

f(t) dt =1N

∫ T+b

b

f(t) dt =1N

∫ T

0

f(t) dt,

Page 25: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

PERIODIC WAVELET TRANSFORMS AND PERIODICITY DETECTION 25

which is independent of b.Note that the optimization process depends on the choice of p.

4.2. Examples of optimal generalized Haar wavelets. Example 4.4 andExample 4.5 illustrate how to apply Theorem 4.2.

Example 4.4. Figure 4.1. A shows the 1–periodic signal f(x) = sin(2πx) +sin(4πx) + sin(6πx) + sin(8πx) + sin(10πx) + sin(12πx), sampled at 20 samples perunit. Fixing N = 8, we calculate k(b, a) = ‖PH(kb,a)‖l2(CN ) for this signal. The resultis displayed in Figure 4.1.B.

Fig. 4.1. A: f(x) = sin(2πx)+ sin(4πx)+ sin(6πx)+ sin(8πx)+ sin(10πx)+ sin(12πx), sampledat 20 samples per unit. B: k(b, a) =

PH(kb,a)

l2(CN )for N = 8.

Figure 4.2 illustrates the dependence of the generalized Haar wavelet on the choiceof the normalization constant p. Figure 4.2.A and Figure 4.2.B display the optimalgeneralized Haar wavelets for p = 1 to p = 2.4. For p > 2.4 we continue to obtainthe same wavelet as for p = 2.4. The optimal generalized Haar wavelets for p = 1,p = 1.75, p = 2, and p = 2.2 are shown separately below Figure 4.2.A and 4.2.B.

Example 4.5. Theorem 4.2 is applied to the epileptic seizure problem in Figure4.3. Our basic assumption is that the precursors of a seizure will be found in the sameperiodicities dominant within the seizure itself. Such an assumption implies that whatis being detected is a process with the same dynamics (periodicities) as the seizure,but in miniature form, and then difficult to detect within the background electricactivity of the brain. After simulating an expected period, in our case the seizureperiod of an individual patient, we define the periodic function F associated with theseizure period. F is sampled at 130 samples per period for subsequent calculationswith the projection PH . We choose N = 5 and calculate k(b, a) = ‖PH(kb,a)‖l2(CN ).For the normalization constants p = 1, p = 1.35, and p = 2, we obtain distinct optimalgeneralized Haar wavelets. This particular simulated sample seizure data is designedto mimic full blown “3 per second spike and wave” activity, which is characteristic

Page 26: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

26 J. J. BENEDETTO AND G. E. PFANDER

Fig. 4.2. Optimal generalized Haar wavelets for sin(2πx) + sin(4πx) + sin(6πx) + sin(8πx) +sin(10πx) + sin(12πx), p = 1 to p = 2.4, N = 8.

of petit mal “absence” seizures. Realistically, precursors for actual petit mal absenceseizure generally seem to lack this characteristic.

0 101800

2000

2200Seizure Period

0 500 1000 15001800

2000

2200Model of Seizure F

Samples

0

50

100

050

100

0

5000

10000

b−axisa−axis

k(b,a), N=5

0 2 4 6−1

0

1Opt. Wavelet, p=1

0 2 4 6−1

0

1Opt. Wavelet, p=1.35

0 2 4 6−1

0

1Opt. Wavelet, p=2

Fig. 4.3. Construction of the optimal generalized Haar wavelet in the epileptic seizure case.

Page 27: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

PERIODIC WAVELET TRANSFORMS AND PERIODICITY DETECTION 27

4.3. Optimal generalized Haar wavelets with additional properties. Insome applications, the signal might have features we want to replicate or highlightwhen constructing “optimal” generalized Haar wavelets. The following problems arise.

Problem 4.6. Suppose, the periodic signal f is symmetric or almost “symmetric”with respect to a reference point t0 ∈ [0, T ], i.e., f(t0 + t) = −f(t0 − t) for t ∈ R(“odd signal”), or symmetric with respect to a reference axis t = t0, i.e., f(t0 + t) =f(t0 − t) for t ∈ R (“even signal”). We would like the constructed wavelet to havethe corresponding symmetric form, i.e., we would like to construct an optimal evengeneralized Haar wavelet or an optimal odd generalized Haar wavelet in order tocapitalize on Proposition 2.5.

Problem 4.7. We would like the wavelet transform obtained through the con-structed generalized Haar wavelet to be resistant to some specific background behaviorin the signal.

Problem 4.8. Our signal might carry two periodic components which we want toanalyze separately. Here, the goal is to construct a pair of generalized Haar waveletswhich are sensitive in detecting one of the components and overlooking the other.

Problem 4.9. One period of the signal might have parts where it is slowlyvarying and other parts with high variance. The associated wavelet should focustoward the fast varying part and allow many different values there, while in otherparts a few values might be sufficient.

The question of whether we can construct generalized Haar wavelets which takeinto account a specific feature of a signal has to be answered individually for eachsuch feature. Nevertheless, a small contribution to the general case is made in theremainder of this section. In fact, Theorem 4.10 generalizes Theorem 4.2 and is a toolfor solving problems such as those stated above. For example, Proposition 4.11 andProposition 4.12 use this theorem to give solutions to problems of the kind describedin Problem 4.6 and Problem 4.7, respectively. They further illustrate how solutionsto some problems can be found. The method is based on Lemma 4.1 and the factthat the optimization process in Theorem 4.2 can be applied if we replace H by anysubspace U of CN for which U ⊆ H.

Theorem 4.10. Let p > 1 and f ∈ L∞(R), or let p ≥ 1, f ∈ L1(TT ), andsuppose each x ∈ R is a Lebesgue point of f . Let N ∈ N and let kb,a and H be definedas in Theorem 4.2. If U is a subspace of CN , then there exists (b0, a0) ∈ R×R+ suchthat

a− 1

p

0 ‖PU∩H(kb0,a0)‖l2(CN ) = max(b,a)∈R×R+

a−1p ‖PU∩H(kb,a)‖l2(CN ) ,

where PU∩H is the orthogonal projection of CN onto the subspace U ∩H. By setting

c0 =PU∩H(kb0,a0)

‖PU∩H(kb0,a0)‖l2(CN )

,

we obtain

|W pψc0 f(b0, a0)| ≥ |W p

ψcf(b, a)|for all (b, a) ∈ R× R+, c ∈ U , and ψc satisfying (4.1), (4.2),(4.3).

Proof. The first steps of the proof of Theorem 4.2 can easily be generalized to thesetting of Theorem 4.10 by replacing H by U ∩H.

It remains to show that the maximum exists. For this, note that we proved thatkb,a is T periodic in b. This implies that PU∩H(kb,a) is T–periodic in b. Essentially,

Page 28: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

28 J. J. BENEDETTO AND G. E. PFANDER

we also showed that PH(kb,a) is T–periodic in a. By the definition of orthogonalprojections we have

PU∩H(kb,a) = PU (PH(kb,a)),

and therefore PU∩H(kb,a) is T periodic in a.We can conclude the existence of the maximum by continuing to follow the proof

of Theorem 4.2 and by using the fact that

‖PU∩H(kb,a)‖l2(CN ) ≤ ‖PH(kb,a)‖l2(CN ) .

Solving a given problem can be approached by defining the subspace U such thatc ∈ U if and only if ψc has the desired properties. Of course, such a subspace mightnot exist.

The problem described in Problem 4.6 can be quantified and resolved in thefollowing way.

Proposition 4.11. a. For k = 1, . . . , N , define vk ∈ C2N by vik = δi,k −

δ2N−i+1,k for i = 1, . . . , 2N . Let Ue = span {v1, . . . , vN}⊥. Then c ∈ U if and only ifψc is even.

b. For k = 1, . . . , N , define vk ∈ C2N by vik = δi,k + δ2N−i+1,k for i = 1, . . . , 2N .

Let Uo = span {v1, . . . , vN}⊥. Then c ∈ U if and only if ψc is odd.Proof. We shall prove part a. The proof of part b is similar.Clearly, c ∈ Ue if and only if c⊥vk for k = 1, . . . , N , i.e.,

0 = 〈c, vk〉 = ck − c2N−k+1 for k = 1, . . . , N .

This holds if and only if ck = c2N−k+1, that is, if and only if ψc is even.Let us discuss further possible features of generalized Haar wavelets. The property

c ∈ H implies that if f is a constant function, then W pψcf(b, a) = 0 for all (b, a) ∈

R × R+. The tophat wavelet ψtop is defined by top = 1√6(1,−2, 1), and has the

property that if f is a linear function, then W pψtopf(b, a) = 0 for all (b, a) ∈ R × R+.

The Haar wavelet does not possess this property. We are led to the question ofwhether it is possible to construct a subspace U ⊆ CN such that for any c ∈ U wehave the property that W p

ψcf(b, a) = 0 for all (b, a) ∈ R×R+ and for any polynomialf of degree less or equal some given K. The answer to this question is affirmative asthe following proposition shows.

Proposition 4.12. For K ≤ N − 2, define vk = (1k, 2k, 3k, . . . , Nk) ∈ CN fork = 0, . . . , K and let UK = span {v0, . . . , vK}⊥. Then c ∈ UK if and only if ψc hasthe property that for any polynomial f of degree less or equal K W p

ψcf(b, a) = 0 forall (b, a) ∈ R× R+.

The proof is omitted.Using Proposition 4.12 we have the following result.Proposition 4.13. The generalized Haar wavelet ψc 6= 0 has the property that

for any polynomial f of degree less or equal K, W pψcf(b, a) = 0 for all (b, a) ∈ R×R+

if and only if K ≤ N − 2 and the polynomial (x − 1)K+1 divides the polynomialc0 + c1x + . . . + cN−1x

N−1.Proof. Let us first assume that ψc 6= 0 has the property that for any polynomial

f of degree less or equal K, W pψcf(b, a) = 0 for all (b, a) ∈ R × R+, i.e., c ⊥ vk =

(1k, 2k, 3k, . . . , Nk) for k = 0, . . . , K (Proposition 4.12). Since c 6= 0 and since thefamily {vk}k=0,...,N−1 is a basis of CN we have K ≤ N − 2.

Page 29: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

PERIODIC WAVELET TRANSFORMS AND PERIODICITY DETECTION 29

To show that (x − 1)K+1 divides p(x) ≡ c0 + c1x + . . . + cN−1xN−1, note that

for s = 0, . . . , K, p(s)(1) =∑N−1

n=0 cnn(n − 1) . . . (n − s + 1) is a linear combinationof

∑N−1n=0 cnnk = 〈c, vk〉. On the other hand 〈c, vk〉 = 0 for k = 0, . . . , K, and hence

p(s)(1) = 0. This implies that (x− 1)K+1 divides p(x).Conversely, assuming that K ≤ N − 2 and that (x − 1)K+1 divides p(x) = c0 +

c1x + . . . + cN−1xN−1, we have 0 = p(s)(1) =

∑N−1n=0 cnn(n − 1) . . . (n − s + 1) for

s = 0, . . . , K. The fact that 0 = p(s)(1) for s = 0, . . . , k implies c ⊥ vk, and usingProposition 4.12 we obtain that ψc 6= 0 has the property that, for any polynomial fof degree less or equal K, W p

ψcf(b, a) = 0 for (b, a) ∈ R× R+

Proposition 4.13 supplies us with generalized wavelets with K + 1 vanishing mo-ments and with minimal support. Up to a scalar we can read these wavelets from amodified Pascal triangle.

K = 0 1 −1K = 1 1 −2 1K = 2 1 −3 3 −1K = 3 1 −4 6 −4 1K = 4 1 −5 10 −10 5 −1K = 5 1 −6 15 −20 15 −6 1

5. Wavelet periodicity detection algorithm.

5.1. Background and idea. We were led to the formulation of the wavelet pe-riodicity detection algorithm, described in Section 5.2, through the study of epilepticseizure prediction problems, see especially [3], cf., [24, 25]. In the case of epilepticseizure prediction, a goal is to detect periodic behavior in EEG data prior to a seizure,where this behavior is indicative of the periodic signature of the seizure itself.

Suppose a periodic seizure signature f is determined from reliable ECoG dataobtained by means of a one–time invasive procedure. The following method is ameans to detect precursors of f prior to its full blown occurrence during seizure. Thisdetection can be observed from non–invasive EEG data subsequent to the originaldetermination of f . Sufficiently early knowledge of reliable precursors of f allows theuse of external treatments to temper the effects of the seizure when it arrives. Ourmethod is composed of three steps.

1. ECoG data of an individual patient are analyzed through spectral and waveletmethods to extract periodic patterns associated with epileptic seizures of a specificpatient;

2. Using this knowledge of seizure periodicity, we construct an optimal generalizedHaar wavelet designed to detect the epileptic periodic patterns of the patient;

3. A fast discretized version of the continuous wavelet transform and wavelettransform averaging techniques are used to detect occurrence and period of the seizureperiodicities in the preseizure EEG data of the patient; and the algorithm is formu-lated to provide real time implementation.

Our method is generally applicable to detect locally periodic components in sig-nals s which can be modeled as

s(t) = A(t)f(h(t)) + N(t), (5.1)

t ∈ I, where f is a periodic signal defined on the time interval I, A is a non–negativeslowly varying function, and h is strictly increasing with h′ slowly varying. N denotesbackground activity. For example, in the case of ECoG data, N is essentially 1/f

Page 30: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

30 J. J. BENEDETTO AND G. E. PFANDER

noise. In the case of EEG data and for t in I, N includes noise due to cranialgeometry and densities [11, 8]. In both cases N also includes standard low frequencyrythms [18].

If F is a trigonometric polynomial, then the signals described in (5.1) have beenanalyzed by Kronland-Martinet, Seip, Torresani, et al., to deal with the problem ofdetecting spectral lines in NMR data [26, 10, 7]. Another technique, that of comput-ing critical frequencies in ECoG seizure data using wavelet transform striations, wasdescribed in [3]. These frequencies are related to the instantaneous frequency [10]h′(t) of s at t; and, with our periodicity detection and computation problem in mind,1/h′(t) is the instantaneous period of s at t.

We shall approach the analysis of (5.1) with a method similar to the aforemen-tioned three step method, e.g., [5]:

1. Non–noisy data are analyzed through spectral and wavelet methods to extractspecific periodic patterns of interest, i.e., f ;

2. We construct an optimal generalized Haar wavelet designed to detect f ;3. Using our discretized version of the continuous wavelet transform and wavelet

transform averaging techniques, we detect occurrence and period of these periodicitiesin real time.

Essentially, we shall describe an algorithm to detect lattice patterns of relativemaxima in periodic wavelet transforms. The output of the algorithm is the periodof a periodic component in the analyzed signal. The algorithm is based on averagingmethods.

5.2. The algorithm. Let f be a T0–periodic function, and let ψc be an evengeneralized Haar wavelet of degree one, i.e., ψc|[n,n+1) = cn for n = 0, . . . , N − 1,c = (c0, c1, . . . , cN−1) ∈ CN , N fixed.

Proposition 2.3 implies that the wavelet transform of the non–normalized wavelettransform Wψcf is identical on each cell

[b + nT0, b + (n + 1)T0]× [jMT0, (j + 1)MT0]

for n ∈ Z and j ∈ N0. Figure 5.1 shows a non–normalized wavelet transform intopographical form.

0

0

MT/2

MT

3MT/2

2MT

T 2T

Fig. 5.1. Time–scale periodicity in topographical form.

Page 31: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

PERIODIC WAVELET TRANSFORMS AND PERIODICITY DETECTION 31

5.2.1. Non–normalized wavelet transform. If R,Q ∈ N, then the periodic-ities of the non–normalized wavelet transform imply that

Wψcf(b, a) =1

(Q + 1)(2R + 1)

R∑

r=−R

Q∑q=0

Wψcf(b, a)

=1

(Q + 1)(2R + 1)

R∑

r=−R

Q∑q=0

Wψcf(b + rT0, a + qT0). (5.2)

Suppose we are given a noisy signal s of the form s(t) = f(t) + N(t) where fis T0–periodic and N is noise. In order to gain knowledge of the period T0 of f , wedefine the average

UQ,Rψc s(b, a, T ) =

1(Q + 1)(2R + 1)

R∑

r=−R

Q∑q=0

Wψcs(b + rT, a + qT ),

where T ∈ R+, a ∈ (0, T ), and b ∈ [0, T ). Clearly, by Proposition 2.3 and Equation(5.2), we have

UQ,Rψc f(b, a, T0) = Wψcf(b, a)

for the periodic signal f . Define

ZQ,Rψc s(T ) = sup

a∈(0,T ),b∈[0,T )

|UQ,Rψc s(b, a, T )|.

Therefore,ZQ,R

ψc f(T0) = supa∈(0,T0),b∈[0,T0)

|Wψcf(b, a)|,

which we maximized in Section 4. Further, we expect that ZQ,Rψc f(T ) is “small” for

T 6= k · T0, k ∈ N and Q and R large.Note that for the noisy signal s = f + N , we further expect that

ZQ,Rψc s(T0) ≈ sup

a∈(0,T0),b∈[0,T0)

|Wψcf(b, a)|

and that ZQ,Rψc s(T ) is small if T 6= T0.

5.2.2. Normalized wavelet transform. In order to analyze an Lp(R) normal-ized wavelet transform, where 1 ≤ p < ∞, we define

vp,Q(a, T ) = a1p

Q∑q=0

(a + qT )−1p ,

where a, T ∈ R+. We compute

W pψcf(b, a) = W p

ψcf(b, a)1

vp,Q(a, T0)a

1p

Q∑q=0

(a + qT0)−1p

=1

vp,Q(a, T0)

Q∑q=0

(a + qT0)−1p a

1p W p

ψcf(b, a)

=1

vp,Q(a, T0)

Q∑q=0

W pψcf(b, a + qT0)

=1

vp,Q(a, T0)(2R + 1)

R∑

r=−R

Q∑q=0

W pψcf(b + rT0, a + qT0).

Page 32: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

32 J. J. BENEDETTO AND G. E. PFANDER

As in the non–normalized case, we are motivated to define

V p,Q,Rψc s(b, a, T ) =

1vp,Q(a, T )(2R + 1)

R∑

r=−R

Q∑q=0

W pψcs(b + rT, a + qT )

for any signal s, where T ∈ R+, a ∈ (0, T ), and b ∈ [0, T ).For the T0–periodic signal f we have

V p,Q,Rψc f(b, a, T0) = W p

ψcf(b, a).

Thus, definingZp,Q,R

ψc s(T ) = supa∈(0,T ),b∈[0,T )

|V p,Q,Rψc s(b, a, T )|,

for any signal s, we have

Zp,Q,Rψc f(T0) = sup

a∈(0,T ),b∈[0,T )

|W pψcf(b, a)|.

Note that, in this case, the assertion that Zp,Q,Rψc f(T ) is “small” for T 6= T0 and Q,R

large, is supported by the fact that if a, T ∈ R+, then

limQ→∞

vp,Q(a, T ) = limQ→∞

a1p

Q∑q=0

(a + qT )−1p = a

1p lim

Q→∞

Q∑q=0

(1

a + qT

) 1p

= ∞.

5.3. The algorithm for even or odd generalized Haar wavelets. Let f be aT0 periodic function, and let ψc be either an even generalized Haar wavelet of degree 1,i.e., ψc|[n,n+1) = ψc|[−n−1,−n) = cn for n = 0, . . . , N − 1, c = (c0, c1, . . . , cN−1) ∈ CN ,or an odd generalized Haar wavelet of degree 1, i.e., ψc|[n,n+1) = −ψc|[−n−1,−n) = cn

for n = 0, . . . , N − 1, c = (c0, c1, . . . , cN−1) ∈ CN , where N is fixed.Due to Proposition 2.5, the non–normalized wavelet transform W p

ψcf is in bothcases essentially the same, i.e., the same up to a flip and a sign, on the cells

[b + nT0, b + (n + 1)T0]× [jMT0/2, (j + 1)MT0/2]

for n ∈ Z and j ∈ N ∪ {0}. Figure 5.2 shows the resulting wavelet transform.

0

0

MT/2

MT

3MT/2

2MT

T 2T

Fig. 5.2. Time–scale periodicity for odd or even wavelets in topographical form.

Page 33: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

PERIODIC WAVELET TRANSFORMS AND PERIODICITY DETECTION 33

5.3.1. Non–normalized wavelet transform. Now we define the following al-ternative for averaging:

UQ,Rψc f(b, a, T ) =

12(Q+1)(2R+1)

∑Rr=−R

∑Qq=0(Wψcf(b + rT, a + qT )±Wψcf(b + rT, T − a + qT )),

where T ∈ R+, a ∈ (0, T/2), and b ∈ [0, T ). Here, and in the following, ± denotes −if ψc is even and + if ψc is odd.

By Proposition 2.5, we have

UQ,Rψc f(b, a, T0) =

12(Q + 1)(2R + 1)

R∑

r=−R

Q∑q=0

(Wψcf(b + rT0, a + qT0)

±Wψcf(b + rT0, T0 − a + qT0))

=1

2(Q + 1)(2R + 1)

R∑

r=−R

Q∑q=0

(Wψcf(b, a)±Wψcf(b, T0 − a))

=1

2(Q + 1)(2R + 1)

R∑

r=−R

Q∑q=0

(Wψcf(b, a) + Wψcf(b, a)) = Wψcf(b, a)

for any T0 periodic function f .We proceed as before by defining the test statistic

ZQ,Rψc s(T ) = sup

a∈(0,T/2),b∈[0,T )

|UQ,Rψc s(b, a, T )|

for any signal s.

5.3.2. Normalized wavelet transform. If we are using an Lp(R) normalizedwavelet transform for 1 ≤ p < ∞, let us define

vp,Q(a, T ) = a1p

Q∑q=0

((a + qT )−1p + (T − a + qT )−

1p ), a, T ∈ R+.

As before we write

V p,Q,Rψc s(b, a, T ) =

1vp,Q(a,T )(2R+1)

∑Rr=−R

∑Qq=0(W

pψcs(b + rT, a + qT )±W p

ψcf(b + rT, T − a + qT )),

with T ∈ R+, a ∈ (0, T ) and b ∈ [0, T ).

For T = T0, we get

Page 34: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

34 J. J. BENEDETTO AND G. E. PFANDER

V p,Q,Rψc s(b, a, T0) =

1vp,Q(a, T0)(2R + 1)

R∑

r=−R

Q∑q=0

(W pψcs(b + rT0, a + qT0)

±W pψcf(b + rT0, T0 − a + qT0))

=1

vp,Q(a, T0)

Q∑q=0

(W pψcs(b, a + qT0)±W p

ψcf(b, T0 − a + qT0))

=1

vp,Q(a, T0)

Q∑q=0

((a + qT0)−1p (a + qT0)

1p W p

ψcs(b, a + qT0)

±(T0 − a + qT0)−1p (T0 − a + qT0)

1p W p

ψcf(b, T0 − a + qT0))

=1

vp,Q(a, T0)

Q∑q=0

((a + qT0)−1p a

1p W p

ψcs(b, a))

±(±)(T0 − a + qT0)−1p a

1p W p

ψcf(b, a))

= W pψcf(b, a)

1vp,Q(a, T0)

a1p

Q∑q=0

((a + qT0)−1p + (T0 − a + qT0)−

1p )

= W pψcf(b, a).

We can conclude as in Section 5.2.2.

5.4. Examples of the algorithm. In Example 5.1, Example 5.2, and Example5.3 we apply this method to the signals introduced in Example 4.4 and Example 4.5.

Example 5.1. Figure 5.3A shows the original signal f(t) = sin(2πt)+sin(4πt)+sin(6πt) + sin(8πt) + sin(10πt) + sin(12πt), and Figure 5.3B represents the absolutevalue of its Fourier transform. Figure 5.3C displays the normalized (p = 1.75) wavelettransform of this signal, obtained using the optimal generalized Haar wavelet displayedin Figure 4.2 (N = 8). Zp,Q,R

ψc f(T ) is then calculated for T = 1, . . . , 25 and shown inFigure 5.3D. The location of the maximum of Z implies the occurence of the periodicsignal with period length of 20 samples.

This technique can also be applied successfully to synthesized noisy data as isillustrated in Example 5.2.

Example 5.2. In this case white noise is added to the signal in Example 4.4which is displayed in Figure 4.1. The resulting signal is illustrated in Figure 5.4 A.The same wavelet as in Example 5.1 is applied. The graph in Figure 5.4 D has abscissaT , representing the number of samples per period, and ordinate Z(T ), representingZp,Q,R

ψc s(T ). The graph is automatically generated by the algorithm of Section 5.2.In this case the maximum of Z(T ) is clearly observed to be at T = 20, even thoughthis underlying de facto periodicity (from Figure 4.1) is by no means apparent fromdirect observation or analysis of Figure 5.4 A.

Example 5.3. The seizure signal F constructed in Example 4.5 and shown inFigure 4.3 has a periodicity characterized by its construction using 13 samples perperiod. We compute the p = 1.35 normalized wavelet transform of F . Zp,Q,R

ψc F (T )is then calculated for T = 1, . . . , 20. The maximum of Z in Figure 5.5 implies theoccurrence of the periodic signal with period length of 13 samples.

6. The discretized version of the continuous wavelet transform andimplementation. In order to apply the results of the preceding section, we need to

Page 35: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

PERIODIC WAVELET TRANSFORMS AND PERIODICITY DETECTION 35

0 100 200 300 400 500 600 700 800−5

0

5A

B

0 5 10 15 20 250

1

2

3

4

5D

Period in Samples

Z(T)

C

Fig. 5.3. A: f(t) = sin(2πt)+sin(4πt)+sin(6πt)+sin(8πt)+sin(10πt)+sin(12πt). B: Absolutevalue of its discrete Fourier transform. C: Wavelet transform using the optimal generalized Haar

wavelet obtained for p = 1.75 and N = 8. D: Zp,Q,Rψc f(T ).

0 100 200 300 400 500 600 700 800−15

−10

−5

0

5

10

15A

B

0 5 10 15 20 250

2

4

6

8

10D

Period in Samples

Z(T)

C

Fig. 5.4. A: s(t) = sin(2πt) + sin(4πt) + sin(6πt) + sin(8πt) + sin(10πt) + sin(12πt)+ whitenoise. B: Absolute value of its discrete Fourier transform. C: Wavelet transform using the optimal

generalized Haar wavelet obtained for p = 1.75 and N = 8 in Figure 4.2. D: Zp,Q,Rψc s(T ).

discretize our results.Let us assume that we sampled a signal f and obtained the sequence {f [n]}n∈Z.

Page 36: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

36 J. J. BENEDETTO AND G. E. PFANDERSc

ale

Samples

Waveletgram of F

50 100 150

5

10

15

20

25

30

35

40

45

50

05

10

05

10

0

100

200

SamplesScale

Segment of Waveletgram of F

0 5 10 15 200

100

200

300

Period in Samples

Z(T)

Fig. 5.5. The wavelet transform of the signal shown in Figure 4.3 sampled at 13 samples per

period, and the function Zp,Q,Rψc F (T ) indicating the periodicity of 13 samples.

Let ψ be a generalized Haar wavelet of degree 1. To avoid ambiguous notation, we let

ψ = (. . . , ψ [−1] , ψ [0] , ψ [1] , . . .)

be the vector representing ψ, i.e., ψ [k] = ψ(k) = ck for k ∈ Z.We shall replace our continuous wavelet transform

W pψf(b, a) = a−1/p

∫f(t)ψ( t−b

a ) dt

with the following discretized version

W pψf [n,m] = m−1/p

k∈Zf [k]ψ(k−n

m ) = m−1/p∑

k∈Zf [k]ψ

[⌊k−nm

⌋], (6.1)

m ∈ Z+ and n ∈ Z. bxc denotes the largest integer less or equal x. The secondequality of (6.1) is a consequence of the fact that ψ is a generalized Haar wavelet ofdegree 1. Conditions on ψ so that the family {ψ[b ·−n

m c]}m∈Z+,n∈Z forms a frame forl2(Z) are discussed in [19, 20].

We can easily rewrite (6.1) in the more convenient form:

W pψf [n,m] = m−1/p

k∈Zf [k]ψ

[⌊k−nm

⌋]

= m−1/p

......

......

+ f [n] ψ [0] + . . . + f [n + m− 1] ψ [0]+ f [n + m] ψ [1] + . . . + f [n + 2m− 1] ψ [1]+ f [n + 2m] ψ [2] + . . . + f [n + 3m− 1] ψ [2]

......

......

= m−1/p∑

r∈Z

(m−1∑

l=0

f [n + mr + l]

)ψ [r] . (6.2)

Page 37: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

PERIODIC WAVELET TRANSFORMS AND PERIODICITY DETECTION 37

To serve as an example, we shall prove a discrete version of Proposition 2.3.Proposition 6.1. Let ψ be a generalized Haar wavelet of degree 1, and let

{f [n]}n∈Z be a T–periodic sequence, T ∈ Z+, i.e., f [n + T ] = f [n] for all n ∈ Z.Then m1/pW p

ψf [n,m] is T–periodic in n and T–periodic in m.Proof. The T–periodicity in n follows directly from (6.2) and the fact that f [n +

T ] = f [n] for all n ∈ Z. Further, setting c =∑T−1

l=0 f [l], we obtain

(m + T )1/pW pψf [n,m + T ] =

r∈Z

(m+T−1∑

l=0

f [n + (m + T )r + l]

)ψ [r]

=∑

r∈Z

(m+T−1∑

l=0

f [n + mr + l]

)ψ [r]

= m1/pW pψf [n,m] +

r∈Z

(m+T−1∑

l=m

f [n + mr + l]

)ψ [r]

= m1/pW pψf [n,m] + c

r∈Zψ [r] = m1/pW p

ψf [n,m].

To analyze a signal through a “continuous” wavelet transform is expensive, sincewe need to calculate a large number of coefficients W p

ψf [n,m]. On the other hand theredundancy inherent in such calculation provides stability and robustness to noise;and so it is important to seek fast algorithms. A priori and for large m, the ele-mentary operations needed to calculate W p

ψf [n,m] are of order m. The restrictionto generalized Haar wavelets gives rise to a recursive procedure to obtain these co-efficients. This procedure significantly reduces the number of calculations needed.In fact, if ψ is supported on [0, N ], we shall show that to obtain W p

ψf [n,m] fromW p

ψf [n−1,m] or W pψf [n, m−1] requires only N multiplications, regardless of the size

of m and the support of ψ[b ·−nm c]. For convenience, we shall omit the normalization

factor m−1/p. This factor is certainly independent of both wavelet and signal, andwould be multiplied to W p

ψf [n,m] in the last step of an implementation.Let us begin with the trivial case, obtaining W p

ψf [n, m] from W pψf [n− 1, m]. We

have

W pψf [n,m]−W p

ψf [n− 1,m] =∑

r∈Z

(m−1∑

l=0

f [n + mr + l]−m−1∑

l=0

f [n− 1 + mr + l]

)ψ [r]

=N−1∑r=0

(f [n + mr + m− 1]− f [n− 1 + mr]) ψ [r] .

To obtain W pψf [n,m] from W p

ψf [n,m − 1] for scales m ≥ N is best understoodthrough Figure 6.1 and Figure 6.2. Again, many products appearing in the summationrepresenting W p

ψf [n,m] in (6.2) are already included in W pψf [n,m−1]. In Figure 6.1,

we write the part of the signal f that is relevant to obtain W pψf [n,m] in a rectangular

pattern with N rows and m columns. We obtain the non–normalized coefficientW p

ψf [n,m] by multiplying the r-th row by ψ [r − 1] for r = 1, . . . , N and by addingthe results. This is illustrated in Figure 6.1.

In Figure6.2we illustrate the contribution of the same segment of f to W pψf [n,m−1].

Page 38: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

38 J. J. BENEDETTO AND G. E. PFANDER

f [n-mN+1] f [n-mN+2] f [n-m(N-1)]

f [n-m(N-1)+1] f [n-m(N-1)+2] f [n-m(N-2)]

f [n-m +1] f [n-m+2] f [n]

ψ[0]

ψ[1]

ψ[N − 1]

Fig. 6.1. Contributions of f [n−mN + 1], . . . , f [n] to W pψf [n, m].

f [n-mN+1] f [n-mN+2] f [n-m(N-1)]

f [n-m(N-1)+1] f [n-m(N-1)+2] f [n-m(N-2)]

f [n-m +1] f [n-m+2] f [n]

ψ[N-1]ψ[N-2]

ψ[N-2]ψ[N-3]

ψ[1]ψ[0]

ψ[0]

Fig. 6.2. Contributions of f [n−mN + 1], . . . , f [n] to W pψf [n, m− 1].

The difference W pψf [n, m]−W p

ψf [n, m− 1] is easily calculated:

W pψf [n,m]−W p

ψf [n,m− 1] = ψ [0]N−1∑

l=0

f [n−mN + l]

+ (ψ [1]− ψ [0])N−1∑

l=1

f [n−m(N − 1) + l]

+ . . . + (ψ [N − 1]− ψ [N − 2])f [n].

Implementing this procedure, we use the vector (ψ [0] , ψ [1]−ψ [0] , . . . , ψ [N − 1]−ψ [N − 2]) in order to reduce redundant calculations.

Remark 6.2. Besides the theory developed by Pfander [19, 20], there havebeen several other interesting formulations dealing with wavelet frames on discretegroups. These include formulations by Walnut [29], Flornes et al. [12], Steidl [27],Johnston [13], and Antoine et al. [1]. Our calculations in this section show thatPfander’s formulation is particularly effective for providing fast algorithms in the caseof generalized Haar wavelets.

REFERENCES

[1] J.-P. Antoine, Y. B. Kouagou, D. Lambert, and B. Torresani, An algebraic approach todiscrete dilations, J. Fourier Analysis and Appl., 6 (2000), pp. 113–141.

[2] J. J. Benedetto, Harmonic Analysis and Applications, CRC Press, Boca Raton, 1997.[3] J. J. Benedetto and D. Colella, Wavelet analysis of spectogram seizure chirps, Proc. SPIE,

2569 (1995), pp. 512–521.[4] J. J. Benedetto and G. E. Pfander, Wavelet detection of periodic behavior in EEG and

ECoG data, in 15th IMACS World Congress, Berlin, vol. 1, 1997.

Page 39: PERIODIC WAVELET TRANSFORMS AND … WAVELET TRANSFORMS AND PERIODICITY DETECTION JOHN J. BENEDETTO⁄ AND GOTZ E. PFANDER¨ y Key words. Continuous wavelet transform, epileptic seizure

PERIODIC WAVELET TRANSFORMS AND PERIODICITY DETECTION 39

[5] , Wavelet periodicity detection, Proc. SPIE, 3458 (1998), pp. 48–55.[6] G. Benke, M. Bozek-Kuzmicki, D. Colella, G. M. Jacyna, and J. J. Benedetto, Wavelet-

based analysis of EEG signals for detection and localization of epileptic seizures, Proc.SPIE, Orlando, (1995).

[7] R. A. Carmona, W. L. Hwang, and B. Torresani, Multi-ridge detection and time-frequencyreconstruction. Preprint, 1995.

[8] B. Cuffin, EEG localisation accuracy improvements using realistically shaped head models,IEEE Trans.Biomed.Eng., 43 NO.3 (1996), pp. 299–303.

[9] I. Daubechies, Ten Lectures on Wavelets, SIAM, Philadelphia, 1992.[10] N. Delprat, B. Escudie, P. Guillemain, R. Kronland-Martinet, P.Tchamitchian, and

B. Torresani, Asymptotic wavelet and Gabor analysis: Extraction of instantaneous fre-quencies, IEEE Transactions on Information Theory, 38 NO.2 (644-664), pp. 299–303.

[11] D. J. Fletcher, A. Amir, D. L. Jewett, and G. Fein, Improved method for computationof potentials in a realistic head shape model, IEEE Trans.Biomed.Eng., 42 NO.11 (1996),pp. 1094–1103.

[12] K. Flornes, A. Grossmann, M. Holschneider, and B. Torresani, Wavelets on discretefields, Applied Comput. Harmonic Analysis, 1 (1994), pp. 134–146.

[13] C. P. Johnston, On the pseudo–dilation representations of Flornes, Grossmann, Holschnei-der, and Torresani, J. Fourier Analysis and Appl., 3 (1997), pp. 377–385.

[14] S. Kay, Modern Spectral Estimation, Theory and Application, Prentice-Hall, Englewood Cliffs,1987.

[15] S. Mallat, A Wavelet Tour of Signal Processing, Academic Press, San Diego, 1998.[16] Y. Meyer, Ondelettes et Operateurs, Hermann, Paris, 1990.[17] U. Neri, Singular Integrals, Springer Lecture Notes No. 200, Berlin, New York, 1971.[18] P. Nunez, Electric Fields of the Brain: The Neurophysics of EEG, Oxford University Press,

New York, 1981.[19] G. E. Pfander, A fast nondyadic wavelet transformation for l2(Zd). Preprint, 2000.[20] , Generalized Haar wavelets and frames, Proc. SPIE, 4119 (2000).[21] , Periodic wavelet transforms of functions defined on Rd. Preprint, 2001.[22] J. Proakis, C. M. Rader, F. Ling, and C. L. Nikias, Advanced Digital Signal Processing,

Macmillan, New York, 1992.[23] W. Rudin, Fourier Analysis on Groups, John Wiley and Sons, New York, 1962.[24] S. J. Schiff and J. Milton, Wavelet transforms of electroencephalographic spike and seizure

detection, Proc. SPIE, (1993).[25] S. J. Schiff, J. Milton, J. Heller, and S. L. Weinstein, Wavelet transforms and surrogate

data for electroencephalographic spike and seizure localization, Optical Engineering, 33(3)(1994), pp. 2162–2169.

[26] K. Seip, Some remarks on a method for detection of spectral lines in signals, Marseille CPT-89,(1989).

[27] G. Steidl, Spline wavelets over R, Z, R/NZ, and Z/NZ, in Wavelets, Theory, Algorithms, andApplications, C.K. Chui, L. Montefusco, and L. Puccio, Eds., Academic Press, San Diego,CA., (1994).

[28] E. M. Stein and G. Weiss, Introduction to Fourier Analysis on Euclidean Spaces, PrincetonUniversity Press, Princeton, 1971.

[29] D. F. Walnut, Wavelets in discrete domains, tech. report, The MITRE Corp., 1989. MP-89W00040.

[30] N. Wiener, The Fourier Integral and Certain of its Applications, Cambridge University Press,New York, 1933.