You are on page 1of 9

International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 INTERNATIONAL JOURNAL OF ADVANCED RESEARCH IN

ENGINEERING AND TECHNOLOGY (IJARET) 6480(Print), ISSN 0976 6499(Online) Volume 3, Number 1, January - June (2012), IAEME
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
IAEME

OPTIMIZING THE PARAMETERS OF WAVELETS FOR PATTERN MATCHING USING GA


1 1

Manju B R ,2Dr A R Rajan ,3Dr V Sugumaran

Research Scholar, Dept of Mathematics, University of Kerala, Thiruvananthapuram, manjubrrajendran@yahoo.co.in, 2 Professor, Dept of Mathematics, University of Kerala, Thiruvananthapuram 3 SMBS,VIT University, Chennai Campus, Tamil Nadu, India, v_sugu@yahoo.com

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
77

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

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 lter 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() =
78

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
(x) = h (2x k) . One method for constructing compactly supported scaling 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 = eiw. Where H(z) = h k z k is the associated polynomial. The

k x

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 = eiw, wR if and only if for all R ; a0= 1 + 1 cos , a1= 1 1 cos , b0= 1 + 1 sin , 4 2 2 4 2 2 4 2 2 b1= 1 1 sin
4 2 2

Length six solution; H6(z) = a0 + b0z + a1z2 + b0z3 + a2z4 + b2z5 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 = eiw , w R if and only if a0 = 1 + 1 cos p cos , a1
8 4 2 2

= 1 1 cos ,
4 2 2

a2 = 1 + 1 cos p cos b0 = 1 + 1 cos + p sin


8 4 2 2
8 4 2 2

b1 = 1 1 sin ,b2 = 1 + 1 sin p sin


4 2 2

4 2

where Solution for length 8

p=

for any , R

Lemma 3 :Suppose a, b , c , d R and a2+ b2+ c2+ d2 = 1 if and only if a = cos cos, b = coscos , c = sin cos , d = sin sin for , , R . Let H8(z) =a0 + b0z + a1z2 + b1z3 + a2z4 + b2z5 + a3z6 + z3z7 be a trigonometric polynomial of z = eiw wR. Lemma 4: H8(z) satisfies H8(1) = 1 and | H8(z)|2 +| H8(-z)|2 = 1 for all z = eiw, wR if and only if a0 = 1 + 1 cos + 1 cos cos ,a1 = 8 4 2 2 2 cos + 1 cos sin
2 2

79

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

a2 = 1 + 1 cos 8 4 2

1 2 2

cos cos , a3 =

cos -

1 2 2

cos sin

b0 = 1 + 1 sin + 1
8 4 2

sin cos ,b1 =

sin + 1
2 2

sin sin
1 sin sin where 2 2 2 cos (cos - sin ) - 4

2 2
1 sin cos ,b3 = 2 2

b2 = 1 + 1
8

sin -

sin -

4 2

, , , R satisfy 2 cos sin - 2 cos sin sin +


cos2 cos sin - 2 cos cos (cos + sin )sin2 sin = 0. Length 10 Solution

2 sin sin - 2 sin sin sin - 4 cos

H10(z) satisfies H8(1) = 1and H8(z)2 + H8(-z)2 = 1 z = eiw, wR


if and only if

a0 = 1 + 1 cos + 1 cos cos + r cos 2 16 8 2 4 2 a1 = 1 1 cos +


8 4 2

1 2 2

cos cos , a2 = 1 + 1 cos - 1


8 4 2

cos cos

2 2

a3 = 1 1 cos - 1 coscos ,a4 = 1 + 1 cos + 1 cos cos - r cos 2 8 4 2 16 8 2 4 2 2 2

r b0 = 1 + 1 sin + 1 sincos + sin , b1 = 1 1 sin + 1 sin sin 2 16 8 2 8 4 2 2 2 4 2


b2 = 1 + 1 sin - 1 sin cos , b3 = 1 + 1 sin - 1 sin sin 8 4 2 8 4 2 2 2 2 2 b4 = 1 + 1 sin + 1 sin cos - r sin 2 16 8 2 4 2 where r =
1 a i2 bi2 and , , , , R satisfy 2

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 Darwins 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].

80

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

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 coefficients 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

81

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

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 -4.05 -4.056 -4.056 -4.056 -4.038 -4.045 Error 139.7156 139.7165 139.7166 139.7166 139.7165 139.7164 No. of Iterations 51 51 51 51 51 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 -1.361 -1.386 -1.37 -1.369 -1.394 1.044 1.047 1.085 1.023 1.023 Error 5.7998 6.3047 10.7789 6.4553 5.997 No. Iterations 58 67 59 51 51 of

82

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

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 -7.274 -3.995 -6.481 0.597 -6.297 -4.79 0.45 0.377 -0.724 0.383 -0.263 -0.119 -0.023 2.904 0.968 0.355 1.062 1.409 1.137 1.316 Error 0.0028 0.1538 0.006 314.36 0.0073 No. of Iterations 5 5 5 5 5

Table 4. GA parameters with filter length of 10 0.292 0.785 1.708 0.786 0.1785 1.796 1.178 0.539 1.775 1.224 -0.125 20.442 -1.824 4.123 -0.001 0.922 0.132 0.144 -26.782 -1.475 0.002 0.003 0.218 0.023 1.232 -21.935 -1.485 -0.001 0.426 0.65 2.309 0.881 6.656 -0.253 -2.212 Error 345.2606 180.4064 162.5255 216.7954 187.8904 68.9987 197.044 No. of Iterations 2 2 2 2 4 4 3

83

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

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), 880894 (2003). 5. Georg Regensburger , Parametetrizing compactly supported orthonormal wavelets by discrete moments, 2007,vol18,page 583-601,AAECCE.

84

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

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 Coefcients, 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), 909996 (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. 369384. Vanderbilt Univ. Press, Nashville, TN (2002) 11. Lina, J.M., Mayrand, M.: Parametrizations for Daubechies wavelets. Phys. Rev. E (3) 48(6), R4160R4163 (1993) 12. Pollen, D.: SU (2, F[z, 1/z]) for F a subeld of C. J. Amer. Math. Soc. 3(3), 611624, 1990 13. Regensburger.G, Scherzer, O : Symbolic computation for moments and lter coefcients of scaling functions. Ann. Comb. 9(2), 223243 (2005) 14. Schneid, J., Pittner, S.: On the parametrization of the coefcients of dilation equations for compactly supported wavelets. Computing 51(2), 165173 (1993) 15. Sherlock, B.G., Monro, D.M.: On the space of orthonormal wavelets. IEEE Trans. Signal Process. 46(6), 17161720 (1998) 16. Wang, S.H., Tewk, A.H., Zou, H.: Correction to parametrization of compactly supported orthonormal wavelets. IEEE Trans. Signal Process. 42(1), 208209 (1994). 17. Hereford, J.M., Roach, D.W., Pigford, R.: Image compression using parameterized wavelets with feedback. pp. 267277. SPIE (2003)

85

You might also like