## 4 Mathematical Analysis of Handover Delay and Packet Loss of CoMP
### Analysis of Handover Delay  
In a WoT service environment, the handover delay and packet loss rate are important performance factors in mobility management [22]. For example, medical emergency service requires high quality in handover delay and packet loss rate. Figure 12 shows the mobility model for the handover delay and packet loss were analytically derived. The mobility model shows the CoAP node B in the WSN1 BS moves into the WSN2 BS. At  
Figure 11: DELETOE request and ACK response message. Figure 10: POST request and ACK response message for registration. this time, the handover latency and packet loss are measured and analyzed. The handover latency at a mobile node site is the time interval during which a mobile node cannot send or receive any packets during handover and it is composed of link layer and IP layer handover latency. In this paper, we include the handover delay timeline of the application layer during the handover. The mobility model consists of the CoAP node (CN_B), CoAP Client (CN_A), WMMS, HA, WSN BS1 BS, WSN BS2, and DHCP. First, CN_B connects to WSN BS1 BS and obtains the P_Addr from WSN BS1 BS. CN_B and CN_A then exchange packets. CN_B then moves into the network domain of WSN BS2, and the CN_B starts the handover procedure and obtains a new T_Addr from WSN BS2. After this step, the mobile node performs the binding procedure and completes the handover procedure. In this handover procedure of CN_B, MIPv6, HMIPv6, and CoMP are mobility management protocols. The handover delay at a CoAP node side is the time interval during which the CoAP node cannot send or receive any packets during a handoff, and is composed of both L2 and L3 handover latencies [22, 23, 24]. Figure 13 shows the handover delay timeline caused by executing the CoMP. The white small circle indicates the time line during the handover of CoAP node between WSN BS1 and WSN BS2. The total handover delay, _i.e._, the packet reception latency t\({}_{\text{p}}\), consists of the link setup time (t\({}_{\text{L2}}\)), which is caused by an L2 handover; the IP connectivity latency (tIP); and the location update latency (t\({}_{\text{BU}}\)). Here, t\({}_{\text{IP}}\) is the sum of t\({}_{\text{MD}}\), t\({}_{\text{AC}}\), and t\({}_{\text{BU}}\), where t\({}_{\text{MD}}\) represents the movement detection delay; t\({}_{\text{AC}}\), the address configuration; DAD, the delay; and t\({}_{\text{BU}}\), the BU delay between the CoAP node and WMMS. Figure 12: Mobility model for performance evaluation. To analyze the delay more precisely, in the following passage, we describe the delay caused by a signaling message between the CoAP node and WMMS. Let \(\mathrm{tx},\mathrm{Y}\) be defined as a one-way signaling message transfer delay between nodes \(X\) and \(Y\). One of the endpoints is a CoAP node, and \(\mathrm{tx},\mathrm{Y}\) can be computed as follows:  
\[\mathrm{t}\ \mathrm{x},\mathrm{Y}\ (s)=\left(\frac{s}{B_{wl}}+L_{wl}\right)+ \left((d_{x,y}-1)(\frac{s+s_{t}}{B_{w}}+L_{w}+\varpi)\right). \tag{1}\]  
Here, \(S\) is the size of the signaling message, and _Bwl_ and _Bw_ are the bandwidths of the wireless and wired links, respectively. _Lwl_ and _Lw_ are the link delays of the wireless and wired links; _\(\varpi\)_ is the average queuing delay at each router on the Internet; _d__x,y_-1 is the average number of hops in a wired link between nodes \(X\) and \(Y\); and _St_ is the tunneling packet size. In Equation (1), the first and second terms indicate a one-way signaling message transfer delay in a wireless and wired link, respectively, between nodes \(X\) and \(Y\). For an analytic performance evaluation, a formula for the handover latency was derived for each mobility management protocol. As described in [22], the handover latency in MIPv6 is composed of \(\mathrm{t}_{\mathrm{L2}}\), \(\mathrm{t}_{\mathrm{MD}}\), \(\mathrm{t}_{\mathrm{AC}}\), \(\mathrm{t}_{\mathrm{BU}}\), and \(\mathrm{t}_{\mathrm{RR}}\). Here, \(\mathrm{t}_{\mathrm{BU}}\) is the time delay incurred when the CN_B conducts a BU to the HA.