Linköping University | Department of Computer and Information Science Bachelor thesis, 16 ECTS | Computer science 2018 | LIU-IDA/LITH-EX-G–18/062–SE

Evaluating mobile commu- nication energy consumption with video and voice commu- nication

Utvärdering av trådlös video- och röstkommunikations en- ergikonsumption

Anna Pestrea, Niklas Granberg

Supervisor : Simin Nadjm-Tehrani Examiner : Marcus Bendtsen

Linköpings universitet SE–581 83 Linköping +46 13 28 10 00 , www.liu.se Upphovsrätt

Detta dokument hålls tillgängligt på Internet – eller dess framtida ersättare – under 25 år från publiceringsdatum under förutsättning att inga extraordinära omständigheter uppstår. Tillgång till dokumentet innebär tillstånd för var och en att läsa, ladda ner, skriva ut enstaka kopior för enskilt bruk och att använda det oförändrat för ickekommersiell forskning och för undervisning. Överföring av upphovsrätten vid en senare tidpunkt kan inte upphäva detta tillstånd. All annan användning av dokumentet kräver upphovsmannens medgivande. För att garantera äktheten, säkerheten och tillgängligheten finns lösningar av teknisk och admin- istrativ art. Upphovsmannens ideella rätt innefattar rätt att bli nämnd som upphovsman i den omfattning som god sed kräver vid användning av dokumentet på ovan beskrivna sätt samt skydd mot att dokumentet ändras eller presenteras i sådan form eller i sådant sam- manhang som är kränkande för upphovsmannens litterära eller konstnärliga anseende eller egenart. För ytterligare information om Linköping University Electronic Press se förlagets hemsida http://www.ep.liu.se/.

Copyright

The publishers will keep this document online on the Internet – or its possible replacement – for a period of 25 years starting from the date of publication barring exceptional circum- stances. The online availability of the document implies permanent permission for anyone to read, to download, or to print out single copies for his/hers own use and to use it unchanged for non-commercial research and educational purpose. Subsequent transfers of copyright cannot revoke this permission. All other uses of the document are conditional upon the con- sent of the copyright owner. The publisher has taken technical and administrative measures to assure authenticity, security and accessibility. According to intellectual property law the author has the right to be mentioned when his/her work is accessed as described above and to be protected against infringement. For additional information about the Linköping Uni- versity Electronic Press and its procedures for publication and for assurance of document integrity, please refer to its www home page: http://www.ep.liu.se/.

c Anna Pestrea, Niklas Granberg Students in the 5 year Information Technology program complete a semester-long development project during their sixth semester (third year). The project is completed in mid- sized groups, and the students implement a mobile application intended to be used in a multi- actor setting, currently a search and rescue scenario. In parallel they study several topics relevant to the technical and ethical considerations in the project. The project culminates by demonstrating a working product and a written report documenting the results of the practical development process including requirements elicitation. During the final stage of the semester, students create small groups and specialise in one topic, resulting in a bachelor thesis. The current report represents the results obtained during this specialisation work. Hence, the thesis should be viewed as part of a larger body of work required to pass the semester, including the conditions and requirements for a bachelor thesis. Abstract

Today smart phones can be used in different ways for different scenarios. One is video and voice calls over internet, which consumes a lot of energy and could be improved. This thesis studies how different wireless communication technologies affect the battery consumption of a mobile device. This is measured with the help of a software program named EnergyBox. By capturing different traces on a smart phone and giving it as input to Energybox, we can see how different communication methods affect the energy consump- tion. These results showed that voice calls consumed less energy than video calls and that WiFi was the most energy efficient transmission technology, followed by 3G and LTE. It could also be seen that if the call interval was shortened for the video calls the energy con- sumption decreased. 3G also showed some interesting results that should be investigated further. The conclusion of this is that voice calls are preferred over video calls considering the energy aspect and that WiFi consumes less energy than 3G, which consumes less than LTE. Acknowledgments

Thank to Simin Nadjm-Tehrani for supporting us in the creation of this report. We also thank the contributors of the Energybox project.

v Contents

Abstract iv

Acknowledgments v

Contents vi

List of Figures viii

List of Tables x

1 Introduction 1 1.1 Motivation ...... 1 1.2 Aim...... 1 1.3 Research questions ...... 2 1.4 Delimitations ...... 2

2 Background, theory and related works 3 2.1 Related work ...... 3 2.2 WiFi...... 4 2.3 3G/UMTS ...... 4 2.4 LTE...... 5 2.5 EnergyBox ...... 5 2.6 The test application ...... 5

3 Method 6 3.1 Parameters ...... 6 3.2 Methodology ...... 6 3.3 Methodology in the application ...... 8

4 Results 9 4.1 Voice communication ...... 9 4.2 Video communication ...... 10 4.3 The number of packets sent and received ...... 11 4.4 Summarized results ...... 12 4.5 Average results ...... 13 4.6 Additional 3G tests ...... 14

5 Discussion 17 5.1 Results ...... 17 5.2 Method ...... 18 5.3 The work in a wider context ...... 20

6 Conclusion 21 6.1 Results ...... 21

vi 6.2 Future work ...... 21

Bibliography 22 6.3 Voice communication ...... 24 6.4 Video communication ...... 27 6.5 Uplink and downlink distribution ...... 29 6.6 Connection between power, states and amount of packets ...... 33 6.7 Summarized results ...... 33 6.8 Average results ...... 35

vii List of Figures

2.1 Figure over three of the RRC states ...... 4

4.1 Voice-testing with wifi over 3 minutes...... 9 4.2 Voice-testing with wifi over 1.5 minutes with a total time of 3 minutes...... 10 4.3 Voice-testing with wifi over 30 seconds...... 10 4.4 One three minute video call, that used 242 joule of energy...... 10 4.5 Two 1.5 minute video calls with a total length of 3 minutes...... 10 4.6 Six 30 second video calls with a total length of 3 minutes...... 11 4.7 Packets sent during extra 3G test...... 15 4.8 Power states during extra 3G test...... 15

6.1 Voice-testing with wifi over 3 minutes. The total amount of energy was 46 Joule. . 24 6.2 Voice-testing with wifi over 1.5 minutes with a total time of 3 minutes. The total amount of energy was 46 Joule...... 24 6.3 Voice-testing with wifi over 30 seconds with a total time of 3 minutes. The total amount of energy was 44 Joule...... 25 6.4 Packets over time in 3 minute transmission over 3G. The total amount of energy was 242 Joule...... 25 6.5 Packets over time in two 1.5 minute transmissions over 3G. The total amount of energy was 242 Joule...... 25 6.6 Packets over time in six 30 second transmissions over 3G. The total amount of energy was 242 Joule...... 25 6.7 Packets over time in one 3 minute transmission over LTE. The total amount of energy was 339 Joule...... 26 6.8 Packets over time in two 1.5 minute transmissions over LTE. The total amount of energy was 340 Joule...... 26 6.9 Packets over time in six 30 second transmissions over LTE. The total amount of energy was 321 Joule...... 26 6.10 A 3 minute video call using wifi. The total amount of used energy is 81 Joule. . . . 27 6.11 Two 1.5 minute video calls with a total length of 3 minutes. The total amount of used energy is 80 Joule...... 27 6.12 Six 30 second video calls with a total length of 3 minutes. The total amount of energy used is 73 Joule...... 27 6.13 One three minute video call, that used 242 joule of energy...... 27 6.14 Two 1.5 minute video calls with a total length of 3 minutes. The total amount of energy used is 246 Joule...... 28 6.15 Six 30 second video calls with a total length of 3 minutes. The total amount of energy used is 242 Joule...... 28 6.16 A 3 minute trace over a video call. The total amount of used energy was 384 Joule. 28 6.17 Two 1.5 minute video calls. The total amount of used energy was 377 Joule. . . . . 28 6.18 Six 30 second video calls. The total amount of used energy was 348 Joule...... 29

viii 6.19 Here is the result of the distribution of the up- and downlink for voice calls when using wifi...... 29 6.20 The distribution over up- and downlink using voice call over 3G. Here it is seen that the uplink and downlink distribution is almost the same as for the voice with wifi result...... 30 6.21 The distribution over up- and downlink using voice call over LTE. Here it is seen that the uplink and downlink distribution is almost the same as for the voice with wifi and 3G result...... 30 6.22 The distribution over up- and downlink when using video over WiFi...... 31 6.23 The distribution over up- and downlink when using video over 3G...... 32 6.24 The distribution over up- and downlink when using video over LTE...... 32 6.25 One of our result for a voice call over wifi. It can be seen that power is connected to the number of sent packages...... 33

ix List of Tables

4.1 Packets sent and received during first test round...... 11 4.2 Packets sent and received during second test round...... 11 4.3 Packets sent and received during third test round...... 11 4.4 Packets sent and received during first test round...... 12 4.5 Packets sent and received during second test round...... 12 4.6 Packets sent and received during third test round...... 12 4.7 Overview over the first round of results based on the results from 4.1 and 4.2. . . . 12 4.8 Overview over the second round of results...... 13 4.9 Overview over the third round of results...... 13 4.10 Overview over the average results based on the results from 4.1 and 4.2 ...... 13 4.11 Overview over the average results for the second round of results...... 13 4.12 Overview over the average results for the second round of results...... 14 4.13 The percentage of packets sent uplink during the first test (From tables 4.1 and 4.4). 14 4.14 The percentage of packets sent uplink during the second test (From tables 4.2 and 4.5)...... 14 4.15 The percentage of packets sent uplink during the second test (From tables 4.3 and 4.6) ...... 14

6.1 Overview over the first round of results based on the results from 4.1 and 4.2. . . . 33 6.2 Overview over the second round of results...... 33 6.3 Overview over the number of packages sent uplink and downlink...... 34 6.4 Overview over the number of packages sent uplink and downlink, based on the second voice results...... 34 6.5 Overview over the number of packages sent uplink and downlink...... 34 6.6 Overview over the number of packages sent uplink and downlink, based on the video results from the second sets of results...... 34 6.7 Overview over the average results ...... 35 6.8 Overview over the average results for the second round of results...... 35 6.9 Overview over the average results of the up- and downlink, based on the results from ??. The results shows the result in uplink percentage. It can be seen all voice- based results was very close to 50%, regardless of communication method (WiFi, 3G, LTE)...... 35 6.10 Overview over the average results of the up- and downlink, based on the second round of result. The results shows the result in uplink percentage...... 35

x 1 Introduction

The introduction consists of our motivation and our aim for this thesis, together with the research questions stated. This chapter also contains a section about our delimitations.

1.1 Motivation

In today’s society mobile devices such as and tablets have become a part of the foundation of daily life. In the year 2017 95% of all Swedish households had access to internet and 93% owned a computer. In comparison to the statistic five year earlier, where only 89% had access to the internet, it can be seen that digital devices has become more integrated in our society1. These mobile devices have a large area of use, from social media to keeping track of your bank account. It is especially important that these devices function properly when the need for them is the biggest, for example in an emergency. If a situation such as this arises it is very important that the device is able to function for as long as possible. One of the factors that can affect the energy drain is the application that is currently being used. For the developers of this app it is extra important that the application is made so that it is energy-efficient without affecting the quality of the service provided.

1.2 Aim

The purpose of this thesis is to study how different wireless communication methods affect the energy consumption in an application when streaming voice and video. The application will be created from a project that runs in parallel to this project and will be able to support voice together with video communication. By varying the wireless communication method (WiFi, LTE or 3G), the communication method (voice or video) and the transmission pattern one at a time the study will gain empirical data on how these factors affect the energy con- sumption. An example of transmission pattern can be to vary the duration of the voice call. For instance, will the energy consumption be smaller if we make one call over 15 minutes or will it be better if we first make one call over 10min, wait and then have a new call over 5 minutes?

1https://www.iis.se/docs/Svenskarna_och_internet_2017.pdf

1 1.3. Research questions

1.3 Research questions

In order to develop a deeper understanding for the subjects of this thesis, the following re- search questions are stated:

• What test cases can provide interesting data flows to estimate wireless transmissions energy consumptions?

• Which types of dataflows and in presence of different communication technologies af- fects the energy consumption of the wireless transmissions the most/the least?

1.4 Delimitations

The following delimitations for the thesis was set, partly by the constraints of the bigger project work for which this deeper study was performed.

• 3G, LTE and WiFi will be used as wireless communication methods.

• We will only look at the communication between the first access point and the client (the entity).

• The application is made for an Android system, so all entities that will be used in this thesis will have an Android OS.

2 2 Background, theory and related works

In this chapter the theory and background behind this report is presented, as well as related works that can provide some insights into the thesis subject.

2.1 Related work

Because of the limited batteries used today, there has been made a lot of research on how different ways of wireless communication consume energy. Trestian et al [1] researched how different network conditions affected the energy consumption. The conclusions they reached were that a bad link will increase power consumption, the same with a busy network with much traffic. They also brought forward the observation that bigger packets being sent when using TCP consumed less energy, compared to packets sent using UDP. Trestian et al [2] also tested how different levels of quality of experience affected energy consumption. This was done by testing how different kinds of media was deemed ”good” even when quality of the video was lowered. Therefore energy savings could be made by lowering quality of the sent video, in certain cases.

Chandra [3] showed that certain older streaming applications made the interfaces spend an unnecessary amount of time in the IDLE state, waiting for more data to send. This meant that much more power was used, compared to how little could be used when in SLEEP mode. But since these tests were performed in 2002, the results might not apply to more modern streaming standards and technologies. Kalic et al [4] showed how different wireless technologies had different energy consump- tions when transferring data. Therefore it is of interest to try different methods of sending data. Rajaraman et al [5] broke down the power consumption when live streaming video from a phone. They showed that the wireless transmission was only a fraction of the total en- ergy consumption, where the camera and encoding of the video were the biggest energy consumers. But there were still differences when using different mediums. Hoque et al [6] tested how different streaming techniques and video quality affected en- ergy consumption and data wastage. The tested techniques were bitrate streaming, bitrate throttling, fast caching, ON-OFF and Dynamic Adaptive Streaming over HTTP (DASH). The conclusions were that WiFi used less energy than 3G. It was also found that streaming meth-

3 2.2. WiFi ods that kept consistent connections drew more power. This might not translate that well to live streaming video, since they use different streaming techniques. These works gave an preview of our expected results and some insight in how streaming works. But none of their methodologies were used, since none of them tested client to client based streaming unlike us, with the exception of Rajaraman et al.

2.2 WiFi

The 802.11 WiFi standard has a power management which has several states; IDLE, SLEEP and ACTIVE1. The ACTIVE state is when there is data transmission from or to the wireless device, while the IDLE state is when the device listens after incoming packets. In the IDLE state the device does not transmit any data. The SLEEP state is when the device is sleeping, it does not listen for any incoming packets and neither does it send any. The average con- sumption shows that the ACTIVE state drains the most energy, followed by the IDLE state. The SLEEP state is the most energy-efficient state, but if the device is too long in this state the probability of packet loss increases.

2.3 3G/UMTS

When a transmission is made there are three classifications of energy consumed; ramp energy, transmission energy and tail energy [p.287, 7]. The ramp energy is the energy that is used to switch state, more specifically to switch to a high-power state. The transmission energy is the energy that is consumed during the transmission time. After the transmission the device will remain in a high-power state for some time and the energy that is used during this time is the tail energy. The Radio Resource Control (RRC) in the device manages the wireless radio resources and controls the communication between the Radio Network Controller (RNC) and the de- vice (UE) [p.76-77, 8] [p.116-117, 9]. It also manages the idle and active connection. In the idle mode the device is connected to the network but does not transfer any data. In the active mode the device has connected to the RRC and can be in any of the following four states: cell DCH, cell FACH, cell PCH and URA PCH [p.78, 8] [10] [11]. In the DCH state the data is transferred through a dedicated channel. In the FACH state the data goes through a common channel such as the random access channel (RACH) and the forward access channel (FACH). When the device is in the cell PCH and URA PCH it listens to some channels, more specifi- cally the broadcast (BCH) and paging channel (PCH). During the time the device is in these states it is impossible to transfer data uplink [p.78, 8]. If the device in inactive for too long in some of the states, in other words that the inactivity timer is exceeded, the RRC will change the state. For example if the inactivity timer t2 is exceeded in the state FACH (which is in the active mode) for too long, the state will change to the idle mode, as seen in figure 2.1 [p.79, 8] [p.117, 9].

Figure 2.1: Figure over three of the RRC states

1https://docs.microsoft.com/en-us/windows-hardware/design/device-experiences/wi-fi-power- management-for-modern-standby-platforms

4 2.4. LTE

2.4 LTE

Long Term Evolution (LTE) is a more recent evolution in mobile communications, also re- ferred as 4G. It has two RRC states, RRC_CONNECTED and RRC_IDLE. RRC_CONNECTED has 3 power states; Continuous Reception, short DRX (Discontinuous reception) and long DRX whereas idle only has a DRX power state. If the device is in idle when a packet is sent, the RRC is promoted to connected and immediately put into continuous reception. When the device stops sending and receiving packets, a idle timer is started. This timer resets every time a packet is sent or received. If no packet is sent before this timer runs out, the device is put into short DRX mode. Same applies here, where there is a short DRX timer. If no packet is sent or received during this timer, the device is put into long DRX. Long DRX also has a timer and as soon as this timer runs out with no packets sent, the device enters RRC_IDLE. This time between actually sending/receiving data and entering idle is the energy tail of LTE [12] and it is a big reason for LTE drawing a lot of power.

2.5 EnergyBox

EnergyBox is an energy-measuring tool developed by amongst others Ekhiotz Jon Vergara [13]. EnergyBox takes network traces together with configuration parameters as input and generates output describing how much energy that was consumed during that trace. The output will also contain data about the different energy states, the uplink and downlink dis- tribution of the number of packets. The configuration parameters files includes data about how much energy the device drains in different RRC power states. It also contains informa- tion about the RRC:s inactivity timers, but these are not available for us to use. The inactivity timers are controlled by the RNC (Radio Network Controller), which basically determines when the device will change the states [p.25, 13]. Since the information about the inactivity timers is not available, default settings will be used. The tool is available through a Github ac- count 2 and the program is considered to be quite reliable. For 3G the accuracy of EnergyBox is 94-99% and for WiFi the accuracy is 93-99% [p.34, 13].

2.6 The test application

The application that will be tested is developed using the software program Android Studio 3, which can create applications for smartphones with the android OS. For the voice and video communication the cloud-based platform Sinch was used, which makes it easier for its users to implement Voice, Verification, Video and SMS in their applications4. By using the Sinch SDK the voice and video communication of the application was implemented.

2https://github.com/rtslab/EnergyBox 3https://developer.android.com/studio/ 4https://www.sinch.com/about-us/company/

5 3 Method

Here the method used in the study is described together with its parameters. This chapter will also present how the methodology evolved in order to work around problems in the setup.

3.1 Parameters

We know that different mobile devices have different energy consumption [14], but in this thesis this is not considered to be one of the parameters of the study. Instead, other parame- ters are chosen. By studying the background in chapter 2, the following variables are chosen:

1. WiFi, LTE or 3G as possible communication technologies

2. Voice or video communication

3. Duration of the video and voice calls

3.2 Methodology

Basic test setup First a methodology for generating different transmission traces will be created. The method- ology that was chosen was to one at a time change the variables that are believed to affect the energy usage of the application. Secondly the traces will be generated. In order to minimize the risk for interference from other applications in the Android device, no other applications than the necessary ones will be running during the time that the traces are generated. This is done by factory resetting the device to remove all extra applications and then disabling the remaining applications that are not system critical. It will also be ensured that the device does not need to update and that updates are not run in the background. While measuring Wifi, the access to the other communication technologies will be blocked and while measuring 3G, WiFi and LTE will not be turned on. The same applies to LTE. For WiFi the network Eduroam will be used, since this network is available to us and does not require the user to log in multiple times in order to reconnect to the network. For 3G and LTE the internet service provider will be Comviq.

6 3.2. Methodology

This ISP also shares the same network with Tele2 and Telia1. The device that will be used for the tests is a OnePlus X E1003 that is plugged into a computer during the tests.

Repetitions It is decided that six different test setups shall be used, where different communication tech- nologies (WiFi, 3G and LTE) are paired up to either voice or video communication. Each test will be repeated at least six to ten times, in order to get a more conclusive result. This limit of ten times maximum is because of the limited time that is available to perform the tests.

Time intervals Three different time intervals are chosen since we wanted to test how different call lengths would affect energy consumption. The time intervals are to be some time X minutes, then X/2 minutes and X/10 minutes. This will give a good spread in call lengths, with one full length call, one split into two and one split into many smaller pieces. Since we have six different test setups, three different time intervals and an unknown amount of repetitions we have to limit ourselves. Therefore we are planning to repeat the tests six times with an time interval of 1, 5 and 10 minutes. However when capturing a 10 minute trace (with 64 000 packets) and using it as input to EnergyBox, the program can not handle the calculations in a timely manner for such a big trace file. Therefore the new times are chosen and limited to be smaller than the previous ones. At first the new times was chosen to be 5 minutes, 2.5 minutes and 1 minute. After doing some testing it was discovered that EnergyBox could not calculate the results when the total amount of time was 5 minutes because of lack of RAM (Random Access Memory). However it was able to handle a total time of 3 minutes. Therefore new times for the tests needed to be made. At last the time was chosen to be 3 minutes, 1.5 minutes and 30 seconds. Instead of executing the test six times it is decided to only repeat the test three times. This was because the difference in the results between tests was so small that it was judged to be satisfactory.

Software At first it was planned that the traces were to be captured by the application tPacketCapture2 on the android phone. This did not work because of the way that voice and video communi- cation is implemented. The application tPacketCapture uses a Virtual Private Network (VPN) tunnel to capture the packets, which blocked access to the Sinch server and recipient device. An effect of this is that voice and video communication became unavailable. Therefore a new capturing software was needed. The new software chosen is TCPDump3, which does not go through a VPN tunnel. In- stead it gets the collected data from the network socket. However this application also has different requirements in order to function. We start by gaining access to a rooted android device, in other words we acquire a device with admin privileges given to the user. Normally the user does not have access to these privileges, since the manufacturers want to avoid dam- age to the devices. With the root in place, TCPDump is be installed and configured to work. Some of the permissions are also changed so that the software could be started and stopped from a computer using the Android Debug Bridge (ADB)4, which saves some time and makes it easier to execute the tests. The ADB is accessible through Android Studio5. The following command is used in the terminal to start the TCPDump:

1https://www.comviq.se/tackning#! 2https://play.google.com/store/apps/details?id=jp.co.taosoftware.android.packetcapture&hl=sv 3https://www.androidtcpdump.com/ 4https://developer.android.com/studio/command-line/adb.html 5https://developer.android.com/studio/

7 3.3. Methodology in the application

tcpdump -i interface -w /sdcard/download/file.pcap

Where the interfaces used are wlan0 for WiFi and rmnet0 for the mobile network. The trace files are then used as input to EnergyBox [13], which will estimate the energy consumption of the traces. Energybox needs input files that contain the RRC settings of the network and devices you want to simulate the energy consumption of. Because of the time constraints on this project, settings for the specific test setup will not be used. Instead the standard settings that come with EnergyBox will be used. These settings are for standard WiFi, the 3G network belonging to Telia and the LTE settings for Tele2[15]. The output from EnergyBox will become our result.

Final method The tests were then performed and we had a first round and a second round of results. When looking through the 3G results, some abnormal patterns in the energy estimation was discov- ered and we decided to look into this more. Another test-round was made to see if the 3G data still acted abnormal. To ensure that the abnormalities were not caused by the specific test setup a new test shall be performed, where the calls are split up into 10 seconds pieces over 3 minutes. This is only done on 3G since this is where it was deemed interesting. This test strengthened the notion that something is wrong with 3G and two more tests are to be performed. One where a different device configuration is used in Energybox and one where the total call time is 6 minutes instead of 3 minutes.

3.3 Methodology in the application

The above mentioned tests will be executed with the help of some new code in the applica- tion. The newly written code will start video and voice communication just as before, but only for a specific amount of time. There will exist the possibility of making a 30 second call, a 1.5 minute call and a 3 minute call. For the 30 second call, the call will be disconnected after 30 seconds and then a new call will be started, though with a 3 second delay. This will be repeated six times, so that the total amount of time will be three minutes. The same will happen to the 1.5 minute call, but it will only be repeated two times. Other than this the recipient will be hard-coded, or in other words we will only be able to call one person. The person that receives the call will not be able to chose if the call should be accepted or not, as soon as the caller calls the application will start the voice/video-call. This can also be solved with a script, but this time the code (that was going to perform the actions) was integrated into the application. This can have an effect on the results, however we believe it does not since the call function will not be altered.

8 4 Results

In this chapter we are presenting the results from our tests. Three test rounds were performed for the main results. First we will present an overview of how the different test cases looked after they were captured (section 4.1 and 4.2). Not all the results from this are presented since most of them are repetitive and very similar, therefore we have chosen a few random tests that shows the general pattern that appeared. The rest of the results are presented in the appendix. Then we show the amount of packets that were sent during each test (section 4.3). This is then followed by the energy consumption estimations for all the traces from the performed tests, which is calculated by using Energybox (section 4.4). Then we calculated some averages from these results (section 4.5). Lastly the extra 3G tests are presented (section 4.6). In section 4.1 and 4.2 there are different graphs with the same kind of X and Y axis. The X axis in the graphs is the time in seconds and the Y axis is the size of the packets. The orange colors in the graphs indicate the downloaded packets while red shows the uploaded packets.

4.1 Voice communication

Here it can be seen how the packets are spread out when the voice call tests were performed. These graphs come specifically from the WiFi tests, but they apply to all three communication technologies since they all behaved very similar. The packets sent during voice calls averaged about 100 bytes in size.

Figure 4.1: Voice-testing with wifi over 3 minutes.

Here there it can be seen that there is two spikes in the diagram, one in the beginning and one in the end. In the beginning the connection is established between the clients and in the end the connection is broken down.

9 4.2. Video communication

Figure 4.2: Voice-testing with wifi over 1.5 minutes with a total time of 3 minutes.

Just as before the connection is established each time the call is made at 0 seconds and 90 seconds. The call is also shut down at approximately right before 90 seconds and 180 seconds. We speculate that he extra spikes are because of the call library Sinch, where Sinch confirms the connection by sending some extra packets because packets sent during the spikes are packets related to setting up UDP connections.

Figure 4.3: Voice-testing with wifi over 30 seconds.

This trace had a total time of 3 minutes and the total amount of energy was 44 Joule. Here there is a spike each time a call is made (at 2, 35, 65, 95, 125 and 155 seconds) and a spike each time the call ends.

4.2 Video communication

As with the voice calls, the video calls behaved similarly for all three communication tech- nologies. Therefore we only show the graphs from the 3G tests. The packets sent during video calls averaged around 1000 bytes, but the sizes differ much more than in voice calls.

Figure 4.4: One three minute video call, that used 242 joule of energy.

Here it can be seen that there exist a spike in the beginning of the video call, when the con- nection is established. Unlike the voice results in section 4.1, the size of the packets does not shrink but remains very large.

Figure 4.5: Two 1.5 minute video calls with a total length of 3 minutes.

The total amount of energy used is 246 Joule. There are two spikes in the beginning on each call when the connection is established. However when ending the call there is no spike, in contrast to the voice results in section 4.1.

10 4.3. The number of packets sent and received

Figure 4.6: Six 30 second video calls with a total length of 3 minutes.

The total amount of energy used is 242 Joule. Here the spikes of the beginning of the calls are more distinguished, compared to the video results above.

It can be seen that the energy consumption was the same for these three cases. This is very interesting since the connection is set up several times more in the last case. According to our theories (section 2.1-2.4), this should however drain more energy, but compared to our results it drained less.

4.3 The number of packets sent and received

During each test a certain amount of packets were sent both uplink and downlink. These are presented to give a better overview of the amount of packets that were sent during the tests and also the difference between how much data video and voice calls send.

Voice calls

Type of method WiFi 3G LTE Uplink/Downlink 30s 1.5min 3min 30s 1.5min 3min 30s 1.5min 3min UL 8 337 9 359 9 644 8 441 9 371 9 688 8 461 9 453 9 672 DL 8 317 9 537 9 744 7 884 9 158 9 579 7 916 9 225 9 568

Table 4.1: Packets sent and received during first test round.

Type of method WiFi 3G LTE Uplink/Downlink 30s 1.5min 3min 30s 1.5min 3min 30s 1.5min 3min UL 8 370 9 392 9 682 8 408 9 356 9 580 8 358 9 415 9 684 DL 8 309 9 481 9 794 7 836 9 145 9 459 7 817 9 200 9 585

Table 4.2: Packets sent and received during second test round.

Type of method WiFi 3G LTE Uplink/Downlink 30s 1.5min 3min 30s 1.5min 3min 30s 1.5min 3min UL 8 368 9 352 9 647 8 391 9 379 9 631 8 467 9 432 9 664 DL 8 328 9 474 9 824 7 842 9 178 9 529 7 907 9 218 9 546

Table 4.3: Packets sent and received during third test round.

From these tests we can see that the amount of packets do not vary that much between the different tests and communication technologies. For example most 3 minute calls are within 200 packets of each other for both upload and download. This could mean that the testing environment did not vary a lot between tests.

11 4.4. Summarized results

Video calls

Type of method WiFi 3G LTE Uplink/Downlink 30s 1.5min 3min 30s 1.5min 3min 30s 1.5min 3min UL 36 326 47 351 49 771 21 991 28 913 32 040 36 132 45 303 46 590 DL 37 026 40 620 45 724 33 252 40 928 48 681 31 645 40 914 40 470

Table 4.4: Packets sent and received during first test round.

Type of method WiFi 3G LTE Uplink/Downlink 30s 1.5min 3min 30s 1.5min 3min 30s 1.5min 3min UL 39 559 47 162 47 134 22 281 28 829 29 793 27 094 37 869 35 255 DL 38 525 46 312 48 155 28 755 43 619 49 603 30 287 40 519 47 688

Table 4.5: Packets sent and received during second test round.

Type of method WiFi 3G LTE Uplink/Downlink 30s 1.5min 3min 30s 1.5min 3min 30s 1.5min 3min UL 38 190 54 588 54 550 21 154 27 551 31 135 29 252 36 941 36 937 DL 37 807 44 270 43 695 24 861 44 997 44 967 35 325 36 968 40 572

Table 4.6: Packets sent and received during third test round.

In these tables (4.4, 4.5 and 4.6) it can be seen that for video calls, the device sends a lot more packets compared to the voice option (tables 4.1, 4.2 and 4.3). This might not always correlate to more data sent but in this case the video calls average about 64MB sent, whereas voice calls average about 4MB of data sent. This in itself is not that interesting, but combined with the energy consumption presented in section 4.4 and 4.2, it shows some abnormalities we discuss later. It can also be seen how different the ratios between upload and download are for the cases in all the tests. This is presented better in section 4.5.

4.4 Summarized results

Here the results are summarized for a better overview. All the tables here show some inter- esting patterns and will be discussed.

Total energy consumption

Type of communication method Voice Video Time interval 30sec 1.5min 3min 30sec 1.5min 3min WiFi 44 J 46 J 46 J 73 J 80 J 81 J 3G 242 J 242 J 242 J 243 J 246 J 242 J LTE 321 J 340 J 339 J 349 J 378 J 384 J

Table 4.7: Overview over the first round of results based on the results from 4.1 and 4.2.

12 4.5. Average results

Type of communication method Voice Video Time interval 30sec 1.5min 3min 30sec 1.5min 3min WiFi 44 J 45 J 48 J 73 J 79 J 81 J 3G 242 J 242 J 241 J 242 J 246 J 243 J LTE 314 J 339 J 346 J 352 J 379 J 376 J

Table 4.8: Overview over the second round of results.

Type of communication method Voice Video Time interval 30sec 1.5min 3min 30sec 1.5min 3min WiFi 44 J 46 J 45 J 73 J 79 J 80 J 3G 242 J 243 J 244 J 242 J 246 J 243 J LTE 316 J 337 J 344 J 352 J 379 J 383 J

Table 4.9: Overview over the third round of results.

In these tables (4.7, 4.8 and 4.9) it can be seen that the 3G results behave in a way that is not expected. Unlike WiFi and LTE, the 3G results do not vary so much, but almost has the same value regardless of time interval and method of communication. These are the results that are mentioned in section 3.2 and lead to the extra tests on 3G. This is analyzed deeply in the discussion in section 5.1.

4.5 Average results

In order to be able to compare the different methods of communication and transmission, the averages of all cases are calculated. They do not include the extra tests performed for 3G. They will be used to compare values in the discussion.

Average energy consumption for the tests

Type of communication method Voice Video WiFi 45 J 78 J 3G 242 J 244 J LTE 333 J 370 J

Table 4.10: Overview over the average results based on the results from 4.1 and 4.2

Type of communication method Voice Video WiFi 46 J 78 J 3G 242 J 244 J LTE 333 J 369 J

Table 4.11: Overview over the average results for the second round of results.

13 4.6. Additional 3G tests

Type of communication method Voice Video WiFi 45 J 77 J 3G 243 J 244 J LTE 332 J 371 J

Table 4.12: Overview over the average results for the second round of results.

The average percentage of packets sent uplink over all of the tests, excluding the additional 3G tests. To better show how the different test cases sent packets we have made some percentages to easily compare them

Type of communication method Voice (Uplink) Video(Uplink) WiFi 49,8% 51,8% 3G 50,9% 40,3% LTE 50,8% 53,1%

Table 4.13: The percentage of packets sent uplink during the first test (From tables 4.1 and 4.4).

Type of communication method Voice (Uplink) Video(Uplink) WiFi 49,9% 50,2% 3G 50,9% 40,3% LTE 50,8% 46%

Table 4.14: The percentage of packets sent uplink during the second test (From tables 4.2 and 4.5).

Type of communication method Voice (Uplink) Video(Uplink) WiFi 49,8% 53,9% 3G 50,8% 41,0% LTE 50,9% 47,6%

Table 4.15: The percentage of packets sent uplink during the second test (From tables 4.3 and 4.6)

In table 4.13 the results shows the average in uplink percentage. It can be seen all voice-based results was very close to 50%, regardless of communication method (WiFi, 3G, LTE). In tables 4.14 and 4.15 the results are similar to table 4.13. Unlike the WiFi and LTE results, the 3G results has much less uplink percentage for video. This very interesting since this means the device downloads more than it uploads. This could mean that problems exist in our method and will be discussed further in section 5.1 .

4.6 Additional 3G tests

Here we write about the additional 3G tests for both voice and video.

14 4.6. Additional 3G tests

Changing call time At first we tried changing the call time to 10 seconds to see how the results changed. The time was randomly chosen as a time that was at least less than the previous minimum of 30 seconds.

Figure 4.7: Packets sent during extra 3G test.

Figure 4.8: Power states during extra 3G test.

Energy consumption for the tests ended up being 242 Joule used for voice and 244 Joule used for video. The voice call sent a total of 10 199 packets and the video calls sent 25 587 packets.

Changing the device configuration of the voice traces In our previous tests the general device configuration device3g was used and it was tested to change this to nexus_one_3g. Each number below represents the energy consumption of the device in the state. These two device configurations are different, which can be seen at their power parameters:

Powermode Device_3g POWER_IN_IDLE 0.0 0.2 POWER_IN_FACH 0.45 0.5 POWER_IN_DCH 0.6 1.3

Here we can see the results of our test with changed device configuration. We used the trace files from the first and second test rounds.

Testround Length on test Consumed energy 1 30sec 113 Joule 1 1.5min 113 Joule 1 3min 113 Joule 2 30sec 113 Joule 2 1.5min 113 Joule 2 3min 113 Joule

The total amount of energy when the device3G configuration was used was around 242 Joule (with a minor difference of a joule or two). For the other configuration nexus_one_3g, we had similar results where all of the tests total amount of energy was 113 Joule (with a difference of tenth of a joule).

15 4.6. Additional 3G tests

Changing the device configuration of the video traces Here we also changed the device configuration from device3g to nexus_one_3g. The results of this is seen in the table below:

Testround Length on test Consumed energy 1 30sec 113 Joule 1 1.5min 115 Joule 1 3min 113 Joule 2 30sec 113 Joule 2 1.5min 115 Joule 2 3min 113 Joule

Unlike the voice results, the video results changes more depending on the time intervals. It changes with a difference of a few joules in video compared to a tenth of a joule in voice. This pattern was also observed in the result over the total consumed energy in section 4.4.

Changing the total amount of time We also performed a test where the total time was 6 minutes instead of 3 minutes, which was the standard of the previous tests (see section 4.1 to 4.5). This was done in order to see what happened to the energy consumption when varying the total time. The intervals were the same as the earlier tests. These are presented here.

Type of communication method Voice Video Time interval 30sec 1.5min 3min 30sec 1.5min 3min 3G 476 J 480 J 476 J 478 J 476 J 476 J

Compared to the average energy consumption of the regular 3G tests of 243 Joule, this is about doubled. This is what we expected to happen, yet it still shows the pattern described before.This will still be part of the deeper discussion in this phenomenon.

16 5 Discussion

Here we discuss what our results showed us and what was of interest. We also discuss our method and what could have been done differently. We also have a quick look on the work in a wider context.

5.1 Results

By looking at the results from section 4.4 it is seen that the amount of packets sent uplink differ between voice and video. Video sends more packets compared to voice with at least a 10 000 difference in the number of packets in the same time period. In section 4.4 it can be seen that the tables for the different rounds of results are mostly alike, which strengthens our belief that the results are credible. From chapter 2 we know that there is a connection between the number of packets and the used energy. By taking this information into consideration we believe that the most energy efficient communication method would be the voice alternative. Then we study WiFi, 3G and LTE. According to the tables in section 4.4 WiFi is the most energy efficient method, followed by 3G and LTE. These implications are not new to us and they were expected at the beginning of this work. However at the total energy consumption (table 4.7 and table 4.8) the LTE results varied much compared to the rest. 3G and WiFi did not vary so much between the two different sets of results, at most the difference was 2 joules, while the LTE could have a difference at 8 joules. We believe that this occurs because of poor network conditions or the amount of connected users to the network. We also noticed that where the total amount of used energy was higher and that the number of sent packets uplink was also higher. This would logically make sense since more sent packets should lead to a higher energy consumption. However this intuition turned out to be wrong later on. This is because of the limited time that we had to perform tests and create a understanding of how everything works. The 3G experiments showed some interesting results. The difference in energy consump- tion between different tests was very small. Even with packets sent and received ranging from 10 199 for voice calls up to 80 721 packets sent during video calls. The different energy consumptions shown in tables 4.7 and 4.8 for 3G is no more than 4 Joule. Comparing this difference with the difference of 29 to 33 joules between video and voice for WiFi and 30 to 38 Joule difference for LTE, the question arises on why it is like this for 3G. For a small amount of data this would be quite ineffective, since more energy than necessary would be used. For

17 5.2. Method large amounts of data, this will on the other hand be quite good since it uses the same amount of energy for the transmission, but sends more data. At the beginning it was believed that more packets would lead to more consumed energy and that video calls would drain more energy compared to voice calls. Nevertheless this statement is contradicted by our results for 3G. The extra tests were initiated to see exactly what made the 3G results so different from the WiFi and LTE results. First changing the device configuration for voice and video. Even though the results were different in scale, the pattern was the same. All tests had almost the same amount of consumed energy, with the 1.5 minute video tests consuming a little bit more. This leads to the conclusion that the device configuration files are not the source of this pattern, but it is something else. Then we changed the total amount of time from 3 minutes to 6 minutes. These results showed that the consumed energy was almost doubled, which was expected since twice the time should give twice the data and double the time in a high energy state. But it also showed a very similar pattern to the one shown in 4.4. This is suspicious since voice and video varied more for the other two transmission technologies. The theory also contradicts this, as video should consume more energy than voice. Therefore this should be tested on actual hardware rather than the simulated approach used now, since the software (the testing application that was run on the phone) might be inaccurate. A possible reason for this could because of the call library Sinch that is used in the tests. It could be that Sinch behaves different when making calls over the 3G network. This means that a different call software could perhaps show a different result. It could also be because 3G actually acts this way in reality. Looking at tables 4.4 and 4.5 it can be noted that the amount of downloaded packets are less than the ones uploaded for LTE. It is not certain what is causing this difference, but a theory is that packets are being dropped since they are being sent as UDP packets over a wireless network and wireless networks are not as stable as wired ones. It could also be the server the packets pass through between devices. Whatever it is could affect the results of the tests, since packets being dropped means that they might not reach the receiver, unless they are dropped by the receiver. This means that it is not certain how many packets actually are received. This could affect the result, but it is not certain how much. Another thing seen in the same tables is that in all of the 3G video tests and in some of the LTE video tests, the device receives more packets than it sends. This means that either the device on the other end is acting different in a way that enables it to send more packets or the server in between the devices is adding packets. Whatever it is it could have a effect on the tests since both sides are not working in the same conditions and the amount of packets could change the simulation of the energy consumption. But this could also stem from us not differentiating between data packets and packets for the connection between clients. We do not know if this has any effect on the energy consumption. This could also happen because of different network conditions making the adaptive codec change the amount of packets going each way. After some reflection on the subject we believe that we were wrong in thinking that the 3G results were wrong. As long as the entity is in high energy mode, the amount of data that is being sent does not matter. It will still use about the same amount of energy.

5.2 Method

No method is perfect and ours is no exception to this. There are several points that need to be evaluated and discussed about the method. Energybox is a great tool which allows people to easily estimate how much energy a de- vice uses when sending data, without cumbersome physical tests. But it has some big prob- lems with large traces. When working on a trace that contains many packets, the program slows down severely. This meant that the plans on how to perform our tests changed many

18 5.2. Method times before a working setup was found. To avoid this, the tools could have been tested before the actual tests were planned. This also means that when getting close to the upper limit on how many packets the program can handle, the processing will take upwards of 25 minutes. Then when the results are presented, it can take another 5 minutes to load each page. It also requires a powerful computer, often using more than 10GB of RAM to calculate and present the results. The extra test where the video trace was 6 minutes took even longer to compute, with times between 30 to 40 minutes and another 10 minutes to load a second page in the results. It also required the program to be allocated 20GB of RAM to be able to finish the calculations. It is a very limiting factor in the method, which needs to be considered. This means that the tests are very limited in scope, therefore the applicability of them might not be that good. Energybox also requires configuration files. These have to be constructed using values measured from the actual hardware it simulates. This was not a possibility for this test, meaning that the precision of all values calculated might not be good, since they are for completely different networks and devices. However they are still applicable for a overview of how things work, since the same configuration files were used consistently and they are still replications of actual functioning hardware. Therefore conclusions can still be drawn and discussed. The tests were performed and recorded on a that was factory reset and all software that was not needed was disabled. Despite these preventative measures, there were packets that got into the trace that were not specifically from the test. These extra packets are deemed negligible, since they are so few compared to the amount of packets sent during a video or voice call. That is also because the tests did not rely on sections where no packets would be sent. The lack of resources means that exact test settings were not possible. Network conditions could be different between tests, since that is affected by amount of devices currently using the network or general obstacles. It was attempted to keep the settings as alike as possible by performing all tests in the same area. This could affect how many packets are sent, since the voice/video call API used for the tests has a dynamic codec adaption. This means that different amounts of data could be sent in identical tests. However these differences have been small enough that this can also be deemed negligible, but it could be improved and preferably avoided. A possible variable that has not been used is the time between calls. To avoid crashes from ending a call and immediately starting a new call, 3 seconds were put right in between the end and start of calls. This time is just enough to not start idle or power save states in the transmission technologies being tested. Increase the time and it starts affecting the test. Therefore this is something to be used in future tests. The time is also important if the energy tail of the trace will be studied. Another possible variable is the quality of video and voice sent. As Trestian et al [2] showed, for certain types of media the quality could be decreased without a noticeable difference in quality of experience. This could be experimented with in live video calls and used since lower quality means less data sent. This would however require a different test setup, which is why it wasn’t done for this thesis. The code in the testing application could cause the probe effect, which is an unintended alteration that happens when a system is measured. This is because of the code in the original application was edited to automatically perform the calls. Since this replaced a script running externally and that no core functions were edited, we judge that the probe effect was not affecting the results. But for future works, a external script could be used to confirm the results from these tests.

19 5.3. The work in a wider context

5.3 The work in a wider context

Energy consumption is a big research topic, since mobile devices are still severely limited by how much energy they can store. Therefore it is of great interest to make mobile devices as energy efficient as possible. Testing and discovering how video call software acts during different conditions and how that matters for energy consumption can help make mobile de- vices more energy efficient. This can be used to improve the energy consumption for both the average person on the street or a emergency responder trying to communicate with col- leagues far away. Lowering energy consumption also has the added effect of being better for the environment. Not all electricity is generated in a "green" fashion and by consuming less energy, the usage can be deemed better.

20 6 Conclusion

Here is our conclusion of this thesis. In this chapter we will write about our results and what we recommend for future work.

6.1 Results

As seen in the results the voice option is much more energy-efficient than video. If the net- work connections is bad enough that the call keeps disconnecting, then it is recommended to use voice. When using this application in the field it is suggested to use the 30 second- option as much as possible when using LTE. For WiFi and 3G the energy consumption does not change so much between the distinctive options, which leads to the conclusion that you can freely use any option. However since 3G appears to not really differ in energy consumption, even when call settings differ wildly, it would be recommended to simply keep the call length as short as possible when using 3G. But if it is available and a video call could be more useful than a voice call, using 3G is the recommended choice since it would use as much energy as if it would have been a voice call. But considering all the doubts appearing in section 4.6 and 5, this should be taken with a grain of salt. Later on after some reflection we could see that 3G is supposed to act this way. This means that the above recommendations apply for 3G. For WiFi and LTE it is suggested to use WiFi if possible and LTE should be avoided in order to increase energy efficiency. If the user needs to use the video option, the user should try to minimize the time of the video conversation.

6.2 Future work

The tool Energybox could have been used in a much more effective way. It took some time to understand that Energybox was limited in capacity for different time intervals and different amount of packets. For future work it is suggested to either limit yourself to smaller trace files or to rebuild Energybox so that it can handle larger trace files. It is also important to see that all of the settings are chosen carefully. Depending on the settings the results may vary. It would be interesting for future work to look at traces with longer gap between the voice and video calls, to see how this affects the energy consumption. Another thing that would be interesting to study is to see how the different settings and hardware affect the result.

21 Bibliography

[1] R. Trestian, A. N. Moldovan, O. Ormond, and G. M. Muntean. “Energy consumption analysis of video streaming to Android mobile devices”. In: 2012 IEEE Network Opera- tions and Management Symposium. Apr. 2012, pp. 444–452. DOI: 10.1109/NOMS.2012. 6211929. [2] R. Trestian, O. Ormond, and G. M. Muntean. “Energy Quality Cost Tradeoff in a Multimedia-Based Heterogeneous Wireless Network Environment”. In: IEEE Transac- tions on Broadcasting 59.2 (June 2013), pp. 340–357. ISSN: 0018-9316. DOI: 10 . 1109 / TBC.2013.2244790. [3] S. Chandra. “Wireless network interface energy consumption”. In: Multimedia Systems 9.2 (Aug. 2003), pp. 185–201. ISSN: 1432-1882. DOI: 10.1007/s00530-003-0089-0. URL: https://doi.org/10.1007/s00530-003-0089-0. [4] G. Kalic, I. Bojic, and M. Kusek. “Energy consumption in android phones when using wireless communication technologies”. In: 2012 Proceedings of the 35th International Con- vention by Croatian Society for Information and Communication Technology, Electronics and Microelectronics. May 2012, pp. 754–759. [5] S. V. Rajaraman, M. Siekkinen, and M. A. Hoque. “Energy consumption anatomy of live video streaming from a ”. In: 2014 IEEE 25th Annual International Symposium on Personal, Indoor, and Mobile Radio Communication (PIMRC). Sept. 2014, pp. 2013–2017. DOI: 10.1109/PIMRC.2014.7136502. [6] M. A. Hoque, M. Siekkinen, J. K. Nurminen, and M. Aalto. “Dissecting mobile video services: An energy consumption perspective”. In: 2013 IEEE 14th International Sympo- sium on "A World of Wireless, Mobile and Multimedia Networks" (WoWMoM). June 2013, pp. 1–11. DOI: 10.1109/WoWMoM.2013.6583384. [7] V. Kadu and A. Saywan. “Review of Energy Consumption in Mobile Networking Technology”. 2016, pp. 286–290. URL: www . researchpublish . com / journal / IJCSITR/Issue-1-January-2016-March-2016/0. [8] A. Barbuzzi, P. Perälä, and G. Boggia. “3GPP radio resource control in practice”. 2012, pp. 76–83. URL: http : / / ieeexplore . ieee . org / stamp / stamp . jsp ? tp = &arnumber=6393521.

22 Bibliography

[9] G. Durrel De Silva, B. Chen, and M. Choon Chan. “Collaborative cellular tail energy reduction: Feasibility and fairness”. In: Pervasive and Mobile Computing 36 (2017). Special Issue on Pervasive Social Computing, pp. 115–133. ISSN: 1574-1192. DOI: https:// doi.org/10.1016/j.pmcj.2016.09.011. [10] P. H. J. Perälä, A. Barbuzzi, G. Boggia, and K. Pentikousis. “Theory and Practice of RRC State Transitions in UMTS Networks”. In: 2009 IEEE Globecom Workshops. Nov. 2009, pp. 1–6. DOI: 10.1109/GLOCOMW.2009.5360763. [11] X. Wei, T. Stoner, J. Knight, and L. Guo. “Measuring and Understanding RRC State Machine Optimization in Light of Recent Advancements”. In: IEEE Transactions on Mo- bile Computing 16.5 (May 2017), pp. 1330–1342. ISSN: 1536-1233. DOI: 10.1109/TMC. 2016.2598164. [12] J. Huang, F. Qian, A. Gerber, M. Mao, S. Sen, and O. Spatscheck. “A Close Examination of Performance and Power Characteristics of 4G LTE Networks”. In: Proceedings of the 10th International Conference on Mobile Systems, Applications, and Services. MobiSys ’12. Low Wood Bay, Lake District, UK: ACM, 2012, pp. 225–238. ISBN: 978-1-4503-1301-8. DOI: 10 . 1145 / 2307636 . 2307658. URL: http : / / doi . acm . org / 10 . 1145 / 2307636.2307658. [13] E. Jon Vergara, S. Nadjm-Tehrani, and M. Prihodko. “EnergyBox: Disclosing the wire- less transmission energy cost for mobile devices”. In: Sustainable Computing: Informatics and Systems 4.2 (2014). Special Issue on Selected papers from EE-LSDS2013 Conference, pp. 118–135. ISSN: 2210-5379. DOI: https://doi.org/10.1016/j.suscom.2014. 03.008. URL: http://www.sciencedirect.com/science/article/pii/ S2210537914000195. [14] E. Eugenio and A. Cortesi. “WiFi-Related Energy Consumption Analysis of Mobile De- vices in a Walkable Area by Abstract Interpretation”. In: Distributed Computing and In- ternet Technology. Ed. by P. Krishnan, P.R. Krishna, and L.Parida. Cham: Springer Inter- national Publishing, 2017, pp. 27–39. ISBN: 978-3-319-50472-8. [15] Gunnar Berg. In: (2016), p. 28. URL: http : / / www . diva - portal . org / smash / record.jsf?pid=diva2%5C%3A1037739%5C&dswid=-2303.

23 Appendix

Here all of our results from the experiment is presented. In the result there are two kinds of packets, symbolized with orange and red color.The orange color symbolizes the packets sent downlink, while the red color symbolizes the packets sent uplink.

6.3 Voice communication

WiFi The results using wifi with time intervals of 30 seconds, 1.5 and 3 minutes indicates that the energy consumption is not affected so much by the different intervals.

Figure 6.1: Voice-testing with wifi over 3 minutes. The total amount of energy was 46 Joule.

Figure 6.2: Voice-testing with wifi over 1.5 minutes with a total time of 3 minutes. The total amount of energy was 46 Joule.

24 6.3. Voice communication

Figure 6.3: Voice-testing with wifi over 30 seconds with a total time of 3 minutes. The total amount of energy was 44 Joule.

3G The results when using the 3G network showed some interesting points. Comparing figure 6.4 to figure 6.5 and 6.6 it can be seen that even though transmissions times are slightly lower for both the latter tests, they still use more energy.

Figure 6.4: Packets over time in 3 minute transmission over 3G. The total amount of energy was 242 Joule.

Figure 6.5: Packets over time in two 1.5 minute transmissions over 3G. The total amount of energy was 242 Joule.

Figure 6.6: Packets over time in six 30 second transmissions over 3G. The total amount of energy was 242 Joule.

25 6.3. Voice communication

LTE Here is the result for the LTE voice communication presented. Interestingly enough, LTE breaks the pattern of more calls leading to more energy used.

Figure 6.7: Packets over time in one 3 minute transmission over LTE. The total amount of energy was 339 Joule.

Figure 6.8: Packets over time in two 1.5 minute transmissions over LTE. The total amount of energy was 340 Joule.

Figure 6.9: Packets over time in six 30 second transmissions over LTE. The total amount of energy was 321 Joule.

26 6.4. Video communication

6.4 Video communication

WiFi Here the results is presented when using wifi for a video call.

Figure 6.10: A 3 minute video call using wifi. The total amount of used energy is 81 Joule.

Figure 6.11: Two 1.5 minute video calls with a total length of 3 minutes. The total amount of used energy is 80 Joule.

Figure 6.12: Six 30 second video calls with a total length of 3 minutes. The total amount of energy used is 73 Joule.

3G Here the results is presented when using 3G for a video call.

Figure 6.13: One three minute video call, that used 242 joule of energy.

27 6.4. Video communication

Figure 6.14: Two 1.5 minute video calls with a total length of 3 minutes. The total amount of energy used is 246 Joule.

Figure 6.15: Six 30 second video calls with a total length of 3 minutes. The total amount of energy used is 242 Joule.

LTE Here the results is presented when using LTE for a video call.

Figure 6.16: A 3 minute trace over a video call. The total amount of used energy was 384 Joule.

Figure 6.17: Two 1.5 minute video calls. The total amount of used energy was 377 Joule.

28 6.5. Uplink and downlink distribution

Figure 6.18: Six 30 second video calls. The total amount of used energy was 348 Joule.

6.5 Uplink and downlink distribution

Here the result for the downlink and uplink is presented for the different communication methods.

Up- and downlink over voice As seen in this result the uplink and downlink sends almost the same amount of packets, even though the 3 minute call is made in 30 seconds, 1.5 minute and 3 minute intervals. The communication method does not affect this fact either.

Figure 6.19: Here is the result of the distribution of the up- and downlink for voice calls when using wifi.

29 6.5. Uplink and downlink distribution

Figure 6.20: The distribution over up- and downlink using voice call over 3G. Here it is seen that the uplink and downlink distribution is almost the same as for the voice with wifi result.

Figure 6.21: The distribution over up- and downlink using voice call over LTE. Here it is seen that the uplink and downlink distribution is almost the same as for the voice with wifi and 3G result.

30 6.5. Uplink and downlink distribution

Up- and downlink over video Unlike the voice communication, the packets for the downlink is more compared to the pack- ets for the uplink. This was quite surprising, as it was expected for the packets for up- and downlink to be roughly the same.

Figure 6.22: The distribution over up- and downlink when using video over WiFi.

31 6.5. Uplink and downlink distribution

Figure 6.23: The distribution over up- and downlink when using video over 3G.

Figure 6.24: The distribution over up- and downlink when using video over LTE.

32 6.6. Connection between power, states and amount of packets

6.6 Connection between power, states and amount of packets

In our results, it was noted that the used energy (previously mentioned in Joules) is connected to the power used by the application. As another interesting connection is that the power is connected to the different kind of states and the amount of packets. This gives us the implication that the amount of packages sent uplink and downlink is connected to the total amount of energy used.

Figure 6.25: One of our result for a voice call over wifi. It can be seen that power is connected to the number of sent packages.

6.7 Summarized results

Here the results are summarized for a better overview.

Total energy consumption

Type of communication method Voice Video Time interval 30sec 1.5min 3min 30sec 1.5min 3min WiFi 44 J 46 J 46 J 73 J 80 J 81 J 3G 242 J 242 J 242 J 243 J 246 J 242 J LTE 321 J 340 J 339 J 349 J 378 J 384 J

Table 6.1: Overview over the first round of results based on the results from 4.1 and 4.2.

Type of communication method Voice Video Time interval 30sec 1.5min 3min 30sec 1.5min 3min WiFi 44 J 45 J 48 J 73 J 79 J 81 J 3G 242 J 242 J 241 J 242 J 246 J 243 J LTE 314 J 339 J 346 J 352 J 379 J 376 J

Table 6.2: Overview over the second round of results.

33 6.7. Summarized results

Uplink and downlink for voice communication

Type of method WiFi 3G LTE Uplink/Downlink 30s 1.5min 3min 30s 1.5min 3min 30s 1.5min 3min UL 8 337 9 359 9 644 8 441 9 371 9 688 8 461 9 453 9 672 DL 8 317 9 537 9 744 7 884 9 158 9 579 7 916 9 225 9 568

Table 6.3: Overview over the number of packages sent uplink and downlink.

Type of method WiFi 3G LTE Uplink/Downlink 30s 1.5min 3min 30s 1.5min 3min 30s 1.5min 3min UL 8 370 9 392 9 682 8 408 9 356 9 580 8 358 9 415 9 684 DL 8 309 9 481 9 794 7 836 9 145 9 459 7 817 9 200 9 585

Table 6.4: Overview over the number of packages sent uplink and downlink, based on the second voice results.

Uplink and downlink for video communication

Type of method WiFi 3G LTE Uplink/Downlink 30s 1.5min 3min 30s 1.5min 3min 30s 1.5min 3min UL 36 326 47 351 49 771 21 991 28 913 32 040 36 132 45 303 46 590 DL 37 026 40 620 45 724 33 252 40 928 48 681 31 645 40 914 40 470

Table 6.5: Overview over the number of packages sent uplink and downlink.

Type of method WiFi 3G LTE Uplink/Downlink 30s 1.5min 3min 30s 1.5min 3min 30s 1.5min 3min UL 39 559 47 162 47 134 22 281 28 829 29 793 27 094 37 869 35 255 DL 38 525 46 312 48 155 28 755 43 619 49 603 30 287 40 519 47 688

Table 6.6: Overview over the number of packages sent uplink and downlink, based on the video results from the second sets of results.

34 6.8. Average results

6.8 Average results

Average results for the uplink package percentage

Type of communication method Voice Video WiFi 45,333... J 78 J 3G 242 J 243,666... J LTE 333,333.. J 370,333... J

Table 6.7: Overview over the average results

Type of communication method Voice Video WiFi 45,666... J 77,666... J 3G 241,666... J 243,666... J LTE 333 J 369 J

Table 6.8: Overview over the average results for the second round of results.

Average results for the uplink package percentage

Type of communication method Voice (Uplink) Video(Uplink) WiFi 49,8% 51,8% 3G 50,9% 40,3% LTE 50,8% 53,1%

Table 6.9: Overview over the average results of the up- and downlink, based on the results from ??. The results shows the result in uplink percentage. It can be seen all voice-based results was very close to 50%, regardless of communication method (WiFi, 3G, LTE).

Type of communication method Voice (Uplink) Video(Uplink) WiFi 49,9% 50,2% 3G 50,9% 40,3% LTE 50,8% 46%

Table 6.10: Overview over the average results of the up- and downlink, based on the second round of result. The results shows the result in uplink percentage.

35