Chapter 3 System Model
3.3. Scheduling
Based on the description in Subsection 3.2, we will now present the scheduling model for both WSNs during its regular operation, utilizing a TDMA-based MAC protocol (referred as TDMA network in subsequent text), and WSNs in the emergency mode, utilizing a CDMA-based MAC protocol (referred as CDMA network in subsequent text), with the considered topologies. The scheduling model for the TDMA networks are derived so that the performance of the TDMA-based networks can later be analyzed and compared with that of the CDMA networks
First, we derive the transmitting schedule for the single-chain topology, as shown
17
in Figure 3-4 and Figure 3-5. The small circles represent nodes and the big circles represent the effective transmission range of a node. One node can only successfully send data to nodes within its effective transmission range.
In Figure 3-4, if Node B is sending a packet to Node A, Node C cannot send a packet to Node B in the same slot since a sensor node cannot transmit and receive at the same time. However, Node D can send a packet to Node C in the same slot. When using CDMA as MAC protocol, we assume that all transmitting nodes use different transmitting PN code, so the correlation between signals from different sources should be small; thus, we can assume that the interference from Node B to Node C is low. For CDMA, a transmitting node must be located at least two hops away from another transmitting node. Therefore, it is sufficient to use two alternating time slots to schedule all transmissions in the single-chain network. In this schedule, a node is in the transmission state in a time slot, and in the reception state in the next time slot. The node and its immediate neighbors are in different states in each time slot.
The scheduling model for TDMA network with the single-chain topology is different and shown in Figure 3-5. If Node B is sending a packet to Node A, Node C cannot send a packet to Node B in the same time slot. The reason is the same as in the CDMA networks. However, Node D cannot send a packet to Node C either, since we assume that there can only exist one transmitting node in the receiving range of a node,
18
in order to prevent collisions. All nodes use the same spreading code in TDMA networks and, therefore, unlike CDMA, collisions usually result in erroneous packet receptions. In summary, a transmitting node must be located at least three hops away from another transmitting node. Therefore, for TDMA, it is required to use three alternating time slots to schedule all transmissions in the single-chain network, and the utilization of links is apparently smaller than that of the CDMA network. The difference in the schedules for these two different types of networks leads to their performance difference in terms of throughput.
With the same principle, we can deduce that the utilization of links with the multi-chain topology is smaller than that of the network with the single-chain topology for TDMA networks; since there can only be one transmitting node in the receiving range of the gateway, the utilization of links is limited by the number of chains connecting to the gateway. In the TDMA network with the single-chain topology, the length of schedule is three time slots (the schedule repeats itself), and for the multi-chain topology it is at least the number of chains (three time slots when the number of chains connecting to the gateway is smaller than three).
To analyze the performance of a TDMA network with the multi-chain topology, we need to derive a simple and feasible schedule in details. In our analysis, we will utilize a heuristic periodical schedule based on a prime number theorem described below:
19
Figure 3-4 The schedule in a CDMA network with the single-chain topology
Figure 3-5 The schedule in a TDMA network with the single-chain topology Theorem 3.1: If (𝐴, 𝐵) = 1 and 𝑆 = {0, 1, 2, … , 𝐵 − 1} → 𝐴 ∙ 𝑆 = 𝑆 (𝑚𝑚𝑚 𝐵)
Proof: If 𝐴 ∙ 𝑆 ≠ 𝑆 (𝑚𝑚𝑚 𝐵), then there are at least two elements 𝑠1 and f 𝑠2 in 𝑆
such that 𝐴 ∙ 𝑠1 ≡ 𝐴 ∙ 𝑠2(𝑚𝑚𝑚 𝐵) . Arrange the equation, we can find that 𝐴 ∙ (𝑠1− 𝑠2) ≡ 0(𝑚𝑚𝑚 𝐵). Since (𝐴, 𝐵) = 1, we can deduce that (𝑠1− 𝑠2) ≡ 0(𝑚𝑚𝑚 𝐵).
Therefore, 𝑠1 is equal to 𝑠2. This result leads to a contradiction.
Now we will utilize Theorem 3.1 to derive the schedule. Let 𝐵 be the number of chains connecting to the gateway, and 𝐴 be a chosen co-prime number smaller than 𝐵.
With a schedule of a length of 𝐵, it is trivial that the first transmitting node of each chain is among the first 𝐵 regular nodes. Applying the theorem, the �(𝐴 ∙ 1)%𝐵 + 1�-th regular node of the first chain, �(𝐴 ∙ 2)%𝐵 + 1�-th regular node of the second
20
chain,…, and �(𝐴 ∙ 𝐵)%𝐵 + 1�-th regular nodes of the 𝐵-th chain would be the first transmitting node of each chain in the first time slot in the schedule. The next transmitting node of each chain is 𝐵 hops away from the first transmitting node in that chain, and so on. The transmitting nodes of each chain in the next time slot are the receiving regular nodes in this time slot. Continuing with this approach, we can construct a simple, periodic, and repetitive schedule for the TDMA network with the multi-chain topology. It also guarantees that the transmission constraints of TDMA are satisfied. The choice of the parameter A could influence the network performance. An example of the schedule in the TDMA network with a multi-chain topology is depicted in Figure 3-6.
On the other hand for CDMA network, we assume that the radio in the gateway is equipped with multiple decoders and can receive packets spreaded with different PN codes (from different nodes) simultaneously. As the constraints of having only one transmitting node in the receiving range of the gateway is lifted, the schedule for a CDMA networks with the multi-chain topology could be shorter than that of a TDMA network. It is obvious that the received SINR of the gateway would decrease compared to that of the single-chain topology if more chains are allowed to transmit at the same time. There is clearly a tradeoff between the signal quality and the length of schedule.
To derive the schedule for CDMA networks, we modify the one for TDMA networks to
21
allow more flexibility. The number of nodes transmitting to the gateway and their relative positions would affect the performance, and therefore are made configurable parameters. The optimal values for these parameters will be determined later in Section 4. Figure 3-7 presents an example of the schedule for a CDMA network with eight chains. On the left sub-figure, 4 nodes take turns to transmit signal to the gateway in an interleaving manner. The figure shows that there is a great amount of interference from each transmitting node to its immediate neighboring receiving nodes, which are the ones that are affected the most. On the other hand, if we assign transmitting nodes to every other neighboring chains, one can find that there are still 4 nodes transmitting to the gateway, but the interference is greatly reduced. Our goal is to quantify the amount of performance improvements with the added flexibility in the schedule of the CDMA networks compared to that of the TDMA networks.
22
Figure 3-6 The schedule of a TDMA network with the multi-chain topology
Figure 3-7 The schedule of a CDMA network with the multi-chain topology