Research Article

A Hybrid Deep Neural Network for Electricity Theft Detection Using Intelligent Antenna-Based Smart Meters

Algorithm 1.

Pseudocode of PSO.
1: Initialization
2: for each particle i =1,…,Np, do.
3: (a) Initialize the particle’s position using uniform distribution as and U(LB, UB) where UB and LB represent the upper bound and lower bound of the search space, respectively.
4:
 (b) Initialize pbest to its initial position:pbest(i,0) = pi(0)
5: (c) Initialize gbest to the minimal value of the swarm.
:gbest(0) = pi(0).
6: (d) Initialize Velocity: Vi U(—UB-LB—),—UB-LB—
7: end for.
8: Repeat until the Termination Criteria Is Met
9: for each particle i =1,…,NP, do.
10: (a) Pick random numbers: r1,r2 U(0,1).
11: (b) Update the particle’s velocity. See Equation (16).
12: end for.
13: if f[pi(t)] < f[pbest(i,t)], then.
14: Update the best Known Position of Particle I: Pbest(I,T) = pi(T)
15: if f[pi(t)] < f[gbest(t)], then.
16: Update the swarm’s best Known Position: Gbest(T) = pi(T)
17: end if.
18: end if.
19: Output gbest(t) that holds the best found solution.
20: End.