# ATWin: An Improved and Detailed Startup Model of TTP/C
## 4 Formal Demonstration of the Validity of the ATWin Model
### Analysis of the Upper Bound of the Startup Time  
In this paper, the upper bound of the startup time is defined as the longest time interval from the sending instant to the SYNC instant. Specifically, the sending instant is defined as the time point when a node sends the cold-start frame under the condition that there are at least two nodes transiting into the LISTENING state or the COLDSTART state in the system. The SYNC instant is defined as the time point when there are at least two nodes transiting into the SYNC state in the system. It is known from the last section that if there is a contention occurring in startup cycle \(n\), the contention is removed in startup cycle \(n+1\). Let TS be the startup time upper bound. Let \(\Delta_{contention}\) be the time for contention removing, and let \(\Delta_{role}\) be the time for clique detecting. The TS can be formalized below according to the startup of the TTP/C protocol. \[TS=\Delta_{contention}+\Delta_{vote} \tag{20}\]  
According to Equation (20), the key to the problem lies in the analysis of the time for contention-removing \(\Delta_{contention}\) and the time for clique detecting \(\Delta_{vote}\). **A. The upper bound of the contention-removing time**  
In our proposal, the contention-removing time is the time interval, from the instant when the nodes access the bus in the startup cycle n to the decision instant when the head node accesses the bus in startup cycle \(n+1\), denoted as the formula below. \[ \begin{split}&\Delta_{contention}=T_{startup}^{hd(n+1)}(n+1) \\ +&\Delta_{window}+\Delta_{PRP}-T_{listen}^{hd(n)}(n )\end{split}  \tag{21}\]From Theorem 5, we know that node \(hd(n+1)\) is the smallest node ID number in set \(\text{S}_{t}(n)\). Let it be node \(k\); then, the following formula can be entailed. \[ \begin{split}& T_{startup}^{hd(n+1)}(n+1)\ \ =T_{start}^{k}(n)+\Delta_{startup}^{k}\\ &+\Delta_{TDMA}-\Delta_{slot}+\Delta_{PSP}\end{split}  \tag{22}\]  
From the two above formulas, the contention-removing time can be expressed as below. \[ \begin{split}&\Delta_{contention}\\ &=T_{start}^{k}(n)+\Delta_{startup}^{k}+\Delta_{TDMA}-\Delta_{ slot}\\ &+\Delta_{PSP}+\Delta_{window}+\Delta_{PRP}-T_{listen}^{hd(n)}(n)\\ &=T_{start}^{k}(n)+\Delta_{startup}^{k}+\Delta_{TDMA}-T_{listen}^{hd (n)}(n)\end{split}  \tag{23}\]  
In the above formula, the value of \((T_{start}^{k}(n)-T_{listen}^{hd(n)}(n))\) determines the value of the contention-removing time \(\Delta_{contention}\). According to the definition of decision instant, node \(k\) is a sending nod; thus, the following formula is entailed. \[ \begin{split}& T_{startup}^{hd(n+1)}(n+1)\ \ =T_{start}^{k}(n)\\ &+\Delta_{startup}^{k}+\Delta_{TDMA}-\Delta_{slot}+\Delta_{PSP} \end{split}  \tag{24}\]  
Thus, the contention-removing time interval can be formulated as below. \[ \begin{split}&\Delta_{contention}=\Delta_{startup}^{k}+\Delta_{TDMA}\\ &+\Delta_{window}+\Delta_{PRP}+T_{listen}^{k}(n)-T_{listen}^{hd (n)}(n)\end{split}  \tag{25}\]  
Apparently, the value of \(\Delta_{contention}\) is determined by the value of \((T_{listen}^{k}(n)-T_{listen}^{hd(n)}(n))\). If there is only one node in set \(\text{S}_{t}(n)\), the contention in the \(n\)-\(th\) round startup is inferred by all receiving nodes by the reason of the compulsive frame-dropping, which is the pseudo-contention case. In such a case, the head node in startup cycle \(n\) is still the head node in startup cycle \(n+1\). Thus, \(T_{listen}^{k}(n)-T_{listen}^{hd(n)}(n)=0\). The max time for contention removing in this case is formulated as Equation (26). \[ \begin{split}&\max(\Delta_{contention})\\ &=\max\Bigl{(}\Delta_{startup}^{k}+\Delta_{TDMA}+\Delta_{window }+\Delta_{PRP}\Bigr{)}\\ &=\max\Bigl{(}\Delta_{startup}^{k}\Bigr{)}+(n+1)\Delta_{slot}- \Delta_{PSP}\\ &=2\Delta_{TDMA}+\Delta_{slot}-\Delta_{PSP}\end{split}  \tag{26}\]  
If there are more than one nodes in set \(\text{S}_{t}(n)\), the contention in the \(n\)-\(th\) round startup is caused by a concurrent startup, which makes a true-contention case.