168
5 Optimization Algorithm and RFID System Physical Anti-Collision
V m (t + 1) = wV m (t) + c 1 r (t)(P m (t) − X m (t)) + c 2 r
(t)(G d (t) − X m (t))
X m (t + 1) = X m (t) + V m (t + 1)
(5.18)
where r (t) and r
(t) are random numbers uniformly distributed over [0, 1] varying
with time t. Considering the influence of the inertia weight w and the acceleration
coefficients c 1 , c 2 on the diversity of the population, the linear inertia weight and the
time-varying acceleration coefficients are used in this paper. This method focuses on
self-learning of P(t) and G(t) in the iterative process, which is beneficial to improve
the overall performance of the algorithm. The corresponding formulas are shown as
follows:
⎧
⎨
⎩
w(t) = w e + (w i − w e )(t max − t)/t max
c 1 (t) = c 11 + (c 12 − c 11 )t/t max
c 2 (t) = c 21 + (c 22 − c 21 )t/t max
(5.19)
where w i and w e are the initial and final values of the inertia weights; c 11 , c 12 , c 21 ,
and c 22 are fixed values; and t max is the maximum number of iterations.
Therefore, Eq. (5.14) should be changed as follows:
V m (t + 1) = w(t)V m (t) + c 1 (t)r (t)(P m (t) − X m (t)) + c 2 (t)r
(t)(G d (t) − X m (t))
X m (t + 1) = X m (t) + V m (t + 1)
(5.20)
When the position parameter of the particle is updated, it is necessary to calculate
the fitness value of the new position and update the individual and population optimal
position. The formulas are as follows:
P(t + 1) =
X (t + 1), F(X (t + 1)) < F(P(t))
P(t),
(5.21)
G(t + 1) =
P n (t + 1),
G(t),
F(P n (t + 1)) < F(G(t))
(5.22)
where n represents the particle of best fitness. When the number of iterations reaches
the maximum, the population optimal position G is the optimal solution.
(2) Results and analysis
In this paper, PSO algorithm is used to improve the BP neural network. After the
weights and thresholds of BP neural network are optimized by the PSO algorithm,
a model for the relationship between tag coordinates and reading distance has been
set up by this improved neural network. There are 300 groups of data used for the
experiment, each group has 7 tags. The results are shown in Table 5.1. (x i , y i , z i )
represents the spatial position of the i th tag, d r represents the actual reading distance,
5 Optimization Algorithm and RFID System Physical Anti-Collision
V m (t + 1) = wV m (t) + c 1 r (t)(P m (t) − X m (t)) + c 2 r
(t)(G d (t) − X m (t))
X m (t + 1) = X m (t) + V m (t + 1)
(5.18)
where r (t) and r
(t) are random numbers uniformly distributed over [0, 1] varying
with time t. Considering the influence of the inertia weight w and the acceleration
coefficients c 1 , c 2 on the diversity of the population, the linear inertia weight and the
time-varying acceleration coefficients are used in this paper. This method focuses on
self-learning of P(t) and G(t) in the iterative process, which is beneficial to improve
the overall performance of the algorithm. The corresponding formulas are shown as
follows:
⎧
⎨
⎩
w(t) = w e + (w i − w e )(t max − t)/t max
c 1 (t) = c 11 + (c 12 − c 11 )t/t max
c 2 (t) = c 21 + (c 22 − c 21 )t/t max
(5.19)
where w i and w e are the initial and final values of the inertia weights; c 11 , c 12 , c 21 ,
and c 22 are fixed values; and t max is the maximum number of iterations.
Therefore, Eq. (5.14) should be changed as follows:
V m (t + 1) = w(t)V m (t) + c 1 (t)r (t)(P m (t) − X m (t)) + c 2 (t)r
(t)(G d (t) − X m (t))
X m (t + 1) = X m (t) + V m (t + 1)
(5.20)
When the position parameter of the particle is updated, it is necessary to calculate
the fitness value of the new position and update the individual and population optimal
position. The formulas are as follows:
P(t + 1) =
X (t + 1), F(X (t + 1)) < F(P(t))
P(t),
(5.21)
G(t + 1) =
P n (t + 1),
G(t),
F(P n (t + 1)) < F(G(t))
(5.22)
where n represents the particle of best fitness. When the number of iterations reaches
the maximum, the population optimal position G is the optimal solution.
(2) Results and analysis
In this paper, PSO algorithm is used to improve the BP neural network. After the
weights and thresholds of BP neural network are optimized by the PSO algorithm,
a model for the relationship between tag coordinates and reading distance has been
set up by this improved neural network. There are 300 groups of data used for the
experiment, each group has 7 tags. The results are shown in Table 5.1. (x i , y i , z i )
represents the spatial position of the i th tag, d r represents the actual reading distance,
