Upload
iaemedu
View
537
Download
2
Embed Size (px)
DESCRIPTION
Citation preview
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
– 6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 1, January - June (2012), © IAEME
77
OPTIMIZING THE PARAMETERS OF WAVELETS FOR PATTERN
MATCHING USING GA
1Manju B R ,
2Dr A R Rajan ,
3Dr V Sugumaran
1Research Scholar, Dept of Mathematics, University of Kerala, Thiruvananthapuram,
[email protected], 2Professor, Dept of Mathematics, University of Kerala, Thiruvananthapuram
3SMBS,VIT University, Chennai Campus, Tamil Nadu, India, [email protected]
ABSTRACT
Pattern matching has numerous applications in engineering. Wavelets have
been used as a tool for pattern matching of signals to identify pattern, specifically in
pattern recognition problems. To design wavelets for a given pattern, there are two
popular approaches namely, parametric approach and non-parametric approach. In
parametric approach, the wavelet is defined with a few parameters and designing a
wavelet for a given pattern is performed by choosing the right parameters which gives
minimum error. The selection of such parameters is done usually on trial –and –error
method. It is time consuming and laborious. In this paper a Genetic Algorithm based
approach is proposed to design parameters of the wavelet by minimizing the error
between the pattern and the designed wavelet. The method is illustrated with a
simulated sine wave for filter lengths of 4, 6, 8, and 10. The results are encouraging.
Keywords: Parametric wavelet design, GA, Pattern matching
1. INTRODUCTION
Compactly supported orthogonal systems of wavelets were introduced by
Daubechies, and she proved the existence of a multidimensional family of such wavelet
systems. She also proved specific wavelet systems with maximum vanishing moments
and with smoothness properties of a specific type. The wavelets are classified in a
rough manner by the nonvanishing coefficients in the fundamental difference
equation which defines them. This number is an integer N, N ≥ 2 and the support of the
scaling function has length N-1. As the number of coefficients increases, the support
gets larger and larger, and the smoothness also increases. In case if the wavelet system
INTERNATIONAL JOURNAL OF ADVANCED RESEARCH IN ENGINEERING AND TECHNOLOGY (IJARET)
ISSN 0976 - 6480 (Print)
ISSN 0976 - 6499 (Online)
Volume 3, Issue 1, January- June (2012), pp. 77-85
© IAEME: www.iaeme.com/ijaret.html
Journal Impact Factor (2011): 0.7315 (Calculated by GISI)
www.jifactor.com
IJARET © I A E M E
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
– 6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 1, January - June (2012), © IAEME
78
is in C∞ then there are infinite number of coefficients and the support in the entire real
axis. In general, for an arbitrary even N, D = (N-2)/2 tells that there is a D – parameter
family of wavelet systems.
The parameterization has the advantage of global coordinates in R , the explicit
smoothness dependencies on the parameters and a simple geometry should facilitate
the optimization problems. The general goal would be to optimize the wavelet systems
adapted to a specific problem. There are two ways this can be made possible.
• Choose a wavelet system for an application, optimizing over Rn or
• Dynamically optimizing over R by modifying the choice of wavelet at successive
stages as the application progresses with respect to some parameter.
To develop a parameterized wavelet we will consider the properties of a wavelet. We
have to design an impulse response, i.e., filter coefficients and these filter coefficients
convolve with input signal to get the desired signal information. Effective filter design is
important to capture the desired information from a non-stationary signal.
2. LITERATURE SURVEY
Daubechies [1] Mayer[2] gives an insight of compactly supported orthonormal
wavelets. Daubechies [9] introduced a general method to construct compactly
supported wavelets based on scaling function which satisfy the dilation equation.
Parameterzing all possible filter coefficients that correspond to compactly supported
orthonormal wavelets has been studied by several authors [10, 11,12,14,15,16] A
discussion of scaling function with six filter coefficients depending on two parameters
were carried out in [3]and [4]. Paper [5] gives a discussion of parameterization of filter
coefficients with scaling functions and compactly support orthonormal wavelets with
several vanishing moments.[6] demonstrates a technique that determines the best
wavelet for each image from the class of orthogonal wavelets with fixed no of
coefficients.[7] presents a formal description of the algorithm for the construction of N
parametric equations.[8] gives a method for the construction of wavelet coefficients in
an algebraic extension field Q. Applications of parameterized wavelets to compression
are discussed in [17] and [13].
3. PROBLEM DEFINITION
The parameters of the parametric wavelets have to be found such that the error
between the pattern and the designed wavelet is minimum. Here, a sine wave is taken
for illustration and parametric wavelets are designed for lengths of 4, 6, 8 and 10.
The parameters of the wavelets are optimized for minimal error for pattern
matching application.
4. DESIGN OF PARAMETRIC WAVELETS
In this section we normalize the wavelet coefficients by setting hk =ak/2. We let
h = (h0 , h1 ,….hN-1) be a point of the moduli space MN, under this renormalization which
makes the analysis simpler and will eliminate many factors of powers of 2. Let h ∈MN,
then associated with h = (h0 , h1 ,….hN-1),is trigonometric polynomial H(ζ) =
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
– 6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 1, January - June (2012), © IAEME
79
ζ. One method for constructing compactly supported scaling
k
x
(x) h (2x k)φ = φ −∑
with a finite number of coefficients. In order for a function of this type to be orthogonal
to its integer shifts, the coefficients in the dilation equation must satisfy H(z) = 1 and
|H(z)|2 +|H(-z)|
2 = 1, z = e
iw. Where H(z) = k
k
x
h z−∑ is the associated polynomial. The
necessary conditions for orthogonality yield a set of linear and nonlinear equations
which necessarily imply that various sums of dilation coefficients form perfect squares.
This leads to the introduction of parameters. Then we give the parameterization of
the length 4, 6, 8, 10 filters for completeness.
Length four Solution : Let H4(z) = a0 + b0z + a1z2
+ b1z3.
Lemma 1: H4(z) satisfies H4(1) =1and|H4(z)|2 +|H4(-z)|
2 =1 for all z = e
iw, w∈R if and
only if for all α∈R ; a0= 1 1cos
4 2 2+ α , a1= 1 1
cos4 2 2
− α , b0= 1 1sin
4 2 2+ α ,
b1= 1 1sin
4 2 2− α
Length six solution; H6(z) = a0 + b0z + a1z2 + b0z
3 + a2z
4 + b2z
5 be the trigonometric
polynomial of z = eiw
, w ∈ R
Lemma 2: H6(z) satisfies H6(1) = 1 and |H6(z)|2 + | H6(-z)|
2 = 1for all z = e
iw , w ∈ R
if and only if a0 = 1 1 pcos cos
8 24 2+ α − β , a1
= 1 1cos
4 2 2− α ,
a2 = 1 1 pcos cos
8 24 2+ α − β
b0 = 1 1 pcos sin
8 24 2+ α + β
b1 = 1 1sin
4 2 2− α ,b2 = 1 1 p
sin sin8 24 2
+ α − β
where p = for any α ,β € R
Solution for length 8
Lemma 3 :Suppose a, b , c , d ∈ R and a2+ b
2+ c
2+ d
2 = 1 if and only if
a = cos βcosγ, b = cosβcosγ , c = sin βcos θ, d = sin βsin θ for β, γ, θ ∈ R .
Let H8(z) =a0 + b0z + a1z
2 + b1z
3 + a2z
4 + b2z
5 + a3z
6 + z3z
7 be a trigonometric polynomial
of z = eiw
w∈R.
Lemma 4: H8(z) satisfies H8(1) = 1 and | H8(z)|2 +| H8(-z)|
2 = 1 for all z = e
iw, w∈R
if and only if a0 = 1 1 1cos cos cos
8 4 2 2 2+ α + β γ ,a1 = cos α + 1
2 2
cos β sin γ
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
– 6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 1, January - June (2012), © IAEME
80
a2 = 1 1
8 4 2+ cos α - 1
2 2
cos β cos γ , a3 = cos α - 1
2 2
cos β sin γ
b0 = 1 1
8 4 2+ sin α + 1
2 2
sin β cosθ ,b1 = sin α + 1
2 2 sin β sin θ
b2 = 1 1
8 4 2+ sin α - 1
2 2
sin β cos θ ,b3 = sin α - 1
2 2
sin β sin θ where
γθβα ,,, ∈ R satisfy 2 cos θ sin β - 2 cos θ sin α sin β + 2 cos β (cos γ - sin γ) - 4
cos2β cos γ sinγ - 2 cos α cos β (cos γ + sin γ)- 2 sin β sin θ - 2 sin α sin β sin θ - 4 cos θ
sin2 β sin θ = 0.
Length 10 Solution
H10(z) satisfies H8(1) = 1and H8(z)2 + H8(-z)2
= 1 ∀ z = eiw
, w∈R
if and only if a0 = 1 1
16 8 2+ cos α + 1
4 2
cos β cos γ + r
2 cos δ
a1 = 1 1
8 4 2− cos α + 1
2 2 cos β cos , a2 = 1 1
8 4 2+ cos α - 1
2 2
cos β cos γ
a3 = 1 1
8 4 2− cos α - 1
2 2cosβcos γ,a4 = 1 1
16 8 2+ cos α + 1
4 2cos βcos γ - r
2 cos δ
b0 =1 1
16 8 2+ sinα + 1
4 2sinβcos θ +
r
2sin δ, b1 =
1 1
8 4 2− sin α + 1
2 2 sin β sin θ
b2 = 1 1
8 4 2+ sin α - 1
2 2 sin β cos θ, b3 = 1 1
8 4 2+ sin α - 1
2 2 sin β sin θ
b4 = 1 1
16 8 2+ sin α + 1
4 2 sin β cos θ - r
2 sin δ
where r = 2 2
i i
1a b
2− Σ − Σ and α, β, γ, δ, θ ∈ R satisfy
cos β [cos γ ( 2 -2 cos α) - 8 2 r cos δ sin γ)] +sin β [cos θ ( 2 -2 sin α) - 8 2 r sin δ sin
θ)] = 0
5. GENETIC ALGORITHM
Genetic algorithm or adaptive heuristic search algorithm is based on
evolutionary ideas of natural selection and genetics. It is a part of evolutionary
computing inspired by Darwin’s theory about evolution- “Survival of the fittest”. It uses
random search method to solve optimization problem. Although randomized it exploits
historical information to direct the search in to the region of better performance.
Genetic algorithms are good at taking large, potentially huge search pages and
navigating them, looking for optimal combinations of things, the solution one might not
find otherwise find in a lifetime [Salvatore Mangano, Computer design, May 1995].
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
– 6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 1, January - June (2012), © IAEME
81
The optimization is a process that finds optimal solutions for a problem and is
centered around three factors:
1. An objective function which is to be minimized or maximized
2. A set of unknowns or variables that affect the objective function,
3. A set of constraints that allow the unknowns to take on certain values but
exclude others;
The GA optimizes a problem by mimicking the processes the nature uses, i.e.,
selection, cross-over, mutation and accepting. The Pseudo code of GA is given below:
BEGIN
INITIALISE population with random candidate solution.
EVALUATE each candidate;
REPEAT UNTIL (termination condition ) is satisfied DO
1. SELECT parents;
2. RECOMBINE pairs of parents;
3. MUTATE the resulting offspring;
4. SELECT individuals or the next generation;
END.
5.1 Outline of the Basic Genetic Algorithm
1. [Start] Generate random population of n chromosomes (i.e. suitable solutions for the
problem).
2. [Fitness] Evaluate the fitness f(x) of each chromosome x in the population.
3. [New population] Create a new population by repeating following steps until the
new population is complete.
(a) [Selection] Select two parent chromosomes from a population according to
their fitness (better the fitness, bigger the chance to be selected)
(b) [Crossover] With a crossover probability, cross over the parents to form new
offspring (children). If no crossover was performed, offspring is the exact copy
of parents.
(c) [Mutation] With a mutation probability, mutate new offspring at each locus
(position in chromosome).
(d) [Accepting] Place new offspring in the new population
4. [Replace] Use new generated population for a further run of the algorithm
5. [Test] If the end condition is satisfied, stop, and return the best solution in current
population
6. [Loop] Go to step 2.
6. RESULTS AND DISCUSSION
A sine wave is taken as a pattern for which a matching wavelet has been
designed using genetic algorithm. The parameters of the parametric wavelets are
derived and the final results alone are presented in section 4. The wavelets of filter co-
efficients of length 4, 6, 8 and 10 are considered in the present study. Section 4 gives
the general filter co-efficients that can be tuned to any pattern of interest. In the
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
– 6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 1, January - June (2012), © IAEME
82
present study, the designed wavelets are tuned for the sine wave - a representative
pattern for illustration. Here, the tuning of wavelet parameter is modeled as an
optimization problem. The objective function is defined as the error between the
original pattern (sine wave) and designed wavelet. The number of variable parameters
will depend on the length of the filter co-efficients. For filter co-efficient length of 4,
the number of variable parameter is one and that happens to be ‘α’ (see section 4).
Similarly, for other lengths it may go up to 5 for the filter lengths considered here.
Tuning the wavelet for a pattern means finding the right values/ combination of values
such that the error is minimum. Hence, it is modeled as minimization problem. Matlab
optimization toolbox was used for optimization. The objective function here is an m-file
which calculates the error between the pattern (sine wave) and the designed wavelet.
The variable parameters are changed in random order and new error is found. The
process continues till we get a predefined small error or consecutively getting same
error for many iterations.
The Table 1 shows the simulation results of GA with filter co-efficient length of
four. The initial population is filled with random number. However, the optimization
converges in just 51 iterations giving α value of -4.05 with an error of 139.71. Here the
error is not expressed as percentage. It is root mean squared error (RMS error). The
error, however is high in this case.
Table 1. GA parameters for sine wave with filter length of 4
α Error No. of Iterations
-4.05 139.7156 51
-4.056 139.7165 51
-4.056 139.7166 51
-4.056 139.7166 51
-4.038 139.7165 51
-4.045 139.7164 51
The Table 2 shows the simulation results of GA with filter co-efficient length of
six. The initial population is filled with random number. However, the optimization
converges in just 58 iterations giving α value of -1.361 and β value of 1.044 with an
error of 5.7998 (RMS). The test results of various trials are shown in Table 2.
Table 2. GA parameters sine wave with filter length of 6
α β Error No. of
Iterations
-1.361 1.044 5.7998 58
-1.386 1.047 6.3047 67
-1.37 1.085 10.7789 59
-1.369 1.023 6.4553 51
-1.394 1.023 5.997 51
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
– 6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 1, January - June (2012), © IAEME
83
The Table 3 and Table 4 show the simulation results of GA with filter co-efficient
length of eight and ten respectively. The initial population is filled with random number
and results of many trials were recorded. The optimization converges faster in case
length 10 compared to that of length 8; however, the error is very high in case of length
10. On careful observation, from Table 3, one can find GA has converged once with an
RMS error of 314.36. This is because GA has found the local minimum while the
solution that is in search is global minimum. This is a general problem with GA and this
can be solved by using multiple trials of GA. In the present study, the multiple use of
GA gives better result with an RMS error of 0.002. Looking for the similar pattern in
Table 4, it is clear that GA finds it difficult to optimize and give closed values. For the
chosen pattern, filter length of eight gives best results. The optimal values of each filter
co-efficient lengths is plotted against the pattern and shown in Fig. 1. One can confirm
pictorially from looking at the waveform matching for pattern matching application.
Table 3. GA parameters sine wave with filter length of 8
α β Γ Θ Error No. of
Iterations
-7.274 -4.79 -0.263 0.355 0.0028 5
-3.995 0.45 -0.119 1.062 0.1538 5
-6.481 0.377 -0.023 1.409 0.006 5
0.597 -0.724 2.904 1.137 314.36 5
-6.297 0.383 0.968 1.316 0.0073 5
Table 4. GA parameters with filter length of 10
α β Γ δ θ Error No. of
Iterations
0.292 0.539 -0.001 0.003 0.426 345.2606 2
0.785 1.775 0.922 0.218 0.65 180.4064 2
1.708 1.224 0.132 0.023 2.309 162.5255 2
0.786 -0.125 0.144 1.232 0.881 216.7954 2
0.1785 20.442 -26.782 -21.935 6.656 187.8904 4
1.796 -1.824 -1.475 -1.485 -0.253 68.9987 4
1.178 4.123 0.002 -0.001 -2.212 197.044 3
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
– 6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 1, January - June (2012), © IAEME
84
Fig. 1 Pattern and designed wavelets
7. CONCLUSION
In the present study a parametric based wavelet design is taken up. The
parameters of the parametric wavelets were derived for filter lengths of 4, 6, 8 and 10.
These parameters are optimized for a chosen illustrative pattern using GA. From the
above results and discussion, one can easily conclude that GA can be used effectively
for design of parametric wavelets. Further, in this specific case, length eight gives best
wave let for pattern matching applications.
8. REFERENCES
1. Daubechies,Ten Lectures on Wavelets, CBMSNSF, Reg. Conf. Series Appl Math.
SIAM,1992.
2. Meyer.Y,Les Ondelettes- Algorithmes et applications,Armand Colin,1992.
3. Bratteli.O,Jorgensen.P,Wavelets through a looking glass.Applied and Numerical
Harmonic Analysis, Boston,MA(2002).
4. Jorgensen, P.E.T.: Matrix factorizations, algorithms, wavelets. Notices Amer. Math.
Soc. 50(8), 880–894 (2003).
5. Georg Regensburger , Parametetrizing compactly supported orthonormal wavelets
by discrete moments, 2007,vol18,page 583-601,AAECCE.
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976
– 6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 1, January - June (2012), © IAEME
85
6. James Hereford, David Roach, Ryan Pigford, Image compression using
parameterized wavelets with feedback ,Proceedings SPIE ,5102,267 (2003).
7. Joao Dovincchi, Joao Bosco da Mota Alves, Luis Fernando jacinthao Maria and Eder
de Mattos , N-Parametric Dilation Coefficients - A Contribution to the compactly
supported wavelets construction, Signal processing and its application, 2005,
Proceedings of the eighth international symbosium,2005, pages 13-15.
8. Thomas Beth, Andreas Klappenecker,Construction of Algebraic Wavelet Coefficients,
Proc. Int. Symp of Information Theory and its applications,1994,isita 94,Sydney, pages
341-344,1994.
9. Daubechies, I.: Orthonormal bases of compactly supported wavelets. Comm. Pure
Appl. Math. 41(7), 909–996 (1988)
10. Lai, M.J., Roach, D.W.: Parameterizations of univariate orthogonal wavelets with
short support. In: Approximation theory, X (St. Louis, MO, 2001), Innov. Appl. Math.,
pp. 369–384. Vanderbilt Univ. Press, Nashville, TN (2002)
11. Lina, J.M., Mayrand, M.: Parametrizations for Daubechies wavelets. Phys. Rev. E (3)
48(6), R4160–R4163 (1993)
12. Pollen, D.: SU (2, F[z, 1/z]) for F a subfield of C. J. Amer. Math. Soc. 3(3), 611–624,
1990
13. Regensburger.G, Scherzer, O : Symbolic computation for moments and filter
coefficients of scaling functions. Ann. Comb. 9(2), 223–243 (2005)
14. Schneid, J., Pittner, S.: On the parametrization of the coefficients of dilation
equations for compactly supported wavelets. Computing 51(2), 165–173 (1993)
15. Sherlock, B.G., Monro, D.M.: On the space of orthonormal wavelets. IEEE Trans.
Signal Process. 46(6), 1716–1720 (1998)
16. Wang, S.H., Tewfik, A.H., Zou, H.: Correction to ‘parametrization of compactly
supported orthonormal wavelets’. IEEE Trans. Signal Process. 42(1), 208–209 (1994).
17. Hereford, J.M., Roach, D.W., Pigford, R.: Image compression using parameterized
wavelets with feedback. pp. 267–277. SPIE (2003)