Published: 30 June 2017

The application research on improvement of genetic algorithm in linear CCD detection

Bo Yu1
Zhan-hui Yan2
Li-tao Wang3
Xiao-dong Li4
Da-yu Wang5
1, 2, 3, 4, 5Changchun Institute of Technology, Changchun, China
Corresponding Author:
Bo Yu
Views 34
Reads 15
Downloads 1459


When the linear array image sensor (CCD) is used for spot detection, the optimization of the detection signal is usually one of the problems that plague the user. In linear array imaging sensor (CCD) detection applications, optimization of the detection signal is usually one of the problems with the user. Based on the characteristics of linear array CCD detection signal, a genetic algorithm (GA) is established to solve the problem of mathematical model. In this paper, a new adaptive genetic algorithm (IGA) with directional adaptive guidance and adaptive control technology and threshold constraint technology are proposed for the lack of local optimization ability of the standard genetic algorithm (SGA), premature convergence and low accuracy. By applying IGA to the actual detection data, it is proved that IGA has certain advantages in solving the problem of linear CCD detection signal optimization. In the end of this paper, the performance of IGA, SGA and peak finding algorithm (SP) are analyzed and compared, which fully demonstrates the advantages of IGA in solving such problems.

1. Introduction

The linear array CCD image sensor spot detection signal optimization is a nonlinear, multi peak of combinatorial optimization problem, how quickly and accurately its optimal solution is a one of the research topic of practical value. The key to solve these problems lies in two aspects: one is how to build a linear CCD light spot detection signal mathematical model of optimization; the second is how to choose the optimization method of solving the mathematic model. GA is Holland, drain the survival of the fittest in nature and genetic optimization algorithm [1-3]. Because, the GA has many advantages, so in recent years, GA has been widely applied in many fields. But GA also exposes some disadvantages in the process of application, such as the global search performance, for the search speed and precision is slightly less than [4, 5].

This paper focuses on: how to design effective IGA, in the practical application, it can quick and efficient solve the problem of “linear CCD light spot detection signal optimization”.

2. Signal optimization mathematical model

2.1. The object of study

In this paper, the research object is an online optimization problem of “spot on CCD imaging curve”, the problem comes from photoelectric measuring system of “light reflection method of micro friction test project”, the photoelectric testing system structure as shown in Fig. 1.

Its composition is: two sets of laser generator, collimating focusing lens, two sets of silicon sensor, two sets of linear CCD detector. Working principle is: the laser light laser, the collimating lens focus after the incident to the silicon sensor, then through the reflection into the linear CCD detector photosensitive surface, light spot online CCD imaging curve is shown in Fig. 2.

Analysis: the location of the curve peak in imaging should be linear CCD photosensitive light reflection on the surface of the position.

Laser and CCD imaging curve’s maximum position is unchanged. The amplitude of the silicon wafer action directly reflects the actual test of friction and the size of the positive pressure, maximum position is reflected in the CCD imaging curve changes, the real value of the friction force and the positive pressure can be obtained through calculation of the calibration.

To sum up, the CCD imaging curve optimization problem is an important part of the photoelectric testing system, how can fast and accurate positioning the maximum points and calculating the variation has become the key to realization the high precision, high sensitivity testing system.

Fig. 1Photoelectric detection system structure

Photoelectric detection system structure

Fig. 2Spot on the CCD imaging curve

Spot on the CCD imaging curve

2.2. Mathematical model

By the Fig. 2 can get the following data: intensity value corresponding to the maximum value of imaging curve is about 275, the Yu Guangjiang values less than 100 are believed to be points not spot, speckle imaging pixel points about 200 pixels wide. The optimization solution model can be established:

(1) The objective function.

According to the above data, determine the maximum light intensity with the curve 275 and search the difference between the light intensity value as objective function, the function expression is:


(2) Constraint conditions.

Because of the light intensity value maximum 275 only, so establishing the constraint expression for the following:


(3) Termination conditions.

According to the actual situation, to establish differential value is 0, or the time difference is equal to the first I – five times to the average of the time difference I to termination conditions, its function is as follows:


On Eqs. (1)-(3) parameters are defined as follows: Δmax for maximum light intensity 275, ΔI get effective light intensity for arbitrary point, Δj for arbitrary point of the actual light intensity, to take the number of N.

3. The improved genetic algorithm

3.1. Improve the principle

The improvement of GA can be embodied in every steps of the algorithm implementation, such as the establishment of the coding, initial population, the establishment of a fitness function, and so on.

Improvement scheme in this paper is proposed to the SGA termination conditions, the author in the SGA termination conditions combined with adaptive technology and dynamic threshold constraint technology, makes the improved algorithm on such optimization problem has obvious superiority. Specific implementation plan is as follows (based on the actual research object).

Known to the system, the optimal values of the linear array CCD detection of maximum light intensity is about 275, speckle imaging point of pixels wide approximately 200 pixels, the CCD signal of the position of the light intensity is about the biggest 200 pixels, in the middle of the position, due to the above two known data, so the constraint can be set like this:

(1) Compare the random-access target value of the relative light intensity value and the threshold of 100 (light intensity value is less than 100 are believed to be spot not point), because the ultimate goal intensity value is about 275, so they can think the light intensity more than 100 in the target location is in speckle imaging points of 200 pixels wide. If all individual target values are less than the threshold of 100, then redistribute system to get light intensity values and continue to compare, until there is individual target value is greater than the threshold of 100. If setting up reasonable population size, can get individuals greater than the threshold of 100 within three time.

(2) After individual target value is greater than the threshold of 100, then narrow the randomly assigned space, according to the individual target position corresponding pixel value as the center, the backward and forward 60 pixel length open space (spot the corresponding pixel wide for 200, half of 100, so the selection of 60, the two can cover the whole optimal solution area), to form a 120 pixels in the allocation of space, and to increase the number of total group of individuals and to change previous constraints, constraints into each individual size comparison between the target, so much. Due to allocate space on this for individual target has been more and more close to the optimal solution, so the increase in the total group of individual number can improve the optimization efficiency and optimization precision. According to the above scheme performed several times to get the maximum of the curve.

3.2. Implementation steps

IGA, as a kind of adaptive global efficient optimization algorithm, for any need to be optimized calculation model, according to the following steps, the solution generally can be construct: 1) determine the decision variables and constraints, including individual phenotype and problem solution space; 2) to determine the initial population and scale; 3) determine the method of feasible solution of chromosome coding; 4) determine the individual fitness function; 5) to determine the genetic operators, including selection, crossover and mutation operator; 6) the related operation parameters of improved genetic algorithm, including population size M, the largest evolution algebra T, crossover probability Pc and mutation probability Pm, initial constraint threshold TV1 and extension field TV2.7) set up the dynamic adaptive termination conditions.

4. The application and performance analysis

IGA test object is the model introduced in the second part of article. the model test curve belongs to the nonlinear, multi-optima irregular curve, there are innumerable local maximum point on curve, but only a global maximum points. Want to rapid and accurate get the optimal solution of curve (the maximum), the use of traditional optimization algorithm, may be limited to get local optimal or make a long time because complex algorithm, using the IGA can be accurately obtained the optimal solution. The author selected IGA and SGA, SP algorithm for the optimization problem. The following are the specific process of solution and analysis.

IGA to solve the parameter selection are as follows: initial population size N1= 30, enter the space distribution of population size (n= 50, number of variables NVAR = 2 (relative light intensity value and pixel values), individual coding string length PRECI = 10, the largest genetic algebra MAXGEN = 100, generation gap GGAP = 0.9, crossover probability p= 0.7, the mutation probability PM = 0.7/(2xPRECI) = 0.014, the original constraint thresholds TV1 threshold TV2 = 100 and extension field is 60.

In order to establish an algorithm of comparable, take the SGA’s solution of the improved algorithm to solve the parameters of the equivalent parameters (N= 50 population, solving other parameters are equal).

Fig. 3, Fig. 4 of SGA genetic respectively 30 individual target distributions and IGA genetic 10 after generation after individual target distribution.

Fig. 3 shows that use the SGA to solve the maximum, after genetic 30 generations to get the maximum value of 271.732. And Fig. 4 shows that maximum also is to solve the model, using the IGA, after genetic 10 generations to get maximum of 274.148, far more than SGA genetic a maximum of 30 generations. Thus, contrast Fig. 4, Fig. 4 shows: IGA compared with SGA, the solving speed is much faster than the latter.

Fig. 3SGA genetic 30 generations individual value distribution

SGA genetic 30 generations  individual value distribution

Fig. 4IGA code for 10 individual value distribution

IGA code for 10 individual  value distribution

Fig. 5Standard and improve the best individual trends

Standard and improve the best individual trends

Fig. 5 for the algorithm is improved and the best individual change trend diagram, can see clearly from the picture: IGA genetic 10 generations had to get the most value, and genetic 30 generations than the SGA to get the most value, and get the most value of the latter is slightly less than the former. “Light reflection method for micro friction test project”, the optimal solution of the difference of error may represent an order of magnitude, so IGA both from the solution efficiency and precision into consideration are very suitable for the project.

In the table below for the specific performance analysis of three kinds of algorithm, by the table below shows that IGA is not only improves a lot on solving speed (faster than SGA and SP), and also have to improve on precision (higher than SGA).

Table 1Performance comparison of three kinds of algorithm

A single processing time
The optimal solution
0.78 s
0.91 s
2.03 s

5. Conclusions

GA as a non-deterministic quasi-natural algorithm provides an effective solution for the optimization of complex systems. By analyzing the traditional optimization algorithm SP and the standard genetic algorithm SGA, the author points out its shortcomings and designs an improved genetic algorithm (IGA). The algorithm is simple and practical. SP based on traditional optimization algorithm and standard genetic algorithm (SGA analysis, points out its insufficiency, and designed a kind of improved genetic algorithm, IGA algorithm is simple, high practical value. Finally, it is proved that the superiority of IGA in the optimization problem is easy to be generalized by applying it to the actual test data analysis and comparison. This example also confirms that IGA is a global random search technique with directional guidance.


  • Holland J. H. Adaptation in Nature and Artificia System. The University of Michigan Press, Ann Arbor, 2004.
  • Yuan Qun, Zuo Yi Selection of cold chain logistics distribution center location based on improved hybrid genetic algorithm. Journal of Shanghai Jiao Tong University, Vol. 50, Issue 11, 2016, p. 1795-1861.
  • Sun Tian-yu, Shi Zheng, Sun Tian-yu, Shi Zheng Research on design of FIR filter based on improved genetic algorithm. Computer Engineering and Applications, Vol. 34, Issue 9, 2016, p. 752-158.
  • Liu Hao-ran, Zhao Cui-xiang, Li Xuan, Wang Yan-xia, Guo Chang-jiang Study on a neural network optimization algorithm based on improved genetic algorithm. Chinese Journal of Scientific Instrument, Vol. 37, Issue 7, 2016, p. 1573-1581.
  • Fu Xiao Ming, Wang Fu Lin, Shang Jia Jie Optimized BP neural network algorithm based on multi-child genetic algorithm. The Computer Simulation, Vol. 33, Issue 3, 2016, p. 258-264.

About this article

17 May 2017
31 May 2017
30 June 2017
Mathematical models in engineering
CCD detection
genetic algorithm