If my calculations are correct, 1 packet every 400ms is 2.5 packets per
second or 1120 bits/sec including preamble -- 580 bits/sec if you just
count the data payload.

The CSMA layer checked into beta/CC1000Radio achieves 12.1kbps (~30
packets/sec) with one node and 15.7kbps effective data rate (~35
packets/sec) with two nodes.  The calculated data rate is near 100%
success packet reception and utilizes 82% of the available data
bandwidth of the channel.

My CSMA can be compiled by including the beta/CC1000Radio and
beta/CALADC directories in your search path when compiling using the -I
directive.

-Joe

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Lin Gu
Sent: Wednesday, September 10, 2003 11:16 PM
To: [EMAIL PROTECTED]
Subject: [Tinyos] Collision-free MAC protocol

Hi,

I am pleased to inform you that our group has designed a TDMA-based 
MAC protocol, named "PRIME", and has added an implementation of it to 
the 'contrib' directory as tinyos-1.x/contrib/prime.

This is a collision-free MAC protocol. In the test with the
'Chirp' program on 4 Mica2 motes sending packets at 1 packet/400ms,
the packet delivery success rate is 95%, 2.5 times higher than
the current CSMA-based MAC protocol.

Actually,  the current implementation is a simplified version of the 
PRIME protocol (The full implementation was programmed and tested on
Mica, not Mica2 motes). Thus it's called SPRIME. Though not as flexible 
as the full implementation, SPRIME is likely to still suffice for most 
of applications.

I am including a README file at the end of this email. You are welcomed
to find the up-to-date version of this file in tinyos-1.x/contrib/prime.
More documentation and a setup program that install/uninstall SPRIME 
will be added as soon as I can.

Comments and suggestions will be much appreciated, and I will be more 
than glad to provide support if you'd like to try the protocol with
your applications.

Best regards,

lin
--
Lin Gu
Department of Computer Science
University of Virginia


-----------------------------------------------------------
The README file -- for interested readers
-----------------------------------------------------------



                            PRIME Protocol


Introduction
============

PRIME (Period Reservation and Inter-Master Estimation) protocol is a 
collision-free MAC protocol. It automatically detects interfering nodes 
in a network and uses TDMA to coordinate network transmission, so as 
to avoid collision.

SPRIME is a simplified version which supports static time-slot
(super-slot, 
in PRIME terminology) assignment. Though not as flexible as PRIME, it 
still achieves good performance -- in a test with "Chirp" program on 4 
motes, the packet delivery success rate is 95%, compared with a success 
rate of 26.5% with CSMA.


Files
=====

To facilitate interested developpers to try and test, a working version 
including all the supporting files is included in this directory. The 
following files and directories are main part of the SPRIME
implementation.

README                          This file
tos/system/GenericCommPRIME     GenericComm configuraiton file that uses
                                SPRIME
tos/system/SPRIME.nc            SPRIME component
tos/system/MsgPool.nc           Message pool (memory mangement)
apps/Benchmark/Chrip.SPRIME     Chirp applicaiton, using SPRIME protocol
apps/Benchmark/Chirp            Chirp application, using the originial
                                CSMA MAC that comes with TinyOS

More documentation will be added as soon as I can.


Configuration
=============

Right now the default configuration of SPRIME is a 4-mote, consecutive 
ID configuration. The parameters are defined as macros in SPRIME.nc. 
(TODO: a configuraiton file will be used instead of macros in the
program).


Installation
============

Copy the 'prime' directory and set the 'TOSDIR' environment variable to 
the 'tos' directory in the 'prime' directory. (TODO: a setup program
will 
be provided later to configure the existing TinyOS to switch between 
using SPRIME and the original CSMA MAC protocol)


Test configuration and results
==============================

A simple test has been done to assess the performance of SPRIME. Four 
motes, mote 0-3, are uploaded with Chirp application and put close to 
each other.

To run the tests, cd to apps/Benchmark/Chirp or 
apps/Benchmark/Chirp.SPRIME and use the usual TinyOS build method

        make mica2 install.<mote id>

to build and upload program.

To compute the packet delivery rate, use a 'GenericBase' program to
listen 
to the packets (you may want to modify the GenericBaseM.nc file to tally

the packets received).

Right now, the Chirp programs send 160 packets at the rate of 1
packet/400ms.
The reference result is as follows

                CSMA MAC                        SPRIME
                --------                        ------
success rate    26.5%                           95%

So the success rate is increased by 258%.


History
=======

To improve the network performance on the MAC layer, we originally seek 
to apply piggybacked acknowledgement to improve reliability. It develops

to "AMConform", which is a reliable one-hop communication protocol
supporting
most of the functionality in traditional data-link level communication
-- 
sliding window control, duplicate removal, queuing, piggybacked 
acknowledgement, and re-transmission for unicast communication. The
platform 
is TinyOS 0.6 on Mica mote.

In our experiment and development for tracking demo, the reliable data-
link level component does improve the performance dramatically (But at 
least half of the enhancement seems to come from the buffering 
functionality). The retransmission introduces delay and impose a burden 
on the network when the bandwidth is in shortage. It still does not
handle 
the wireless communication well because it does not consider
hidden-terminal, 
asymmetric channel, wide interference range, and so on... Retransmission

also consumes energy.

As a result, in 2002, PRIME protocol is designed to provide predictable 
bahavior without incurring much computation, bandwidth and energy cost. 
It's main features include hidden-terminal and interference detection
and 
TDMA scheduling. The development is based on TinyOS 0.6 on Mica motes.

To make the PRIME protocol work with TinyOS-1.x and NesC, the code is 
modified early this year (2003) and the functionality is trimmed to make

it easier to be ported to programs where AMStandard is used, hence the 
SPRIME protocol.

Acknoledgements
===============

The current PRIME/SPRIME implementation is based on TinyOS. Thanks to
all 
the people from Berkeley and other groups for helping me in various 
development issues.


Support and bug report
======================

Please feel free to contact me for questions, bug reports, suggestions,
or 
just talking.

Lin Gu
Computer Science Department
Univ. of Virginia
[EMAIL PROTECTED]
Tel: 434-249-3158

********************************************************************
                        Sept 10, 2003




_______________________________________________
Tinyos mailing list
[EMAIL PROTECTED]
http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos

_______________________________________________
Tinyos-users mailing list
[EMAIL PROTECTED]
http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users

Reply via email to