with the advent of wireless technology in hand - held devices , saving energy incurred due to wireless protocols is of prime importance . to design efficient power management policies for wireless adapters, it is often required to know the energy spent by wireless stations ( stas ) running different classes of applications . since users often use tcp based applications , in this paper we characterize the energy spent by stas while running tcp controlled data transfers .we focus only on the energy spent in radio communication , and we evaluate this by obtaining the fraction of times the sta radio stays in different states , i.e. , idle , transmit and receive .  in normal mode of operation , also called as the continuously active mode ( cam ) , an sta always keeps its radio on , so it can receive and transmit at any time .this mode of operation is energy inefficient since stas draw current even when they are idling . to save power during the period when there is less or no network activity ,wifi cards are provided with controls through which they can be turned off . to leverage this facility ,the ieee 802.11 standard has a feature using which stas can turn off their radio without losing packets .this is generally the power save mode ( psm ) . in this mode, an sta can be in any one of the two state , _ active state _ and _ sleep state_.  _ contribution : _ in this paper we analyze various scenarios in which several stations ( stas ) are associated with a single access point ( ap ) . in each scenarioeach sta is considered to be either in the psm or the cam and downloading files via the ap .the file server is considered to be located on the high speed ethernet link connected to the ap , which makes the propagation delay between the ap and server negligible .our aim is to model the energy spent for radio communication by the stas for the following two types of tcp traffic in either mode of operation of the sta :  * stas downloading long files over tcp in this scenario , the average rate of expenditure of energy is analyzed . to evaluate this, we obtain the fraction of times the radios of stas stay in different states , i.e. , idle , receive and transmit .* stas downloading short files over tcp in this scenario, we consider a constant number of users downloading short files over tcp . in between two downloads , a short period of inactivity or_ think time_. to analyze this scenario , a processor sharing ( ps ) model is used to model the download rates provided to the files by ieee 802.11 mac .the ps service rate is obtained from the analysis of long file downloads mentioned in the previous paragraph .this paper is organized as follows : section [ sec : related_work ] discusses the previous literature in the area of wlan energy modeling .section [ sec : psm_overview ] provides an overview of the psm and the queuing structure at the ap . in section [ sec : long_file ] , we analyze the scenario of tcp long transfers for both cam and psm . in section [ sec : short_files ] , we analyze short file transfers .finally , section [ sec : conclusion ] concludes the paper .anastasi et al .  consider a single sta in psm downloading a file over tcp in the presence of active stas .the authors evaluate the expected energy spent by the sta to download the file as a function of .this is indirectly obtained by evaluating the contention time required to send a ps - poll frame .while in our work , we do not consider active stas , instead they are considered to be downloading files over tcp .further , we have assumed more realistic psm protocol , which will be explained later .lei and nilsson  consider stas in psm carrying downlink traffic in which inter - arrival time between packets at the ap is exponentially distributed .they obtained average packet delay due to queueing and the psm protocol .they also obtain lower and upper bounds on the average percentage of time a sta stays in sleep state .baek and choi consider the same scenario as in  and evaluate the variance and exact expression for the average percentage of time a sta stays in sleep state .si et al . consider stas in psm mode , carrying downlink and uplink traffic .they describes the model , using which aggregate throughput and power consumption is obtained . we note that the models in  ,  and  assume poisson arrivals of packets into the ap or sta , and , hence , do not correctly model the traffic generated by the tcp controlled file downloads .they observed excessive contention among stas immediately after the transmission of beacon frame , if there are large number of stas in psm .it is because , stas start contending for ps - poll frame safter receiving beacon frame , if they have a data frame stored packet at the ap . to avoid excessive contention, authors suggested that the ap should not inform to all stas about the stored packets .this is also observed by us and can drastically reduce the performance of psm .however , in our case , we avoid excessive contention by setting the rule at the sta ; if the sta has already sent the ps - poll and is waiting for the packet , it will not generate another ps - poll before receiving the packet , even if beacon frame indicates that there are packets stored at the ap .  in all the above papers ,  ,  and  , authors consider psm protocol implementation which is not practical in the presence of download type background traffic .they consider the following sequence of frame exchanges : first the psm sta sends the ps - poll frame through contention , after sifs ap sends the data packet and after sifs again the sta sends the mac ack .so the ap does not contend to send data . in the presence of traffic from the ap to other stas ,when the ap receives the ps - poll frame , some packets might be already present in the nic queue of the ap , and these packets need to be sent first .we have analyzed the psm protocol in the presence of traffic from other stas , which is a more realistic scenario and so we have considered an implementation of the psm protocol in which the ap contends to send data to psm stas .hu et al . consider stas in an independent basic service set ( ibss ) and evaluate the throughput , delay and the loss rate of the energy characterization as a function of the traffic load , buffer size and other protocol specific parameters .our work is different from this as we focus on the stas in an infrastructure basic service set .krashinsky and balakrishnan  consider a single sta in psm doing very short file transfers ( order of tens of kbs ) .they observed that web transfers incur large delays , because of the interaction between tcp slow start , rtt and psm . to bound the delay ,the authors propose a bounded slow down ( bsd ) protocol in which a web page can experience a delay not more than a specified percentage ( ) of the actual normal delay ( without psm ) .bsd  is further improved upon by quiao and shin  .they estimates the rtt of current tcp connection and using this information , the sleep wake schedule is made more efficient .however , the scope of their work is limited to only one sta , while here , we analyze the effect of background traffic , which plays a dominant role in determining energy consumption and delay for a file transfer .anand et al . demonstrate the degradation of performance of latency sensitive application like nfs and audio streaming for a sta in psm . to prevent this degradation, they proposed a self - tuning power management ( stpm ) algorithm which accepts inputs from applications .on the basis of the inputs , the algorithm evaluates expected energy and delay incurred in both the modes ( cam and psm ) , using which it decides to operate in a particular mode .our work can complement this by quantifying the exact value of the energy that is consumed while a tcp application is running , so it can help to devise better power management policies .yong et al . propose a way to minimize energy and delay by scheduling and informing the schedule to stas through beacon frames .the authors show that scheduled psm improves the performance in terms of energy as it reduces the idle times in the presence of background traffic .tan et al . propose to take advantage of throttling done by the tcp server in media streaming applications .throttling means that the server sends data at rate less than the end to end available bandwidth .they use tcp receiver advertised window to shape traffic in the form of periodic bursts .so instead of downloading packets over larger duration , an sta completes the download in lesser duration , which saves energy .however if the wlan is the bottleneck link then it is difficult to achieve to achieve this gain .zanella and pellegrini et al . and wang et al . consider saturated stas in cam mode and analyze the energy spent by them in radio communication .while in our paper , stas are not considered to be saturated , but they are considered to be downloading files over tcp .baiamonte et al . propose to make use of nav set in rts and cts , using which the non intended receiver can switch to low power state during the upcoming transmission .it requires that switching delay to low power state should be less than the transmission time of the data packet .our model also accounts for the time during which an sta listens to the traffic for other stas .there are some situations which are not specified in the protocol but are implementation dependent .such situations and the assumed behaviors of an sta and the ap are described here . after sending a ps - poll, the sta marks its state as _ waiting for unicast_. if before the sta receives the unicast packet , the ap transmits a beacon frame and it indicates that there are packets at the ap for this sta , then this sta will not generate another ps - poll frame . but this may result in a deadlock when the packet that it is waiting for is lost , because then the sta will continue to be awake and will not send another ps - poll . to prevent this situation ,a timer is started when the sta sends the ps - poll , and if the sta does not receive a packet before timer expiry , it goes to the sleep state . subsequently in the next beacon interval , if the sta gets an indication , then it will send a ps - poll to retrieve the packet from the ap .further , if the beacon frames arrives at the sta when it is contending for ps - poll , then it ignores the beacon frame , because the sta already knows that there is a packet at the ap for it .in this section we state the assumptions common to all the scenarios we have analyzed . we consider a single cell 802.11 wlan with stas associated with a single ap .the stas and the ap contend for the channel via the dcf mechanism .we consider various scenarios in which either all the stas are in cam or all in psm . here, we consider only tcp controlled download traffic , which means that the ap sends data packets to stas , while stas send tcp acks .we assume that the rts / cts mechanism is used by the ap to send data packets , while the basic access scheme is used by the stas to send tcp acks .the following are our modeling assumptions :  * in all the scenarios , at any instant , an sta has at most a single tcp connection . *the application at the sta is such that flow control is never required and the advertised tcp window is always . * the receiversdo not implement the _ delayed tcp ack _strategy , i.e. , every received packet generates a tcp ack . *the file server is assumed to be connected to the ap by a high speed lan , which implies that the propagation delay between the ap and the tcp server can be neglected . *the buffers are large enough so that there is no loss of packets due to buffer overflow at the ap or stas .* there are no packet losses due to the bit errors on the the wireless medium .also , there are no packet drops due to the excessive collisions in the medium .the analysis can be extended to include packet loss due to bit errors ; further for tcp controlled transfers the collision probability is indeed so low that the packets are rarely dropped at the mac layer due to excessive collisions .* we also assume that when there are active stas , then these stas and the ap attempt in any slot with probability , where is long term attempt rate and is obtained via saturation analysis in .in this section , we consider stas associated with the ap , with each one downloading a single large file over tcp .we consider two scenarios : 1 ) stas in cam , 2 ) stas in psm . for both the scenarios , we obtain expressions for throughput and average current drawn as a function of the number of stas .let be the total number of acks stored in all the stas at any instant , be the number of data packets stored at ap at .since the rtt between the ap and the server is negligible , so a data packet arrives immediately after the arrival of the tcp ack at the ap . by assumption, is the tcp window advertised by the receiver , so at any instant , . which implies it is sufficient to keep track of either or . in the model, we assume that tcp acks are uniformly distributed among stas , which is quite a valid assumption as there is no preference given to any sta . the model here we use is the simplified version of the model described in , in which the authors consider both upload and download traffic , to evaluate the aggregate throughput . in the next section ,we develop a new model for calculating energy expenditure rates .let us call the instants just after successful transmission of a packet on the medium , as the _ success instants _ , and denote the success instant as .let the value of at instant be . since , we are approximating ieee 802.11 mac by -persistent model , in which every wireless entity attempts independently in every slot with probability , where is the number of active entities .because of it , given the state of at , the future evolution of the process is independent of the past . under the above assumptions , forms a markov renewal sequence , and process forms a markov regenerative process .the dtmc of the process is shown in the figure [ fig : markovchain_exact ] .a transition from state to represents the success of the ap and a transition from state to represents success of some sta .since the backoff parameters of all the stas and the ap are same , if , then at the next _ success instant _ the ap wins the contention with probability and one of the sta wins with the probability .consider the process and define as the length of the cycle .let the number of successful attempts by the ap in the cycle be denoted by ; can be either or .let denote the number of successful attempts made by the ap in .then by markov regenerative analysis  , the following can be written : } \end{split}\end{aligned}\ ] ] where , is the stationary probability of stas contending in a cycle and  ] is given in appendix [ appendix : mean_cycle_length_long_cam ] .in this section , expressions for the average current drawn by an sta is evaluated . for this, we obtain the fraction of time any sta spends in different communication states .we define the following possible states :  * transmitting state ( tx ) : in this state , the sta is transmitting . *receiving state ( rx ) : in this state , the sta is receiving .however , there could be two substates corresponding to this state . ** receiving decode state ( rxd ) : in this state , the sta is receiving as well as decoding . ** receiving listen state ( rxls ) : in this state , the sta is receiving but not decoding the data .this state is possible because of channel reservation by rts - cts mechanism .if the channel is reserved for two nodes , than any other node will know the length of the reservation from the `` duration '' field in the rts and cts ; so this other node will listen to the ongoing transfer and can choose not to decode the corresponding packets .this can result in less consumption of power than in the receive decode state  . *idle state ( i d ) - in this state , the channel is idle ; no node is transmitting .* sleep state ( sl ) - in this state , sta is in sleep state and draws a very small current .let us denote the above states as , , , , .let us denote as the current drawn by an sta while it is in state .let us define as the total charge drawn by sta in the time interval ( ) , then the average current ( ) drawn by stas can be written as follows : let us define the following indicator functions for an sta : now , writing in terms of the above indicator functions : by substituting , eqn .[ eqn : long_file_q_k_t ] in eqn .[ eqn : avg_curr],and then rearranging it , we get the following equation for average current : where , as the fraction of time an sta spends in state .the finite sum and the limit can be exchanged so the above rearrangement is valid .our aim is to evaluate : where , then by markov regenerative analysis  , one can show the following , }{\sum_{k=0}^{nw_{max } } \pi_k e_k[t ] } \\ \end{split}\end{aligned}\ ] ] the detailed expression for  ] in appendix [ appendix : fracs_times_cam_long ] .in this section , we consider stas in psm , downloading large files over tcp . in this scenario, ap will always contend for the channel , since for every two packets ( tcp ack + ps - poll ) sent by each of the stas , packets need to be transmitted by the ap . since, no preference is given either to the ap or to the sta , the above situation is possible , only if small number of stas contend at any time , so that of the packets are transmitted by the stas and of them are transmitted by the ap . since , we are assuming negligible rtt between the ap and server , so at any time , most of the packets of the tcp windows of the stas are present at the ap . because of this the `` more '' bit is always set in every data packet sent; so the stas never go to sleep . on receiving a packet , the sta has to send a ps - poll frame and a tcp ack .since the ps - poll is a mac level packet , it is enqueued at the hol position in the transmission queue of the sta and the tcp ack at the end of the queue .if the transmission queue of the sta is empty when it receives the data packet , then immediately after the reception , its transmission queue will contain two packets , ps - poll at the hol position and tcp - ack behind the ps - poll .after sta sends a ps - poll it starts contending for tcp - ack .if the sta queue is nonempty ( it implies that the sta is contending for tcp ack ) when it receives the data packet , then the sta will first transmit the ps - poll . to transmit the ps - poll , the sta will not sample the new backoff , but uses the residual backoff of the tcp ack for which it was already contending when it received the data packet .it is not possible that sta receives the data packet when it is contending for ps - poll , because it is only after the ps - poll is sent a data packet arrives at the sta . when the ap receives a ps - poll packet from the sta , then a data packet corresponding to this sta is brought into the nic or transmission queue of the ap. there might be some packets already in the transmission queue of the ap ( the probability of this increases with ) , due to which this packet will be transmitted only after the packets preceding it are transmitted . during the time when the ap transmits these preceding packets , with high probability , the sta will transmit the tcp ack ; as a result the ap always sends a data packet to an sta that has an empty transmission queue .since no preference is given to the ap and the ap sends a single packet per ps - poll , the transmission queue of the ap will build up for large value of .the following can be inferred on the basis of the above discussion : 1 ) a packet successfully transmitted by the ap goes to an empty sta and the total number of contending stas increases by one ; 2 ) there are some stas that are contending to send ps - polls and some are contending to send tcp - acks ; 3 ) when a sta successfully transmits a ps - poll , the number of stas contending for tcp - ack increases by one ; 4 ) when a sta successfully transmits a tcp ack , the number of stas contending decreases by one .consider the process of the number of stas with a ps - poll at the hol position and tcp ack behind it , and the process of the number of stas with only a tcp ack .consider the joint process , embed it at the ends of success instants .let us denote the instant when the successful transmission ends .let us denote as the value of the process at .define . using the same arguments of -persistent approximation , as stated earlier in the section [ sec : long_files_cam ] , forms a markov renewal sequence , and the process forms a markov regenerative process .the transition probabilities of the markov chain of depend on the number of active stas , and are shown in fig .[ fig:2_d_markov ] . in fig .[ fig:2_d_markov ] , the axis represents the process and the axis represents process , and the state space is given by .the transition probabilities are obtained using the fact that all nodes ( wireless entities in wlan ) have equal chance to transmit ; so the transition probability from to , which corresponds a successful transmission by the ap , is given by .other transition probabilities are also obtained in the same way .let the number of successful attempts by the ap in the cycle be denoted by ; it could be either 1 or 0 .let denote the number of successful attempts made by the ap in .by markov regenerative analysis  the following can be written , } \end{split}\end{aligned}\ ] ] is the stationary probability of the process .+  ] is given in appendix [ appendix : mean_cycle_length_long_psm_n1 ] .equations [ eqn : avg_curr] [ eqn : long_file_s ] remain valid for this scenario also .the expression for various fractions is given by the following equation : }{\sum_{i=0}^{n}\sum_{j=0}^{n } \pi_{i , j } e_{i , j}[t ] }  \end{split}\end{aligned}\ ] ] the detailed expression for  ] in appendix [ appendix : fracs_times_psm_long ] .model for one sta psm downloading large file ( ) is shown in appendix [ appendix : avg_current_psm_n1 ] .+   +   simulation results are obtained using ns-2.33 and the various parameters used are taken from the 802.11b standard ( given in table [ tab : param ] ) .data rate is taken as mbps to transmit control frames . to transmit data frames and mac header ,data rate is taken as , , mbps .the tcp packet size is taken as 1500b and the rts threshold taken as 300b , which means that the tcp ack is sent through basic access and the data packet is sent by rts / cts scheme .the values of current in different states of radio is taken from the specifications of the intel pro / wireless 2011 card  .comparison of the throughput obtained in cam and psm is shown in fig .[ fig : throughput_long_tcp_cam_psm ] .it can be seen that the aggregate throughput obtained by the stas in psm is less than that in cam .the reason for this is the overhead of extra ps - poll in case of psm .throughput in cam is obtained using the model developed in section [ sec : long_files_cam ] , and its analysis is shown in .figures [ fig : fracs_eff_cam_long ] and [ fig : fracs_eff_psm_long ] shows the comparison of analytical and simulation results for fraction of times , average current and efficiency .efficiency is obtained by dividing the throughput ( in mbps ) by average current ( in ma ) , which is equivalent to data downloaded ( in mb ) per coulomb of charge drawn by an sta .figures [ fig : frac_long_tcp_cam_id ] and [ fig : frac_long_tcp_psm_id ] shows the fraction of time an sta remains in the idle state for cam and psm respectively .it remains constant with number of stas increasing .the time for which the channel remains in the idle state per data packet transmitted can be divided into three parts ; 1 ) time spent in backoff , this depends on the number of stas contending , 2 ) inter frame time , sifs and difs , this remains constant , 3 ) time spent in idling during collision , eifs , this depends on the number of nodes contending . the throughput and the number of contending nodes do not change with number of stas .so the time spent in decrementing backoff counter and the number of collisions per data packet transmitted also do not change . the interframe time, difs and sifs , is constant for a data frame .it can be inferred that a data packet is associated with a constant idle time , irrespective of the number of stas .since the transmission and receive times of frames depend only on the data rate , so the fraction of time an sta stays in idle state remains constant .  the throughput share of a singe sta decreases , as number of stas increases .it implies that number of stas increases , an sta spends more time in receiving data frames for other stas .the stas stays in receive & listen state ( rxls ) state while it is receiving the data frames for other stas .so the fraction of time an sta stays in rxls state increases ( figs .[ fig : frac_long_tcp_cam_ls ] and [ fig : frac_long_tcp_psm_ls ] ) with increasing number of stas .also , because of this reason , the fraction of time any sta remains in receive & decode ( figs .[ fig : frac_long_tcp_cam_tx ] and [ fig : frac_long_tcp_psm_tx ] ) and transmitting state decreases ( figs .[ fig : frac_long_tcp_cam_rxd ] and [ fig : frac_long_tcp_psm_rxd ] ) with increasing number of stas .an sta transmits following frames per data frame it receives : cts , mac ack and tcp ack .being control frames , cts , mac ack are transmitted at mbps , so the transmission time of cts and mac ack does not change with data rates .also , the transmission time of tcp ack does not vary much with changing data rates because of its size ( bytes ) . as the data rate increases , the throughout also increases , which implies that if we consider a time interval then with increasing data rates we can pack more data packets in it .when , number of transmissions of data frame increases , then number of transmissions of aforementioned frames also increases . since the transmission time of these frames does not change with data rate , so the total transmission time increases , which lead to increase in the fraction of time an sta stays in transmission state with increasing data rate ( figs .[ fig : frac_long_tcp_cam_tx ] and [ fig : frac_long_tcp_psm_tx ] ) .recalling , a data frame is associated with constant idle time . as data rate increases , in a given time interval , number of data packets transmitted also increases .so with increasing data rate the idle duration in the time interval increases , hence the fraction of time , an sta spends in idle state increases ( figs .[ fig : frac_long_tcp_cam_id ] and [ fig : frac_long_tcp_psm_id ] ) .  since the fraction of time an sta stays in idle and transmission state increases , so the fraction of time during which the sta stays in receive state ( rxls + rxd ) decreases with increasing data rate .it could be obtained by adding the values shown by figs .[ fig : frac_long_tcp_cam_ls ] and [ fig : frac_long_tcp_cam_rxd ] for cam and figs .[ fig : frac_long_tcp_psm_ls ] and [ fig : frac_long_tcp_psm_rxd ] for psm .with the number of stas increasing , the fraction of time an sta spends in transmitting state decreases and transmit current is more than the idle and receive current ( tab .[ tab : param ] ) , so with number of stas increasing , the average current decreases ( fig .[ fig : avg_curr_long_tcp_cam ] for cam and fig .[ fig : avg_curr_long_tcp_psm ] for psm ) and converges to idle current for large number of stas .since the throughput of a single sta decreases as and the average current converges to a constant value , so the efficiency as defined above decreases as .on comparing fig .[ fig : eff_long_tcp_psm ] and fig .[ fig : eff_long_tcp_cam ] it is clear that for the long file transfer case , cam has higher efficiency than psm , it is because of the overhead of ps - poll in case of psm .parameter & value & parameter & value + eifs time &  & rts size & 20 bytes + sifs time & 10 & ps - poll size & 20 bytes + difs time & 50 & cts size & 14 bytes + system slot time & 20 & mac ack size & 14 bytes + plcp header time &  & ip header & 20 bytes + phy header time &  & tcp data size & bytes + mac header size & bytes & tcp header size & 20 bytes +  , & ma & & 300 ma + & 10 ma & & +  [ tab : param ]short file downloads and _ think times _ between downloads is the typical behavior of a user browsing the internet .we assume that all the files are part of a single tcp connection , which means that the tcp connection is established for the first file while for rest of the files , the same connection is used . for every file , an http request packet is sent by stas to initiate the transmission  .  with the number of stas increasing , the aggregate throughput of the ap does not change , as observed in the previous section , and this throughputis equally shared by all the stas .thus , the ap can be modeled as a processor sharing ( ps ) server and the think time can be modeled as the time spent at a server .this is analogous to the closed queueing network model in which there is a constant number of customers alternating between the processor sharing server ( ap ) and at a server as shown in fig .[ fig : ps_server ] .think time is considered to be exponentially distributed with mean and file size distribution is taken as exponentially distributed with mean .so the service time of a single file being downloaded alone is exponentially distributed with mean , where is the aggregate throughput by stas downloading large files , as obtained in the previous section . for this scenario , we are interested in obtaining out two metrics :  * average charge (  ] ) it is defined as the , total time taken by all the files downloaded in a given interval divided by the total number of files downloaded in the the same interval . here , the time taken to download a files is taken as the time difference between the instant the sta starts contending for the http request packet and the instant it receives the last packet of the file .   if is the number of ongoing short files transfers at , then the number of stas in the think state at will be . is a ctmc , because service time and think times are exponentially distributed .[ fig : ratetransition ] shows the transition rate diagram of .define ( derived in section [ sec : long_files_cam ] ) as the average current drawn by stas when they are downloading long files and let be the average current drawn by a sta listening ( not doing any activity ) to the traffic of stas downloading long files ( derived in appendix [ appendix : passive_current ] ) .let be the indicator function indicating stas active at any instant .let be the total charge drawn , and be the number of downloads completed by sta in time interval ( , ) .our aim is to evaluate the average charge drawn by stas per file , which is given by the following equation : =\lim_{t \to \infty } \frac{\sum_{j=1}^n q_j(t)}{\sum_{j=1}^n n_j(t ) } = \lim_{t \to \infty } \frac{\frac{\sum_{j=1}^n q_j(t)}{t}}{\frac{\sum_{j=1}^n n_j(t)}{t } } \label{eqn : cam_short_charge0 } \ ] ] note that if the limit ( at ) in the numerator and the denominator exist then these are , respectively , the rate of consumption of charge in all the stas , and the total rate of transfer of short files ( over all the stas ) . now , if there are exactly stas active and downloading throughout the interval and in think state during that duration. then the following expression gives the total charge drawn by all the stas in the time interval {\{x(t)=k\ } } dt \label{eqn : avg_chrg_cam_shrt}\end{aligned}\ ] ] on summing the above expression over all , we get the sum of all the charge drawn by all the stas , in the time interval to . after summing the above expression and then substituting it in the eqn .[ eqn : cam_short_charge0 ] , we get the following equation :  & = \lim_{t \to \infty } \frac{\frac{1}{t}\sum_{k=0}^n\int_0^t [ kj_{k , a } + ( n - k)j_{k , p } ] i_{\{x(t)=k\ } } dt}{\frac{\sum_{j=0}^n n_j(t)}{t } } \\ & = \frac{\sum_{k=0}^n \pi_k [ kj_{k , a } + ( n - k)j_{k , p } ] } { \sum_{k=0}^{n}\pi_k(n - k)\lambda}\\ \end{split } \label{eqn : cam_short_charge2}\end{aligned}\ ] ] where , is the stationary probability of stas downloading files and stas in think state .similarly , the expression for expected sojourn time can be written as follows : = \frac{\sum_{k=0}^n k \pi_k}{\sum_{k=0}^{n}\pi_k(n - k)\lambda } \ ] ]   in this scenario , stas are in psm , so when the user is in the think state , the sta goes to sleep state .when the user requests a file , the sta wakes up and sends a http request packet and then again goes back to sleep .since we are assuming the server to be local to the lan , so the packets from the server in response to the request , arrives immediately at the ap .this information is sent to the sta in the next beacon frame .this means that the sta starts getting service at the beginning of the next beacon interval .after this the sta is assumed to remain in awake state until the whole file is downloaded .the interaction between the tcp slow start and the psm  , can be ignored in our case .it is a reasonable approximation because , rtt between the ap and the tcp server is negligible in our case , so the data packet arrive immediately in response to the tcp ack , due to this the sta does not got to sleep state .further , here we consider the file downloads in the presence of download type traffic to other stas , this decreases the net throughput to a single sta .hence , sojourn time of the file increases , so the time spent in slow start becomes less dominant .let denote the number of stas in the download state at time , and , the value of embedded at the beacon instants . since the file sizes and think times are taken to be exponentially distributed , so the process is a dtmc .the transitions of the markov chain are governed by the number of files completing transfer and the number of users completing their think times in the beacon interval .to make the calculation of transition probabilities simple , we assume that the users who complete their downloads starts their think times from the next beacon interval , so that the number of users that complete their think times in a beacon interval do not depend on the number of users who complete their transfers in the same beacon interval . this assumption is justified since the beacon interval is generally ms and the think time is generally of the order of seconds , hence the probability of a user completing its think time within one beacon interval is very small .let be the total number of stas associated with the ap , and the duration of beacon interval .since we assume that the think times of stas are exponentially distributed with mean , so the probability that user finishes his think time within interval of is .if there are customers downloading files at the start of a beacon interval , then users are in think state , then the probability that users finish their think times within the beacon interval is .let be the probability that users complete their downloads out of active users within the time interval of .this probability depends on the mean file length ; we have assumed the files to be exponentially distributed with mean , where is the throughput obtained in the previous section for the large file download case .let us denote as the probability that there will be users downloading file at , given that there were users downloading files at .the transition probability ( ) of can be written as follows : where , is given by the following equation :    using little s theorem , following expression can be written for expected sojourn time : =  \frac{\sum_{k=0}^{n } k \pi_k } { \lim_{t \to \infty } \frac{1}{t } \sum_{j=1}^{n } n_j(t ) } \label{eqn : eq_s_3 } \end{split}\end{aligned}\ ] ] where , is the number of downloads completed by the user in , is the stationary probability of the above expression only accounts for the time for which the sta stays in active state .it does not accounts for the time duration between the instant it sends the http request and the next beacon instant .the expected value of this duration is . by the definition , this durationis also included in the sojourn time .so the total sojourn time of the file is the sum of the above expression ( eqn .[ eqn : eq_s_3 ] ) and .   in this scenario , stas download a file and then go in think state . during think time stasstay in sleep state except when they wake up to listen to the beacon frames . as the beacon frame is sent by contention so sta has to be awake for a some duration to be able to listen to it .lets call this duration as .the mean number of times stas come to active state during think time is equal to the expected think time divided by the beacon interval ( ) . mean total duration for which stas stays in active state during think time is .using the equations [ eqn : cam_short_charge0 ]  [ eqn : cam_short_charge2 ] , and taking the current drawn by the stas in think state as , following equation for the expected charge drawn per file can be written : = & \frac{\sum_{k=0}^{n } [ k j_k + ( n - k)j_{sl } ] \pi_k } { \lim_{t \to \infty } \frac{1}{t } \sum_{j=1}^{n } n_j(t ) } \\&+ j_{id}t_{lb}\left(\frac{1}{b\mu}\right ) - j_{sl}\left[\frac{1}{\lambda } -\left(\frac{1}{b\mu}\right ) \right ] \end{split } \label{eqn : eq_f_3}\end{aligned}\ ] ] where , is the average current drawn by the stas , which are downloading files .it is to be noted that we have not modeled long files transfer in psm scenario for , so to evauate to , we just extended the model of psm for . is given by following expression :  }{b } \\ & = \frac{\sum_{k=0}^{n } u_k \left [ \sum_{l=1}^{n - k}l p^{(a)}(l , k)\right]}{b }  \end{split}\ ] ]  here , + is the stationary probability of the markov chain for the transition probabilities given in the eqn .[ eqn : transition_prob ] .+ is the probability of arrivals in time interval when there are customers in service and it is given by following expression      is calculated by using theory of mrgp }{\sum_{j=0}^{n}u_j b}\\ \end{split}\ ] ]  ] is given in appendix [ section : appendix_expec_ekj ]simulation results are obtained using ns-2.33 and the other parameters are same as stated earlier in section [ sec : sim_res_long_files ] . to generate http traffic in ns, we used packmime  .the file size is taken to be exponentially distributed with mean , and the think is taken to be exponentially distributed with mean .the beacon interval is taken as and the time duration for which the sta come in cam , to listen to beacon frame is taken as .figures [ fig : soj_time_short_tcp_cam_all ] and [ fig : soj_time_short_tcp_psm_all ] shows the comparison of sojourn time obtained using analysis and simulation , for psm and cam .it can be seen that the delay incurred in downloading file for cam is slightly lesser than in psm .this is due to lesser throughput achieved in psm than in cam .figures [ fig : transac_cam_all ] and [ fig : transac_psm_all ] give the comparison of the simulation and the analytical values of the number of downloads that can be completed in a given battery capacity . here , the battery capacity is taken in the form of maximum charge that can drawn from it .so the number of files that can be completed in a given battery capacity is obtained by dividing the battery capacity ( ) by the expected charge drawn in downloading a file .it is clear from fig .[ fig : transac_cam_all ] and fig .[ fig : transac_psm_all ] that static psm is more efficient than cam .the reason behind this is that , the psm sta goes to sleep state when it is not downloading anything ; which is not the case with cam .the psm will even perform more better if the think time between the downloads increases , since then the cam will be wasting more energy during idling .further improvement in the psm is possible by increasing the beacon interval , so that the sta does not have to wake up at every beacon instant , but it will increase the delay . it is to be noted , that with the number of stas increasing the number of file downloads that can be completed in a given battery capacity decreases , because in this case while downloading its own file sta has to overhear the frame destined to other stas also . figs .[ fig : stat_prob_cam_n8_all ] and [ fig : stat_prob_psm_n8_all ] shows the stationary probability of station receiving service , when there are total of stas associated with the ap .it is clear from the figures that there is considerable probability of more than one sta being active .our future work will be focussing on this problem of decreasing efficiency with increasing number of stas associated with the ap .in this paper , our contribution is two fold ; firstly , we have modeled the energy consumption of tcp controlled large file transfers in cam and in psm , in the presence of download type tcp background traffic , which have been absent in the literature . secondly , we modeled the energy consumption of tcp controlled short file transfers when all the stas are in cam and in psm .we have seen that our analytical results matches quite well with that of the simulation results , which shows the correctness of our analysis .we have also shown that the psm performs better than the cam when the user remains inactive for some time in between the activity . however, if there is no inactivity then the performance of the psm starts to degrade and performs worse than the cam , as evident from the large file download case . in the future work, we will study the performance of psm sta downloading short files , in the presence of cam stas carrying similar traffic .further , we will study adaptive psm which will have features of both cam and psm ; it does not have the extra overhead of ps - poll and also can go to sleep state if user is not active for a certain time .  1 `` the network simulator ns2 . '' , http://www.isi.edu / nsnam / ns/. r. litjens , f. roijers , j. van den berg , r. boucherie , and m. fleuren , `` performance analysis of wireless lans : an integrated packet / flow level approach , '' enschede , 2003 , imported from memoranda .d. miorandi , a. a. kherani , and e. altman , `` a queueing model for http traffic over ieee 802.11 wlans , '' _ computer networks _ , vol .50 , no . 1 , pp . 6379 , 2006 .g. anastasi , m. conti , e. gregori and a. passarella , `` saving energy in wi - fi hotspots through 802.11 psm : an analytical model , '' in _2nd workshop on modeling and optimization in mobile , ad hoc and wireless networks ( wiopt04 ) _ , march , 2004 , pp .. h. lei and a. a. nilsson , `` an m / g/1 queue with bulk service model for power management in wireless lans , '' in _ pe - wasun 05 : proceedings of the 2nd acm international workshop on performance evaluation of wireless ad hoc , sensor , and ubiquitous networks_.1em plus 0.5em minus 0.4emnew york , ny , usa : acm , 2005 , pp .s. baek , b. d. choi , `` performance analysis of power save mode in ieee 802.11 infrastructure wireless local area network , '' _ journal of industrial and management optimization ( jimo ) _ , vol . 5 , no . 3 , pp . 481492 , august , 2009 .si , h. ji , f. r. yu , g. yue , ` ieee 802.11 dcf psm model and a novel downlink access scheme,' in _ wireless communications and networking conference , 2008 .wcnc 2008 ., march 31 2008-april 3 2008 , pp . 13971401 .r. zheng , j. c , c. hou , and l. sha , `` a microscopic study of power management in ieee 802.11 wireless networks , '' _ int ._ , vol . 1 , no . 3/4 , pp .165178 , 2006 .r. krashinsky , h. balakrishnan , `` minimizing energy for wireless web access with bounded slowdown , '' _ wirel ._ , vol . 11 , no . 1 - 2 , pp . 135148 , 2005 .d. qiao , kang g. shin , `` smart power - saving mode for ieee 802.11 wireless lans , '' in _infocom 2005 .24th annual joint conference of the ieee computer and communications societies .proceedings ieee _, 2005 , pp .73 1583 vol .m. anand , e. b. nightingale , j. flinn , `` self - tuning wireless network power management , '' in _mobicom 03 : proceedings of the 9th annual international conference on mobile computing and networking_.1em plus 0.5em minus 0.4emnew york , ny , usa : acm , 2003 , pp .h. yong , r. yuan , x. ma , j. li , c. wang , `` scheduled psm for minimizing energy in wireless lans , '' in _ icnp 2007 ._ , 16 - 19 oct .2007 , pp .e. tan , l. guo , s. chen , x. zhang , `` psm - throttling : minimizing energy consumption for bulk data communications in wlans , '' in _ icnp 2007 ._ , 16 - 19 oct .2007 , pp . 123132 .a. zanella , f. d .pellegrini , `` mathematical analysis of ieee 802.11 energy efficiency , '' in _ proc .the 7th international symposium on wireless personal multimedia communications(wpmc2004 ) _ ,1215 september 2004 , pp .x. wang , j. yin , d. p. agrawal , `` analysis and optimization of the energy efficiency in the 802.11 dcf , '' _ mob ._ , vol . 11 , no . 2 ,279286 , 2006 .v. baiamonte , c .- f .chiasserini , `` saving energy during channel contention in 802.11 wlans , '' _ mob ._ , vol . 11 , no . 2 , pp .287296 , 2006 .a , kumar , e. altman , d. miorandi , m. goyal , `` new insights from a fixed - point analysis of single cell ieee 802.11 wlans , '' in _ ieee infocom 05 _ , march , 2005 , pp .r. bruno , m. conti , and e. gregori , `` performance modelling and measurements of tcp transfer throughput in 802.11-based wlan , '' in _mswim 06 : proceedings of the 9th acm international symposium on modeling analysis and simulation of wireless and mobile systems_.1em plus 0.5em minus 0.4emnew york , ny , usa : acm , 2006 , pp .g. kuriakose , s. harsha , a. kumar , v. sharma , `` analytical models for capacity estimation of ieee 802.11 wlans using dcf for internet applications , '' in _ wireless networks , springer _ , vol .15 , 2009 , pp .259277 vol .3 . r. w. wolff , _ stochastic modeling and the theory of queues ( paperback)_.1em plus 0.5em minus 0.4emprentice hall , 1989 . ``power consumption and energy efficiency comparisons of wlan products , '' atheros , www.atheros.com/pt/whitepapers/atheros_power_whitepaper.pdf `` intel pro / wireless 2011 lan pc card , '' intel ., http://download.intel.com/support/wireless/wlan/pro2011/wireless.pdf `` hypertext transfer protocol http/1.1 , '' 1999 , http://tools.ietf.org/html/rfc2616#section-5.1.1 `` analytical models for energy consumption in infrastructure wlan stas carrying tcp traffic '' , http://arxiv.org/abs/0909.3717v1 `` packmime - http : web traffic generation . '' ] can be written as follows ,   = 0  \,\,\,\ ,j < k \\ & e_k^{(j)}[t ] = b  \,\,\,\ , j = k=0 \\ & e_k^{(j)}[t ] = \int_{0}^{b } \mu u e^{-\mu u } du + b(e^{-\mu b } ) \,\,\,\ ,  j= k \neq 0 \\ & e_k^{(j)}[t ] = \int_{0}^{b}r(j , j - k , u)[\int_{u}^{b } ( t - u)\mu e^{-\mu ( t - u ) } dt  +  ( b - u)e^{-\mu ( b - u)}]\,\ , du \,\,\,\ , j > k>0  \\ & e_k^{(j)}[t ] = \int_{0}^{b}r(j , j - k , u)(b - u)\,\ , du \,\,\,\ ,j > k,\,\,\ ,k=0  \label{eqn : expected_time_all_1 } \end{split}\end{aligned}\ ] ]  rearranging fourth case of equation [ eqn : expected_time_all_1 ] we get the following equation ,   = \int_{0}^{b } \int_{u}^{b }  r(j , j - k , u)(t - u ) \mu e^{-\mu ( t - u ) } dt\,du + \int_{0}^{b }  r(j , j - k , u)(b - u)e^{-\mu ( b - u ) } du \,\,\,\ , for \,\,\,\ , j > k > 0  \end{split } \label{eqn : expected_time_c5}\ ] ]  changing the order of double integration in equation [ eqn : expected_time_c5 ] we get the following equation , & = \int_{0}^{b } \int_{0}^{t }  r(j , j - k , u)(t - u ) \mu e^{-\mu_k(t - u ) } du\,dt + \int_{0}^{b }  r(j , j - k , u)(b - u)e^{-\mu ( b - u ) } du \\e_k^{(j)}[t ] & = \int_{0}^{b } ( r(j , j - k ) \star g)(t ) dt + ( r(j , j - k ) \star g)(b)\,\,\,\ , for \,\,\,\ , j > k>0 \\ \end{split } \label{eqn : frth_case_2}\end{aligned}\ ] ]  further fifth case of eqn .[ eqn : expected_time_all_1 ] can be written as follows , = ( r(j , j - k)\star h)(b ) du  \,\,\,\ , for \,\,\,\ , j > k,\,\,\ , k=0  \label{eqn : fifth_case_2}\ ] ]  where , + + + can be expressed as follows ,    taking the laplace of the eqn .[ eqn : r_prob_1 ] , we get the following equation , taking the laplace of [ eqn : frth_case_2 ] , and substituting eqn [ eqn : r_prob_1_lap ] in it , we get the following equation =  \int_{0}^{b } ( r(j , j - k ) \star g)(t ) dt + ( r(j , j - k ) \star g)(b)\,\,\,\ , for \,\,\,\ , j > k>0 \\ & l[e_k^{(j)}[t ] ] =  r(j , j - k , s ) g(s)\frac{1}{s } + r(j , j - k , s ) g(s)\,\,\,\ , for \,\,\,\ ,j > k>0 \\ & = \left(\frac{\mu}{\mu + s}\right)^{j - k } \frac{\mu}{(s + \mu)^2 } \frac{1}{s } + \left(\frac{\mu}{\mu + s}\right)^{j - k } \frac{\mu}{(s + \mu)^2 } \\  & = \mu^{(j - k+1)}\left(\frac{1}{\mu + s}\right)^{j - k+2 } \frac{1}{s } + \mu^{(j - k+1)}\left(\frac{1}{\mu + s}\right)^{j - k+2 }  \\ & = \mu^{(j - k+1 ) } \left[\sum_{l=1}^{j - k+2}\frac{-1}{\mu^{j - k+3-l}(\mu + s)^l } + \frac{1}{s\mu^{j - k + 2}}\right ] + \mu^{(j - k+1)}\left(\frac{1}{\mu + s}\right)^{j - k+2 }  \\ \end{split } \label{eqn : frth_case_3}\ ] ] taking the inverse of eqn .[ eqn : frth_case_3 ] , we get the following equation , & = \mu^{(j - k+1 ) } \left[\sum_{l=1}^{j - k+2}\frac{-1 t^{l-1}e^{-\mu t}}{\mu^{j - k+3-l}(l-1 ) ! } + \frac{1}{\mu^{j - k + 2}}\right ] + \mu^{(j - k+1 ) } \frac{t^{j - k + 1}e^{-\mu t}}{(j - k + 1 ) ! }  \end{split}\ ] ] taking the laplace of eqn .[ eqn : fifth_case_2 ] , and substituting eqn [ eqn : r_prob_1_lap ] in it , we get the following equation & = ( r(j , j - k)\star h)(b)\,du\,\,\,\ , for \,\,\,\ , j > k , \,\ , k=0 \\ l[e_k^{(j)}[t ] ] & = r(j , j - k , s ) h(s ) \,\,\,\ ,for \,\,\,\ , j > k , \,\ , k=0 \\& = \left(\frac{\mu}{\mu + s}\right)^{j - k }  \frac{1}{s^2 } \\     & = \mu^{j - k}\left[\sum_{l = 1}^{j - k } \frac{j- k + 1 - l}{\mu^{j - k+2-l}(\mu + s)^l }  - \frac{j - k}{s\mu^{j - k+1 } } + \frac{1}{s^2\mu^{j - k}}\right ]  \end{split } \label{eqn : fifth_case}\ ] ] taking the inverse of eqn .[ eqn : fifth_case ] , we get the following equation ,  = \mu^{j - k}\left[\sum_{l = 1}^{j - k } \frac{(j- k + 1 - l)e^{-\mu t}t^{l-1}}{(l-1)!\mu^{j - k+2-l } }  - \frac{(j - k)}{\mu^{j - k+1 } } + \frac{t}{\mu^{j - k}}\right ] \end{split}\ ] ] equation [ eqn : expected_time_all_1 ] can be written as follows & = 0 \qquad j < k \\e_k^{(j)}[t ] & = b \qquadj = k=0 \\ e_k^{(j)}[t ] & = \int_{0}^{b } \mu u e^{-\mu u } du + b(e^{-\mu b } )  \qquad j= k \neq 0 \\ e_k^{(j)}[t ] & = \mu^{(j - k+1 ) } \left[\sum_{l=1}^{j - k+2}\frac{-1 t^{l-1}e^{-\mu b}}{\mu^{j - k+3-l}(l-1 ) ! } + \frac{1}{\mu^{j - k + 2}}\right ] + \mu^{(j - k+1 ) } \frac{t^{j - k + 1}e^{-\mu b}}{(j - k + 1 ) ! } \qquad j > k>0 \\ e_k^{(j)}[t ] & = \mu^{j - k}\left[\sum_{l = 1}^{j - k } \frac{e^{-\mu b}b^{l-1}}{(l-1)!\mu^{j - k+2-l } }  - \frac{(j - k)}{\mu^{j - k+1 } } + \frac{b}{\mu^{j - k}}\right ]  \qquad j > k,\,\,\ , k=0  \end{split } \label{eqn : expected_time_all_2}\end{aligned}\ ] ]let the attempt probability for of a node when there are nodes saturated , obtained by fixed point analysis , be , following recursive equation can be written for $ ] , + p_{sr}^{(i , j)}[t_{sr } ] + p_{st}^{(i , j)}t_{st } + p_{spspl}^{(i , j)}[t_{sp } ] + p_{ct}^{(i , j)}[t_{ct } + e_{(i , j ) } ] \\ & + p_{cp}^{(i , j)}[t_{cp } + e_{(i , j ) } ] + p_{cp - r}^{(i , j)}[t_{cp - r } + e_{(i , j ) } ] \\&+ p_{ct - r}^{(i , j)}[t_{ct - r } + e_{(i , j ) } ] + p_{ct - p}^{(i , j)}[t_{ct - p } + e_{(i , j ) } ] +  p_{ct - p - r}^{(i , j)}[t_{ct - p - r } + e_{(i , j)}]\\ \\e_{i , j } = & \frac{p_{idle}^{(i , j)}[\delta ] + p_{sr}^{(i , j)}t_{sr } + p_{stack}^{(i , j)}t_{st}}{1 - p_{c}^{(i , j ) } - p_{idle}^{(i , j ) } }  + \frac{p_{sp}^{(i , j)}t_{sp } + p_{ct}^{(i , j)}t_{ct}}{1 - p_{c}^{(i , j ) } - p_{idle}^{(i , j ) } }  + \frac{p_{cp}^{(i , j)}t_{cp }  + p_{cp - r}^{(i , j)}t_{cp - r } + p_{ct - r}^{(i , j)}t_{ct - r}}{1 - p_{c}^{(i , j ) } - p_{idle}^{(i , j ) } }  \\&+ \frac { p_{ct - p}^{(i , j)}t_{ct - p } + p_{ct - p - r}^{(i , j)}t_{ct - p - r } } { 1 - p_{c}^{(i , j ) } - p_{idle}^{(i , j ) } }  \end{split}\end{aligned}\ ] ]  notations used in the above equation are defined below and they uses the 802.11 parameters defined in the table [ tab : param ] +  [ cols= " < , < " , ]   [ tab : psm_single_long ]  since in this case , there are only three possible states , which are = idle state , = tranmission state = receive and decode state .  }{e[t_k ] } \\ \end{split}\ ] ]   + =   p_{id}(\delta + e[id ] ) + p_{cr - t}(t_{eifs } + e[id ] ) +  p_{st , k}(t_{sifs } + t_{difs } ) + p_{sr , k}(4t_{sifs } + 2t_{difs } + \delta\frac{1 - \beta_2}{\beta_2})\\ & e[id]= \frac{p_{id}\delta + p_{cr - t}t_{eifs}}{1 - p_{id } -  p_{c } } +  \frac{p_{st}(t_{sifs } + t_{difs } ) + p_{sr}(4t_{sifs } + 2t_{difs } + \delta\frac{1 - \beta_2}{\beta_2})}{1-p_{id}- p_{c } } \end{split}\ ] ]   \\&=  p_{id}e[rxd ] + p_{cr - t}[max(0,t_{rts}-t_{tack } ) + e[rxd ] ]  + p_{st } t_{ack } + p_{sr}(t_{rts } + t_{data } + t_{ack})\\ & e[rxd ] \\&= \frac{p_{cr - t}max(0,t_{rts}-t_{tack})}{1-p_{id}- p_{c } } + \frac{p_{st}t_{ack } + p_{sr } ( t_{rts } + t_{data } + t_{ack } ) } { 1-p_{id}- p_{c } } \end{split}\ ] ]   = & p_{id } ( 0 + e[tx ] ) + p_{c}(t_{tack } +  e[tx ] ) + p_{st } t_{tack } +  p_{sr}(t_{cts } + t_{ack } + t_{pspl})\\ e[tx ] = & \frac{p_{c}t_{tack } + p_{st } t_{tack } } { 1 - p_{id } - p_c } + \frac { p_{sr}(t_{cts } + t_{ack } + t_{pspl})}{1 - p_{id } - p_c } \end{split}\ ] ]  notations used in the above equation are in appenidix [ appendix : fracs_times_psm_long ] and [ appendix : mean_cycle_length_long_psm_n1 ] .they uses the 802.11 parameters defined in the table [ tab : param ] .results for the single sta in psm downloading a large file over tcp is shown in tab .[ tab : psm_single_long ] .there is a slight mismatch between the analysis and the simulation values .as discussed earlier sta goes to sleep state when there are no packets at the ap .when a single sta is downloading file then , then the partial tcp window remains at sta in the form of tcp acks and remaining at the ap in the form of data packets .if at any instant whole tcp window comes in the form of tcp acks at the sta , it goes to sleep state , since the last packet it received must have more bit unset .sta remains in sleep state till the arrival of the next beacon frame , this results in lesser throughput and current values than the analytical values .since in this case stas are only listening to the transmission not transmitting , so there are only three possible states , which are = idle state , = listen state , = receive and decode state . =   p_{idle , k}(\delta + e_k[id ] ) + p_{c , k}(t_{eifs } + e_k[id ] ) +  p_{st , k}(t_{sifs } + t_{difs } ) + p_{sr , k}(3t_{sifs } + t_{difs})\\ & e_k[id]= \frac{p_{idle ,k}\delta + p_{c , k}t_{eifs}}{1 - p_{idle , k } -  p_{c , k } } +  \frac{p_{st , k}(t_{sifs } + t_{difs } ) + p_{sr , k}(3t_{sifs } + t_{difs})}{1-p_{idle , k}- p_{c , k } } \end{split}\ ] ]   & =  p_{idle , k}e_k[rxd ] + p_{cr - t , k}[max(t_{rts},t_{tack } ) + e_k[rxd ] ] +  p_{ct , k}(t_{tack } + e_k[rxd ] )  \\&+ p_{st , k}(t_{tack } + t_{ack } ) + p_{sr , k}(t_{rts } + t_{cts } + t_{ack})\\ e_k[rxd ] & = \frac{p_{cr - t , k}max(t_{rts},t_{tack } ) + p_{ct , k}t_{tack}}{1-p_{idle , k}- p_{c , k } } \\&+ \frac{p_{st , k}(t_{tack } + t_{ack } ) } { 1-p_{idle , k}- p_{c , k } }  + \frac{p_{sr , k}(t_{rts } + t_{cts } + t_{ack } ) } { 1-p_{idle , k}- p_{c , k } } \end{split}\ ] ]

Abstract: we develop analytical models for estimating the energy spent by stations ( stas ) in infrastructure wlans when performing tcp controlled file downloads . we focus on the energy spent in radio communication when the stas are in the continuously active mode ( cam ) , or in the static power save mode ( psm ) . our approach is to develop accurate models for obtaining the fraction of times the sta radios spend in idling , receiving and transmitting . we discuss two traffic models for each mode of operation : ( i ) each sta performs one large file download , and ( ii ) the stas perform short file transfers . we evaluate the rate of sta energy expenditure with long file downloads , and show that static psm is worse than just using cam . for short file downloads we compute the number of file downloads that can be completed with given battery capacity , and show that psm performs better than cam for this case . we provide a validation of our analytical models using the ns-2 simulator  .


the microstrip gas chamber ( msgc ) was proposed in 1988 by oed [ 4 ] .this new detector has been expected to provide stable operation under intense irradiation and radiation hardness , which are required for an x - ray photo - counting detector operated in high intensity radiation environments .msgcs also have a good position resolution of a few tens m. therefore a two - dimensional msgc would enable to realize an ideal x - ray imaging detector also having a photo - counting ability .a msgc is usually produced using micro - electronics technology : sequences of alternating thin anodes and cathodes are formed with a few hundred micron pitch on an insulating substrate .the closeness of the electrodes provides the above features of a msgc .while most msgcs have been realized on glass or quartz substrates so far , we have been developing another type of msgc having a m thin polyimide substrate since 1991(nagae et al.[2 ] , tanimori et al.[8 ] ) .our msgc is made using multi - chip module ( mcm ) technology , which allows a high density assembly of bare silicon lsi chips on a silicon or a ceramic board .a very thin substrate of the msgc enables us to control the flow of positive ions from anodes to cathodes by optimizing the potential on the back plane . also due to the thin substrate ,a fast signal is induced on a backplane , which enables two - dimensional readout from one msgc ( nagae et al.[2 ] , tanimori et al.[7 ] ) . in 1993 ,the 5 cm square 2d - msgc with 200 m anode and backstrip pitches were made , and clear two - dimensional x - ray images were successfully obtained .the performances obtained from this msgc were described in detail in tanimori et al . [ 8 ] , in which position resolution , stability , durability , and operation in high counting rate were investigated .based on that study , the new 2d - msgc having a large area of a 10 cm square has been developed since 1997 .in addition , we have developed a new type of the readout system in which the data are synchronously managed in digital electronics to handle the huge quantity of data from the msgc for real - time image processing . using this new system, we successfully got real - time movies from the msgc , and examine the new x - ray crystal analysis methods using the photo - counting ability of the msgc ( tanimori et al .[ 9 ] ) .  here ,after summarizing both the msgc imaging device and the readout system , we mainly report the new approach to overcome the destruction of electrodes due to discharges , which is the most crucial problem for msgcs , and the further development of the application of the msgc imager to the x - ray crystal analysis .figure [ fig : f1 ] shows a schematic structure of our two - dimensional msgc , which is formed on the 20 m thin polyimide substrate . on the polyimide layer ,10 m wide anodes and 100 m wide cathodes are formed alternately by photo - lithography technology . between the ceramic base and the polyimide substrate , there are back strips with a 200 m pitch in orthogonal to the anode , which provide information in the second dimension .all electrodes are made of gold with a thickness of 1 m ( recently chromium are used as mentioned in section 5 ) . in order to reduce the effect of parallax broadening of the position distributions , a drift planeis placed 3 mm above the substrate .every 32 cathode strips are aggregated to one group at one end in the a 10 cm square msgc .there are 16 cathode groups , to which high voltages are independently supplied .the signal from groups of cathodes can be used as an energy measurement of an x - ray .the edge of the cathode is coated by polyimide with a width of  m for suppressing discharges between anodes and cathodes(tanimori et al.[8 ] ) .the back strips are connected to the preamplifiers .a gas mixture of argon ( 80% ) and c ( 20% ) was used in atmospheric pressure .the absorption efficiency of this condition ( 3 mm gap and the use of the above gas ) is % for 8.9 kev x - rays .the resistivity of the substrate is considered to be a key factor to keep stable operation of a msgc under high counting rate .a very thin organic - titanium is coated on the surface , by which a surface resistivity of /square was obtained .we found an optimum operating point by adjusting both the thickness of the substrate and the potential of both anodes and cathodes .the details of the features about gas amplification and its stability of the msgc are reported in tanimori et al . [ 8 ] .the new 10 cm square msgc was directly mounted on the 30 cm square mother board by a bonding technique . in order to handle more than a thousand - signal lines in a 30 cm square size, the structure of 8 layers and the micro resistor arrays were adopted .figure [ fig : f2 ] shows the mother board and the gas vessel in which the 10 cm square msgc is mounted .the preamplifier cards are inserted vertically to the connecter on the rear side of the motherboard , which has 64 fast amplifiers ( mqs104 developed by lecroy ) and discriminators .all discriminated signals from the anodes and the cathodes ( ecl level ) are fed to the position encoded system mentioned hereafter .  as pointed out in the tanimori et al .[ 8][9 ] , the fast and narrow pulses from both anodes and back strips provide very tight timing coincidence between anodes and back strips within .this means that the two coordinates of an incident point are able to be synchronously encoded with a few ten ns clock cycle by requiring the coincidence between the timings of both anodes and back strips .this procedure enables us to encode more than 10 events per second .since almost all events generates about three hit strips on both anodes and back strips , a simple method of getting the hit position as a center gravity of the hit electrodes can provide a position resolution of less than 100 m .this resolution reaches the limit due to the diffusion of drift electrons .therefore , we need to record only the positions of the hit anodes and back strips instead of the pulse heights of those electrodes .  to realize the above idea for handling more than million events per second ,the synchronous encoding system has been developed , of which block diagram is shown in fig.[fig : f3 ] .the readout system consists of 9-u vme modules of two types .one is the position encoding module ( pem ) which has 128 inputs and trees of programmable logic devices ( pld ) .the pem encodes hit strips to x or y coordinates .the other is the control and memory module ( cmm ) which has a large buffer memory of mbyte for keeping the image data during seconds at the counting rate of 10 events / s , and generates the synchronous clock .the new system can handle more than 3 million events per second , which is more than 3 times the ability of the camac system .this enables us to take 30 frames / seconds of images with enough quality .figures [ fig : f4 ] show the several sequent frame images in the movie taken a metal pendant rotating at the front of the msgc by an x - ray irradiation , where 25 images per second were taken .the details of the readout method and those vme modules are described in tanimori et al . [ 9 ] and ochi et al . [ 3 ] , respectively .in general , a two - dimensional image of a diffraction pattern is not sufficient to obtain the three dimensional information of the objective crystal .when using a monochromatic x - ray beam , several diffraction patterns are taken varying the angle between one axis of the crystal and the x - ray beam over an acceptable angle range ( a few degrees ) .the msgc can record the arriving time of each x - ray photon with a few ten ns resolution .the timing just gives us the information on the angle of the rotation of the crystal with a very fine angular resolution .figures [ fig : f5](a ) shows the three - dimensional images obtained from msgc which consists of two positional and one rotating angle coordinates .you note that this fine angular resolution of 0.1 degree is obtained for each diffraction spot , which enable to remove the noises spreaded uniformly in this space from real spots made by an x - ray diffraction from a target crystal . using this method ,the sensitivity for a faint diffraction spot can be improved more than 10 times as shown in fig.[fig : f5](b ) . for crystals having the little constituent atoms, the msgc allows us to get all the information needed for crystal analysis from only a few minutes measurement with one continuous rotation of a crystal .fig.[fig : f6 ] shows a reciprocal lattice image calculated from the data obtained by the msgc .thus the msgc would dramatically improve an x - ray crystallography .  the most intriguing approach for an x - ray crystallography using an ultimate time resolved image is a direct observation of the dynamical change of a crystal structure for periodic variations or reactions .the imaging device based on the photo counting method such as mwpc or msgc has an essential upper limit of 10 events / s for handling the data , which restricts the number of picture frames to less than hundreds per second .however , a fast process within  can be observed as continuous images if periodic measurements are done for this process .since the msgc records the timings both of each detected x - ray and of each periodic process , all x - rays obtained by the msgc can be folded into one phase of the periodic process . when a process with variation times of 100 is measured periodically by the msgc at the event rate of a few mhz during 10s , hundred images with  timing bincould be obtained in one process . each image made of about 10 x - rays gives a high quality picture .we already applied this method , and succeeded to catch the dynamical change of the crystal structure of [ bu][pt(pop) ] between a photon excited state and a stable state first in the world .details of the x - ray crystallography application and another potentialities of msgc are described in ochi [ 11 ] .although the technology of a msgc seems to be established due to the recent intensive studies in the world , there still remains one crucial problem to prevent a msgc from the stable operation : discharges damage the electrodes of a msgc .the process of the discharge in msgcs are studied in detail by peskov , ramsey & fonte [ 5 ] .although we do not know the complete diagnosis of discharges in a msgc yet , the tolerance can be increased by several improvements . about 5% of electrodes were damaged by discharges during one years operation in our experience , testing lots of 5 cm square msgc . since damage due to discharges usually concentrated in warming up at the first use , dust and parts of bad quality of electrodes might be the reasons for discharges .for the 10 cm square msgc , the surface are now looked into by a microscope before the operation to remove dusts .also chromium has been used as the material of the electrode in the latest msgcs due to its higher melting point .these efforts have distinctly suppressed the occurrences of broken strips by a discharge .another solution is the insertion of an intermediate gas - multiplier such as gas electron multiplier ( gem ) proposed by bouclier et al .an intermediate gas - multiplier was at first realized in a multi - step avalanche chamber using fine mesh planes , which were intensively studied around 1980 .originally an intermediate gas - multiplier was used to attain a very high gain by combined with a mwpc , for detecting one ultraviolet photon of cherenkov light .we are now investigating a capillary plate as an intermediate gas - multiplier , which consists of a bundle of fine glass capillaries with uniform length , the ends of which forms flat planes and was coated by inconel metal .the gas multiplication of a capillary plate in gases has already been confirmed by sakurai et al .[ 6 ] . in this paper ,high voltages were fed to both end planes of a capillary plate with the diameter of 2 cm , and the high - electric field in a capillary induced a gas multiplication .its gain was reported to reach up to more thousands .the detail is mentioned in this reference .figure [ fig : f7 ] shows the side view of our system combined with the 10 cm square capillary and the 10 cm square msgc , where capillary are set 4 mm above the msgc . the large capillary plate used here is made by hamamatsu photonics , andthe diameter and the length of its capillary are 100 m and 1 mm respectively .a thickness of a capillary plate of 1 mm , which is more ten times thicker than that of gem , and the very high surface resistivity of a capillary easily let us infer the unstable operation of its gas multiplication under a high intense radiation due to a space - charge effect in a capillary . actually , non - uniformity and instability of a gain were observed every measurement for this 10 cm square capillary even under a relative low irradiation of 100 hz / mm . under a medium radiation , most bright parts in a image obtained by this systemwere observed to diminish soon . by such instability, we could not evaluate the performance of it quantitatively .  in order to absorb ions in a capillary, a little conductivity was added to the surface of the capillary , by which the resistivity of 40 m appeared between both sides of the 10 cm square capillary .this conductive capillary has dramatically improved the performance of this system .figure [ fig : f8 ] shows the energy spectrum of cu characteristic x - rays obtained by this improved system , where the peak generated by a single msgc and that by combined msgc and capillary plates are obviously distinguished . from this figure the gain of the capillary itself can be estimated , and the rate capability was measured . as shown in fig.[fig : f9 ] , the capillary was observed to be operated steadily up to more than a 10 / mm .the gain of a conductive capillary reached more than 3000 , and non - uniformity of the gain more than 10% was not observed .figures [ fig : f10](a ) and ( b ) show the comparison of the image performance between this system and imaging plate using the powder diffraction of sugar for same exposure times ; the very good performance of this system are distinctly noted . herethis system was operated with the total gain of 1000 ( cu characteristic x - rays were used ) , and the gain of the msgc itself was only a few tens . by adopting this intermediate multiplier , the total gain was increased about ten times , and the operation voltage of the msgc between anodes and cathodes could be reduced by 100 v. this condition ensures the stable operation free from both discharges and electrical noises even under an intense irradiation .the detail of the study on the conductive capillary plate will be described in nishi et al . [* summary * we have developed a two - dimensional msgc and the fast readout system , both of which are essential developments to realize a new time resolved x - ray imaging detector .in addition , the new type of an intermediate electron multiplier has been proposed : the capillary plate of which capillary has a conductive surface was made and set above the msgc .this combined system was found to be operated very stably with an enough gain , which has never been attained by a simple msgc .furthermore , supplied voltages for anodes and cathodes of the msgc can be kept within the quite safety range against discharges , and we have been free from the risk of the destruction of electrodes due to discharges .such an desirable operation of the msgc provides an ideal image having very high qualities such as good position resolution , no distortion , very wide - dynamic range , and steady and flat uniformity of the efficiency ; the new application of this device for the x - ray imaging analyses has been able to be discussed with reality as described in above section .we also stress that this detector system is a complete electric system controlled by the computer , where electric system means not only that the data are electrically transferred to computers , but also that all the components of this system are made from ic technology .the msgc itself is made using high density printed board technology for the direct mounting of a bare lsi .all electrical elements of the msgc readout system are made of commercially available lsi chips . in this system ,ic chips with single function such as fast amplifiers , comparators , and the ecl - ttl transfers are the main elements of the components , whereas plds , the core parts of the readout system , occupies less than 10% of the system .then we have begun to redesign the readout system using commercially manufactured ic chips having 32channels amplifiers or discriminators in one chip which will be mounted directly on the msgc mother board .plds for the position encoding also will be set in the the msgc box , and no ecl - ttl transfer chip is needed .this improvement will realize a handy msgc imager similar to a liquid crystal display in very near future .we gratefully acknowledge the kind support and fruitful discussion of prof .y. ohashi , dr .h. uekusa and their colleagues of dept . of chemistry , tokyo institute of technology .t. tanimori , yuji nishi , and a. ochi would like to thank dr .t. ueki , dr .m. suzuki , dr .t. fujisawa , dr . toyokawa and members of biological physics group of the institute of physical and chemical research ( riken ) and japan synchrotron radiation research institute ( jasri ) for the continuous support and encouragement .this work is supported by crest : japan science and technology corporation ( jst ) and partially by jasri.               * figure 1 .* schematic structure of the two - dimensional msgc which were formed on a 17 m thin polyimide substrate . on the polyimide layer ,7 m wide anodes and 63 m wide cathodes were formed with a 200 m pitch ( the width of the cathodes was changed to 100 m in the imaging measurement as mentioned in section 4 ) . between the ceramic base and the polyimide substrate ,there are set back strips with a 200 m pitch orthogonal to the anodes .all electrodes are made of gold with a thickness of 1 m ( recently chromium are used as mentioned in section 5 ) . to define the drift field ,the drift plane was placed at 10 mm above the substrate .* figure 5 . *( a)three dimensional image ( x , y and rotating angle coordinates ) of x - ray diffraction spots of the phenothiazine - benzilic acid complex , in which the sample crystal at 10 cm front of the msgc was rotated continuously along the axis normal to incident monochromatic x - ray beam .( b)similar image after the noise reduction mentioned in the text .* figure 8 .* energy spectrum of cu characteristic x - rays obtained by the 10 cm square capillary and the 10 cm square msgc , where the peak generated by a single msgc and that by combined msgc and capillary plates are obviously distinguished

Abstract: the development of gaseous detectors has been exciting again since the appearance of a microstrip gas chamber(msgc ) in 1988 , which is made using a micro - electronics technology . these days lots of variations of the advanced gaseous detectors are being intensively studied in the world .   we have developed the two - dimensional msgc having a 10 cm square detection area and the ultra fast readout system for a real time x - ray imaging . the msgc was made using multi - chip module ( mcm ) technology , and has a very thin substrate of 17 m , lots of thin anodes and back strips both with 200 m pitches . this enables us to get fast digital x - ray images with recording both the timing and an energy of each x - ray photon . in addition , an intermediate gas multiplier has been realized using a capillary plate having a conductive surface of a capillary . the msgc combined with the conductive capillary plate can be steadily operated with a high gain under intense irradiation . here we also report new approaches of x - ray crystal structure analyses using timing information obtained by the msgc .   microstrip gas chamber(msgc ) , area detector , time - resolved