## 3 System Model
### Energy Replenish Model  
In R-WSNs, the energy extracting from ambient conditions varies with environment and weather conditions. Even though an energy source cannot be controlled to yield energy at the desired times, its behavior can be modeled to predict the expected availability at a given time. For a sensor power relying on solar power, as is shown in Figure 3, its energy cannot be controlled. However, models for its dependence on diurnal and seasonal cycles are known and can be used to predict availability. For a region, its weather parameter is usually similar to the history data of the same period. Suppose the power output from the energy source is \(P_{i}(t)\) at time \(t\).  
In many instances, the energy generation profile may be very different from the consumption profile. To help support this scenario, consider a device that has a mechanism to store any energy that is harvested. The stored energy may be used at any time later. The energy buffer is defined to be a device that can store limited energy, has an inefficient storage in charging, and does not leak any energy over time. In this case, the energy harvesting from ambient for all non negative values of \(T\) can be calculated as:  
\[E_{i}=\int_{0}^{T}P_{i}(t)d(t)+B_{i},\forall T\in[0,\infty) \tag{5}\]  
where, \(B_{i}\) is the initial energy stored in the energy buffer and it always is below the storage capacity, \(B_{i}\leq B\). Each sensor has limited energy buffer with equal storage capacity, which should be enough to provide at least one packet delivery or acceptance. The energy storage capacity is determined by physical material and storage technology, which is not the main point of our consideration in the work. Harvesting energy will be stored in an energy buffer at first, if a node is in the ideal state, until a packet arrives or if the buffer is full.  
In the work, \(P_{i}(t)\) indicates the ability of a harvesting energy device extracting energy from the environment. A high \(P_{i}(t)\) value means more energy was extracted from the ambient conditions. For a sensor with solar panel as an energy supplement, the \(P_{i}(t)\) is affected by three factors: lighting conditions, the size of panel, and the energy conversion efficiency. The energy conversion efficiency is influenced by energy conversion technology, for instance, at present, the solar-energy conversion efficiency is about 10%-30% [16]. We hypothesize that the power density (per square centimeter),  
Figure 3: A sensor with solar panel is deployed in outside.  
the size of panel (square centimeter), and energy conversion efficiency are \(\lambda_{t}\), \(s_{panel}\), \(\gamma\), respectively. Therefore, the \(P_{i}(t)\) can be concluded as:  
\[p_{i}(t)=\lambda_{t}\times s_{panel}\times\gamma \tag{6}\]  
For a solar panel as the energy source, the power density varies with weather conditions. Obviously, more power can be provided for a sensor on a sunny day and the power density can reach nearly 250,000 lux. Table 1 shows the power density in different weather conditions.  
In R-WSNs, a sensor is expected to achieve energy-neutral operation, its energy used is always less than the energy harvested. The following equation should be satisfied for energy consumption.  
\[w_{i}\leq E_{i} \tag{7}\]