# Lyapunov-Guided Energy Scheduling and Computation Offloading for Solar-Powered WSN
## 6 Results and Discussion
### Performance for Network  
Figure 2 shows the stability of the energy queue \(E_{k}\) and data queue \(Q_{k}\) of node \(k\), and the solar powered HAP energy queue \(E_{S}\) and network average energy efficiency queue \(EE\), respectively. The HAP energy queue fluctuates steadily around the harvested green energy over time within a controlled range, which effectively ensures the robustness of the energy queue backlog, because if the broadcast and computational energy consumption of HAP in a time slot is much smaller than the harvested green energy, the excess energy is stored in the next time slot, resulting in a queue backlog. The stability of the energy queue \(E_{k}\), data queue \(Q_{k}\), and average energy efficiency queue \(EE\) is mainly controlled by the HAP energy queue \(E_{S}\), which remains stable within a controlled range and can make the rest of the queues gradually stabilize. Figure 3 compares the network energy efficiency of _\"Proposed\"_ with _All MEC_, _All local_, _Fixed broadcast power_, and _Fixed energy allocation_. As the number of sensors increases, the energy efficiency of all algorithms except _All local_ shows a trend of increasing then decreasing, while the _proposed_ has significantly better energy efficiency than others. This is because as more sensors are accessed, the energy broadcasted by HAP is received and utilized on a larger scale, which reduces the environmental loss. However, as the number of sensors continues to increase, the network computation increases, and the time slot resources required for multi-node offloading increases, which seriously compresses the HAP energy broadcast time. Here, due to the high independence of each node in the local computing mode, _All local_ has no offloading time slot resource occupation, and its energy efficiency shows a continuous slowly increasing trend with the increase of the network scale. In contrast, _All MEC_ offloads all tasks to the MEC server, resulting in a sudden drop in computation volume in the offload mode as the number of terminal nodes increases and exceeds a threshold value. _Fixed broadcast power_ with constant transmit power, when the energy broadcast time decreases, results in lower total energy broadcast in the HAP period, a large amount of solar energy backlog, and less energy harvesting by nodes, which reduces a large amount of computational data backlog and reduces network computation, seriously affecting network energy efficiency. _Fixed energy allocation_ is a fixed-ratio energy allocation algorithm that is not flexible enough to cope with the changes in solar energy and data arrival and its energy efficiency is low. The proposed algorithm can adjust the transmit power in time according to the solar-harvested and the computation to tradeoff the network energy efficiency and reduce the network average queue backlog. Figure 4 analyses the effect of the total network bandwidth on the network energy efficiency for different algorithms. Clearly, the network energy efficiency increases as the total bandwidth increases. This is because a larger bandwidth means lower energy consumption required for offloading tasks, which enhances the network energy efficiency. The comparative analysis in Figure 4 shows that the larger the part of the network that is used for remote offloading decisions, the more the average network energy efficiency increases with bandwidth, but as the bandwidth continues to increase, the network energy efficiency tends to stabilize, which is because network energy becomes critical to limiting network performance in the latter stages. Figure 3: The performance of energy efficiency under different algorithms with network size. Figure 2: Analysis of queue stability (a) energy queue of node \(k\) (b) data queue of node \(k\) (c) energy queue of HAP (d) network average energy efficiency queue. Figure 5 analyses the effect of the control parameter \(V\) on the network average energy efficiency.