1. Introduction
Recently, there has been significant interest in wireless sensor networks (WSNs). They are one of the most important technologies used in all our daily life applications due to their benefits and ease of implementation, especially with Internet of Things (IoT) applications. They are also preferred for use in environmental monitoring, natural disaster detection, security, energy management, healthcare, industrial product tracking and management, and more [
1]. WSNs are a collection of small devices (sensors) with limited processing and power capabilities, and a communication unit that communicates with each other via wireless technologies to collect data from the surrounding environment. The collected data can be transmitted to other units or to a central server [
2]. The sensor node must also be low-cost, highly efficient, consume little power, and be highly adaptable to the surrounding conditions and application.
Among the challenges of WSNs that must be considered when designing the network are how to operate the network with an appropriate power source, its energy consumption, and the ability to sustain the network through power management. Batteries are used as the primary source to supply the network with the appropriate voltage and current. WSNs require battery replacement to provide timely power, avoiding failures or delays in data collection. Battery life is very short due to the high power consumption of dynamic sensor operations, so using batteries primarily to power the network is a cost-ineffective solution that increases network lifetime and adaptability [
3]. Therefore, most communication system developers generally focus on low-energy communication technologies while providing renewable energy resources, also known as energy-harvesting resources. These resources, such as solar, geothermal, and wind power, can be used with WSNs to provide the required amount of energy [
4]. Batteries can also be used whenever needed.
A WSN consists of many sensor nodes connected as an ad hoc network. Its topology varies depending on the application used and the number of nodes used. If the network relies on limited energy sources, this represents a significant limitation in terms of controlling energy to extend the network’s sensor node lifespan and reduce its cost [
5]. When nodes lose energy, they lose their ability to communicate, and thus cannot perform their role, unless an alternative energy source is implemented. Renewable energy-harvesting (EH) systems have become increasingly important, especially with the increase in global warming and environmental issues. Energy harvesting can be employed in WSNs, which extends the network’s lifespan. This has become known as energy-harvesting wireless sensor networks (EH-WSNs) [
6].
WSNs are a vital part of modern communications infrastructure, using electromagnetic radio waves as the primary means of communication between nodes. The need for continuous data exchange between nodes is increasing. This growing demand is accompanied by challenges related to performance, reliability, and security [
1]. While they offer many benefits, they also face multiple challenges that affect network performance. These include interference from nearby wireless devices, which leads to data loss and reduced connection quality; limited range and the impact of obstacles; environmental factors that can cause poor connectivity; and spectrum congestion, which increases latency and reduces data speed. They also consume a large amount of energy which affects the battery life of nodes, especially in self-powered networks [
5]. As a result, WSNs can be developed using new designs that help overcome the challenges of radio waves. Recently, Li-Fi (Light Fidelity) technology has emerged as an innovative solution for wireless communication systems, and it can be integrated with traditional communication technologies such as Wi-Fi [
7].
This study focuses on building a wireless sensor network (WSN) that operates in smart environments (such as smart homes, smart farms, industrial areas, etc.) without a permanent external power source, relying on solar energy as a renewable energy source (solar energy harvesting (SEH)), rather than relying entirely on traditional batteries. The batteries are charged through solar cells, thus extending the network’s lifespan and enabling it to operate autonomously for extended periods. To achieve high data transfer efficiency, improve performance, enhance communication efficiency, reduce energy consumption, and extend the network’s lifespan, Li-Fi and Wi-Fi technologies are integrated to take advantage of the characteristics and advantages of each in sending and receiving data. Li-Fi is used to transfer data locally between nearby sensors and units with high accuracy and speed, while Wi-Fi is used to send data collected from the central unit to a server or cloud for analysis and display. It also integrates a smart switching algorithm to automatically select the best communication channel (Li-Fi or Wi-Fi) based on network conditions and signal quality, a sleep scheduling algorithm to turn off sensors in sleep mode when transmission is not needed to reduce power consumption, and a Markov model to predict network behavior and data traffic and reduce latency.
The paper is organized as follows:
Section 2 introduces Li-Fi technology.
Section 3 introduces energy harvesting in WSNs.
Section 4 introduces the Solar Energy-Harvesting Wireless Sensor Network (SEH-WSN).
Section 5 describes how to model the Solar Energy Harvester.
Section 6 demonstrates how to use Hybrid Li-Fi/Wi-Fi in SEH-WSN.
Section 7 reduces transmission power consumption in the SEH-WSN by integrating a Markov model, sleep scheduling, and smart switching algorithms.
Section 8 concludes.
2. Li-Fi Technology
Li-Fi is a visible light communication (VLC) system that relies on visible light to transmit data [
8,
9]. It operates wirelessly in a single- or bidirectional manner with multiple access. It is characterized by its high speed and high bandwidth. It can be used in a similar manner to Wi-Fi or combined with other broadband networking technologies such as Wi-Fi, as Li-Fi-based communication speeds can be significantly higher than traditional Wi-Fi [
7]. Li-Fi supports the unification of the Physical (PHY) and Media Access Control (MAC) layers through IEEE 802.15.7 [
10].
Visible light is a form of electromagnetic energy that can be an alternative to radio frequency communication systems. Its frequency range is 430–790 THz, and it represents a communication channel for data transmission. This frequency range makes it superior to radio waves in data transmission speed and reduces congestion [
9]. It can also be achieved through the light emitted by LEDs. LEDs can be turned on and off at a speed that is beyond recognition, making it possible to use visible light as a carrier for both data transmission and illumination simultaneously [
10]. At the transmitter end, the intensity of the received light is modulated, and then the photo detector receives the data. The modulation and decoding are removed, and the data signal is then transmitted to the destination end, ready for use in a manner imperceptible to the human eye [
11].
Figure 1 shows a schematic diagram of the basic components of Li-Fi.
The modulation methods used in Li-Fi depend on the intensity of the light falling from the LED. Modulation techniques are used so that lighting is not required while connectivity remains available [
12]. The transmitted signal is identified by the difference in light intensity. There are various types of Li-Fi modulation methods, as shown in [
13]. Modulation methods directly impact the speed and efficiency of data transmission and provide greater reliability in different environments [
13]. For example, frequency modulation can be easily affected by ambient light sources, while Orthogonal Frequency Division Multiplexing (OFDM) techniques can be more resistant to interference. Also, some methods, such as Multi-Chip Module (MCM), may require more power to operate, which impacts the battery life of WSN nodes.
Li-Fi is characterized by being free of electromagnetic interference (EMI), making it ideal for systems sensitive to EMI. It also requires no infrastructure, as lighting is already present. This makes it low-power, easy to implement, and cost-effective. Due to the difficulty of optical signal penetration and its inability to pass through walls, it possesses a high degree of efficiency, security, and reliability compared to other wireless communication technologies [
11]. As a result of these advantages, Li-Fi could revolutionize technology when applied to all industrial, military, healthcare, smart city, and other applications.
There are some challenges that affect Li-Fi, such as its reliance on visible light, which limits its ability to operate over short transmission distances. Consequently, the signal range is limited within space, depending on the transmission path length (LOS). The signal is also affected by other light sources, such as sunlight [
10]. Although Li-Fi’s data transfer speed is much higher than other wireless communication technologies such as Wi-Fi, this speed may be affected by the quality and efficiency of the LEDs and the modulation techniques used [
11]. As a result, maximum benefits can be achieved through the integration of Li-Fi and Wi-Fi.
Table 1 illustrates the differences between Li-Fi and Wi-Fi.
3. EH Technique in WSNs
Energy-harvesting wireless sensor networks (EH-WSNs) are a type of WSN that rely on energy-harvesting technologies to power nodes instead of requiring battery replacements [
4]. These networks aim to improve energy sustainability and reduce reliance on traditional batteries. This increases the network’s lifespan and reduces maintenance costs associated with battery replacement, enabling its use in remote or difficult locations. Various energy sources can be harvested and converted into the desired form to power sensor nodes. Therefore, when providing the required power source, it must maintain the required voltage and current levels.
Energy-harvesting sources and techniques in WSNs include:
Solar EnergyHarvesting (SEH): A technology used to generate electrical energy from sunlight. It is a clean and inexpensive energy source that is integrated into WSNs to provide sustainable power to nodes, extending the network’s lifespan and reducing the need for battery replacement. It also has the potential to be applied in remote locations. It can be harvested from both indoor and outdoor environments. Solar panels are used to collect sunlight and convert it into a constant voltage that can be used to power nodes [
14].
There are some challenges associated with using solar energy, such as the impact of weather factors and the angle of sunlight, which can affect the amount of energy generated. There is also the need for an alternative energy source or solar energy storage mechanisms for use on cloudy days or at night. However, this can be addressed by exploiting the artificial light present in the indoor environment, with the potential for long-term storage [
15].
Radio-Frequency EnergyHarvesting (RF-EH): This technology uses radio signals in the environment to charge nodes with direct current. These frequencies operate in the 30 Hz to 300 GHz range, broadcast by RF devices such as radio and television broadcasting stations, mobile phone towers, and others [
16]. Nodes contain receivers (rectifier antennas) capable of capturing radio frequency (RF) signals. These frequencies power the sensor nodes wirelessly.
RF-EH provides a sustainable power source, especially in hard-to-reach environments. Several factors affect the efficiency of energy harvesting, including the radiation density in the environment, which may be low in some areas, interference between signals within the frequency range, and a significant decrease in efficiency with increasing distance between the source and the node. RF-to-DC conversion can reach 50% to 75% over 100 m [
16].
Thermal EnergyHarvesting (TE-EH): This is a technology that uses thermoelectric generators that convert temperature differences in the environment based on the Seebeck effect principle into direct current. The harvesting efficiency may be affected by changes in temperature which thus affect the amount of energy extracted [
12].
Mechanical Energy-Based EnergyHarvesting (CE-EH): This technology uses electromechanical generators that convert energy from motion, vibration, and pressure into electrical energy through the relative motion of moving parts. This low-cost energy-harvesting technology can be used, especially in dynamic environments such as industrial areas, nuclear reactor plants, and natural environments [
12].
Hydroelectric-Based EnergyHarvesting (HE-EH): This is a clean and renewable energy source that captures electrical energy from flowing water. It can be obtained from rivers, waterfalls, seas, and water storage plants [
15].
Wind-Based EnergyHarvesting (WE-EH): This is a clean and renewable energy source that can be obtained from airflows generated by kinetic energy [
15].
Chemical-Based EnergyHarvesting (ME-EH): This technology relies on converting energy from chemical reactions into electrical energy, such as rechargeable chemical batteries or the use of fuels and organic materials. However, these are less efficient compared to other methods and require an effective energy management system.
The performance of single-source energy-harvesting technology has some advantages and disadvantages, and depends on factors such as availability, continuity, time, weather, location, and the ability to control data collection, which impacts battery charging and network stability.
Enhanced hybrid WSNs can be designed and developed using one of these energy-harvesting technologies to improve network efficiency, extend network life, reduce energy consumption, and operate continuously to collect, process, and transmit data [
15].
4. Solar Energy-Harvesting Wireless Sensor Network (SEH-WSN)
WSNs have become the foundation of the Internet of Things (IoT) architecture in smart cities. Due to the limited battery life, this impacts network performance. The use of energy harvesting mitigates the problem of limited battery life and high energy consumption of WSN nodes.
The design of solar energy-harvesting enhanced wireless sensor networks (SEH-WSNs) is an effective and necessary solution that can harness ambient solar energy and extend the network’s lifespan by several years. SEH-WSNs rely on the network inputs to convert solar energy into electrical energy, which is then used to charge the WSN sensor node batteries.
SEH-WSNs reduce the workforce and risks faced by workers when replacing dead batteries for sensor nodes located in remote areas or hazardous environments such as volcanoes, glaciers, forest monitoring, industrial process monitoring, and more [
17].
Several different types of sensors can be used in SEH-WSNs to measure temperature, humidity, light, pressure, motion, and other physical quantities at the same time, and then transmit the obtained data wirelessly for processing [
1].
The SEH system provides a DC power source for the WSN node by harvesting ambient sunlight using solar panels and converting the solar energy into electrical energy [
6].
Figure 2 shows the block diagram of a solar energy-harvesting wireless sensor network (SEH-WSN).
SEH-WSN consists of a solar cell designed to create an electric field. A DC-DC converter regulates the voltage to achieve a constant DC voltage at a specific output to charge the rechargeable battery or, via a supercapacitor (C), power the WSN node, regardless of changes in the input voltage or connected load. This is accomplished using two types of control methods: pulse width modulation (PWM) and maximum power point tracking (MPPT). They are used to maximize solar energy use, due to the variation in voltage and current output from the solar panel as a result of changes in sunlight. Both PWM and MPPT act as an intermediary between the solar panel, the battery or capacitor, and the voltage regulator. PWM is characterized by its simplicity, low power consumption, and high efficiency in controlling the voltage and current output from the panel. It also prevents battery overcharging and is used in simple networks that do not require high power consumption. MPPT, on the other hand, is a strategy that works to extract the maximum power when solar radiation reaches the Maximum Power Point (MPP), as it works to change the PWM duty cycle to obtain the highest possible power. MPPT increases productivity and improves system efficiency and is preferred for use in applications that require maximum power and in unstable environments [
17].
A power management unit (PMU) is also used to improve power distribution efficiency, adapt to changes in light levels, protect the battery from overcharging or deep discharge, and protect the network from overcurrents and voltages. The battery voltage is used to power the wireless sensor node [
6]. The sensor nodes measure the required physical quantities according to the type of application and the sensors used. A microcontroller unit processes the sensor data. Communication is established with other sensor nodes with similar characteristics, and the sensor data is then sent in packets to the cluster head nodes, which then sends it to the gateway. The user can then remotely control the sensor and take necessary action. Solar energy harvesting plays an important role: if the light falling on the solar cell is low, the battery will not be recharged, which reduces the WSN’s operational lifespan [
5].
5. Solar Energy Harvester Modeling
SEH powers the WSN node and maintains continuous system operation without the need for a permanent external power source. Because power availability varies over time depending on environmental conditions, the panel may be in a dormant state, not harvesting power, or in an active state, harvesting power at a rate of
α [
12]. The Markov hypothesis can be used as a probabilistic model that can analyze and compare events or accurately predict solar power changes based on the current state [
14]. This can help determine whether the controller should be activated to send data or enter sleep mode to save power.
SEH modeling evaluates the current and voltage supplied to the sensor node’s charging and operation using temperature and radiation data from a solar cell, also known as a photovoltaic (PV) cell. This semiconductor cell converts incident light energy into electrical energy through a phenomenon known as the photovoltaic effect. When light (photons) falls on the surface of the cell, the energy from the photons is absorbed, which in turn releases electrons, generating an electric field. There are different types of solar cells based on their crystalline composition, such as monocrystalline silicon (c-Si), amorphous silicon (a-Si), multi-crystalline silicon (multi-Si), thin-film solar cells (TFSCs), and others [
6].
Solar panel modeling also involves understanding and estimating the behavior of solar panels, analyzing their performance, and predicting energy production under various conditions, such as the ambient temperature of the solar panel. The efficiency of a panel may decrease with increasing temperature. Similarly, the intensity of direct light affects the amount of energy produced, and the angle of inclination of the solar panel affects the amount of light it receives [
6]. The power of solar radiation (P
solar) is a key factor in determining the amount of electrical energy that solar cells can produce and its unit (W). It depends on the level of radiation and the efficiency of the solar cells. It can be expressed using Equation (1):
where G is the solar irradiance (W/m
2), A is the area of solar panels (m
2), η is the cell efficiency (typically 10–20%), and f(T) is the temperature correction factor [
18]. It consists of photovoltaic cells connected using a single-diode model. An electrical model and performance equations can be used to describe the relationship between the voltage and current produced by the solar panel [
12]. PV modeling can be expressed using Equation (2):
where
is the total output current of the solar cell,
is the current generated by the light,
is the transient current (reverse saturation current),
V is the open-circuit voltage of the solar cell (the voltage across the cell terminals),
q is the electron charge (1.6 × 10
−19 C),
n is the ideality coefficient of the diode,
K is the Boltzmann constant (1.38 × 10
−23 J/K), and
T is the solar cell temperature (300 K).
Figure 3a shows the symbol for the equivalent circuit of the solar cell, while
Figure 3b represents the equivalent electrical circuit of the solar cell, which consists of a current source generated by the light (
IL), a diode (
D) to represent the behavior of the solar cell, and two resistors (
Rp,
Rs) to represent the power loss [
16].
Figure 4 shows the current–voltage (I–V) and power–voltage (P–V) characteristics of a 1 cm
2 solar panel under sunlight (irradiation). The effect of a series resistance (
RS = 4.5 Ωcm
2) on the I–V curve is demonstrated by the change in voltage across the diode.
Figure 4 shows that the current in the solar panel increases with increasing irradiance until it reaches its maximum. The short-circuit current (I
SC) is unaffected by the series resistance until it becomes very large. The series resistance has no effect on the solar cell at the open-circuit voltage (V
oc), because the total current flowing through the solar cell can reach zero. However, as the open-circuit voltage approaches, the I–V curve is strongly affected by the series resistance [
19]. The value of the series resistance can be obtained by finding the slope of the I–V curve at the open-circuit voltage point.
6. Hybrid Li-Fi/Wi-Fi in an SEH-WSN
The increasing demand for wireless bandwidth and the expansion of wireless applications with big data have led to the need for technologies that improve network efficiency and handle this amount of data. This can be achieved by combining Li-Fi and Wi-Fi. A hybrid Li-Fi/Wi-Fi network can overcome the challenges of each technology, such as signal interference, poor network security, high power consumption, and total reliance on radio waves, as previously mentioned in
Section 2 and
Table 1. This combination is an advanced step towards enhancing network efficiency and performance [
11]. It can be used as an innovative and applicable solution with an EH-WSN to improve its effectiveness and provide greater flexibility in network design.
Li-Fi can be used in areas with good LED lighting, low power, or when sensors are close to optical receivers, for example, a photodiode is used as a photodetector to receive data (short-range local communication), or when faults occur, or when increased confidentiality and security are required [
20]. A Li-Fi system can be implemented through the circuits designed in [
11] by replacing the Arduino Uno with an ESP32 as shown in
Figure 5. Wi-Fi technology can be used when high power is available, or in areas where there is no line of sight, or there are physical obstacles that impede signal transmission, or the distance between the photodiode and the photodetector is large, or both are positioned at an undirected angle, or there are other light sources such as sunlight that affect signal quality, or data transmission over longer distances is required, such as for an internet connection. A Wi-Fi system can be implemented by using two ESP32s, one on the transmitter side and the other on the receiver side [
11], as shown in
Figure 5.
Table 2 compares the use of Li-Fi and Wi-Fi in both transmission and receiving. Each technology can work alone or they can be integrated together. We propose to implement this integration by linking light-transmitted data via Li-Fi with direct line-of-sight capability, which increases data protection from hacking, improves data transmission speeds, increases network sustainability, and expands its application range in a variety of fields [
11]. To achieve the integration between Li-Fi and Wi-Fi, it is implemented as shown in
Figure 6 [
11], by replacing the Arduino Uno and ESP8266 with an ESP32.
The network consists of a solar panel that collects and stores solar energy to charge a rechargeable battery with sufficient capacity to provide stable voltage during the absence of sunlight. This is accomplished through a charging circuit and a protection circuit against overcharging and over-discharging. This circuit operates a set of sensors that sense and transmit their data by converting various physical quantities (temperature, humidity, motion, gas, pressure, visible and invisible radiation, etc.) depending on the sensor type into electrical signals. These signals are distributed in a specific environment according to the required application and operate on energy based on the SEH process [
12].
The nodes rely on solar power and become self-contained. Initially, each sensor sends a connection request to the ESP32 controller, which represents the gateways. The controller collects the data and converts it into a binary string. The ESP32 features small sizes, high performance, powerful processing capabilities, low power consumption, and wireless connectivity. Each sensor reading can be transmitted via Wi-Fi or Li-Fi as shown in
Figure 5; the ESP32 monitors the power status and then decides which communication method to use and which technology to use. Sensor data is transmitted via Li-Fi in the form of light pulses, invisible to the naked eye, representing 0 or 1 (a digital coding similar to Morse code), via an LED quickly using an On-Off Keying (OOK) modulation [
11]. A photodiode receives the optical pulses and converts them into electrical signals, enabling the ESP32 to analyze, process, and convert them into displayable data. Transmission times must be separated and regulated via either technology to avoid interference and ensure proper data delivery. In the case of Wi-Fi transmission, data is sent directly wirelessly to the receiver via the ESP32 for display on the user interface, storage, or transmission over longer distances, such as via the internet.
The two technologies can be integration to gain the advantages of each and be used as complementary technologies [
11]. When transmitting via Li-Fi, data is sent using the same steps as above, while when transmitting data via Wi-Fi, the data is transmitted in optical form, making it more secure and unhackable, while maintaining connection stability. This is done via an LED lamp, and using OOK modulation and a solid-state relay (SSR), the lamp’s brightness is controlled to transmit data at high speed [
11]. The photodiode then receives the optical signal and converts it into digital data suitable for display. This design can also be connected to an alarm or control system if values exceed certain limits, depending on the application being used.
Figure 6 illustrates how data is transferred from a sensor node to a server using Li-Fi and Wi-Fi integration.
7. Reducing Transmission Power Consumption in the SEH-WSN
An SEH-WSN reduces the cost of replacing depleted batteries, but when there is no sunlight at night or in winter, the power produced may be less than the power required to operate the sensor. In this case, the sensor operates using the stored energy to maintain operation. To further extend the life of the sensor system and reduce and rationalize energy consumption, this paper proposes the integration of a set of smart algorithms such as Markov theory, smart switching, and sleep scheduling, which can be implemented in the proposed SEH-WSN network based on the integration of Li-Fi and Wi-Fi. This can be explained as follows:
First: Markov Hypothesis: This is a probabilistic model that compares events and data resulting from solar energy changes over time depending on environmental conditions (daytime, cloud cover, nighttime), thus providing varying energy availability throughout the day. The Markov hypothesis is used to accurately analyze or predict future solar energy changes based on the current state, rather than the sequence of previous states [
21]. This model can be combined with an intelligent algorithm to adjust the system’s data transmission and sleep mode. It measures the battery voltage at each interval and determines its state by assigning power to possible states (high, medium, low). The transition between the three states is based on the expected solar charge. as shown in
Table 3. The choice between Li-Fi or Wi-Fi is made based on the power state [
22].
Second: Sleep Scheduling Algorithm: This algorithm is used in wireless systems such as WSNs to reduce energy consumption and extend battery life by controlling the operating state of nodes [
23]. It regulates the sleep or active state of a node. This means keeping nodes asleep most of the time to save energy and avoid wasting it when not needed and activating them only at the appropriate time (e.g., when transmitting, receiving, or sensing). Each node in the network has a fixed or dynamic schedule (such as TDMA) [
24]. If it is not in its allocated slot, it remains on standby or sleep mode to avoid collisions (each node broadcasts only at its own time). The Markov hypothesis is used as the basis for designing the sleep scheduling algorithm, which executes actions based on Markov hypothesis predictions, i.e., deciding whether to sleep or be active.
Third: Smart Switching Algorithm: This algorithm helps automatically choose the most appropriate path by intelligently switching between more than one energy source (solar power or battery), or multiple communication sources (Li-Fi or Wi-Fi), based on smart criteria. Thus, it relies on the current network status, such as power level, communication path quality, and signal quality. The sleep scheduling algorithm is used as the basis, and the smart switching algorithm as the conditional action on power level and communication channel quality, to maximize their benefits without conflict. The battery status is first measured, then its status is classified. The strategy used is determined according to
Table 3. For example, during the day, nodes are powered by solar energy, while at night, they operate on battery power. When the battery voltage drops, the system enters sleep mode [
25].
Several studies have used the proposed algorithms, but individually. The Markov hypothesis was applied to WSNs to analyze energy consumption and improve quality of service through intelligent control of node operating modes [
21]. This study [
23] used a sleep scheduling algorithm to restrict sensors to sleep for specific periods. This study [
24] used Time Division Multiple Access (TDMA) technology to organize time and reduce energy consumption by reducing transitions between different modes. This study [
26] used an intelligent wake-up scheduling algorithm based on predicting target movement in the network by switching nodes between sleep and active states. This study [
27] relied on the use of a synchronous sleep scheduling algorithm that takes into account multiple power states to maintain quality of service (QoS) for different applications. This study [
28] used policy sleep scheduling based on the Markov model to analyze energy consumption and switching between nodes. While this study [
29] is based on software-defined networks (SDNs) which takes advantage of smart switching and sleep scheduling algorithms with the use of a Markov model to determine the best sleep and wake-up times based on the current state and analysis of energy and connectivity forecasts.
This study features integrated algorithms that help estimate the probability of transitioning to the next state based on the current state. Based on this prediction, if the probability indicates an upcoming power drop, the system begins reducing activity before it occurs, whether it involves sleep, communication, or even suspending the sensor to save energy. It then returns to the beginning of the cycle after sleep. The integration aims to improve performance and achieve maximum energy savings without sacrificing transmission efficiency and ensuring continuity of communication depending on environmental conditions and available energy. It also acts proactively based on the next state, not just the current state. It also maintains network coverage by alternating roles between peripheral and central nodes, especially in low-power situations.
Table 4 illustrates the difference between the two proposed algorithms. For practical application, the system’s transmission and reception codes are shown below [
30,
31].
To measure the quality of the received signal, a conventional optical transmission using OOK modulation was used, without any intelligent power management.
Figure 7 shows the relationship between the bit error ratio (BER) and the signal-to-noise ratio (SNR) using OOK modulation for Li-Fi. The BER is high in all modes when the SNR is low, indicating poor channel quality. As the channel improves (increasing SNR and decreasing BER), power consumption decreases (fewer transmissions or fewer retransmissions). From the figure, we see that at 2 dB, BER value drops to 10
−1 and continues to decrease until SNR value increases. At about 12 dB, the BER value drops to less than 10
−4. Thus, there is a significant improvement resulting from using OOK modulation. Data rate depends on several factors related to each technology, Li-Fi relies on data transmission via light, which practically reaches 1 Gbps or more, while Wi-Fi, according to the 802.11n standard and due to the use of an ESP32, can reach 10–20 Mbps under ideal conditions [
11], and when used for a low-power WSN design, it is in the range of Kbps. This makes these technologies suitable for WSN.
Using the smart switching algorithm reduces the BER by 20% by selecting the best power source or channel. This saves approximately 30% of power and reduces latency by approximately 8 ms. While using the Markov model and sleep scheduling algorithm, the node schedules deep sleep based on the Markov model’s power prediction, saving up to 50% more power and increasing battery life. However, it adds approximately 15 ms of wake-up dead time (delay) because the packet may have to wait for the node to wake up or the next TDMA window to end. This causes a small increase in BER of up to 10%. SNR does not significantly affect the latency of data transmission to the gateway because it does not alter the sleep schedule. Therefore, using them together increases network reliability and performance, especially during periods of low traffic or when the battery is low.
Figure 8 shows the relationship between SNR and reduced power consumption.
Figure 9 shows the relationship between SNR and time delays.
Figure 10 shows the relationship between throughput and distance between transmission and receiving using the proposed techniques. Throughput increases significantly over short distances (1–3 m) when connecting via Li-Fi, but it drops dramatically because of light scattering and optical line aberration during data transmission. While throughput decreases with Wi-Fi and becomes more stable over distances greater than 3 m, radio transmission relies on adaptive correction and modulation capabilities. Integration between them will improve throughput. The shorter the distance, the higher the performance, especially when using the smart switching algorithm, which selects the optimal channel.
Figure 11 illustrates the relationship between BER and transmitter/receiver distance using the proposed communication technologies. BER of Li-Fi communication is very low over short distances (less than 2 m). However, after approximately 3 m, the BER increases to 10 m, which is not acceptable for a communication system. This is due to optical dispersion, obstruction of line of sight, and weak light intensity. Wi-Fi communication is relatively stable over long distances, and the BER increases slowly with distance. This is due to the error correction protocols it uses. The integration of these two technologies reduces BER, especially when using the smart switching algorithm. Li-Fi is preferred over short distances of less than 2 m, while Wi-Fi is preferred over distances of 2 m or more. This achieves a high data rate within the coverage area. For practical application, the curve codes for the system are shown below [
32].
8. Conclusions and Future Work
The demand for wireless sensor networks (WSNs) is growing due to the rapid growth of applications and technologies. This requires the development of effective strategies to address challenges related to performance and security, reduce energy consumption, increase network lifetime, and ensure continuous operation, especially in harsh and remote locations.
In this work, a solar-powered wireless sensor network (SEH-WSN) is proposed to conserve batteries and extend their lifespan by charging them, thus preventing network downtime and reducing the cost of continuous battery replacement. Hybrid Li-Fi/Wi-Fi communication technologies are used, enhancing the capacity and performance of networks, whether the connection is local (indoors) or external (communication to the server/internet). TDMA-based transmission scheduling with multiple access is used to reduce interference, coupled with smart switching and sleep scheduling algorithms, while predicting battery state transitions using a Markov model. Simulation results show that when the proposed algorithms and communication techniques are integrated with the SEH-WSN, they provide high data transmission efficiency, increased throughput, reduced latency by up to 8 ms, reduced power consumption by up to 50%, and reduced the bit error rate (BER) of the received data by up to 20%. This results in an integrated smart network that operates without human intervention, improving power management and dynamically and efficiently communicating.
Future work will include the use of an encryption tool to provide maximum data protection and error reduction and correction techniques, relying on a protocol that specifies the beginning and end of each message to minimize data loss. Because the proposed system relies entirely on solar energy, the power management algorithm can be improved by using MPPT, implementing a combined algorithm between MPPT and sleep scheduling, and implementing them practically in one of the smart applications.