Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

IMTC 2005 - Instrumentation and Measurement

Technology Conference
Ottawa, Canada, May 17–19, 2005

A Smart Optical Position Sensor with Genetic Programming Technique


K. Ohtani1 , M. Baba2
1
Faculty of Engineering, Hiroshima Institute of Technology
2-1-1, Miyake, Saeki-ku, Hiroshima, 731-5193, Japan
Phone: +81 82 9216429, Fax: +81 82 9218973, E–mail: ohtani@me.it-hiroshima.ac.jp.
2 Faculty of Engineering, Ibaraki University

4-12-1, Nakanarusawa-cho, Hitachi, Ibaraki, 316-8511, Japan


Phone: +81 294 387099, Fax: +81 294 385272, E–mail: mbaba@mx.ibaraki.ac.jp.

Abstract – An optical measurement system, which uses a light spot or and subtracts only the background light from the sensor’s out-
a slit ray system, often requires an optical position sensor. In such put. The method is time consuming and memory wasting.
a system, because the position of a signal light is the most important In this paper, we propose a new intelligent method for op-
and basic information needed, it is necessary for the position sensor tical position sensing that is applicable in a real environment.
to detect the position accurately under any conditions. We proposed
The proposed method can estimate the actual positions of light
an intelligent position sensor that can estimate the actual position of
a light spot using a neural network, but the sensor has to go through
spots accurately by estimating the actual intensity of a signal
a relearning process when the surroundings change. In this paper, we light and a background light, respectively, through the use of
propose a new method for measuring the position of a light spot in a genetic programming. In this way, the proposed method can
real environment utilizing genetic programming. The method doesn’t perform some intelligence functions, such as adaptation of the
require advance training, unlike the method employing a neural net- detection procedure to the environment being measured online.
work, and it eliminates the influence of background lights. Therefore, The paper is organized as follows: first, the basic scheme of our
we expect that the application of the proposed sensor will be for on- position detection approach is explained, and we then present
line measurement in an actual environment. the simulation results and provide a discussion of some exper-
imental results with a prototype system.
Keywords – Position detection, Sensor array, Light spots, Genetic
programming
II. POSITION DETECTION BY GENETIC
PROGRAMMING
I. INTRODUCTION

A. Basic scheme
An optical position sensor is often required to detect the po-
sitions of plural light spots illuminated by light sources such
as laser diodes and light-emitting diodes. Applications that use The basic scheme of our method separates a signal light el-
such sensors include tracking systems to measure the positions ement and a background light element from the output of a
of robot manipulators [1] and laser rangefinders [2]. In these sensor array by utilizing genetic programming (GP). The sen-
applications, the position of a signal light is the most impor- sor array, which consists of a small number of sensor elements
tant and basic information needed, and accurate measurement arranged in one dimension or two dimensions, outputs the in-
of the position is required in any environment. In a factory or a tensity distribution of an incident light. GP is related to a ge-
laboratory, background lights can be easily excluded from the netic algorithm (GA), in which computer programs, rather than
surroundings of the object being measured. However, using a function parameters, are optimized. GP often uses tree-based
method without noise control in an environment that contains internal data structures, instead of the list, or array, structures
sunlight or fluorescent light will greatly affect the accuracy typical of GAs, to represent the computer programs for adap-
of the position sensor due to interference caused by ambient tation. In this study, as shown in Fig. 1, GP estimates the op-
light. In this case, the position sensor’s signal processor needs timal coefficients in the following functions (1) and (2), which
to eliminate these types of deleterious influences by light. express a signal light distribution and a background light dis-
One of the typical methods for removing background light tribution, respectively:
is the on-off method [3]. This method is available for an array
type of sensor such as a charge-coupled device (CCD). The fi (x) = A(x − Pi )2 + Q + N(x) (1)
method uses the intensity distribution of a background light N(x) = a(x − p)2 + q + bx + c (2)

0-7803-8879-8/05/$20.00 ©2005 IEEE 1166


Signal element Spot noise element ROOT
Linear noise element
Sensor output

A Q
* P - Noise

+ 0.6 -4.5 / + * + 5.2


1.5 9.5 -1.2 -5.5
5.5
* -9.3 -3.7
5.5 -4.2 + 7.1
-7.5 -0.2 -9.3 -3.7
1.5
Sensor array -3.7 -9.3
-3.7

(a) Intensity of each light element


Fig. 2. Individual tree structure

Pile of the intensity of


each light elements
B. Tree structure of individuals

Fig. 2 shows the tree structure of an individual in the GP, as


an example. The tree structure, which is expressed as equations
(1) and (2), is evolved by a natural selection based on GP. In
this structure, the node of!HROOT !I ,!HP !I,!HNoise !I , and the
four basic operations of arithmetic are non-terminal symbols.
(b) Output distribution of a sensor array The node of!HROOT !I , which has four partial trees, is the root
of a tree. The four partial trees stand for the A, Pi , Q, and N(x)
in equations (1) and (2). Those coefficients are determined by a
Signal element Spot noise element
combination of a terminal symbol of a real number and the four
Linear noise element
basic operations of arithmetic. In this figure, for example, the
parameter A is expressed as the function (5.5 + (−4.2)) ∗ 0.6.

C. Fitness function

Equation (3) gives the root mean squared error-based fitness


(c) Results of GP's estimation function:
1
F=  (3)
Fig. 1. Outline of the estimation based on GP 1
1+ ∑{ fi (x) − s(x)} 2
I
Here, s(x) stands for the output of the sensor array at the posi-
From the viewpoint of measurement accuracy and hardware tion of x, and I stands for the number of light signals to be de-
costs, in the case of using a laser diode and a light-emitting tected. The fitness is determined by the collation between the
diode (LED) as a light source, it is effective to approximate output value of the sensor array and the computed value from
the output distribution of a sensor array with a second-order the GP’s estimated function in each measurement. The indi-
polynomial as expressed by equation (1) and detect the incident vidual that produced the greatest fitness is the best individual
position of a spot light [4]. Here, the Pi in equation (1) stands in any generation, because the fitness function is normalized.
for the peak positions of signal lights. The i stands for the
number of signal lights.
On the other hand, as expressed by equation (2), we assume D. Genetic operation
that a background light mainly consists of a spot light element
a(x − p)2 + q and a uniform light element bx + c. In a practical In this study, we adopt roulette wheel selection, uniform
measurement, the sensor array outputs the composite value of crossover, and mutation as the genetic operations. The genetic
those light elements, as shown in Fig. 1(a), (b). Therefore, it operations are performed on individuals that are randomly se-
is difficult to detect the actual position of a signal light from lected from the population. This produces offspring. The fit-
the sensor output directly. Here, as shown in Fig. 1(c), the ac- ness of these individuals is then measured, and the probability
tual position of a signal light is computed from those estimated of their survival is determined by their fitness. In the muta-
functions. tion operation, a single parental individual is probabilistically

1167
selected from the population based on fitness. A mutation 14
point is randomly chosen, the subtree rooted at that point is Calculated position
deleted, and a new subtree is grown there using the same ran- 12 from the sensor

Detected postition (pixel)


dom growth process that was used to generate the initial popu- output directly
10
lation.
8
III. COMPUTER SIMULATION Estimated
6
position by GP
A. Procedure 4

2
To verify the applicability of the GP approach to the estima-
tion of plural continuous functions from a discrete datum, we 0
0 2 4 6 8 10 12 14
simulated the behavior of a prototype GP on a computer in sev-
Actural position (pixel)
eral situations. In this simulation, we assume that the discrete
datum s(x) is given by the following equations (4), (5), and (6), Fig. 3. Linearity of the peak detection
and the value of s(x) is determined by the amount value of each
equation at x. Here, the discrete datum s(x) is regarded as the

Average error of position estimation (%)


sensor output at the position of x. 0.8

s(x) = ∑ fi (x) (4) 0.6

fi (x) = A (x − Pi )2 + Q + N  (x) (5)


N  (x) = a (x − p )2 + q + b x + c (6) 0.4

In this simulation, the population of one thousand individ- 0.2


uals undergoes generation changes ten thousand times. We
adopt roulette wheel selection, and the selected individuals
0.0
were implemented in a crossover operation with an eighty per-
10.4 13.9 19.9 60.0
cent probability. The mutation probability was five percent.
The coefficients of estimated functions were computed based Signal-to-noise ratio (20*log(x) dB)
on the individual that produced the best fitness. Fig. 4. Peak detection error versus the signal-to-noise ratio

B. Results
Fig. 3 shows the linearity of the position detection. In this
Equations (7) and (8) show the functions that produce the figure, the data expressed in the square shows the results of the
output of the sensor array. The parameters in these functions ordinary method without noise control, and the other shows
are given random values selected from the allowed range on that of the proposed method with GP. Compared with the or-
startup. Equations (9) and (10) show the estimated functions dinary method, our GP method showed a good linearity. The
from the GP corresponding to functions (7) and (8), respec- maximum relative error of the proposed method was 1.0 %.
tively. The estimated positions Pi were nearly equal to the Next, we simulated whether the proposed GP could elim-
given positions Pi . This shows that the GP is effective at re- inate various intensities of spot noise as well as estimate the
moving background light in such an optical sensor array. peak position of signal light spots. The signal-to-noise (S/N)
level was set for up to about 10 dB. Fig. 4 shows the average
error of the peak position estimation for each S/N level. This
fi (x) = −0.46(x − Pi )2 + 91.0 + N  (x) (7) result shows that the GP method can estimate the spot light po-

N (x) = −0.80(x − 10.0) + 30.0 + 0.00x − 0.70
2
(8) sition to within about 10 dB of the S/N level. It is thus not nec-
essary for our method to obtain preliminary knowledge about
fi (x) = −0.44(x − Pi ) + 36.8 + N(x)
2
(9) the environment being measured in advance, which means it
N(x) = −0.56(x − 14.4) + 35.9 − 0.13x − 0.52
2
(10) may adapt to a real environment autonomously.
Finally, we conducted a simulation to determine whether
i 1 2 3 4 5 the proposed GP could adapt to an environment being mea-
Pi 5.00 9.00 11.0 13.0 16.0 sured online. Fig. 5 shows the behavior of the GP versus
Pi 4.97 9.10 11.3 13.3 16.2 measurement time. The background light was changed three

1168
Changing points of the surroundings Light source
20 for spot-noise 1.0 mm
Convergence eorror (%)

NN y z
10 Photo-diode array
x

GP Lens
0 ADC
0 300 600 1200 1500
Time in measurement (s) Light source for signal
Fig. 5. Trend of convergence in the changing of surroundings during
measurement Computer
(GP operation)
Fig. 6. Measurement setup
times during the measurement period. The error of the GP es-
timation decreased as the evolution by GP progressed. This
result shows that the proposed method is effective for online
measurement in a real environment. On the other hand, the
method with a neural network [5], which has been proposed from the signal light source at different positions, respectively.
by our group, showed a larger error at the point at which the In this figure, the horizontal axis shows the pixel number in the
background light was changed. Once the neural network has photodiode array, and the vertical axis shows the output voltage
learned the light condition in the measuring environment, it of the sensor element. As shown in this figure, each intensity
remains effective until the light condition changes. However, distribution of the signal light is warped by the spot noise and
the neural network did not adapt to change in an environment does not fit to an ideal curve. Moreover, the expanses of the
on-line. intensity distributions do not coincide with each other in form.
In such a situation, it is difficult to realize precise detection of
IV. EXPERIMENT the incident positions of light spots. Here, we tried to separate
10 signal elements and one noise element only from the sensor
output using the proposed GP approach. The genetic operation
A. Setup and procedure in this experiment is almost the same as that in the simulation
mentioned above. It took about 300 seconds to compute 10
In the practical applicability of this method to the position points using a computer with a Pentium 4 processor 1.6-GHz
detection of light spots, the sensor output does not always coin- CPU and 512 MB of memory.
cide with the discrete value computed from a continuous poly-
nomial because of ambient light and electrical noise in a signal
processing circuit. Therefore, to verify the usefulness of the
GP approach in practice, we experimented with detecting the 1.4
Sensor output (V)

position of light spots using a photodiode array (S4114-35Q, 1.2


Hamamatsu Photonics, K.K.) [6] and LEDs, as shown by Fig. 1.0
6. The photodiode array, which received light spots through
0.8
a lens from a light source, consisted of 20 sensor elements.
The interval between sensor elements was 1.0 mm. The sensor 0.6
has a sensitivity of 190 nm to 1000 nm wavelength, and the 0.4
peak wavelength is 800 nm. The light source consisted of 2 0.2
LEDs which have 660 nm wavelength. One LED functioned
0
as a signal light source. This LED was able to move at various
1 4 7 10 13 16 19
intervals by an auto-moving stage. The other LED produced a
light spot for a noise element at a fixed position. The intensity
Position (pixel)
of the signal spot was about 5 times larger than that of the noise Fig. 7. Output distributions of the photo-diode array
spot.
Fig. 7 shows the sensor output in this experiment. The
sensor array observed the 10 intensity distributions projected

1169
B. Results TABLE I
C OEFFICIENTS IN THE APPROXIMATED FUNCTIONS OF THE LIGHT
INTENSITY DISTRIBUTIONS

Fig. 8 shows the estimation results of the GP approach. Ta- Calculated value GP estimation
ble I shows the detail of the estimated functions of the signal A' P' A P
elements and the noise element. In this table, the column la- peak 1 -0.96 -13.59 -1.10 -12.70
beled!HCalculated value !Ilists the calculated coefficients from peak 2 -0.84 -12.94 -12.40
each light element directly using a fitting with a second-order peak 3 -1.21 -9.13 -9.08
polynomial. The column labeled !H GP estimation !Ilists the peak 4 -1.15 -5.67 -5.70
coefficients estimated through the use of the proposed GP ap- peak 5 -1.45 -4.82 -4.83
proach. The parameters in the table stand for the coefficients in peak 6 -1.46 -1.42 -0.72
the equations (1), (2), (5), and (6). From these results, we see peak 7 -1.41 2.01 2.40
that the estimated coefficients agree well with the calculated peak 8 -1.30 5.50 6.30
values. peak 9 -1.16 9.12 8.90
peak 10 -1.13 12.49 12.60
1.2
a' p' a p
noise -0.14 -2.19 -0.10 -2.47
Sensor output (V)

1.0
0.8
0.6 2.0
0.4 Without noise control
0.2 Error (pixel) 1.0
0.0
1 4 7 10 13 16 19 0.0
Position (pixel)
(a) signal elements -1.0
GP estimation
Sensor output (V)

1.0 -2.0
0.8 1 2 3 4 5 6 7 8 9 10

0.6
Peak index

0.4 Fig. 9. Measurement error of the position detection


0.2
0.0
1 4 7 10 13 16 19 V. CONCLUSION
Position (pixel)
(b) noise elements We proposed a new smart optical position sensor that can be
Fig. 8. Separation results of the signal and noise elements from the sensor applied to a real environment. The sensor can detect the actual
outputs positions of light spots accurately through the use of GP. The
GP estimates the approximation functions to the intensity dis-
tribution of both of a signal light element and a noise light ele-
Fig. 9 shows the position detection error of the proposed ment from the sensor array output blended with ambient noise.
approach and the ordinary method without noise control. From In this research, we first verified the validity of the GP ap-
this figure, we see that the GP approach detected all positions proach against the estimation of continuous functions from a
of light spots within about 0.5 % in surroundings with ambient discrete datum using a computer simulation. Next, we carried
light. However, the result of the method without noise control out an experiment with a photodiode array and LEDs in prac-
was relatively worse than that of the GP approach. Considering tice. We found that the proposed method made an appropriate
the circumstances mentioned above, we think that the proposed estimation of the approximation function against both of a sig-
approach can eliminate the spot noise from the sensor output nal light element and a noise element from the output of the
accurately without previous knowledge about the environment sensor array. These results show the practical applicability of
being measured. the proposed GP approach to the robust detection of a light spot
position with an optical sensor array.

1170
REFERENCES
[1] H. Gander, M. Vincze, and J.P. Prenninger, “Application of a floating
point digital signal processor to the control of a laser tracking system,”
IEEE Trans. Control System Technology, vol. 4, no. 2, 290–298, 1994.
[2] F. Chen, G. M. Brown, and M. Song., “Overview of three dimensional
shape measurement using optical methods,” Optical Engineering, vol.
39, no, 1, 10–22, 2000.
[3] Michael W. Burke, Image Acquisition, Chapma & Hall, 1996.
[4] K. Ohtani and M. Baba, “An intelligent position sensor for light spots
using an analog scan circuit and FPGA,” Proc. IEEE Instr. and Meas.
Tech. Conf., Vail, CO, May 2003.
[5] K. Ohtani and M. Baba, “An intelligent optical position sensor applica-
ble to a real environment,” Proc. 4th Topical Meeting on Optoelectronic
Distance/Displacement Measurements and Applications, Oulu, Finland,
126–131, June 2004.
[6] Hamamatsu Photonics, K.K., http://sales.hamamatsu.com/index.php
id=13183174&language=1&, March 2005.

1171

You might also like