Our discussion of the mathematical properties of SSCH will focus on the static case initially. The behavior of SSCH when channel schedules are not changing assures us that in a steady-state flow setting, nodes will rendezvous appropriately, in a sense that we make precise below. We will then expand our discussion to include the dynamics of channel scheduling in an environment where flows are starting and stopping.
The channel scheduling mechanism has three simultaneous design goals: allowing nodes to be synchronized in a slot, infrequent overlap between nodes that do not have data to send to each other, and ensuring that all nodes come into contact occasionally (to avoid a logical partition). To achieve these goals, we rely on a very simple mathematical technique, addition modulo a prime number.
Consider two nodes that want to be synchronized in a given slot. If they have identical (channel, seed) pairs for this slot, then clearly they will remain synchronized in future iterations (using the static assumption). Now consider two nodes that are not synchronized because they have different seeds. A simple calculation shows that these two nodes will overlap exactly one out of every 13 iterations in this slot (recall that 13 is the number of channels). This is the behavior we want from these nodes: they overlap regularly enough that they can exchange their channel schedules, but they are mostly on different channels, and so do not interfere with each other's transmissions.
Now consider the rare case that two nodes share identical seeds in
every slot, but different channels accompany each seed - this has
at most a 1 in
chance of occurring for
randomly chosen (channel, seed) pairs.
In this case,
the nodes will march in lock-step
through the same set of channels in each slot, never
overlapping. This would be problematic, and it is this situation that
the parity slot prevents. To justify this claim, we consider two distinct
situations. If both nodes enter their parity slot at the same time,
then they overlap there because the parity channel is equal to the seed for
the first slot for both nodes. With our chosen parameter settings of
10 ms per slot, 4 slots, and 13 channels, this overlap occurs once every 530 ms and lasts for 10ms.
If their parity slots do not occur at the same time,
then the first node's parity slot offers a fixed target for the slot
in which the second node is changing channels, and again, the two nodes
will overlap. This overlap occurs once every 7 seconds.
Although both these cases will be rare, the SSCH time synchronization mechanism
allows us to ignore the second case entirely - a
relative clock skew of 5 ms or less is sufficient to guarantee that two parity slots overlap in time.
Now considering the dynamic case (and assuming clock synchronization to within 5 ms), we note that nodes are not permitted to change the seed for the first of their four slots except during a parity slot. Therefore they will always overlap in either the first slot or the parity slot, and hence will always be able to exchange channel schedules within a moderate time interval.
The use of addition modulo a prime to construct channel hopping schedules
does not restrict SSCH to scenarios where the number of
channels is a prime number. If one desired to use SSCH with a wireless
technology where the number of channels is not a prime, one could straightforwardly use a larger
prime as the range of
, and then map down to the actual number of
channels using a modulus reduction. Though the mapping would have some bias to certain channels,
the bias could be made arbitrarily small by choosing a sufficiently large prime.
A final point about the use of addition modulo a prime is that SSCH can be modified to require fewer bits to represent a node's schedule by reducing the number of choices for a seed. The only penalty to this reduction is increasing the protocol's reliance on the parity slot for avoiding logical partitions.