13
Symmetric Symmetric Detection Detection

Symmetric Detection. Overview In this phase, each mote will maintain a neighbor table. It provide a command bool isSymmetric(uint16_t neighborID) for

Embed Size (px)

Citation preview

Page 1: Symmetric Detection. Overview In this phase, each mote will maintain a neighbor table. It provide a command bool isSymmetric(uint16_t neighborID) for

Symmetric Symmetric DetectionDetection

Page 2: Symmetric Detection. Overview In this phase, each mote will maintain a neighbor table. It provide a command bool isSymmetric(uint16_t neighborID) for

OverviewOverview• In this phase, each mote will

maintain a neighbor table. • It provide a command bool

isSymmetric(uint16_t neighborID) for the backbone creation phase .

• The judgment is based on the statistic.

Page 3: Symmetric Detection. Overview In this phase, each mote will maintain a neighbor table. It provide a command bool isSymmetric(uint16_t neighborID) for

OverviewOverview• Provides interface

– SDNeighborTable– StdControl

• Used components– SDM– RoutingC– RandomLFSR– TimerC– TinyAlloc

Page 4: Symmetric Detection. Overview In this phase, each mote will maintain a neighbor table. It provide a command bool isSymmetric(uint16_t neighborID) for

Data StructureData StructuresendId size Data

2 1 18

Every neighborID occupies 2 bytes, so one packet can accommodate 18/2=9 neighborID

MAX_NEIGHBOR = 40Totally we need 5 packets at most.MAX_SD_BUFFER_SIZE = (MAX_NEIGHBOR+5)/10, Shall we use MAX_NEIGHBOR/9+1?Or shall we change the SD_PAYLOAD_SIZE = 18 ?

Page 5: Symmetric Detection. Overview In this phase, each mote will maintain a neighbor table. It provide a command bool isSymmetric(uint16_t neighborID) for

Data StructureData Structuretypedef struct{

uint16_t neighborID[MAX_NEIGHBOR];uint8_t symmChannel[MAX_NEIGHBOR];uint8_t asymmChannel[MAX_NEIGHBOR];uint8_t noChannel[MAX_NEIGHBOR];uint8_t currStatus[MAX_NEIGHBOR];

/* 0------noChannel 1------asymmChannel

2------symmeChannel*/

uint8_t aliveLastTime[MAX_NEIGHBOR]; } NEIGHBOR_TABLE;

Note: neighborID[0..MAX_NEIGHBOR] is initialed to be 0xffff

Page 6: Symmetric Detection. Overview In this phase, each mote will maintain a neighbor table. It provide a command bool isSymmetric(uint16_t neighborID) for

WorkflowWorkflow

Scan the neighbor table Generate packets to be sendStart a new Timer

Send Packet

Check Neighbor

table

Interval of T1:SEND_BEACON_PERIODInterval of T2:(Random.rand()) % (SEND_BEACON_PERIOD/global_size)

Check Neighbor

table

Page 7: Symmetric Detection. Overview In this phase, each mote will maintain a neighbor table. It provide a command bool isSymmetric(uint16_t neighborID) for

WorkflowWorkflow• How about the last packet in the T1

interval• If the process to generate packets is

too long or due to other delay, then the last packet will be lost.

• Guarantee that SEND_BEACON_PERIOD/global_size - beacon_delay > 640

Page 8: Symmetric Detection. Overview In this phase, each mote will maintain a neighbor table. It provide a command bool isSymmetric(uint16_t neighborID) for

RulesRules• checkNT() will examine the previous round status and update the statistical value.• Once a mote receive a packet, it examine the sendID first, then examine the string of neighbor ID to judge whether it is symmetric in previous round.• If a node does not receive a packet from a certain node in a round &&nodeId is in the neighbortable-> no channel in this round.

Page 9: Symmetric Detection. Overview In this phase, each mote will maintain a neighbor table. It provide a command bool isSymmetric(uint16_t neighborID) for

OverflowOverflow

Node 10

Node 11

Neighbor[0]=11

Neighbor[0]=10

Cur[0]=asy

Cur[0]=asy

Cur[0]=sym

Cur[0]=sym

checkNTSyn[0]=1

checkNTSyn[0]=1

checkNTSyn[0]=1noChan[0]=1

checkNTSyn[0]=2

checkNTSyn[0]=1noChan[0]=2

checkNTSyn[0]=2Ayn[0]=1

Cur[0]=sym

Cur[0]=noChanCur[0]=noChan

Cur[0]=asy

Page 10: Symmetric Detection. Overview In this phase, each mote will maintain a neighbor table. It provide a command bool isSymmetric(uint16_t neighborID) for

ParameterParameterss•SEND_BEACON_PERIOD– Interval for T1•CHECKNT_WAIT_TIMES– In which round it starts to do checkNT()•global_threshold– numSymm /(numAsymm + numSymm +

numNone) >= (global_threshold/100)•Also, the system should carefully the

number of round to detect symmetric

Page 11: Symmetric Detection. Overview In this phase, each mote will maintain a neighbor table. It provide a command bool isSymmetric(uint16_t neighborID) for

ParametersParameters

Node 10

Node 11

Neighbor[0]=11

Neighbor[0]=10

Cur[0]=asy

Cur[0]=asy

Cur[0]=sym

Cur[0]=sym

checkNTSyn[0]=1

checkNTSyn[0]=1

checkNTSyn[0]=1noChan[0]=1

checkNTSyn[0]=2

checkNTSyn[0]=1noChan[0]=2

checkNTSyn[0]=2Ayn[0]=1

Cur[0]=sym

Cur[0]=noChanCur[0]=noChan

Cur[0]=asy

If the motes are fully synchronized ,then the third time it could do checkNT()

Page 12: Symmetric Detection. Overview In this phase, each mote will maintain a neighbor table. It provide a command bool isSymmetric(uint16_t neighborID) for

• If motes are not fully synchronized, then forth timer is the best time to start do checkNT().

Page 13: Symmetric Detection. Overview In this phase, each mote will maintain a neighbor table. It provide a command bool isSymmetric(uint16_t neighborID) for

• Neighbor table: 7byte*MAX_NEIGHBOR• MAX_SD_BUFFER_SIZE*sizeof(TOS_Msg))• If we do not plan to do the judgment on

multiple rounds. Then we do not need to have

uint8_t symmChannel[MAX_NEIGHBOR];

uint8_t asymmChannel[MAX_NEIGHBOR];uint8_t noChannel[MAX_NEIGHBOR];uint8_t aliveLastTime[MAX_NEIGHBOR];