INTERNATIONAL JOURNAL OF ADVANCED RESEARCH INInternational Journal of Advanced Research in Engineering and Technology (IJA...
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976– 6480(Print), ISSN 0976 – 649...
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976– 6480(Print), ISSN 0976 – 649...
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976– 6480(Print), ISSN 0976 – 649...
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976– 6480(Print), ISSN 0976 – 649...
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976– 6480(Print), ISSN 0976 – 649...
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976– 6480(Print), ISSN 0976 – 649...
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976– 6480(Print), ISSN 0976 – 649...
International Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976– 6480(Print), ISSN 0976 – 649...
Upcoming SlideShare
Loading in …5
×

Optimizing the parameters of wavelets for pattern matching using ga

483 views

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
483
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Optimizing the parameters of wavelets for pattern matching using ga

  1. 1. INTERNATIONAL JOURNAL OF ADVANCED RESEARCH INInternational Journal of Advanced Research in Engineering and Technology (IJARET), ISSN 0976 ENGINEERING AND TECHNOLOGY (IJARET)– 6480(Print), ISSN 0976 – 6499(Online) Volume 3, Number 1, January - June (2012), © IAEMEISSN 0976 - 6480 (Print)ISSN 0976 - 6499 (Online) IJARETVolume 3, Issue 1, January- June (2012), pp. 77-85© IAEME: www.iaeme.com/ijaret.html ©IAEMEJournal Impact Factor (2011): 0.7315 (Calculated by GISI)www.jifactor.com OPTIMIZING THE PARAMETERS OF WAVELETS FOR PATTERN MATCHING USING GA 1 Manju B R ,2Dr A R Rajan ,3Dr V Sugumaran 1 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.comABSTRACT Pattern matching has numerous applications in engineering. Wavelets havebeen used as a tool for pattern matching of signals to identify pattern, specifically inpattern recognition problems. To design wavelets for a given pattern, there are twopopular approaches namely, parametric approach and non-parametric approach. Inparametric approach, the wavelet is defined with a few parameters and designing awavelet for a given pattern is performed by choosing the right parameters which givesminimum error. The selection of such parameters is done usually on trial –and –errormethod. It is time consuming and laborious. In this paper a Genetic Algorithm basedapproach is proposed to design parameters of the wavelet by minimizing the errorbetween the pattern and the designed wavelet. The method is illustrated with asimulated sine wave for filter lengths of 4, 6, 8, and 10. The results are encouraging.Keywords: Parametric wavelet design, GA, Pattern matching1. INTRODUCTION Compactly supported orthogonal systems of wavelets were introduced byDaubechies, and she proved the existence of a multidimensional family of such waveletsystems. She also proved specific wavelet systems with maximum vanishing momentsand with smoothness properties of a specific type. The wavelets are classified in arough manner by the nonvanishing coefficients in the fundamental differenceequation which defines them. This number is an integer N, N ≥ 2 and the support of thescaling function has length N-1. As the number of coefficients increases, the supportgets larger and larger, and the smoothness also increases. In case if the wavelet system 77
  2. 2. 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), © IAEMEis in C∞ then there are infinite number of coefficients and the support in the entire realaxis. In general, for an arbitrary even N, D = (N-2)/2 tells that there is a D – parameterfamily of wavelet systems. The parameterization has the advantage of global coordinates in R , the explicitsmoothness dependencies on the parameters and a simple geometry should facilitatethe optimization problems. The general goal would be to optimize the wavelet systemsadapted 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. Wehave to design an impulse response, i.e., filter coefficients and these filter coefficientsconvolve with input signal to get the desired signal information. Effective filter design isimportant to capture the desired information from a non-stationary signal.2. LITERATURE SURVEY Daubechies [1] Mayer[2] gives an insight of compactly supported orthonormalwavelets. Daubechies [9] introduced a general method to construct compactlysupported wavelets based on scaling function which satisfy the dilation equation.Parameterzing all possible filter coefficients that correspond to compactly supportedorthonormal wavelets has been studied by several authors [10, 11,12,14,15,16] Adiscussion of scaling function with six filter coefficients depending on two parameterswere carried out in [3]and [4]. Paper [5] gives a discussion of parameterization of filtercoefficients with scaling functions and compactly support orthonormal wavelets withseveral vanishing moments.[6] demonstrates a technique that determines the bestwavelet for each image from the class of orthogonal wavelets with fixed no ofcoefficients.[7] presents a formal description of the algorithm for the construction of Nparametric equations.[8] gives a method for the construction of wavelet coefficients inan algebraic extension field Q. Applications of parameterized wavelets to compressionare discussed in [17] and [13].3. PROBLEM DEFINITION The parameters of the parametric wavelets have to be found such that the errorbetween the pattern and the designed wavelet is minimum. Here, a sine wave is takenfor 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 patternmatching application.4. DESIGN OF PARAMETRIC WAVELETS In this section we normalize the wavelet coefficients by setting hk =ak/2. We leth = (h0 , h1 ,….hN-1) be a point of the moduli space MN, under this renormalization whichmakes 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
  3. 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 ζ φ(x) = ∑ h φ(2x − k) k . One method for constructing compactly supported scaling xwith a finite number of coefficients. In order for a function of this type to be orthogonalto 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 xnecessary conditions for orthogonality yield a set of linear and nonlinear equationswhich necessarily imply that various sums of dilation coefficients form perfect squares.This leads to the introduction of parameters. Then we give the parameterization ofthe 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, w∈R if andonly if for all α∈R ; a0= 1 + 1 cos α , a1= 1 − 1 cos α , b0= 1 + 1 sin α , 4 2 2 4 2 2 4 2 2b1= 1 − 1 sin α 4 2 2Length six solution; H6(z) = a0 + b0z + a1z2 + b0z3 + a2z4 + b2z5 be the trigonometricpolynomial of z = eiw, w ∈ RLemma 2: H6(z) satisfies H6(1) = 1 and |H6(z)|2 + | H6(-z)|2 = 1for all z = eiw , w ∈ Rif 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 8 4 2 2 where p= for any α ,β € RSolution for length 8Lemma 3 :Suppose a, b , c , d ∈ R and a2+ b2+ c2+ d2 = 1 if and only ifa = cos βcosγ, b = cosβcosγ , c = sin βcos θ, d = sin βsin θ for β, γ, θ ∈ R .Let H8(z) =a0 + b0z + a1z2 + b1z3 + a2z4 + b2z5 + a3z6 + z3z7 be a trigonometric polynomialof z = eiw w∈R.Lemma 4: H8(z) satisfies H8(1) = 1 and | H8(z)|2 +| H8(-z)|2 = 1 for all z = eiw, w∈Rif and only if a0 = 1 + 1 cos α + 1 cos β cos γ ,a1 = cos α + 1 cos β sin γ 8 4 2 2 2 2 2 79
  4. 4. 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), © IAEMEa2 = 1 + 1 cos α - 1 cos β cos γ , a3 = cos α - 1 cos β sin γ 8 4 2 2 2 2 2b0 = 1 + 1 sin α + 1 sin β cosθ ,b1 = sin α + 1 sin β sin θ 8 4 2 2 2 2 2b2 = 1 + 1 sin α - 1 sin β cos θ ,b3 = sin α - 1 sin β sin θ where 8 4 2 2 2 2 2α , β , θ , γ ∈ R satisfy 2 cos θ sin β - 2 cos θ sin α sin β + 2 cos β (cos γ - sin γ) - 4cos2β cos γ sinγ - 2 cos α cos β (cos γ + sin γ)- 2 sin β sin θ - 2 sin α sin β sin θ - 4 cos θsin2 β sin θ = 0.Length 10 SolutionH10(z) satisfies H8(1) = 1and H8(z)2 + H8(-z)2 = 1 ∀ z = eiw, w∈Rif and only if a0 = 1 + 1 cos α + 1 cos β cos γ + r cos δ 16 8 2 4 2 2 a1 = 1 − 1 cos α + 1 cos β cos , a2 = 1 + 1 cos α - 1 cos β cos γ 8 4 2 2 2 8 4 2 2 2 a3 = 1 − 1 cos α - 1 cosβcos γ,a4 = 1 + 1 cos α + 1 cos βcos γ - r cos δ 8 4 2 2 2 16 8 2 4 2 2 r b0 = 1 + 1 sinα + 1 sinβcos θ + sin δ, b1 = 1 − 1 sin α + 1 sin β sin θ 16 8 2 4 2 2 8 4 2 2 2 b2 = 1 + 1 sin α - 1 sin β cos θ, b3 = 1 + 1 sin α - 1 sin β sin θ 8 4 2 2 2 8 4 2 2 2 b4 = 1 + 1 sin α + 1 sin β cos θ - r sin δ 16 8 2 4 2 2 1 where r = − Σa i2 − Σbi2 and α, β, γ, δ, θ ∈ R satisfy 2cos β [cos γ ( 2 -2 cos α) - 8 2 r cos δ sin γ)] +sin β [cos θ ( 2 -2 sin α) - 8 2 r sin δ sinθ)] = 05. GENETIC ALGORITHM Genetic algorithm or adaptive heuristic search algorithm is based onevolutionary ideas of natural selection and genetics. It is a part of evolutionarycomputing inspired by Darwin’s theory about evolution- “Survival of the fittest”. It usesrandom search method to solve optimization problem. Although randomized it exploitshistorical information to direct the search in to the region of better performance.Genetic algorithms are good at taking large, potentially huge search pages andnavigating them, looking for optimal combinations of things, the solution one might notfind otherwise find in a lifetime [Salvatore Mangano, Computer design, May 1995]. 80
  5. 5. 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 iscentered 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 Algorithm1. [Start] Generate random population of n chromosomes (i.e. suitable solutions for theproblem).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 thenew 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 population4. [Replace] Use new generated population for a further run of the algorithm5. [Test] If the end condition is satisfied, stop, and return the best solution in currentpopulation6. [Loop] Go to step 2.6. RESULTS AND DISCUSSION A sine wave is taken as a pattern for which a matching wavelet has beendesigned using genetic algorithm. The parameters of the parametric wavelets arederived 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 givesthe general filter co-efficients that can be tuned to any pattern of interest. In the 81
  6. 6. 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), © IAEMEpresent study, the designed wavelets are tuned for the sine wave - a representativepattern for illustration. Here, the tuning of wavelet parameter is modeled as anoptimization problem. The objective function is defined as the error between theoriginal pattern (sine wave) and designed wavelet. The number of variable parameterswill 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 valuessuch that the error is minimum. Hence, it is modeled as minimization problem. Matlaboptimization toolbox was used for optimization. The objective function here is an m-filewhich 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. Theprocess continues till we get a predefined small error or consecutively getting sameerror for many iterations. The Table 1 shows the simulation results of GA with filter co-efficient length offour. The initial population is filled with random number. However, the optimizationconverges in just 51 iterations giving α value of -4.05 with an error of 139.71. Here theerror is not expressed as percentage. It is root mean squared error (RMS error). Theerror, 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 ofsix. The initial population is filled with random number. However, the optimizationconverges in just 58 iterations giving α value of -1.361 and β value of 1.044 with anerror 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 No. of α β Error 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 82
  7. 7. 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-efficientlength of eight and ten respectively. The initial population is filled with random numberand results of many trials were recorded. The optimization converges faster in caselength 10 compared to that of length 8; however, the error is very high in case of length10. On careful observation, from Table 3, one can find GA has converged once with anRMS error of 314.36. This is because GA has found the local minimum while thesolution that is in search is global minimum. This is a general problem with GA and thiscan be solved by using multiple trials of GA. In the present study, the multiple use ofGA gives better result with an RMS error of 0.002. Looking for the similar pattern inTable 4, it is clear that GA finds it difficult to optimize and give closed values. For thechosen pattern, filter length of eight gives best results. The optimal values of each filterco-efficient lengths is plotted against the pattern and shown in Fig. 1. One can confirmpictorially from looking at the waveform matching for pattern matching application.Table 3. GA parameters sine wave with filter length of 8 No. of α β Γ Θ Error 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 5Table 4. GA parameters with filter length of 10 No. of α β Γ δ θ Error 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 83
  8. 8. 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 wavelets7. CONCLUSION In the present study a parametric based wavelet design is taken up. Theparameters 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 theabove results and discussion, one can easily conclude that GA can be used effectivelyfor design of parametric wavelets. Further, in this specific case, length eight gives bestwave let for pattern matching applications.8. REFERENCES1. 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 NumericalHarmonic 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 waveletsby discrete moments, 2007,vol18,page 583-601,AAECCE. 84
  9. 9. 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), © IAEME6. James Hereford, David Roach, Ryan Pigford, Image compression usingparameterized wavelets with feedback ,Proceedings SPIE ,5102,267 (2003).7. Joao Dovincchi, Joao Bosco da Mota Alves, Luis Fernando jacinthao Maria and Ederde Mattos , N-Parametric Dilation Coefficients - A Contribution to the compactlysupported 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, pages341-344,1994.9. Daubechies, I.: Orthonormal bases of compactly supported wavelets. Comm. PureAppl. Math. 41(7), 909–996 (1988)10. Lai, M.J., Roach, D.W.: Parameterizations of univariate orthogonal wavelets withshort 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,199013. Regensburger.G, Scherzer, O : Symbolic computation for moments and filtercoefficients of scaling functions. Ann. Comb. 9(2), 223–243 (2005)14. Schneid, J., Pittner, S.: On the parametrization of the coefficients of dilationequations 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 compactlysupported orthonormal wavelets’. IEEE Trans. Signal Process. 42(1), 208–209 (1994).17. Hereford, J.M., Roach, D.W., Pigford, R.: Image compression using parameterizedwavelets with feedback. pp. 267–277. SPIE (2003) 85

×