# SolarCastalia: Solar Energy Harvesting Wireless Sensor Network Simulator

Authors: Jun Min Yi; Min Jae Kang; Dong Kun Noh
Journal: International Journal of Distributed Sensor Networks
 (2015)

---

## Abstract

Most existing simulators for WSNs (wireless sensor networks) model battery-powered sensors and provide MAC and routing protocols designed for battery-powered WSNs. Recently, however, increasingly extensive studies of energy harvesting sensor systems require the development of appropriate simulators, but there are few related studies on such simulators. Unlike existing simulators, simulators for energy harvesting WSNs require a new energy model that is integrated with the energy harvesting, rechargeable battery, and energy consuming models. Additionally, the new model must enable applications of the well-known MAC and routing protocols designed for energy harvesting WSNs and have a convenient user-friendly interface. In this work, we design and implement a user-friendly simulator for solar energy harvesting WSNs.


---

## Body

## 1. Introduction

A sensor network consists of tens to thousands of smart sensor nodes working with very limited resources in terms of calculation, storage, communication, and energy. Particularly, the core obstacle of existing battery-powered WSNs is a limited lifetime during which the sensor nodes or networks operate functionally. Manual replacement or recharge of the batteries on each node is economically impractical and inordinately expensive. Further, a WSN can be located in an area where such a replacement or recharge is impossible (e.g., dangerous area such as war zones or outdoors).Hence, for a battery-powered sensor network to operate autonomously for a long period a technology that minimizes the use of limited energy is required. With this aim (i.e., to overcome the short lifetime of a battery-powered wireless embedded system), previous studies have been conducted primarily on the energy-adaptive operation in a system or network level (e.g., a routing or MAC layer), which can operate sensors and maintain a network with minimal energy. However, even with this technique applied, stability and durability are insufficiently guaranteed, because a battery-based energy source is essentially limited.The need to overcome the limitations and to satisfy the autonomy and continuance of a sensor node or a network in energy terms has recently generated interest in systems that harvest energy sources in the environment autonomously. However, researches on simulators for energy harvesting WSNs have not been conducted thoroughly, and thus such studies remain problematic. Moreover, using existing battery-powered WSN simulators for an energy harvesting WSN study creates the following difficulties. First, they do not provide an energy harvesting model for nodes. Because an energy harvesting sensor node collects energy intermittently or regularly, its schedule must be considered continuously when the remaining energy amount is calculated. Second, in contrast to a battery-powered WSN, an energy harvesting WSN uses a rechargeable battery for energy storage. Because there are a variety of rechargeable batteries, including SLA, NiCd, NiMH, Li-ion, and Li-polymer, each with its own characteristics, a simulator must accommodate the differences among the types and characteristics of rechargeable batteries. Third, existing simulators have extendibility issues as a result of their limitations regarding commercialization of programs, private source codes, and programming languages. Hence, designing a new routing, MAC, topology, and mobility protocol is difficult or impossible. Lastly, most simulators are command-line implementations which have a user-unfriendly feature [1].By just increasing the residual energy to some amount, the energy harvesting model may be mimicked very roughly. However, it is not enough to simulate the actual energy harvesting WSN, due to the various components of energy harvesting node and the various environments of deployment. The main reason why we use the simulator prior to the real installation is to test the operation, to identify the problems, and to verify if the performance can meet the application’s requirement. The energy harvesting nodes (e.g., the solar-powered nodes) have very different amounts of available energy according to their deployment season/location, panel type/size, and battery type/capacity. Therefore, in order to configure the cost-effective energy harvesting node which can meet the application’s requirements, a new simulator for the energy harvesting WSN is positively necessary.To resolve these problems, this study proposes an efficient simulator that permits easy various-level analysis of energy harvesting WSNs. The proposed simulator has been designed, in particular, for solar energy among many other energy sources. The characteristics of this simulator with solar energy harvesting feature are as follows: firstly, because it has been implemented with consideration of insolation and of the sizes and characteristics of solar panel types, simulation can be conducted under a range of conditions; secondly, because this simulator has been designed by considering the characteristics of each type of energy storage, a variety of analyses can be simulated for a storage type; thirdly, owing to the object-oriented implementation of the simulator, it is easy to add or revise a new model; fourthly, the simulator provides a user with a user-friendly GUI (graphical user interface) for easy operation; fifthly, by providing various solar energy-based routing and MAC protocols in the base, a new proposed protocol can be compared and analyzed easily; and lastly, with simulation, a user can perform network- and node-level analyses simultaneously, allowing for an easy detailed performance analysis.This study consists of the following sections. Section2 reviews related studies with explanations of energy harvesting sensor systems and the types and characteristics of existing battery-powered WSN simulators. Section 3 describes the proposed simulator’s energy model in detail, and Section 4 explains some important modules and user interface. Section 5 analyzes the simulation results of a solar energy-based routing protocol by using the proposed simulator and verifies its operation. Section 6 draws conclusions accompanied by a final comment.


## 2. Background and Related Work

### 2.1. Energy Harvesting Sensor System

Recent studies on harvesting sensor nodes have focused on finding fundamental solutions for energy limitation [2]. Energy harvesting sensor nodes harvest energy using various nearby environment-friendly energy sources and store and consume the harvested energy using rechargeable batteries. Environment-friendly energies include solar, wind, blood pressure, breathing, footstep, and interior environment-generating vibration. Their characteristics are listed in Table 1. Further, as shown in Table 2, various types of rechargeable battery can store these forms of energy, which include SLA, NiCd, NiMH, Li-ion, Li-polymer, and Super-Capacitor, each of which has its own characteristics such as energy conversion efficiency, complete charge/discharge count, self-discharge, and memory effects [3]. Because energy harvesting sensor nodes using these environmental energy sources with rechargeable batteries can be used permanently through energy harvesting, energy harvesting WSNs are less expensive to be maintained in comparison with the battery-powered WSN. In addition, due to the possibility of high quality of service (QoS) and the various exteriors of sensors, they can be used more widely than existing battery-powered sensor nodes. Figure 1 shows examples of existing energy harvesting sensor nodes developed by preceding studies. They are the solar energy-based Heliomote node [4], wind-energy-based AmbiMax [5], functional prototype of piezoelectric-powered RFID shoes with mounted electronics [6], and self-powered push button transmitter [7], in the order placed. As shown in Figure 1, since energy harvesting sensor nodes use a variety of energy sources and storage devices, each sensor can have a different shape and size. Many energy harvesting sensor nodes in addition to those in Figure 1 are under development for various applications.Table 1
Characteristics of energy harvesting sources [2].
Energy source
Characteristics
Amount of energy available
Harvesting technology
Conversion efficiency
Amount of energy harvested
Solar
Ambient, uncontrollable, predictable
100 mW/cm2
Solar cells
15%
15 mW/cm2
Wind
Ambient, uncontrollable, predictable
—
Anemometer
—
1200 mWh/day
Finger motion
Human power, controllable
19 mW
Piezoelectric
11%
2.1 mW
Footfalls
Human power, controllable
67 W
Piezoelectric
7.5%
5 W
Vibrations in indoor environments
Ambient, uncontrollable, unpredictable
—
Electromagnetic induction
—
0.2 mW/cm2
Breathing
Human power, uncontrollable, unpredictable
0.83 W
Ratchet-flywheel
50%
0.42 WTable 2
Characteristics of rechargeable batteries [3].
Battery type
Capacity (mAh)
Energy (Wh)
Energy density (Wh/Kg)
Efficiency (%)
Self-discharge (%/month)
Memory effect
Charge method
Recharge cycles
SLA
1300
7.8
26
70~92
20
No
Trickle
500~800
NiCd
1100
1.32
42
70~90
10
Yes
Trickle
1500
NiMH
2500
3.0
100
66
20
Yes
Trickle
1000
Li-ion
740
2.8
165
99.9
<10
No
Pulse
1200
Li-poly.
930
3.4
156
99.8
<10
No
Pulse
500~1000Figure 1
Energy harvesting sensor nodes [4–7].
(a)
(b)
(c)
(d)


### 2.2. Battery-Based WSN Simulators

The development of energy harvesting sensors has given rise to many studies on new techniques in the areas of systems, networks, and data, resulting in the modification and subsequent use of simulators that were implemented for existing battery-powered WSNs. Among those simulators, the most commonly used simulators are NS-2 [8], TOSSIM [9], AVRORA [10], SENS [11], and OMNeT++ [12], which have the following characteristics.(i)
NS-2 is a popular general-purpose network simulator that is used for TCP (transmission control protocol), routing, and multicast protocols. NS-2 provides various network management algorithms and protocols which focus on ad hoc network. However, its WSN protocols are limited to 802.11 and single-hop TDMA protocols, resulting in an insufficiency of dedicated WSN protocols. The use of Tcl (tool command language) is a further obstacle to the use of this simulator.(ii)
TOSSIM which is developed by the TinyOS project team at the University of California at Berkeley supports the MicaZ sensor platform and enables precise analysis, resulting from its ability to emulate even an OS command to the CPU. However, its code interruptibility in the compile phase and its inability to handle fine-grained timing result in less accuracy than that of a simulator such as ATEMU [13]. In addition, it is compatible only with TinyOS’s application programs.(iii)
AVRORA which is a Java simulator developed at the University of California at Los Angeles is widely used as an analysis tool for programs written for AVR microcontrollers. Even though this simulator can be used for detailed analyses, including individual sensor and program analysis, tests, and profiling, it neither provides a GUI nor supports a network-communication level simulation. Hence, no network-level simulation is available.(iv)
SENS is a cross level simulator that reflects network communication, applications, and physical environmental factors. Each module uses real-time information obtained from the environment and supports power usage analysis. However, it cannot simulate a MAC protocol accurately and supports only the sound aspects of physical phenomena that are obtained from the sound sensors and actuator.(v)
OMNeT++ is an extensible, modular, component-based C++ simulation library and framework, primarily for building network simulators. It provides component architectures for models which are programmed in C++ and then assembled into larger components and models using a high-level language (NED). Due to the GUI environment, it is widely used in network-related research, including queuing systems, hardware emulation, or WSNs simulation.All of these simulators support battery-powered energy models which contain only energy-consumption model without energy harvesting model. In addition, because they do not consider the characteristics of various storage devices, these simulators are inappropriate for analyzing the performance of an energy harvesting system which uses various kinds of rechargeable batteries. In an attempt to resolve such issues, we designed and implemented a simulator dedicated to solar energy-powered WSNs.


## 2.1. Energy Harvesting Sensor System

Recent studies on harvesting sensor nodes have focused on finding fundamental solutions for energy limitation [2]. Energy harvesting sensor nodes harvest energy using various nearby environment-friendly energy sources and store and consume the harvested energy using rechargeable batteries. Environment-friendly energies include solar, wind, blood pressure, breathing, footstep, and interior environment-generating vibration. Their characteristics are listed in Table 1. Further, as shown in Table 2, various types of rechargeable battery can store these forms of energy, which include SLA, NiCd, NiMH, Li-ion, Li-polymer, and Super-Capacitor, each of which has its own characteristics such as energy conversion efficiency, complete charge/discharge count, self-discharge, and memory effects [3]. Because energy harvesting sensor nodes using these environmental energy sources with rechargeable batteries can be used permanently through energy harvesting, energy harvesting WSNs are less expensive to be maintained in comparison with the battery-powered WSN. In addition, due to the possibility of high quality of service (QoS) and the various exteriors of sensors, they can be used more widely than existing battery-powered sensor nodes. Figure 1 shows examples of existing energy harvesting sensor nodes developed by preceding studies. They are the solar energy-based Heliomote node [4], wind-energy-based AmbiMax [5], functional prototype of piezoelectric-powered RFID shoes with mounted electronics [6], and self-powered push button transmitter [7], in the order placed. As shown in Figure 1, since energy harvesting sensor nodes use a variety of energy sources and storage devices, each sensor can have a different shape and size. Many energy harvesting sensor nodes in addition to those in Figure 1 are under development for various applications.Table 1
Characteristics of energy harvesting sources [2].
Energy source
Characteristics
Amount of energy available
Harvesting technology
Conversion efficiency
Amount of energy harvested
Solar
Ambient, uncontrollable, predictable
100 mW/cm2
Solar cells
15%
15 mW/cm2
Wind
Ambient, uncontrollable, predictable
—
Anemometer
—
1200 mWh/day
Finger motion
Human power, controllable
19 mW
Piezoelectric
11%
2.1 mW
Footfalls
Human power, controllable
67 W
Piezoelectric
7.5%
5 W
Vibrations in indoor environments
Ambient, uncontrollable, unpredictable
—
Electromagnetic induction
—
0.2 mW/cm2
Breathing
Human power, uncontrollable, unpredictable
0.83 W
Ratchet-flywheel
50%
0.42 WTable 2
Characteristics of rechargeable batteries [3].
Battery type
Capacity (mAh)
Energy (Wh)
Energy density (Wh/Kg)
Efficiency (%)
Self-discharge (%/month)
Memory effect
Charge method
Recharge cycles
SLA
1300
7.8
26
70~92
20
No
Trickle
500~800
NiCd
1100
1.32
42
70~90
10
Yes
Trickle
1500
NiMH
2500
3.0
100
66
20
Yes
Trickle
1000
Li-ion
740
2.8
165
99.9
<10
No
Pulse
1200
Li-poly.
930
3.4
156
99.8
<10
No
Pulse
500~1000Figure 1
Energy harvesting sensor nodes [4–7].
(a)
(b)
(c)
(d)


## 2.2. Battery-Based WSN Simulators

The development of energy harvesting sensors has given rise to many studies on new techniques in the areas of systems, networks, and data, resulting in the modification and subsequent use of simulators that were implemented for existing battery-powered WSNs. Among those simulators, the most commonly used simulators are NS-2 [8], TOSSIM [9], AVRORA [10], SENS [11], and OMNeT++ [12], which have the following characteristics.(i)
NS-2 is a popular general-purpose network simulator that is used for TCP (transmission control protocol), routing, and multicast protocols. NS-2 provides various network management algorithms and protocols which focus on ad hoc network. However, its WSN protocols are limited to 802.11 and single-hop TDMA protocols, resulting in an insufficiency of dedicated WSN protocols. The use of Tcl (tool command language) is a further obstacle to the use of this simulator.(ii)
TOSSIM which is developed by the TinyOS project team at the University of California at Berkeley supports the MicaZ sensor platform and enables precise analysis, resulting from its ability to emulate even an OS command to the CPU. However, its code interruptibility in the compile phase and its inability to handle fine-grained timing result in less accuracy than that of a simulator such as ATEMU [13]. In addition, it is compatible only with TinyOS’s application programs.(iii)
AVRORA which is a Java simulator developed at the University of California at Los Angeles is widely used as an analysis tool for programs written for AVR microcontrollers. Even though this simulator can be used for detailed analyses, including individual sensor and program analysis, tests, and profiling, it neither provides a GUI nor supports a network-communication level simulation. Hence, no network-level simulation is available.(iv)
SENS is a cross level simulator that reflects network communication, applications, and physical environmental factors. Each module uses real-time information obtained from the environment and supports power usage analysis. However, it cannot simulate a MAC protocol accurately and supports only the sound aspects of physical phenomena that are obtained from the sound sensors and actuator.(v)
OMNeT++ is an extensible, modular, component-based C++ simulation library and framework, primarily for building network simulators. It provides component architectures for models which are programmed in C++ and then assembled into larger components and models using a high-level language (NED). Due to the GUI environment, it is widely used in network-related research, including queuing systems, hardware emulation, or WSNs simulation.All of these simulators support battery-powered energy models which contain only energy-consumption model without energy harvesting model. In addition, because they do not consider the characteristics of various storage devices, these simulators are inappropriate for analyzing the performance of an energy harvesting system which uses various kinds of rechargeable batteries. In an attempt to resolve such issues, we designed and implemented a simulator dedicated to solar energy-powered WSNs.


## 3. Energy Model of the SolarCastalia

An energy harvesting sensor node can use various types of energies in the environment as its energy sources. Among the environment-friendly energy sources, we selected solar energy, which is uncontrollable, but periodically collectible with sufficient energy density and high conversion efficiency [14]. The energy model of a solar-powered node is composed of three submodels; energy harvesting model, energy consuming model, and the remaining energy model on the rechargeable battery.As shown in Figure2, the energy harvesting system of a sensor node gathers solar energy using a solar cell or solar panel, stores the harvested energy in the rechargeable battery, and operates the sensor system using the stored energy. To simulate more accurate energy harvesting system, we designed an energy harvesting model that considers insolation by weather and climate, the panel size and type characteristics, and characteristics of the types of storage that store the energy harvested. Then, we designed the residual energy model which is combined with an energy harvesting model and an energy consuming model.Figure 2
Structure of an energy harvesting sensor node.


### 3.1. Energy Harvesting Model

The core feature of the proposed simulator is solar energy collection. We incorporated the characteristics of solar panels and rechargeable batteries used in real solar energy harvesting sensor nodes in order to simulate the amount of harvested energy as accurately as possible compared to an actual node. The kinds of solar panel and rechargeable battery are so various, as shown in Tables2 and 3, and thus the amount harvested varies with the selections. In addition, as shown in Figure 3, to reflect the amount of solar energy by weather and season, we actually measured and collected in a database the hourly harvested solar energy for a year by using TI’s EZ430-RF2500-SEH mote of which panel is 5.9 × 5.7 cm2 thin film. Since insolation changes every decade [15], the measured data are valid for the next ten years.Table 3
Characteristics of each solar cell (panel) type.
Type
Characteristics
Crystalline
Single crystalline
(i) Conversion efficiency 16~18%(ii) Regular atomic arrangement(iii) Comparatively good generation in mornings, evenings, and clouds(iv) High conversion efficiency and high durability, but high production cost
Polycrystalline
(i) Conversion efficiency 11~16%(ii) Simpler production process with less expensive production costs, compared with single crystalline (iii) Decreased conversion efficiency due to the irregular atomic arrangement
Amorphous
Amorphous (thin film)
(i) Conversion efficiency 6~8%(ii) Being inexpensive owing to a substantially small amount of using the crystal(iii) High usage owing to high flexibility (iv) Substantially low conversion efficiency, compared to crystalline
Amorphous compounds
(i) CIGS (copper, indium, gallium, and selenium) and brass(ii) Generation volume per weight five times greater than single crystalline(iii) Wider application areas and high development possibility due to lightweight and high efficiency(iv) Need for an alternate material because of limited deposits of indiumFigure 3
Amount of energy harvested by time in March, July, September, and December, which is stored in database.Based on these characteristics, the amount of energy harvested between timet1 and t2 can be calculated using the following: (1)Ht1t2=∫t1t2Psizeratio×Pefficiencyratio×Befficiencyratio×Dtdt,where Ht1t2 is energy that is harvested between times t1 and t2, and it is a value that is calculated by multiplying the actual measurement value Dt by the weighting value of the characteristics. The terms on the right hand side of the equation are the size ratio of the solar cell Psizeratio, the characteristic based on the solar cell type (Pefficiencyratio), and the characteristics based on battery type (Befficiencyratio), respectively, and they are calculated using the following: (2)Psizeratio=PsizeinputPsizebase,(3)Pefficiencyratio=PefficiencyinputPefficiencybase⊆Psingle,Ppoly,Pthin,Pcompounds,(4)Befficiencyratio=BefficiencyinputBefficiencybase⊆BSLA,BNiCd,BNiMH,BLiion,BLipolymer,where Psizebase is the size of the solar cell which is used when we make the reference values in a database, Psizeinput is the size of the solar cell to be simulated, Pefficiencybase is the energy conversion efficiency of the solar cell material used in the reference value measurement, Pefficiencyinput is the energy conversion efficiency of the solar cell material to be simulated, Befficiencybase is the energy conversion efficiency of the rechargeable battery used in the reference value measurement, and Befficiencyinput is the energy conversion efficiency of the rechargeable battery to be simulated. Note that (3) and (4) were precalculated using the panel type and battery type, and they exist as constant values such as Psingle and BSLA.


### 3.2. Energy Consumption Model

Generally, the power consumption of the sensor node can be calculated by adding the power consumptions for data-transmitting, data-receiving, and others such as data-sensing or data-processing [16]. Since our simulator considers the types of rechargeable battery, we added the self-discharged energy of the battery, which reflects the characteristics of the battery type, to the energy consumption model. The following shows the energy consumption model between time t1 and time t2: (5)Ct1t2=CRX+CTX+Csystem+Cbatteryt1×t1-t2,where Ct1t2 represents the energy consumed at one sensor node between t1 and t2, and its respective terms are calculated as follows: (6)CRX=k1×β,CTX=k2×α1+α2dp,Csystem=PW×DC,Cbatteryt=Eresidualt×Sdischarge.In other words, the energy consumed when receiving the transmission (CRX) is estimated using the number of bits per second (k1) and the energy consumed per bit (β). Furthermore, the energy consumed when transmitting (CTX) is calculated using the number of bits transmitted per second (k2), the energy consumed per bit (α1), and the amplifier’s energy α2dp (α2 is the energy consumed per bit in the amplifier, d is the transmission distance, and p is a value of 2~4, which depends on the environment). The energy consumed by the system excluding the TX/RX data (Csystem) is calculated by multiplying the consumed electricity PW by the duty cycle DC. Finally, the decreasing value of energy that is due to the self-discharging of the battery (Cbatteryt) is estimated using the remaining energy of the battery at a certain time Eresidualt and the self-discharging ratio (Sdischarge).


### 3.3. Remaining Energy Model

Finally, the energy management module traces the remaining quantity of energy based on (1) and (5), as shown in (7)Eresidualt=Einit+H0t+C0t,where Eresidualt is the remaining amount of energy at time t, Einit is the initial energy of the battery, H0t is the amount of energy harvested until time t, and C0t is the amount of energy consumed until time t.In addition, the sensor node operates in three different modes, depending on the remaining amount of energy. When the remaining amount of energy is zero(Eresidualt=0), indicating that no energy remains in the node, the node enters the sleep mode, and energy consumption stops. While in a battery-powered system, a node’s life ends in that case and maintenance such as replacement is required; an energy harvesting system enters the sleep mode and then reactivates, when additional energy is harvested. In contrast, if the node’s remaining energy amount is equal to the battery capacity (Eresidualt=Bcapacity), then any harvested energy has no space to be stored, so the energy harvesting model ceases operation. In the normal mode (0<Eresidualt<Bcapacity), the energy harvesting model and the energy consumption model operate simultaneously. Further, to reflect rechargeable battery type characteristics, if the complete charge/discharge count exceeds the predetermined charge/discharge count of the selected battery type at time t, then the Eresidualt value is set to zero since the performance of a rechargeable battery cannot be guaranteed.


## 3.1. Energy Harvesting Model

The core feature of the proposed simulator is solar energy collection. We incorporated the characteristics of solar panels and rechargeable batteries used in real solar energy harvesting sensor nodes in order to simulate the amount of harvested energy as accurately as possible compared to an actual node. The kinds of solar panel and rechargeable battery are so various, as shown in Tables2 and 3, and thus the amount harvested varies with the selections. In addition, as shown in Figure 3, to reflect the amount of solar energy by weather and season, we actually measured and collected in a database the hourly harvested solar energy for a year by using TI’s EZ430-RF2500-SEH mote of which panel is 5.9 × 5.7 cm2 thin film. Since insolation changes every decade [15], the measured data are valid for the next ten years.Table 3
Characteristics of each solar cell (panel) type.
Type
Characteristics
Crystalline
Single crystalline
(i) Conversion efficiency 16~18%(ii) Regular atomic arrangement(iii) Comparatively good generation in mornings, evenings, and clouds(iv) High conversion efficiency and high durability, but high production cost
Polycrystalline
(i) Conversion efficiency 11~16%(ii) Simpler production process with less expensive production costs, compared with single crystalline (iii) Decreased conversion efficiency due to the irregular atomic arrangement
Amorphous
Amorphous (thin film)
(i) Conversion efficiency 6~8%(ii) Being inexpensive owing to a substantially small amount of using the crystal(iii) High usage owing to high flexibility (iv) Substantially low conversion efficiency, compared to crystalline
Amorphous compounds
(i) CIGS (copper, indium, gallium, and selenium) and brass(ii) Generation volume per weight five times greater than single crystalline(iii) Wider application areas and high development possibility due to lightweight and high efficiency(iv) Need for an alternate material because of limited deposits of indiumFigure 3
Amount of energy harvested by time in March, July, September, and December, which is stored in database.Based on these characteristics, the amount of energy harvested between timet1 and t2 can be calculated using the following: (1)Ht1t2=∫t1t2Psizeratio×Pefficiencyratio×Befficiencyratio×Dtdt,where Ht1t2 is energy that is harvested between times t1 and t2, and it is a value that is calculated by multiplying the actual measurement value Dt by the weighting value of the characteristics. The terms on the right hand side of the equation are the size ratio of the solar cell Psizeratio, the characteristic based on the solar cell type (Pefficiencyratio), and the characteristics based on battery type (Befficiencyratio), respectively, and they are calculated using the following: (2)Psizeratio=PsizeinputPsizebase,(3)Pefficiencyratio=PefficiencyinputPefficiencybase⊆Psingle,Ppoly,Pthin,Pcompounds,(4)Befficiencyratio=BefficiencyinputBefficiencybase⊆BSLA,BNiCd,BNiMH,BLiion,BLipolymer,where Psizebase is the size of the solar cell which is used when we make the reference values in a database, Psizeinput is the size of the solar cell to be simulated, Pefficiencybase is the energy conversion efficiency of the solar cell material used in the reference value measurement, Pefficiencyinput is the energy conversion efficiency of the solar cell material to be simulated, Befficiencybase is the energy conversion efficiency of the rechargeable battery used in the reference value measurement, and Befficiencyinput is the energy conversion efficiency of the rechargeable battery to be simulated. Note that (3) and (4) were precalculated using the panel type and battery type, and they exist as constant values such as Psingle and BSLA.


## 3.2. Energy Consumption Model

Generally, the power consumption of the sensor node can be calculated by adding the power consumptions for data-transmitting, data-receiving, and others such as data-sensing or data-processing [16]. Since our simulator considers the types of rechargeable battery, we added the self-discharged energy of the battery, which reflects the characteristics of the battery type, to the energy consumption model. The following shows the energy consumption model between time t1 and time t2: (5)Ct1t2=CRX+CTX+Csystem+Cbatteryt1×t1-t2,where Ct1t2 represents the energy consumed at one sensor node between t1 and t2, and its respective terms are calculated as follows: (6)CRX=k1×β,CTX=k2×α1+α2dp,Csystem=PW×DC,Cbatteryt=Eresidualt×Sdischarge.In other words, the energy consumed when receiving the transmission (CRX) is estimated using the number of bits per second (k1) and the energy consumed per bit (β). Furthermore, the energy consumed when transmitting (CTX) is calculated using the number of bits transmitted per second (k2), the energy consumed per bit (α1), and the amplifier’s energy α2dp (α2 is the energy consumed per bit in the amplifier, d is the transmission distance, and p is a value of 2~4, which depends on the environment). The energy consumed by the system excluding the TX/RX data (Csystem) is calculated by multiplying the consumed electricity PW by the duty cycle DC. Finally, the decreasing value of energy that is due to the self-discharging of the battery (Cbatteryt) is estimated using the remaining energy of the battery at a certain time Eresidualt and the self-discharging ratio (Sdischarge).


## 3.3. Remaining Energy Model

Finally, the energy management module traces the remaining quantity of energy based on (1) and (5), as shown in (7)Eresidualt=Einit+H0t+C0t,where Eresidualt is the remaining amount of energy at time t, Einit is the initial energy of the battery, H0t is the amount of energy harvested until time t, and C0t is the amount of energy consumed until time t.In addition, the sensor node operates in three different modes, depending on the remaining amount of energy. When the remaining amount of energy is zero(Eresidualt=0), indicating that no energy remains in the node, the node enters the sleep mode, and energy consumption stops. While in a battery-powered system, a node’s life ends in that case and maintenance such as replacement is required; an energy harvesting system enters the sleep mode and then reactivates, when additional energy is harvested. In contrast, if the node’s remaining energy amount is equal to the battery capacity (Eresidualt=Bcapacity), then any harvested energy has no space to be stored, so the energy harvesting model ceases operation. In the normal mode (0<Eresidualt<Bcapacity), the energy harvesting model and the energy consumption model operate simultaneously. Further, to reflect rechargeable battery type characteristics, if the complete charge/discharge count exceeds the predetermined charge/discharge count of the selected battery type at time t, then the Eresidualt value is set to zero since the performance of a rechargeable battery cannot be guaranteed.


## 4. Implementation Issues

The proposed simulator was implemented based on an existing sensor simulator called Castalia [17]. Based on Castalia, we modified the design as well as embedding new components, to support energy harvesting feature.


### 4.1. Structure Modified for the SolarCastalia

As shown in Figure4, the SolarCastalia is able to provide the node-level simulation as well as the network-level simulation. Each simulated node is composed of several software components which are closely cooperating such as sensor manager, resource manager, mobility manager, application, and other communication composite modules. In this research, we especially focus on the resource manager, and thus we departmentalize it into devices and energy submanagers, and then drive all energy-related modules to the energy submanager.Figure 4
Structure of the proposed SolarCastalia simulator.The energy submanager consists of the energy harvesting, energy consumption, residual energy modules, and the database for a reference. Firstly, as explained in Section3.1, the energy harvesting module simulates the amount of harvested energy as accurately as possible, by using the database and the user configurations about the simulation environment such as the panel type and size, the storage type and capacitor, season, and weather. And then, the energy consumption module simulates how much energy is consumed by the node as time goes on, by applying (5) in Section 3.2. Finally, the remaining energy module traces the quantity of available energy with the information of energy harvesting module and energy consumption module. According to the amount of residual energy, the node determines its operating mode such as energy-depletion, fully charged, and normal modes as described in Section 3.3.In addition, we realize some major routing and MAC protocols, which are designed for a solar-powered WSN, in the communication composite module, so as to make it easy to compare and verify the performance of a newly proposed scheme in MAC and routing layers. The protocols provided in SolarCastalia are summarized in Table4.Table 4
Routing and MAC protocols for energy harvesting WSNs, which is embedded in SolarCastalia.
Layer
Protocol
Routing
(i) PISA (priority-based path selection algorithm) [18]
(ii) DEHAR (distributed energy harvesting aware routing) [19]
(iii) AOR (adaptive opportunistic routing) [20]
MAC
(i) ODMAC (on-demand MAC) [21]
(ii) QAEE (QoS aware energy-efficient) MAC [22]


### 4.2. Graphical User Interface

Designing an efficient user interface requires the following characteristics: when used for the first time, its usage method must be intuitive and consistent over many components for efficient learning. After learning is completed, its use must be effective. Keeping these aspects in mind, we provided the proposed simulator with a GUI. The GUI is intuitive compared with a command-line interface and allows efficient testing through various functions such as memorization of preceding simulation commands, storage of simulation sets, and autocompletion.Figure5 shows the GUI of our simulator which is developed with Tcl/Tk 8.5 GUI toolkit in Linux platform. As the figure shows, various parameters required for simulation, such as node count, routing and MAC protocols, solar panel and storage types, and weather, can be set easily, and the topology, the transmitting/receiving distance, and the like can be viewed effectively through the sensor field window. The configuration of the node or topology can be set using the top menu.Figure 5
Graphic user interface of SolarCastalia.


## 4.1. Structure Modified for the SolarCastalia

As shown in Figure4, the SolarCastalia is able to provide the node-level simulation as well as the network-level simulation. Each simulated node is composed of several software components which are closely cooperating such as sensor manager, resource manager, mobility manager, application, and other communication composite modules. In this research, we especially focus on the resource manager, and thus we departmentalize it into devices and energy submanagers, and then drive all energy-related modules to the energy submanager.Figure 4
Structure of the proposed SolarCastalia simulator.The energy submanager consists of the energy harvesting, energy consumption, residual energy modules, and the database for a reference. Firstly, as explained in Section3.1, the energy harvesting module simulates the amount of harvested energy as accurately as possible, by using the database and the user configurations about the simulation environment such as the panel type and size, the storage type and capacitor, season, and weather. And then, the energy consumption module simulates how much energy is consumed by the node as time goes on, by applying (5) in Section 3.2. Finally, the remaining energy module traces the quantity of available energy with the information of energy harvesting module and energy consumption module. According to the amount of residual energy, the node determines its operating mode such as energy-depletion, fully charged, and normal modes as described in Section 3.3.In addition, we realize some major routing and MAC protocols, which are designed for a solar-powered WSN, in the communication composite module, so as to make it easy to compare and verify the performance of a newly proposed scheme in MAC and routing layers. The protocols provided in SolarCastalia are summarized in Table4.Table 4
Routing and MAC protocols for energy harvesting WSNs, which is embedded in SolarCastalia.
Layer
Protocol
Routing
(i) PISA (priority-based path selection algorithm) [18]
(ii) DEHAR (distributed energy harvesting aware routing) [19]
(iii) AOR (adaptive opportunistic routing) [20]
MAC
(i) ODMAC (on-demand MAC) [21]
(ii) QAEE (QoS aware energy-efficient) MAC [22]


## 4.2. Graphical User Interface

Designing an efficient user interface requires the following characteristics: when used for the first time, its usage method must be intuitive and consistent over many components for efficient learning. After learning is completed, its use must be effective. Keeping these aspects in mind, we provided the proposed simulator with a GUI. The GUI is intuitive compared with a command-line interface and allows efficient testing through various functions such as memorization of preceding simulation commands, storage of simulation sets, and autocompletion.Figure5 shows the GUI of our simulator which is developed with Tcl/Tk 8.5 GUI toolkit in Linux platform. As the figure shows, various parameters required for simulation, such as node count, routing and MAC protocols, solar panel and storage types, and weather, can be set easily, and the topology, the transmitting/receiving distance, and the like can be viewed effectively through the sensor field window. The configuration of the node or topology can be set using the top menu.Figure 5
Graphic user interface of SolarCastalia.


## 5. Operation Verification

To verify the operation of the proposed simulator, we compared the results of our simulator with that of a battery-powered WSN simulator, with all conditions (except the energy portion) remaining the same, and we analyzed the proposed simulator in energy metric.As shown in Figure6 and Table 5, simulation was conducted for a total of 172,800 seconds from 12 a.m. (midnight) with a squared area of 25 m by 25 m, and its topology contains a sink node positioned at the center and the other twelve nodes positioned randomly. The transmission power of each node was −15 dBm which covers 3~6 m. Each node senses the data every ten seconds and transmits its sensory data to the sink node using GPSR routing and the CSMA/CA-based Tunable MAC protocol. The detailed environmental setting is shown in Table 5, and the duty cycle of the nodes was set for the daily average amount of harvested energy to be approximately 10% greater than the daily energy consumption, thereby preventing an undesired blackout time.Table 5
Simulation environment.
Parameter
Simulation time
Field size
Node
Topology type
Packet rate
Value
172800 (s) from midnight
25 by 25 (m)
13
Random (Sink-Center)
0.1
Parameter
TX power
Routing
MAC
Weather
Season
Value
−15 dBm (3~6)
GPSR
Tunable MAC (CSMA/CA)
Sunny
Fall
Parameter
Solar cell
Cell size
Rechargeable battery
Battery capacity
Initial energy
Value
Thin
32 by 21 (cm)
NiMH
2500 (mAh)
113 (mAh)Figure 6
Network topology (25 m by 25 m).Through the simulation, we confirmed that the daily average energy consumption of each node was approximately 352 mAh and that the daily average amount of harvested energy was approximately 394 mAh. Because the initial remaining energy on the battery was 113 mAh (500 J), as shown in Figure7(a), the existing battery-powered system exhausted its energy, equivalent to the initial energy, in six to seven hours, and the network stopped operating. However, the amount of energy on the energy harvesting system fluctuates as times goes by, thus ensuring continuous operation of the nodes.Figure 7
Simulation result.
(a)
Remaining energy of battery-powered nodes and energy harvesting nodes
(b)
Two-day trace of remaining energy of energy harvesting nodes
(c)
The amount of energy harvested by energy harvesting nodes
(d)
The amount of energy consumed by energy harvesting nodesFigure7(b) shows the change in the remaining energy of a specific node that began operation at 12 a.m. (midnight) and remained in operation for two days. Daytime energy harvesting kept the system operating at night and in the early morning. Additionally, the remaining energy at the second midnight was greater than that of the first midnight, indicating that controlling the duty cycle prevented node blackout.Moreover, Figure7(c) shows the change in the energy harvested at each node for one day, and an intentional deviation is found in the nodes with a consideration of the different amounts of harevested energy among nodes, which could occur in a real-life environment as a result of cloud, shadow, dust, or the like.Lastly, Figure7(d) shows the energy consumption of each node. Node 6, which was positioned close to the sink node and was required to relay the packets from Nodes 8, 12, and 7, was transmitting the greatest number of packets, thus consuming the most energy. Node 2 which was required to relay the packets from Nodes 3, 9, and 11 shows the similar results. The nodes with the second highest energy consumption were Nodes 12, 9, 4, and 5, each of which had one neighbor node to which it can relay packets. The energy information and packet transmission rate for each node are found in Table 6.Table 6
Simulation result of each node.
Info.
Node
0
1
2
3
4
5
6
7
8
9
10
11
12
Hop
Sink
2
1
3
1
1
1
3
2
2
2
2
2
Miss (%)
Sink
0.16
0
0.97
0
0.23
0
0.12
0.95
1.02
0
0
0.28
Consumed (J)
1555
1556
1558
1556
1557
1557
1558
1556
1556
1557
1556
1556
1557
Harvesting (J)
1936
1742
1545
1742
1741
1721
1742
1742
1740
1740
1742
1742
1740
Remaining (J)
881
686
487
686
686
684
663
686
686
683
686
686
684


## 6. Conclusion

We proposed an energy harvesting WSN simulator that can emulate various solar energy harvesting sensor systems by configuring the rechargeable battery and solar panel types, the panel size, and the like. In addition, it can simulate the weather and season when the target WSN is intended to operate and can also support major routing and MAC protocols designed for energy harvesting WSNs. Finally, it facilitates more intuitive simulation through a user-friendly GUI and has scalability resulting from object-oriented programming. Consequently, we expect the proposed simulator to be used widely as a research tool to improve the characteristics and performance of energy harvesting WSNs.



---

*Source: 415174-2015-06-01.xml*