## 4 Proposed Methodologies
### Network Selection for the New NAR  
After generating a new NAR, the patch circuit is activated, and the digitalized signal is modulated. The signal is transmitted by using LED or BLE. The number of surveillance cameras can be more than one but particularly depends on the room size. Algorithm 2 summarizes the network-selection mechanism. The selection probability of OCC depends on the distance between the patient and camera. However, the patient should appear inside the camera AOV. Multiple cameras will increase the OCC coverage. The number of cameras is denoted by \(\xi\). Several factors are investigated before permitting data transmission by OCC. The patch LED will be ready for data transmission only when it is detected by a camera. However, when the number of strips projected in the image sensor is less than \(\Gamma_{\text{min}}\), the camera cannot extract data even if the LED is inside the AOV. This problem can occur in two circumstances. First, the Euclidean distance is considerably high between the camera and the patient. Second, the projected image appears in a corner of the image sensor, and the camera confronts the projection of a very small part of the LED. In both cases, \(\Gamma\) can be lower than \(\Gamma_{\text{min}}\). Hence, the communication can be instantly terminated in this condition. Therefore, a critical threshold of \(\Gamma\) is significantly required to confirm the reliability of the OCC scheme. The threshold is denoted by \(\Gamma_{\text{crit}}\), whose value is only above \(\Gamma_{\text{min}}\). The value of \(\Gamma_{\text{crit}}\) varies for the cameras with different characteristics. Initially, the system checks the value of \(\xi\). When \(\xi=1\), the camera is selected as the transmission network. However, for the high values of \(\xi\), the SS of each camera is investigated. Then, the camera with the highest SS is selected. When a camera is selected for communication, its \(\Gamma\) is immediately verified whether it is lower than \(\Gamma_{\text{crit}}\) or not. If yes, BLE will be selected for communication. To theoretically represent the selection probability of each network, we consider a room with a dimension of \(\text{a}_{\text{room}}\times\text{h}_{\text{room}}\), as illustrated in Figure 5. The image sensor dimension of each camera is \(\text{P}_{\text{im}}\times\text{q}_{\text{im}}\). For simplicity, we assume that each camera is separated with equal distance from each other. The distance is denoted by \(\vartheta\). The selection probability of OCC is expressed in the following equation:  
\[\text{S}_{\text{P-OCC}}=\frac{\sum\limits_{\text{i=1}}^{\xi}\left[\frac{1}{2} \mathbb{P}_{im}\text{q}_{\text{im}}\left(\frac{\text{d}_{\text{d}}}{\text{f} _{\text{o}}}\right)^{2}+\text{d}_{\text{d}}\text{P}_{im}\vartheta-\psi\right] +\frac{\text{d}_{\text{d}}\text{P}_{\text{im}}}{\text{f}_{\text{o}}}\left( \frac{\text{q}_{\text{im}}\text{d}_{\text{d}}}{2\text{f}_{\text{o}}}- \vartheta\right)}{\text{a}_{\text{room}}\text{h}_{\text{room}}}. \tag{10}\]  
Here,  
\[\psi=\left\{ \begin{array}{c}\frac{\text{P}_{\text{im}}\text{m}_{\text{im}} \text{d}_{\text{d}}}{2\text{f}_{\text{o}}^{2}},\text{ for }\text{d}_{\text{overlap}}\geq\frac{\text{m}_{\text{im}}}{2\text{f}_{\text{o}}} \\ \frac{\text{P}_{\text{im}}\text{m}_{\text{im}}\text{d}_{\text{d}}}{\text{f}_{ \text{o}}^{2}},\text{ for }\text{d}_{\text{overlap}}<\frac{\text{m}_{\text{im}}}{2\text{f}_{\text{o}}} \end{array} \right. \tag{11}\]  
where \(\text{d}_{\text{d}}\) denotes the vertical distance from the LED to the camera and \(\text{m}_{\text{im}}\) is the minimum part of \(\text{q}_{\text{im}}\) in which the minimum part of the LED must appear to extract the data bits sent from the LED. The minimum LED part depends on the size of the LED and the distance between the LED and image sensor. The minimum area of the LED that should appear inside the image sensor for successful data decoding can be measured using the following equation [26]:  
\[\mathrm{A_{m}}=\left\{