Expectation Maximization Based Power-Saving Method in Wi-Fi Direct

Wi-Fi Direct has been proposed with the purpose of enabling the connection between any two devices without requiring a wireless access point. Because of the limited battery capacity of mobile devices, it is important issue to provide an efficient energy consumption to the Wi-Fi Direct device. In order to reduce unnecessary energy consumed, Wi-Fi Direct standard defines two power-saving mechanisms: the opportunistic power-saving (OppPS) mode and notice of absence power-saving (NoAPS) mode. In this study, we propose a method to enhance the efficiency of the NoAPS mode for the transmission of multimedia video traffic. The proposed method dynamically determines the length of the awake interval long enough to guarantee the successful reception of the frame in clients with the given outage probability based on the pdf of the video frame size estimated. The shape and scale parameters of the pdf of the video frame size and the weights of all the mixture components are updated by the Expectation Maximization (EM) algorithm whenever a frame is transmitted. Furthermore, we suggest priority-based frame transmission strategy considering the inter-dependency between video frames to reduce the packet loss rate. Results show that the proposed method reduces the energy consumption and the transmission delay of Wi-Fi Direct devices compared to the existing NoAPS method.


I. INTRODUCTION
The wireless communication technologies such as ZigBee, Bluetooth, and Wi-Fi Direct, facilitate the mobile devices to transmit data or voice over a short distance without a wireless access point. Recently, growing demands for video streaming over Wi-Fi Direct are witnessed because video streaming becomes even more convenient with wide deployment of Wi-Fi Direct compliant mobile devices (e.g., such as latest smartphone models) [1]. Furthermore, as consumer demand increases for better video quality and improved streaming stability, Wi-Fi Direct is regarded as an excellent candidate for high-quality video transmission because it can support higher data rate and wider coverage compared to Bluetooth and ZigBee.
The associate editor coordinating the review of this manuscript and approving it for publication was Emrecan Demirors .
In general, video streaming requires a steady flow of information and delivery of packets by a deadline. However, when a large number of users access the network at the same time, the wireless radio networks may have difficulties to provide such a service reliably because of increasing demands for high quality video service and limited bandwidth [2]. For such systems to deliver the best end-to-end performance, it is required to jointly consider both the video frame structure and wireless resource allocation. Regarding the video frame structure, various kinds of video compression techniques have been widely developed in order to reduce its storage, transmitting capacity and redundancies in spatial and temporal directions because the transmission of uncompressed video would be extremely costly and impractical.
To improve energy efficiency of the MAC protocol, the IEEE 802.11n introduced the power management framework called the power-save multi-poll (PSMP) mode. In the PSMP mode, the access point (AP) sends the PSMP frames to STAs so as to schedule the subsequent transmission and selects the frames to be consecutively transmitted during the downlink phase. The STA only needs to wake up in its allocated PSMP downlink transmission time and PSMP uplink transmission time so as to receive and transmit the downlink and uplink frame, respectively. Then, it can enter to the doze mode during the transmission time of other STAs to save the energy consumption [3]. The IEEE 802.11ba uses a wake-up radio (WUR) to transmit the control information, which includes four major duty cycle parameters: 1) the duty cycle period, 2) the starting time of on period, 3) the length of the on period, and 4) the minimum wake-up duration. During the on period, the clients switch on the WUR to receive the WUR wake-up frame and then turn on the primary communication radio (PCR) to send back a respond frame to the AP. The authors in [4] discussed the coexistence technologies between the legacy Wi-Fi and the WUR Wi-Fi in IEEE 802.11ba group and evaluated the wake-up latency considering the WUR signaling procedure together with the different load from co-existing legacy Wi-Fi devices. The results showed that the duty cycle based on the operation mode consumes the less energy, but requires the low network load scenarios. In contrast, the delay for duty cycle mode drastically increases with the load of co-existing legacy Wi-Fi network, but decreases more energy consumption. The reference [5] investigated the approaches for the open issues of the IEEE 802.11ba protocol in order to provide the energy efficient data transmission and reduce the channel time consumption. The authors in [6] modeled the mathematical framework to set up the duration of and the period of the reserved time intervals that can guarantee the QoS requirements of the constant bit rate (CBR) and bursty variable bit rate (VBR) traffics. The major challenge in this study is the wasting channel time, which occurs when STAs reserve the channel time too long or have no data to transmit during the period of the reserved time interval. This article described the solutions through the combinations of input flows and transmission methods, from the simplest one with a CBR flow and the individual transmission to the most complicated one with a VBR flow and block transmission. In an IEEE 802.11aa/ax network, the APs are connected to a cloud controller [7]. They are required to measure the parameters of the transmitted video flow and also the channel quality. Then, the APs should report these kind of parameters to the cloud controller. Base on these parameters, the cloud controller can calculate how much channel time the AP needs to stream a particular video flow and which reservation parameters should be used, and then replies to the AP with the recommended parameter values. In this way, the authors in this article proposed an approach to dynamically change the reservation parameters in order to minimize the channel resource consumption while satisfying QoS requirements of real-time video transmissions. The Wi-Fi Direct supports a group connection, in which one device is selected as an access point (AP) called the group owner (GO), and the other devices act as clients called group members (GMs). Because of the high mobility it is important issue to provide an efficient energy consumption to the Wi-Fi Direct device. The Wi-Fi Direct defines two power-saving mechanisms for the GO: the opportunistic power-saving (OppPS) mode and notice of absence power-saving (NoAPS) mode [8]. Fig. 1 shows the OppPS and NoAPS mechanisms in Wi-Fi Direct. In the OppPS mode, the GO periodically sends a beacon traffic indication message (TIM) to the clients so as to provide the scheduling information. On the basis of this time reference, GO and its clients are simultaneously awakened in the section of the Client Traffic (CT) window to exchange data. Before ending the section of the CTWindow, the GO and the clients are still awakened if the data transmission is not completed, otherwise they enter to the sleep mode upon the end of CT Window. When the client has data to transfer to the GO, it sends a frame with the PM bit, which is set to 0 to the GO during CTWindow (PM = 0). The GO and client are forced to stay awake until the GO receives a PM bit, which is set to 1 (PM = 1) at the end of data transmission, and then they simultaneously enter to the sleep mode. On the other hand, in the NoAPS mode, GO sends to the clients the beacon so as to schedule the packet transmission time. The beacon message includes the scheduling information, such as the start time of the first absence, the number of absences per a beacon interval, and the lengths of a doze and an awake intervals. On the basis of this scheduling information, GO and its clients can remain simultaneously awake to transmit data and enter the sleep mode to decrease the energy consumption [9]. It is noted that the NoAPS method provides flexibility that the length of awake intervals can be dynamically adjusted according to the traffic load to reduce the unnecessary energy consumption and transmission delay. When applying power-saving mechanisms of Wi-Fi Direct to video streaming, the length of awake intervals should be long enough to transmit a whole frame to avoid the fraction loss. However, because of significant frame size differences in various frame types, there would be inconsistency in matching the awake interval and the frame size, which results in considerable amount of wasted energy or frame losses in clients. VOLUME 8, 2020 Researches for efficient power-saving mechanism under the Wi-Fi Direct have been widely conducted. The authors of [10] designed two algorithms: adaptive single present period (ASPP) and adaptive multiple present periods (AMPP). Both ASPP and AMPP allow a Wi-Fi Direct device to act as AP (e.g., a mobile phone) to access to an external network (e.g., a cellular network) and result in enhancing the power consumption efficiency of the AP. The authors of [11] proposed the audio-assisted Wi-Fi power-saving mechanism (A2PSM), which uses the audio interface as a parallel to the Wi-Fi interface so as to allow the client stations (STAs) to sleep as long as possible when there is no data to exchange. The result shows that the A2PSM can save more than 25% power consumption as compared to the static power-saving mode (SPSM). In [12], the authors proposed a dynamic power management (DPM) scheme-based wireless extension of the universal serial bus (WSB) application that can switch between the OppPS and NoAPS modes by acquiring the service information during the association and beacon intervals. It is shown that the proposed scheme increases the quality of service (QoS) and improves the energy efficiency. Other researches have been conducted to adjust the length of the awake/sleep interval according to the traffic load. In [13], the researchers proposed the traffic-aware parameter tuning scheme (TAPS) to adjust the length of the awake interval according to the traffic load with the purpose of reducing the energy consumption. The results showed that TAPS achieved 97% and 79% performance improvement in terms of the average energy efficiency as compared to the OppPS and NoAPS modes, respectively. In [14], the dynamic power management (DPS) scheme is defined, which utilizes the traffic pattern information of the data sender and tunes the duty cycle according to the increase in the sleep efficiency in order to decrease the number of and the length of the active windows. This proposed scheme reduces the end-toend transmission delay and achieves better energy efficiency than the traditional Wi-Fi Direct power-saving scheme.
As described above, the NoAPS method has the advantage of being able to flexibly determine the number and length of sleep intervals between beacon interval, thereby maximizing the power-saving effect. In particular, if traffic encoded by video codecs that support variable frame lengths such as H.264/AVC and MPEG is transmitted, the power-saving effect of the NoAPS method can be maximized. In this article, we find the optimized configuration of the NoAPS mode for the video streaming service in Wi-Fi Direct. For this purpose, we note that the video frames are constructed of the hierarchical group of picture (GoP) structure whose frame sizes make a lots of difference. Therefore, we suggest an algorithm that adjusts the length of awake interval in a beacon interval using the distribution of each video frame class to enhance the energy efficiency and reduce the transmission delay. We consider that a single awake interval is allotted to one video frame. To predict the distribution of each frame class, we use the EM algorithm to update the parameters of the frame size distribution, including the shape parameters, the scale parameters, and the weights of all the mixture components, which enables the on-line update of the distribution of the video frame sizes. Furthermore, we consider the inter-dependence between the video frames, and the frame transmission per frame class is prioritized to increase the success probability of a video frame with high priority and thus enhance the transmission efficiency.
The rest of this article is organized as follows: Section II describes the application of the EM algorithm for a gamma mixture model to analyze the video frame size distribution. Section III discusses the use of the EM algorithm to calculate the dynamic length of awake, analyzes the video traffic on the basis of the frame priority, and obtains the transmission delay and energy consumption. Section IV explains simulation runs for performance evaluation and compares the proposed method with the NoAPS mode. Section V concludes.

II. UPDATE OF FRAME SIZE DISTRIBUTION USING EM FOR GAMMA MIXTURE MODEL
A video codec supporting variable frame size usually categorizes the video frames by three types: Intra (I)-frame, Predictive (P)-frame, and Bi-directional (B)-frame. Video frames can be encoded in a sequence called a group of pictures (GoP) to reduce their spatial and temporal redundancies [10].
Hence, video frames are transmitted in the order of the GoP structure (e.g., I, B, B, P, B, B, . . . ), as illustrated in Fig. 2. I-frames are encoded as they are without any motion compensation, P-frames are encoded with reference to the previous I-frame and P-frame, and the encoding of B-frames refers to the previous and the following I-frame or P-frame [15]. The loss of an I-frame results in the loss of all the frames in a GoP, and the loss of a P-frame causes the loss of the following P-frames and B-frames, as illustrated in Subfigs. 2(b) and (c), respectively. In contrast, the loss of a B-frame does not affect the other frames, as shown in Fig. 2(d).
Considering the power-saving mode in Wi-Fi Direct, the number of awake intervals in a beacon interval is determined so that there exists one-to-one mapping relation between each awake interval and each video frame; i.e., a single awake interval is allotted to one video frame. The awake intervals for video frames are categorized according to frame class. We call the awake intervals assigned to I-frames, P-frames, and B-frames as the I-frame interval, P-frame interval, and B-frame interval, respectively.
In our work, GO determines the length of awake interval for next x-frame based on the distribution of the x-frame size which has been updated by previously received x-frames. The update of the distribution of the x-frame size is realized by the expectation-maximization (EM) algorithm for gamma mixture model (GMM), which is an iterative approach for finding the maximum-likelihood estimates of the parameters (e.g., the shape parameter, the scale parameter, and the weight parameter) so as to find the probabilistic model that best fits the observed data distribution. Let Z x = z i , 1 ≤ i ≤ N x , be a random variable denoting the x-frame size, where N x is total number of x-frames and x is one of I, P, or B. The frame size data are considered as samples from independent and identically distributed (i.i.d.) random variables (RVs). The GMM of x-frame sizes considers that these variables result from the contribution of N distribution, which is given by Here, θ x is a vector of the parameters of the GMM of the x-frame size (π x 1 , . . . , π x N , θ x 1 , . . . , θ x N ), θ x j represent the shape parameter (α x j ) and the scale parameter β x j , π x j for 1 ≤ j ≤ N , is the weight with N j=1 π x j = 1, and N is the number of mixture components. The pdf of Gamma distribution is defined as where (x) is the Euler gamma function defined as (x) = ∞ 0 τ x−1 exp(−τ )dτ , for x > 0. Then the joint distribution of x-frame sizes is given as The EM algorithm for GMM consists of two steps: E step and M step. In E step, we use this EM method to maximize the log-likelihood function with respect to the parameters (e.g., the weight parameter, the shape parameter, and the scale parameter) when the hidden discrete RVs (X = x i ) are introduced to the model. X i = j means the sample x i belongs to the distribution in class j. The expected value of the log-likelihood is defined as where L(·) is the log-likelihood function and θ (k) x is a vector of the parameters of GMM in the k-th iteration. In M step, the new estimate of the parameter θ (k+1) x is derived by maximizing the expected value of the log-likelihood function x , Z x ). In references [16] and [17], the new estimate of the parameters of GMM are obtained as where the Digamma function ψ(x) is defined as ψ(x) = (x)/ (x) and the responsibility of the distribution class j for explaining z i can be defined as . ( Algorithm 1 shows the operational procedure for the EM algorithm for GMM. It is noted that the optimal parameters of GMM are obtained when Algorithm 1 stops its iteration. Algorithm 1 EM Algorithm for GMM 1) Initialize the parameters of GMM of the x-frame sizes, such the weight π (0) x j , the shape parameter α (0) x j , and the scale parameter β (0) x j , and set the value of the error tolerance (ETOL).
2) E step. Evaluate the responsibility γ x i,j given in Eq. (8).

III. PROPOSED EM-BASED POWER-SAVING METHOD A. PROBABILISTIC AWAKE INTERVAL DISCUSSION BASED ON TARGET PROBABILITY
In this subsection, we explain the algorithm to determine the length of awake interval using the target probability. In our VOLUME 8, 2020 paper, the target probability means the probability that a frame can be wholly transmitted during the corresponding awake interval. For instance, if the target probability is set to 95% for I-frame, it implies that 95% of I-frames can be wholly transmitted during the corresponding I-frame intervals, and 5% of I-frames cannot be wholly transmitted during the corresponding I-frame interval, but the remaining part of I-frame is concatenated with next B1-frame. The target probability is set based on the mean and standard deviation of the frame size distribution. As explained in the section II, we use the EM algorithm for gamma distribution to estimate the parameters of the frame size distribution. Because the EM algorithm updates the parameters of the distribution at each iteration, the target probability and length of awake interval should be updated accordingly. The mean of x-frame size distribution at k-th iteration is given by The second moment of x-frame size is calculated by where (α + 2) = α(α + 1) (α) = ∞ 0 x α+1 exp(−x)dx. Hence, from (9) and (10), the variance of the x-frame size distribution is derived as Let T (k) x represent the length of the awake interval for the x-frame and S (k) x be the x-frame size that can be transmitted during T (k) x at k-th iteration. The proposed algorithm determines S (k) x as the function of the average and the standard deviation of the x-frame size distribution, which is given by where η denotes the scale factor to control the value of S (k) x . Then, the x-frame interval is calculated by B R is the bit rate [bit/s]. It is noted that when the x-frame size is greater than S (k) x , the whole x-frame cannot be transmitted during T (k) x , and there should therefore be packet segmentation or frame drop due to the short awake interval compared to the frame size. Hence, the target probability with which the x-frame can be wholly transmitted during T (k) x is given by where γ (α, is the incomplete gamma function.

B. PRIORITY-BASED FRAME TRANSMISSION STRATEGY
In this subsection, we focus on the frame transmission strategy in which the frame transmission per frame class is prioritized by considering the inter-dependence between the video frames in the GoP structure. Again, it is noted that the loss of I-frame results in the loss of following all frames in a GoP and the loss of P-frame influences the next P-and B-frames, but the loss of B-frame does not affect other frames. Thus, the transmission priority should be determined with the order of I-frame, P-frame, and B-frame. In our work, the method of dealing with the remaining fraction of the frame is different according to the priority of each frame. In case of I-frame with the highest priority, any remaining fraction of the I-frame (P-frame) is concatenated with the immediately following B1-frame (B3-frame) and transmitted along with the B1-frame (B-3 frame) during the B1-frame (B-3 frame) interval, in order to enhance the transmission success probability of the I-frame (P-frame), as seen in Fig. 3. From the above operational procedure, the size of the frame to be transferred during the B1-frame (B3-frame) interval becomes the sum of the sizes of the any remaining fraction of I-frame and B1-frame (B3-frame). Thus, to determine the length of the B1-frame interval, it is required not to use the B1-frame size distribution only, but to construct a new distribution function for concatenated frame size.

C. AWAKE INTERVAL DISCUSSION UNDER PRIORITY-BASED FRAME TRANSMISSION STRATEGY
As the priority-based frame transmission strategy is employed, the awake interval for B1-frame (B3-frame) should be updated considering the remaining fraction of I-frame (P-frame), if any. In this subsection, we derive the distribution of frame size for the sum of B1-frame (B3-frame) and the possible residual I-frame (P-frame), and explain the awake interval decision algorithm in a similar way to Subsection III-A. Let Z Y R be the random variable denoting the size of residual Y-frame that cannot be transmitted during Y-frame interval and Z Y represents the size of Y-frame where Y is the one of I or P. Z Y R is given by Here, Z Y R becomes a mixture of continuous and discrete random variable. The distribution of the residual Y-frame size is calculated as follows. If z < 0, we trivially have If z = 0, we have From (16)- (18), the pdf of Z Y R is derived as where δ(.) is the Dirac-Delta function. Let Z Y R B = Z Y R + Z B is the random variable presenting the size of the sum of the residual Y-frame and B-frame. Hence, the pdf of Z Y R B

becomes the convolution of pdf of Z Y R and pdf of Z B . f Z Y R B
is calculated by (20) where ν = 1/β (k) B j and 1 F 1 (α; β; z) is the degenerate hyper-geometric function. The detailed calculation is given in appendix. The average of residual Y-frame is calculated as where W λ,µ (z) is the Whittaker function. The second moment of residual Y-frame is calculated as From (9) and (21), the average of the sum of the residual Y-frame and B-frame is calculated as The closed form of σ 2 is obtained by combining (11), (21), and (22). Hence, the length of the awake interval for the sum of residual Y-frame and B-frame is calculated as where B R is the bit rate [bit/s].In Table 1, we summarize notations used in our analysis.

D. TRANSMISSION DELAY AND ENERGY CONSUMPTION
When the size of the x-frame is larger than S (k) x (η), the remaining Y-frame has to wait until the next B-frame. We define this waiting time as the transmission delay. Let T be the inter-frame interval of the GoP structure and M Y denote the total number of Y-frames. Then the delay time of the oversized Y-frame becomes T − T Y (η), and the number of Y-frames that cannot be wholly transmitted in the Y-frame interval is given by (1 − P Y )M Y . When Y = I or P, the average transmission delay of the I-and P-frames can be defined as where M IP = M I +M P is the total number of I-and P-frames. The probabilities P I and P P can be calculated using (14). The average energy consumption is defined as the sum of two different energies consumed during the awake interval and the sleep interval. Let E awake and E sleep be the average consumed energy during the awake interval and the sleep interval, respectively. E awake is calculated as where P sleep is the power consumption during the sleep interval. From (27) and (28), the average energy consumption per frame can be derived as where E switch represents the additional energy consumed to switch from the sleep mode to the awake mode.
In case of the existing NoAPS method, the lengths of the awake interval and the sleep interval are fixed. Let T NoA be the length of the awake interval in the NoAPS method; then, the sleep interval is T −T NoA . From (14), the probability that a Y-frame can be wholly transmitted in T NoA can be determined asP whereS NoA (η) = B R T NoA . From (26), the average transmission delay in the NoAPS is given by Finally, the energy consumption can be calculated as

IV. PERFORMANCE EVALUATION
For the performance evaluation, we decode two movies titled 'Amazing Mary Gifted' and 'Jurassic World (2015)' using the Elecard StreamEye Studio software, which is a video quality test software for analysis of the stream structure and inspection of code parameters [18]. Fig. 4 shows the snapshot of Elecard StreamEye Studio. The standard of these videos are MPEG-2, which requires the frame rate of 24fps to support 1920×1080 resolution [19]. It is noted that the frame rate of 24fps for a video sequence is equivalent to the inter-frame interval of 41.7ms. We assume the Wi-Fi Direct devices based on the 802.11ac standard that can achieve a high PHY data rate of 58.5Mbps using the channel bandwidth of 160MHz together with a BPSK modulation scheme and a code rate of 1/2 [20]. The numbers of I-, P-, and B-frames of the movies are summarized in Table 2. Regarding the network scenario, we considered the one-to-one direct communication between a GO and a client. The number of awake intervals in a beacon interval are set to be equal to  the number of frames in a GoP structure in order to satisfy the one-to-one mapping relation between each awake interval and each video frame. At the first beacon interval, the wake up ratio is set to 50%, which means that the awake interval length is the same to that of the sleep interval as in [12]. Then, GO uses the EM algorithm to predict the distribution of the frame sizes received and determine the length of the next awake interval to be used in the next beacon interval. In our simulation runs for the NoAPS method, we considered the one-to-one direct communication between a GO and a client as like the proposed algorithm. Therefore, the beacon interval is the same to the length of a GoP, and the number of awake intervals in a beacon interval is the number of frames in a GoP; i.e., a single awake interval is allotted to one video frame. However, the length of awake intervals of the existing NoAPS method are not variable but set to be fixed. The power consumption during the awake and sleep intervals are set to 432mW and 0.3mW, respectively [10]. The additional energy of 0.6mJ is used to switch from the sleep mode to the awake mode [22]. Fig. 5 compares the original distribution of I-frame size in 'Amazing Mary Gifted' with the distribution of I-frame obtained by the EM algorithm for GMM. The result shows that the estimated distribution by the EM algorithm approaches to the originally given distribution of the I-frame size (obtained by frames decoded by 'StreamEye') as the   number of online update increases. Figs. 6 and 7 show that the same argument is available for the cases of P-and B-frames.
Proposed algorithm combines the residual I(P)-frame with the immediately following B frame when the I(P)-frame could not be wholly transmitted in the I(P)-frame interval with length of T I (T P ) with the probability of P I (P P ). We reconstruct the pdf for the size of B-frame concatenated with residual I-frame with 1 − P I = 0.3 and compare the given pdf with updated pdf using the EM algorithm in Fig. 8. The result shows that the pdf obtained by the EM algorithm converges to the given pdf as discussed above. From Fig. 9,  we can verify that the same argument holds when B-frame is concatenated with residual P-frame. Fig. 10 shows the average delay per frame for two movies as a function of the scale factor η ranging from 0.4 to 1.7 with the granularity of 0.1. As the scale factor increases, the target probability increases, which leads to long awake intervals. Then the number of I-or P-frames whose residual frame to be transmitted together with the following B-frame decreases and the average delay decreases as a consequence. Table 4 shows that the mean and standard deviation of a frame size for 'Amazing Mary Gifted' is lower than that of 'Jurassic World (2015)'. Therefore, it results in that the length of awake interval (the average delay) for 'Amazing Mary Gifted' is shorter (longer) than that of 'Jurassic World (2015)' when the scale factor ranges from 0.4 to 0.9. Fig. 11 shows the energy consumption per frame of the proposed algorithm for two movies. From the results, it is verified that the energy consumption increases as scale factor  increases and awake interval get therefore longer. Because the length of awake interval for 'Jurassic World (2015)' is longer than that of 'Amazing Mary Gifted', it is very clear that the average energy consumption per frame of the proposed algorithm for 'Jurassic World (2015)' is always higher than that of 'Amazing Mary Gifted'. Fig. 12 plots the energy-delay trade-off curves in the energy-delay plane under both the proposed algorithm and the NoAPS method for ''Jurassic World (2015)'. A point on the curve of the proposed algorithm corresponds to the specific scale factor. A point on the curve of the NoAPS method corresponds to the length of awake interval. It is noted that the length of awake interval of the NoAPS method is set as ranging from 5.8ms to 9.8ms with the granularity of 0.4ms. In both methods, the energy consumption and the delay are inversely proportional to each other, which shows typical energy-delay trade-off relation. More importantly, it is clear that the trade-off performance of inner curve is better than that of outer curve. That is, both the energy consumption and the delay of inner curve are smaller than those of the outer curve. Because the outer curve obtained from the NoAPS method, and the inner curve is obtained from the proposed method, the result implies that the proposed method enhances the overall performance and shows better performance than the NoAPS method.

V. CONCLUSION
In this article, we suggested the power-saving algorithm which dynamically adjusts the length of awake intervals according to the frame sizes. For this purpose, we applied the EM algorithm for the gamma mixture model with four components to estimate the pdf of the frame sizes for I-, P-, and B-frames online. Based on this estimated pdf, the awake interval for x-frame is determined by using the target probability P x . Furthermore, the proposed algorithm concatenates the any residual I-or P-frame with the immediately following B-frame in order to provide high transmission success rate for the I-and P-frame which are highly prioritized due to mutual dependency in the GoP structure. Simulation results show that the estimated pdf via the EM algorithm converges to the inherent pdf of the frame size and the trade-off performance between the energy consumption and the delay of the proposed algorithm shows better results compared to that of the NoAPS method. However, the Wi-Fi Direct devices may need some time to discover each other and set up the security and IP configuration before they activate the power-saving protocol. Therefore, the total delay in Wi-Fi Direct should be caused by the discovery delay, the delay caused by the security setup and IP configuration, and the transmission delay in power-saving protocol. Therefore, as the future work, we plan to study the power-saving mode together considering delays caused by the discovery, the security setup, and IP configuration procedures. On the other hand, the performance of the energy-saving protocol is affected by the variation of the received SNR because the packet loss occurs when the received SNR falls below the certain SNR threshold. Therefore, the optimized power-saving algorithm in Wi-Fi Direct considering both traffic characteristics and channel environment such as received SNR would be our future work. In addition, we will also build a plan to study the power man-agement framework in Wi-Fi Direct with the consideration of the video transmission scheme as a future work.

APPENDIX
The pdf of Z Y R B , f Z Y R B , becomes the convolution of f Z Y R and f Z Y R as: .
We have Y (η). Thus, the pdf of Z Y R B is derived as: where ν = 1/β (k) B,j . We have Hence, from (14),