After the setup stage, cluster heads simultaneouslybroadcast TDMA scheduling messages using spreadingcodes to start the steady stage, which involves data signalsending from non-CH nodes to the CH nodes by TDMAscheduling, aggregation and routing to the Base. LEACHuses a single hop routing algorithm and each CHs sendthe aggregated data to the Base Station in a single hopmanner.  LEACH is based on rounds and the system repeats theclustering and transmission for each round. LEACH hasits own defects, but improved algorithms will definitelysolve these problems. Some of these problems are as fol-lows:1.
Cluster heads are predefined in LEACH protocoltypically taken as 5% or 10% of total deployednodes. If sensor nodes in the network are not uni-formly distributed, specified number of clustersmight not be sufficient to cover the entire area.2.
Cluster heads send aggregated data to the BaseStation in a single hop manner, so consume a lotof energy.3.
Probability function T(n) does not take residualenergy of nodes into account while selectingcluster heads, so if a less energy node becomesCH, it will fail and subsequently the cluster net-work becomes dysfunctional.4.
It consist of rounds while in each round, all sen-sor nodes take part in reconstructing new clus-ters and this action consumes a lot of energy. 
EECHS  improves the LEACH protocol by improvingthe election strategy of the cluster heads, considering re-sidual energy, distance from the Base Station, number ofconsecutive rounds in which a node has not been a clusterhead.In EECHS, stochastic cluster head selection algorithmis extended by adjusting the threshold T(n) denoted in (1),considering the residual energy of the nodes, distancebetween the nodes and the Base Station and the numberof consecutive rounds in which a node has not been acluster head as follows:
r div si Di E
pr p pnT
(2)Here the residual energy factor is:E(i) = (E
) Where E
is the remainingamount of energy and E
is the initial energy of a nodebefore transmission and Variable i indicates the serialnumber of nodes.The Distance factor D(i)=d
Where debt is the dis-tance from node i to Base as shown in (3):
BS i BS iiB
Y Y X X d
(3) And d
is the distance of the farthest node from theBase Station. Here X
are the location of the BaseStation.In the third parameter (s div r), s is the number of consec-utive rounds in which a node has not been a cluster headand r is the number of the current round.Instead of considering these three important parame-ters, EECHS does not consider the factor that whether thenodes remaining energy are sufficient enough to send theaggregated data to the Base Station or not. Besides, inEECHS, there is no limitation for location of cluster heads.
In 2.1 and 2.2 sections, LEACH and EECHS Algorithmsare investigated along with problems existed in each ap-proach.
A method will be presented in this part
have any drawbacks of the two previous methods. Toimprove the insufficiency of LEACH and EECHS, we in-troduce an improved protocol in this paper. This protocollike LEACH and EECHS divided into two stages includesetup stage and steady stage.Before describing the algorithm, network modelshould be investigated.
3.1 Network Model
For our proposed approach, we adopt a few reasonableassumptions as follows: [2, 3] 1.
Sensor nodes are immobile.2.
Nodes are not able to access Base directly.3.
The Base Station is located at a far distancefrom the sensor nodes and is immobile.4.
All nodes are able to control their transmitpower to change the communication range.5.
Access of nodes to the Base is performed by aspecial node called Local Mobile Agent (LMA)located in the center of the network, in a circlewith L radius.6.
All sensor nodes are homogeneous and havethe same hardware components except LMAwhich includes specific components.7.
The LMA is the only mobile node in the net-work.8.
Regarding to the access of Local Mobile Agentto the wireless charging equipment, the ener-gy of this node will be considered unlimited.9.
Radio and energy model is the same as radiomodel in , which is called first radio model.
3.2 Setup Stage
1. CH selection
In addition to the factors that EECHS algorithm is uti-lized in the cluster head selection process, two other fac-tors that are ignored in this algorithm will be added to the
JOURNAL OF COMPUTING, VOLUME 5, ISSUE 2, FEBRUARY 2013, ISSN (Online) 2151-9617https://sites.google.com/site/journalofcomputingWWW.JOURNALOFCOMPUTING.ORG2