Consec Rou
Consec Rou
com
ScienceDirect
ICT Express 9 (2023) 1077–1084
[Link]/locate/icte
Abstract
Wireless sensor networks are susceptible to a variety of network attacks. Due to the limited energy of nodes and selfish nodes in the network,
the packet delivery rate is lower. To address these issues, we innovatively propose an energy-harvesting Q-learning secure routing algorithm
with authenticated-encryption. The algorithm uses physical unclonable functions and optimized Q-learning to ensure that the transmission
path is reliable. Meanwhile, we combine the LSTM-based prediction model to predict the energy value that the nodes replenish. In addition,
simulations are performed to compare the performances of the proposed algorithm with other algorithms under different attacks. The proposed
algorithm has greater improvements in the packet delivery rate, filtering selfish nodes, and reducing node energy consumption.
© 2023 The Author(s). Published by Elsevier B.V. on behalf of The Korean Institute of Communications and Information Sciences. This is an open
access article under the CC BY license ([Link]
Keywords: Energy harvesting; Power prediction; Q-learning; Secure routing; Wireless sensor network
Table 1
The behavioral characteristics of typical attacks.
Network attack Drop data Modify data Disrupting
packets packets routing
Sink hole attack ✓ ✓ ✓
Black hole attack ✓ × ✓
Gray-hole attack ✓ × ×
Selective forwarding attack ✓ × ×
Tampering attack × ✓ ×
Witch attack × × ✓
N
1 ∑
I M F j (t) = I M Fi j (t) (3)
N i=1
N
1 ∑
R(t) = Ri (t) (4)
N i−1
where IMF j (t) denotes the jth IMF component after the
integrated average, and R(t) denotes the residual component.
(4) After normalizing the IMF component, input it to LSTM
to obtain the IMF component predicted value {H1 , H2 , . . . ,
H N } and the residual component predicted value H R . For {H1 ,
H2 , . . . , H N } are inverse normalized and superimposed to
obtain the final solar irradiance prediction H.
(5) The sink node receives Rk and obtains Ck from 2.6. The Q-learning secure routing algorithm based on
Eq. (7) authenticated-encryption
Ck = I Di ⊕ Rk (7) In Q-learning, the ε-greedy strategy performs the random
(6) If Ck = Ci , it determines the unknown node as exploration with equal probability ε, it is not easy to make
a legitimate node; otherwise, its connection request will be optimal decisions about actions [17]. The improved Q-learning
rejected. strategy uses a decreasing ε-greedy strategy, exploring all ac-
tions with a decreasing probability εT , so that the proportion of
exploration actions decreases with state space, making finding
2.5. The model for selecting relay nodes the optimal solution easier. The probability εT is:
Since the selection of relay nodes is only related to the εT = [(T − Ti )/T ]ε0 (15)
current state, such as behavior and energy, it is independent where Ti denotes the current training round, T denotes the
of previously experienced states, i.e., it possesses a Markov total training round, ε0 denotes the initial probability. Set the
property. Therefore, we model it as MDP, as shown in Eq. (8). minimum probability εmin = 0.05 to prevent the agent from
falling into a non-exploration state.
The proposed algorithm is based on the comprehensive
G t = gt + γ (gt+1 + γ (gt+2 + · · · )) = gt + γ G t+1 (8)
evaluation of node behavior and location. In the trust detection
where Gt denotes the total reward of the model after time t, process, watchdog mechanism is used to detect malicious
gt denotes the reward for node action, γ denotes the discount behaviors in routing [13]. Assuming that the coordinates of
factor, and γ ∈[0, 1]. The agent in the environment state y, the sink node are (sx , s y ) and the coordinates of the sensor
according to the strategy π :Y→X selects the action x from node i are (nix , niy ), the distance between them is:
the action space X, denoted as x = π (y). Then the total value √
ρsni = (n ix − sx )2 + (n iy − s y )2 (16)
function obtained after executing the strategy π in state y is
The distance between sensor node i and the next hop node
V π (y) = G(y) + γ PYπ (Y ) (y∗)V π (y∗)
∑
(9)
j can be expressed as:
y∗∈Y √
j j
where Vπ (y) denotes the state value in the current state, G(y) ρni n j = (n ix − n x )2 + (n iy − n y )2 (17)
denotes the immediate reward feedback that the agent can get
Then the behavior trust value of the sensor node i is shown
after performing action x in the environment state y, and the in Eq. (18):
combined formula denotes the sum of future rewards that the
agent can get after performing action x in the environment state n i → Q t = (1 − α) · n i → Q t−1 + α · R (18)
y. Denote the state value function in each state y as V π (y) , then where α denotes the learning rate, Qt denotes sensor node
the optimal state value function is defined as i’s the latest behavioral trust value, and Qt−1 denotes sensor
node i’s the behavioral trust value in the last training round. R
∑
V ∗ (y) = G(y) + max γ Px y (y∗)V ∗ (y∗) (10)
x∈X
y∗∈Y
denotes the reward factor, as shown in Eq. (19):
Rmax , p = 0 and ρsni = ρni n j
{
From Eq. (10), the optimal strategy function can be ob- R= (19)
tained as Eq. (11), and the inequality Eq. (12) can be obtained Rmin , p = 1
from where p denotes sensor node i’s behavioral discrimination
∑ value. When p = 1, the behavior of sensor node i is judged
π ∗ (y) = arg max Px y (y∗)V ∗ (y∗) (11)
x∈X to be negative; when p = 0, the behavior of sensor node i
y∗∈Y
is judged to be positive; Rmax denotes the maximum reward,
π∗
V ∗ (y) = V (y) ≥ V π (y) (12) and Rmin denotes the minimum reward. When the behavior
of the sensor node i is judged to be positive, update the
The state–action value function Qπ (y, x) can be used instead comprehensive trust value with the node i’s location.
of the V π (y) . Qπ (y, x) denotes the reward obtained by the agent
in the current environment after receiving and executing the n i → Q t = (1 − α) · n i → Q t−1 + α · (R ′ + γ · Q max ) (20)
strategy π , as shown in Eq. (13). where γ denotes the discount factor, and Qmax denotes the
π π
Q (y, x) = E [gt + γ gt+1 + γ gt+2 + · · · |y, x]
2 maximum comprehensive trust value of the surrounding relay
(13) nodes. R′ denotes the reward under the positive behavior of
= E y ∗ [gt + γ Q π (y∗, x∗)|y, x]
sensor node i, as shown in Eq. (21):
when the Q value obtains the maximum value, the correspond- {
Rmid , p = 0 and ρsni > ρsn j
′
ing optimal value function is also the maximum value and is R = (21)
0, p = 0 and ρsni < ρsn j
unique. As shown in Eq. (14).
where Rmid denotes the medium reward. The Algorithm 1
Q ∗ (y, x) = max Q π (y, x) (14) depicts the comprehensive trust value update algorithm.
π
1080
C. Li, J. Wu, Z. Zhang et al. ICT Express 9 (2023) 1077–1084
3. Experimental results
In this section, we have experimented with and analyzed the
proposed algorithm. In addition, we compare the performance
of the algorithm with several other algorithms under different
types of attacks. Where we obtained results from the compari-
son algorithm by repetition multiple simulations are performed
to average the experimental results. The ratio of selfish nodes
is increased from 5% to 50%. Simulation parameters are given
in Table 2.
The most secure routing algorithm selects the relay node Table 2
with the highest comprehensive trust, which will increase Simulation parameters.
the energy consumption of the node. Therefore, the energy Parameters Value
consumption of the network needs to be balanced. The energy Monitoring region 100 m × 100 m
consumption of transferring l bit of data to a distance of d is Number of nodes deployed 100
Communication distance 20 m
E T R = 2E elec l + ld 2 εamp (22) Node initial energy 10 J
Location of sink node (50, 50)
where Eelec is the energy consumption per bit, εamp is the Eelec /(J bit−1 ) 50 × 10−9
energy consumed to achieve a certain signal to noise ratio. εamp /(J bit−1 m−4 ) 0.0013 × 10−12
Suppose the initial energy of node is E0 , and the expected εmin 0.05
λen 3 J
supplementary energy of sensor node in a training round is λtr 1000
E f , then its residual energy is Er e .
Er e = E 0 − E T R + E f (23) 3.1. Packet delivery rate
1081
C. Li, J. Wu, Z. Zhang et al. ICT Express 9 (2023) 1077–1084
[14] P. Zou, B. Hou, J. Lei, et al., Bearing fault diagnosis method based on [16] W. Wang, C. Qiu, Z. Yin, et al., Blockchain and PUF-based lightweight
EEMD and LSTM, Int. J. Comput. Commun. Control 15 (1) (2020). authentication protocol for wireless medical sensor networks, IEEE
[15] Y. Li, X. He, C. Yin, Energy aware opportunistic routing for energy Internet Things J. 9 (11) (2022) 8883–8891.
harvesting wireless sensor networks, in: 2020 IEEE 31st Annual [17] R. Lu, S.H. Hong, X. Zhang, A dynamic pricing demand response
International Symposium on Personal, Indoor and Mobile Radio algorithm for smart grid: reinforcement learning approach, Appl.
Communications, IEEE, 2020, pp. 1–6. Energy 220 (2018) 220–230.
1084