164
5 Optimization Algorithm and RFID System Physical Anti-Collision
The double threshold algorithm is used to detect and connect the edge. First, the
low threshold δ 1 and high threshold δ 2 should be set. Then, the image is divided into
low threshold edge image T 1 [x, y] and high threshold edge image T 2 [x, y] according
to these two thresholds. The edge is connected into a contour in the image T 2 [x, y].
When the contour endpoint in T 2 [x, y] is reached, the corresponding neighborhood
position of the low threshold edge image T 1 [x, y] is searched for an edge T 3 [x, y]
that can be connected to the contour. If T 3 [x, y] and T 2 [x, y] can be connected to
a curve or a straight line, it is retained, otherwise discarded. The edge T 3 [x, y] in
T 1 [x, y] is collected until T 3 [x, y] and T 2 [x, y] are connected to a full edge.
To obtain the vertical position of the tag, firstly we should use template matching
method to mark out each tag, as shown in Fig. 5.6. In Fig. 5.6, (a) represents the
template, and (b)−(h) represent the matching results. The horizontal camera should
be adjusted to focus on the i th RFID tag so that the image of the i th RFID tag can
be obtained clearly. The edge of the i th RFID tag and its frame can be obtained by
edge detection method, and the number of pixels on the width of the i th RFID tag
and its frame can also be calculated. Afterwards, the vertical coordinate H i can be
calculated by the ratio method.
H i = a × (n i
m i )
(5.11)
where a is the real width of the RFID tag, n i is the sum of the pixels on the width
of the i th RFID tag and its frame, m i is the pixels on the i th RFID tag. Therefore, the
spatial coordinate of the i th RFID tag is (r i sin θ i , r i cos θ i , H i ).
A larger amount of data has been measured for different spatial distribution of
the tags in this experiment. The results are shown in columns 1 to 21 in Table 5.1,
and (x i , y i , z i ) represents the spatial position of the i th tag. A set of data is selected
randomly to plot the spatial structure of the RFID tag network. The result is shown
in Fig. 5.7.
5.1.3 Prediction of Tag Distribution Based on PSO Neural
Network
(1) Algorithm description
PSO algorithm has a very excellent performance in the multi-objective optimization
[26, 27]. Therefore, PSO is introduced for optimization of multi-tag network, which
is conducive to improve the reading performance of RFID system.
The PSO algorithm is a process that uses an individual (also called a particle)
to move in the solution space to find the optimal solution [28]. Each particle is
described by three parameters: velocity, position, and fitness. The velocity determines
the direction and distance of the particle and adjusts itself with the influence of other
particles. The fitness determines whether the particle is good or bad. The better the
5 Optimization Algorithm and RFID System Physical Anti-Collision
The double threshold algorithm is used to detect and connect the edge. First, the
low threshold δ 1 and high threshold δ 2 should be set. Then, the image is divided into
low threshold edge image T 1 [x, y] and high threshold edge image T 2 [x, y] according
to these two thresholds. The edge is connected into a contour in the image T 2 [x, y].
When the contour endpoint in T 2 [x, y] is reached, the corresponding neighborhood
position of the low threshold edge image T 1 [x, y] is searched for an edge T 3 [x, y]
that can be connected to the contour. If T 3 [x, y] and T 2 [x, y] can be connected to
a curve or a straight line, it is retained, otherwise discarded. The edge T 3 [x, y] in
T 1 [x, y] is collected until T 3 [x, y] and T 2 [x, y] are connected to a full edge.
To obtain the vertical position of the tag, firstly we should use template matching
method to mark out each tag, as shown in Fig. 5.6. In Fig. 5.6, (a) represents the
template, and (b)−(h) represent the matching results. The horizontal camera should
be adjusted to focus on the i th RFID tag so that the image of the i th RFID tag can
be obtained clearly. The edge of the i th RFID tag and its frame can be obtained by
edge detection method, and the number of pixels on the width of the i th RFID tag
and its frame can also be calculated. Afterwards, the vertical coordinate H i can be
calculated by the ratio method.
H i = a × (n i
m i )
(5.11)
where a is the real width of the RFID tag, n i is the sum of the pixels on the width
of the i th RFID tag and its frame, m i is the pixels on the i th RFID tag. Therefore, the
spatial coordinate of the i th RFID tag is (r i sin θ i , r i cos θ i , H i ).
A larger amount of data has been measured for different spatial distribution of
the tags in this experiment. The results are shown in columns 1 to 21 in Table 5.1,
and (x i , y i , z i ) represents the spatial position of the i th tag. A set of data is selected
randomly to plot the spatial structure of the RFID tag network. The result is shown
in Fig. 5.7.
5.1.3 Prediction of Tag Distribution Based on PSO Neural
Network
(1) Algorithm description
PSO algorithm has a very excellent performance in the multi-objective optimization
[26, 27]. Therefore, PSO is introduced for optimization of multi-tag network, which
is conducive to improve the reading performance of RFID system.
The PSO algorithm is a process that uses an individual (also called a particle)
to move in the solution space to find the optimal solution [28]. Each particle is
described by three parameters: velocity, position, and fitness. The velocity determines
the direction and distance of the particle and adjusts itself with the influence of other
particles. The fitness determines whether the particle is good or bad. The better the
