Keywords

1 Introduction

With the development of chip manufacturing processes and software systems, more and more portable wireless devices, such as smart watches and tablets, have become popular in recent years. Because the power consumption of accessing the Internet through a cellular interface is often several times that of a Wi-Fi interface, most smart devices only have the ability to access the Internet via Wi-Fi. Currently, mobile phones can use the Wi-Fi interface as mobile access points (APs) of nearby smart devices [1, 2], which is also known as Wi-Fi tethering by the public. The mobile APs have gradually become an important bridge between other smart devices and the Internet, which solves the needs of these intelligent devices for networking anywhere.

Reducing the energy consumption of Wi-Fi is a hot topic all the time, because improving the endurance of mobile phones is a very important aspect of improving user experience. However, in general scenarios, APs are assumed to be supported by AC power. Therefore, lots of research related to energy-efficient mechanisms only aims at wireless devices as stations (STAs) and rarely considers them as APs, such as [15,16,17]. According to power save mode (PSM) implemented in the IEEE 802.11 standard [3], an STA can negotiate with an AP to wake up after a certain period of sleep, and then it enters the sleep state again after completing data reception. However, when the mobile phone is used as an AP, the Wi-Fi transceiver module is always in receiving idle state, even when there is no traffic. As a result, a large amount of power is wasted and the battery life of the mobile phone is shortened, which makes the user experience extremely unfriendly.

At present, the research on energy-saving mechanisms for APs can be divided into two types. One is adjusting transmission power of APs, such as [13, 14]. However, it is hard to change mobile devices’ transmission power in reality. The other is designing a sleep scheduling mechanism of APs, which is more likely to deploy in our mobile phones. DozyAP [4] is the first to study the energy consumption of smart terminals as Wi-Fi hotspots. The paper proposes a sleep request mechanism. However, this mechanism is difficult to operate in practice because it requires complicated changes at both the AP and STAs, and it causes a large packet delay. POEM [5] and SleepAP [6] also propose some different sleep polling mechanisms, but the actual deployment of them also has the aforementioned implementation problems. A different solution is proposed in [7]. It allows STA to automatically update the network allocation vector (NAV) through designing a special sleep frame, thus ensuring that no uplink data occurs during the AP sleeps. However, it only uses fixed sleep parameters and cannot adaptively adjust the sleep time according to the traffic conditions of the STA. Therefore, the user experience will be affected in the case of heavy traffic.

This paper proposes an energy-saving protocol for mobile APs with two important considerations. First, the AP sleep timer’s backoff strategy and adaptive sleep time selection strategy are designed in the energy-saving AP protocol. The backoff strategy will delay the transmission of APs’ sleep indication frames to reduce data delay when STAs send uplink traffic. The selection strategy enables the AP to adaptively select the appropriate sleep time according to the average traffic statistics, which can reduce packet delay. The design of two strategies ensures that, no matter which traffic mode the STA is in, it will not affect the user experience. Second, by designing the AP sleep indication frame on the original MAC frame, it does not change the basic structure of the original MAC frame, so it is compatible with the IEEE 802.11 standard.

There are four main contributions in this paper. First, we propose an energy-saving AP protocol based on existing IEEE 802.11 framework to reduce energy consumption of mobile APs. Second, optimized sleep strategies are designed in the protocol framework. The results show that the adaptive method can ensure that, APs can obtain higher energy-saving benefits while not having a huge impact on packet delay. Third, because the current chips do not support the AP to enter sleep mode, we designed and verified the protocol in NS-2, which is the mainstream network simulation tool. Fourth, through adjusting the parameter values, we simulated several scenarios, including single station and multiple stations. Under various traffic patterns, experimental results show that the designed energy-saving protocol reduces energy consumption of the APs by up to 64.60% with little packet delay.

The rest of this paper is organized as follows. Section 2 describes the energy-saving AP protocol and introduces the optimized sleep strategies. Section 3 shows how to implement the simulation in NS-2 and the experimental results under various test scenarios. Finally, we conclude this paper in Sect. 4.

Fig. 1.
figure 1

Program diagram of energy-saving AP protocol. The design is divided into four parts.

2 Energy-Saving Protocol for Mobile APs

The design of the overall energy-saving AP protocol can be described in conjunction with the program diagram in Fig. 1, which is divided into four parts: (i) the judgment of whether there is a buffered packet in the AP, (ii) the sleep scheduling strategy, (iii) the design of the sleep indication frame called PM sent by the AP, and (iv) the process after the STA receives the PM frame. These parts are described as follows.

2.1 Buffer Judgment

There are four different situations: one is single station connecting to an AP without buffered packets; two is single station connecting to an AP with buffered packets; three is multiple stations connecting to an AP without buffered packets; four is multiple stations connecting to an AP with buffered packets.

In first situation, as shown in Fig. 2(a), when there is no packet in the buffer, the AP’s buffer queue length is equal to 0 and then the AP sleep timer starts to work. If the timer expires, the AP will send a sleep indication frame called PM (to be described in Sect. 2.3), which means the AP can start to sleep. In second situation, as shown in Fig. 2(b), the energy-saving STA will send a PS-POLL frame to request packets buffered in the AP. It is judged that when moredata is equal to 0 and the buffer queue length of the AP is equal to 0 after sending the buffered packets, then all packets buffered in the AP have been sent. After that, the AP sleep timer starts timing. In third situation, as shown in Fig. 2(c), the nonbuffered judgment is only performed when the AP does not buffer the packets of any access stations. Then, the operations of the AP are the same as a single station. In fourth situation, if the AP buffers packets of multiple stations, then it needs to clean all the buffered packets being sent to other stations before the AP prepares to send the PM frame. As shown in Fig. 2(d), although the AP has sent the last packet to STA1 and the moredata field is equal to 0, the buffer queue length in the AP is not equal to 0 because it has not sent the buffered packets to STA2. Therefore, the AP sleep timer will not start until the AP has sent all the buffered packets to STA2.

Fig. 2.
figure 2

Judgment flags that AP has no buffered packets, and then the AP sleep timer starts timing in two scenarios. One scenario is the AP connected to a single station. The other scenario is the AP connected to multiple stations. (PM: Sleep indication frame of AP that we designed. ACK and other frames are not drawn in the figure.)

Fig. 3.
figure 3

Backoff mechanism of the AP sleep timer in NS-2. When the STA sends uplink data, the AP needs to backoff N slots and then send the PM. (PM: Sleep indication frame of the AP that we designed, T: Initial waiting interval, N: Increased competition window, S: Maximum sleep time.)

2.2 Sleep Scheduling Strategy

In the sleep scheduling strategy, the design of the AP sleep timer is a key part. The function of this timer is similar to the backoff timer. To send the packet preferentially and reduce the delay time, we need to modify the calculation method of the backoff time. The backoff timer selects a random value in the contention window as the backoff count value, and the AP sleep timer directly selects the contention window as the backoff count value. The specific design is as follows, where the initial waiting interval T, the increased contention window N and the maximum sleep time S are the adjustable parameters.

To avoid conflicts caused by multiple stations accessing the network at the same time, the core mechanism adopted in IEEE 802.11 is carrier sense multiple access with collision avoidance (CSMA/CA) [3]. The specific way to achieve conflict avoidance is to set a contention window and then roll back randomly [12]. When the sleep timer encounters uplink data from the STA, the channel is busy and then the sleep timer suspends timing. The next contention window is increased by N time slots. Therefore, when encountering high traffic intensity, the contention window of the PM frame continues to increase in order to reduce the transmission of the PM frame. The design allows the AP to sleep less and reduce packet delay. Figure 3 specifically demonstrates that, after the AP receives multiple uplink data sent by the STA, the AP sleep timer increases its contention window each time and delays the transmission of the PM frame. The AP does not enter the sleep state until no uplink data is sent for a period of time.

After the AP sleeps for S ms for the first time and then wakes up, the initial duration of the AP sleep timer is set to T ms. When the STA transmits a packet, the contention window of the PM frame will increase and then the timing duration will increase. When there is no packet to transmit, the timer expires and then the AP sends a PM frame to sleep. When T is very small, this design scheme ensures that the AP has more sleep time in a low traffic pattern, improving the AP’s energy-saving effect. When T is large, the packet delay of the STA can be reduced, but the energy-saving benefit will also be reduced. Therefore, the adjustment of three parameters can change the energy-saving benefits and average packet delay. To obtain the best compromise in performance, we design three parameter selection schemes to schedule the PM frame as follows.

Table 1. Sleep parameters corresponding to traffic statistics.

Traverse and Selection of Parameter Values. To determine a set of more suitable values, the first method traverses parameter values. The steps are as follows:

  • Select different traffic patterns to test the percentage of sleep duration and packet delay.

  • Manually adjust the parameters for multiple tests and compare the performance. As a result, S = 30, N = 100, T = 0.002 are the best values under different traffic conditions. They meet the requirements of higher energy-saving benefits while not having too much impact on data delay.

Dynamic Change. The second method dynamically changes the waiting contention window and automatically adjusts N. The steps are as follows:

  • Monitor the channel every 20 ms while the AP sleep frame is waiting to be sent.

  • When the AP finds uplink data, the waiting contention window size is increased by 10. If there is no uplink data, the waiting contention window size is reduced by 10.

Adaptive Adjustment. The third method adjusts the parameter S adaptively according to the previous traffic statistics. The steps are as follows:

  • As shown in Table 1, the average number of packets sent by low, medium, and high traffic patterns determines the threshold and the corresponding parameters.

  • Count the number of packets reaching each beacon and store them in an array A. The average number of packets of the Nth beacon is calculated based on the average number of packets of the previous N-1 beacon interval of the array A.

  • Then, select the parameter value of the Nth time according to the flow interval of the average grouping number, and then take out the corresponding parameter.

  • Repeat the previous two steps for each beacon interval.

Fig. 4.
figure 4

MAC frame format in IEEE 802.11.

2.3 Sleep Indication Frame

Figure 4 shows the MAC frame format of the existing IEEE 802.11 protocol. The AP’s sleep indication frame PM added in the protocol is a multicast frame. When the PM frame is sent, it will be sent to all STAs connected to the AP. In the PM frame, the key point that we design is setting the original field Duration/ID of the MAC frame header, which occupies 2 bytes. As shown in Fig. 4, when the 15th bit of this field is set to 0, the field represents the Network Allocation Vector (NAV). Therefore, the maximum value of the NAV is 32768 microseconds. When we calculate the sleep time of the AP, since the maximum NAV is approximately 32 ms, the AP sleep time should be taken as the lower of the remaining time and the maximum NAV. After the AP sends the PM frame and then receives the ACK frame from the STA, it starts to sleep.

2.4 STA Process After Receiving the PM

After the STA successfully receives the PM frame, it will perform the following steps:

  • First, the STA obtains the Duration/ID field in the PM frame and then makes the NAV of the STA equal to the sleep time according to its value. When the STA receives the PM frame and sends the ACK frame, the NAV timer starts to work. During this time, the STA monitors whether the channel is busy, thus it does not try to send the uplink traffic before the NAV timer expires. The AP sleep duration does not exceed the maximum value of the NAV, which ensures that there is no uplink traffic while the AP is asleep, so the AP can sleep safely without packet loss [8].

  • If the AP enters sleep mode, then the STA also enters sleep mode after receiving the PM frame, and it automatically wakes up after the sleep duration expires to monitor the arrival of the next PM frame.

3 Performance Evaluation

3.1 Implementation

We implement the energy-saving AP protocol in NS-2. The energy model of NS-2 records the remaining energy of each wireless node, and the energy parameter settings of each wireless node are shown in Table 2. For the energy parameters, this paper refers to energy consumption under 3.3V power supply in [9] and sets the initial battery energy of each node to 1000J. The literature [10], [11] found that the “ON/OFF” model based on the Pareto distribution can simulate actual web traffic. Therefore, the traffic generator based on the Pareto “ON/OFF” model is selected to simulate real network applications in NS-2. In this model, the “ON” and “OFF” intervals conform to the Pareto distribution, and the traffic is only generated in the “ON” state. The following two scenarios (to be described in Sects. 3.2 and 3.3) are verified by five different traffic patterns, as shown in Table 3. After completing each simulation, we used Gawk to extract useful information from the data generated in the wireless tracking file. Finally, three performance indicators are obtained: the sleep duration, energy consumption and average packet delay.

Table 2. Energy parameters in NS-2 for calculating energy consumption
Table 3. Five different traffic intensity parameters in NS-2 (L: Low traffic intensity, M: Medium traffic intensity, MH: Between medium and high traffic intensity, H: High traffic intensity, F: Full load traffic intensity).

For comparison, we tested three sleep scheduling strategies proposed in Sect. 2.2 and recorded their performance indicators. The first sleep strategy, GreenAP-1, selected a fixed set of good values by simply traversing all parameter values. The second sleep strategy, GreenAP-2, dynamically changed the waiting competition window and automatically adjusted the parameter N. The third sleep strategy, GreenAP-3, adjusted the parameter S adaptively according to the previous traffic statistics. As a result, the best sleep scheduling strategy is GreenAP-3, based on the performance comparison in Sects. 3.2 and 3.3. GreenAP-1 has the highest energy-saving benefit under MH traffic, and GreenAP-2 has the highest energy-saving benefit under L and M traffic, but they both cause more packet delay. However, GreenAP-3 sacrifices only a small energy-saving benefit to keep the packet delay at a low value, achieving the best compromise between energy-saving effects and user experiences.

3.2 Single Station

The topology structure built in this scenario is an AP and an STA. The STA establishes an association with the AP through passive scanning.

Fig. 5.
figure 5

Energy and delay performance under five traffic intensities when an STA is connected with an AP. The figures compare the performance indicators of three sleep scheduling strategies obtained in NS-2 (GreenAP-1, GreenAP-2 and GreenAP-3).

As shown in Fig. 5, when the STA sends packets to the AP at L and M traffic intensity, GreenAP-2 has the highest percentage of sleep duration, reaching 86.7%, which corresponds to an 80.9% reduction in energy consumption. When the STA sends packets to the AP with ML traffic, the sleep duration of GreenAP-1 accounts for the highest percentage, reaching 29.9%, which saves 27.2% energy. Because GreenAP-3 sleeps for a shorter time under these traffic patterns, the sleep duration and energy consumption are up to 16.3% lower than those of GreenAP-1 and GreenAP-2. On the contrary, the average delay of GreenAP-3 is only 4.8 ms at low traffic, which is 68.5% lower than GreenAP-1 and GreenAP-2, with 14.1 ms and 13.7 ms, respectively. GreenAP-3 also maintains the lowest packet delay under the other two conditions.

Fig. 6.
figure 6

Energy and delay performance with multiple stations (1 5). L traffic intensity is selected in this scenario.

When the STA sends packets to the AP with H traffic or F traffic, the sleep duration of the AP under the three sleep strategies is essentially the same, less than 10%, and the energy savings is less than 5%. Additionally, the packet delay is reduced to less than 3 ms, which indicates that the AP rarely enters the sleep state ensuring the quality of service for users. When traffic becomes highest, the backoff mechanism of the designed AP sleep timer ensures that the energy-saving AP protocol does not have much impact on the packet delay through sending fewer PM frames. The above results show that, in the state of data transmission, packet delay of hotspots can be controlled according to the number of packets, and the energy-saving benefits can be guaranteed as users are unaware of transmission delay.

3.3 Multiple Stations

In this scenario, two, three, four, and five STAs are constructed to connect to the AP for testing, and each station establishes an association with the AP through passive scanning. The test results are shown in Fig. 6.

When the number of STAs connecting to the AP changes from two to five, the sleep duration of GreenAP-1 decreases from 79.8% to 57.9%, and the energy consumption changes accordingly by 20.7%. The percentage of GreenAP-2 sleep duration decreases from 83.2% to 57.0%, and the energy consumption changes by 24.7% accordingly. The percentage of GreenAP-3 sleep duration decreases from 70.4% to 58.5%, and the energy consumption changes by 10.5% accordingly. These results show that, as the accessing number of STAs increases, the APs go to sleep less frequently, and the energy savings also decrease. This is due to the increase in network activity after more stations are connected, thus the number of uplink packets received by the AP is more than in the case of a single station. At the same time, GreenAP-3 has a smaller change in energy consumption as the number of connected STAs increases, compared to GreenAP-1 and GreenAP-2, because it adaptively changes parameters in the sleep scheduling strategy according to the previous traffic conditions. Therefore, GreenAP-3 exhibits superior performance.

Moreover, as the number of STAs increases, the packet delay of GreenAP-1 and GreenAP-2 is reduced from 14.1 ms to 9.9 ms and 13.7 ms to 9.8 ms, respectively, while the packet delay of GreenAP-3 remains at 4 ms. This shows that the strategy in GreenAP-3 greatly decreases the impact of the APs’ sleeping on packet delay, allowing the APs to save energy without influencing user experience.

Based on the above results, in the case of multiple stations access, GreenAP-3, the third solution for adaptively adjusting sleep parameters, still performs better when considering energy consumption and average packet delay. Especially in the case of low data traffic, when the AP energy consumption is reduced by only approximately 16.5% compared with the first and second schemes, the average packet delay decreases by approximately 66.0%. Therefore, GreenAP-3 is not only suitable for ordinary low-traffic scenarios but also low-traffic but delay-sensitive applications such as games.

4 Conclusion

With the popularization of Wi-Fi tethering, mobile APs are widely used. We design an energy-saving AP protocol and verify the protocol in NS-2. Based on compatibility with the original IEEE 802.11 protocol, we design three different sleep scheduling strategies in the energy-saving AP protocol. The protocols are tested in two scenarios with five different traffic types. Through comparison of the simulation results, the optimal sleep scheduling strategy GreenAP-3 is selected, which can adaptively adjust the sleep parameters according to the previous received traffic and achieve the best compromise between APs’ energy-saving benefits and the packet delay.