Friday, July 4, 2008

Performance Analysis of Task 7

Task Description:
"Perform a performance analysis of the application described in task 7 to determine whether the battery-aware element of the algorithm works."[1]

Experiment Basic Information and Precondition:

The main purpose of this experiment is to find what factors can affect SPOTs’ battery life and evaluate the performance of my algorithm for Task 7. We use “Supply Voltage” to measure SPOTs battery life and think this value can range from 3050MV to 4900MV. So 3050MV means no energy (0%) and 4900MV means full-energy (100%).


In the following tests, each SPOT has been charged for 200 minutes. I implemented all tests by two different network architectures:

Network Architecture 1

Network Architecture 2

If there is no special explanation, the test is done by Network Architecture 1.


In testing result chart, X axis stands for Work-Time that records how long SPOTs can stay and the unit of Work-Time unit is second; Y axis stands for Battery-Remaining (Current Supply Voltage) measured in millivolt.


1. To measure how reading frequency can affect SPOTs’ battery life.

No Deep-Sleeping Mode

Deep-Sleeping Mode

Result:

The frequency of readings can affect SPOTs’ battery life, especially for those SPOTs with deep-sleeping mode. In a deep-sleeping mode, there is no battery consumption if the SPOT doesn’t take readings and communication with the base station. So a SPOT’s battery cannot keep itself alive for long if it frequently takes readings and uses the radio.

But the affect of reading-frequency is NOT obvious without deep-sleeping mode. The SPOTs mainly use the radio device during the whole process of taking readings. The other devices in a SPOT consume much more power than the radio so that the extra battery consumption weakens the affect of reading-frequency very much.


“While considerable power can be saved during shallow sleep, it is still necessary to power much of the Sun SPOT hardware:

• CPU – power on but CPU clock off (the CPU's power saving mode)

• Master system clocks – power on

• Low level firmware – power on

• RAM – power on but inactive

• Flash memory – power on but inactive

• CC2420 radio – power on

• AT91 peripherals – power on”[1]

[1]Quoted from Sun™ Small Programmable Object Technology (Sun SPOT) Developers’ Guide(Page 37-38) Author: Sun Labs 16-April-2007

2. To measure how deep-sleeping mode can affect SPOTs’ battery life.

Result:

The deep-sleeping mode can affect SPOTs’ battery life very much. In deep-sleeping mode, SPOTs almost don’t consume power between readings so that the battery can work for a long time.


3. To measure how different communication ways can affect SPOTs’ battery life

Network Architecture 1

Network Architecture 2

Result:

SPOTs can save a little more power by the Point-to-Point way than the broadcast way but this affect is not very important.


4. To measure how different network configurations can affect SPOTs’ battery life.

Communication Way : Broadcast

Communication Way: Point-to-Point

Result:

Different network configurations can affect SPOTs’ battery life only a little. All SPOTS with equivalent power can stay for almost equivalent time by Network Architecture 1 and the affect between SPOTs is very small. In Network Architecture 2, the middle SPOT keeps working in the shortest time, the one close to the base station stays longer and the last one keeps alive in the longest time. The number of transmission Packages through the middle one are much more than the number of those packages through the other SPOTs. So a mesh router consumes much more power than a regular SPOT. In addition, Network Architecture 2 is not as stable as Network Architecture 1 because some package is possibly lost while transmitting messages by mesh routers and the whole network doesn’t work once the middle one turns off.


5. To measure whether my algorithm is better than the basic ones.

Result: The performance with my algorithm is better than the basic one because I keep all SPOTs in the deep-sleeping mode and also change the frequency of readings. I just decrease the frequency of readings a little bit by my algorithm in order to save testing time so that the performance is probably not as good as our expectation.


In one word, the deep-sleeping mode is the most important factor to save energy for SPOTs. If SPOTs are in deep-sleeping mode, we can weaken SPOTs’ battery-consumption by decreasing the frequency of readings.


Conclusion:

According to my experiments, the deep-sleeping mode and frequency of reading can roughly determine how long the battery can keep alive. Basically, we can make SPOT keep working longer as long as we turn on their deep-sleeping mode and decrease the frequency of readings. But each SPOT has different power-storage and power-consumption abilities so that there are some performance-bias exist for the same algorithm by different SPOTs. In addition, the value of battery remaining(Supply Voltage) is not accurate by the function getVbatt().

Time Distribution:


Task

Description

Deadline

End Date

Total Time (hrs)

8

Performance Analysis of Task 7

08/15/2008

07/21/2008

203.5

Sub Task

Time

Modify previous source code

1

Testing

197

Miscellaneous Task (updating the blog, documents and so on)

5.5


[1]Quoted from the section "Task 8" of Class Requirement Document
Written by Professor Sami Rollins

[2]Quoted from Sun™ Small Programmable Object Technology (Sun SPOT) Developers’ Guide(Page 37-38) Author: Sun Labs 16-April-2007