3.2. The Startup Model ATWin
A. The startup process of ATWin
The state transition diagram of the ATWin model is presented in
Figure 5. For the different contention scenarios, the proposed startup model innovatively subdivides the LISTEN state and the COLDSTART state into multiple sub-states based on the standard startup model. Specifically, the LISTEN state is partitioned into four sub-states, while the COLDSTART state is divided into six sub-states. The specific meaning, action and duration of the sub-states proposed in this paper are provided in
Table 3.
The time duration of ATW is denoted as , and the contention flag is denoted as . When the ATWin model starts, the value of defaults to 1, indicating that there is contention. When its value becomes 0, it indicates that there is no contention.
In
Figure 5, the two states highlighted in gray are the INIT state and the SYNC state. The INIT state represents the system initialization phase and marks the beginning of the TTP/C cluster startup cycle. The SYNC state denotes the state where the system achieves complete startup. The upper identifier of each state indicates its running duration. A value of 0 indicates that the state is merely judged, and its running time can be ignored. The fixed time identifier, such as
above the state of
, indicates that nodes in this state run for a predetermined time, even if the action has already been completed. The predetermined time must be greater than the worst-case execution time of the state action. An identifier with an unequal sign in the figure, such as
, indicates that the state’s duration is at most
, where
n is a statically specified value according to the configuration parameter of the node, and the variation of the duration is in units of slots. The identifier
∞ represents that the state can theoretically last for an infinite amount of time.
Table 3 provides the states of the ATWIN startup model, the specific actions to be performed for each state, and the duration. All actions of a state should be completed within the duration of the state. The states marked with diagonal lines in
Figure 5 indicate the unconditional transition states.
B. The contention-detecting strategy in ATWin
The mandatory contention-eliminating strategy in the standard startup model forces the node to discard the first valid frame according to AS6003, even in the absence of contention. Unfortunately, there is no contention-detecting strategy in the standard startup model. However, under some contention scenarios, there may be no need to discard the first valid frame. Therefore, this paper proposes a novel contention-detection strategy to detect these types of contention scenarios to improve the standard startup model’s shortcomings.
In our contention-detecting strategy, when a node starts, the listening process is first performed to determine whether it is a sending node or a receiving node. If it is a sending node, it marks the current round of startup as contention and enters the sending process. During the sending process, the node immediately enters the cold-start process to send a cold-start frame and then performs the cold-start process. If it is a receiving node, it immediately enters the ATWin process to monitor the channel and then waits for the ATW to expire. If the received frame within the ATW is invalid, the value of is still 1 to mark as contention, and the node re-enters the listening phase. If a valid frame is received within the ATW, the node judges whether the contention is detected at the last round of startup. If not, the frame is discarded, and this round of startup fails at this time, and the node should try to restart. If there is a contention detected in the last round of startup, the frame is adopted, and the cold-start state is entered. After the cold-start process finishes, the node completes the startup if the cold-start frame is sent successfully; otherwise, the node fails to start and tries to restart.
The node is only allowed to send or receive frames within the ATW. Its transceiver is turned off whenever the time of ATW is over and the frames outside of the ATW are discarded automatically. If a buffer is used for receiving overflows, the received frame is truncated and judged as an invalid frame. If the receiving node receives multiple frames within the ATW, only the last frame is retained. If a received frame is invalid, the receiver of the node should be closed to stop receiving frames, and all the received frames within the ATW are marked as invalid frames. The invalid overlapping frames indicate that contention has occurred in this round of startup. In the contention elimination strategy of AS6003, if contention occurs in this round, it shall definitely be eliminated in the next round of startup.
There is no contention-detecting strategy in the standard startup model. If the type of contention scenario is C1, the ATWin model cannot determine whether there is contention occurring, marked as pseudo-contention. If the type of contention scenario is C2 or C3, the ATWin model can detect contention that has occurred. If the type of contention scenario is C1 or C2, the receiving node can receive one valid cold-start frame in both scenarios. In these two contention scenarios, both the proposed model and the standard model perform the same operation, discarding the first cold-start frame and successfully starting in the next round. The difference is that our ATWin model can detect contention in the C2 scenario, while the standard model can not. If the type of contention scenario is C3, the receiving node receives overlapping frames. After discarding the invalid frames, our startup model starts successfully in the next round, but the standard startup model must re-enter the listening state and wait for a valid cold-start frame. In a C3-type contention scenario, our startup model saves at least time of one startup cycle, compared to the standard startup model. The differences in detecting and eliminating contention between the standard startup model and our ATWin startup model are summarized in
Table 4.
In summary, the contention-detecting strategy in the ATWin model refines the condition of dropping frame and clarifies the contention scenario where there is no need to discard the frame. Specifically, ATWin can reduce the startup time in the C3-type contention scenario, saving the system at least one TDMA cycle of time. In the other two contention scenarios, our model does not save time compared to the standard startup model.
3.3. The Lower Time Bound of ATW
This section focuses on the lower bound of ATW time to meet the requirements of a normal startup of the system. Several definitions and corresponding symbols are introduced to explain the derivation and the proof.
A startup cycle, denoted as n, is a process that starts from the time when any node in the system attempts to access the bus and ends with the next accessing attempt after the contention elimination. If multiple nodes start almost simultaneously, the first transmission time is considered as the start of a startup cycle.
In the
n-th round startup, the node abandons the cold-start if it detects channel activity before the listening timeout timer expires. Let
S denote the node set;
denotes the nodes that are allowed to perform cold-start;
denotes the nodes that give up the cold-start operation during the
n-th round startup;
denotes the nodes that normally perform the cold-start operation; and
denotes the nodes that have not been started during the
n-th round startup. Thus, (
4) holds, as seen in
Figure 6.
The listening timeout refers to the listening timeout time point of node i in startup cycle n.
Channel delay denotes the communication delay from node i to node k, including propagation delay and digitization error. For bus deployment, the channel delay between node i and node k is symmetrical. Its maximum one-way transmission delay is abbreviated as . That is to say, there is a formula, which is .
Concurrent startup refers to a phenomenon that there exists at least two nodes, named node i and node j, satisfying the condition . It is also called the true-contention phenomenon.
Arrival Time
refers to the arrival time point when the cold-start frame sent by node
i is received by node
j at the
n-th round of startup. In the startup model, the sending node sends a cold-start frame immediately at the timeout time of the listening timeout timer; thus, Equation (
5) can be entailed.
For any two nodes in set
, they should satisfy the constraint below.
Head node refers to the earliest start node that sends the cold-start frame firstly at the n-th round of startup. If there exist multiple nodes whose listening timeout timers expire at the same time in a startup cycle, the head node in this startup cycle is the node with the smallest number id.
The decision time point refers to the instant that the node i starts the post-cold-start process, which is specified by the instant of the end of the current slot for cold-start sending nodes and the instant of the end of the ATW for cold-start receiving nodes.
The epoch node refers to the node that satisfies conditions below in startup cycle n: if node , then the for node i in startup cycle n is the node i; if the node , then the node for node i in this startup cycle is the earliest node of all nodes in the ATWin of the node i. If there exist multiple nodes satisfying the conditions aforementioned, the smallest node id is . In the startup cycle n, there must be a node for every node i.
Activity time for node i refers to the instance for node i that opens its ATWin in startup cycle n. As it can be concluded from the definition, if node , ; if , , where is the epoch of node i.
Compensating time refers to the longest time interval from the instant when a node ends its ATW to the instant when the node completes the synchronizing.
The definitions of symbols proposed in this paper are summarized in
Table 5 for easy reference. These definitions are explained in detail above.
Let the duration of the ATW be . Let the time duration of sending time for a cold-start frame be . For the reason of physical contention and logic contention in the bus topology, the should be set with enough time within which the sending node can completely send a cold-start frame, and the receiving nodes can receive cold-start frames from all sending nodes. The relationship between the listening timeout values of the nodes in can be described by Theorem 1.
Theorem 1. During the n-th round of startup, for any node i
and node j
in the union set of and
,
the absolute difference value between their active time points must be less than or equal to the maximum propagation delay. Its formal expression is Inequality (7) (see Appendix A for the proof).
The meaning of Theorem 1 is that when the start time interval between node
i and node
j is less than
, node
i and node
j start simultaneously. It supplements one of the missing details of AS6003, marked in Mark 2 in
Figure 4.
Let the number of the sending nodes in set
be m and the number of the receiving nodes in set
be g. To ensure that any receiving node
k can receive all the cold-start frames within ATW, the constraint is given in Formula (
8) for any node
i and node
j in
.
According to Theorem 1, the constraints are listed as follows:
where
is related to the listening timeout time of node
i and the propagation delay between node
i and node
k. According to the definition and Formula (
9),
can be computed as:
According to Formula (
8), the propagation delay must be greater than zero. Combined with Formula (
11), when
obtains the maximum value,
could obtain the minimum value. Therefore,
can also obtain the maximum value under the condition. The following formula must be satisfied.
supplements one of the missing details of AS6003, marked as Mark 1 in
Figure 4.
Formula (
14) is derived from the above analysis.
Since the nodes are not allowed to perform other operations in the protocol within ATW, there is a compensation time
reserved for nodes to complete the remaining operations for synchronization. The required value for
should not exceed the slot exhaustion time of the sending node, as shown in
Figure 7, where
is the duration time of the PRP in the TTP/C three-phase cycle.
To maintain compatibility with the AS6003, the duration time of the
phase in its time slot can be set to the length of
without a dedicated timer if the dedicated MEDL is used in the startup phase. In the MEDL design phase,
should satisfy Formula (
15).
At this time, the compensation time should meet the constraint condition defined in Formula (
16). The compensation time supplements one of the missing details of AS6003, marked Mark 5 in
Figure 4.
To sum up, in order to start correctly, the lower bound time of ATW is ().