# A Cross-Layer Optimization QoS Scheme in Wireless Multimedia Sensor Networks
## 2 Network Model and Design of Queues  
### Network Model  
The wireless multimedia sensor network consists of common nodes and multimedia nodes. Packets of non-real-time sessions are generated from common nodes. Multimedia nodes are the source nodes of real-time sessions. The destination node of all packets in the network is the sink node, which is denoted by \(d^{\bullet}\). \(m\) denotes a non-real-time or real-time unicast session that has one source-destination pair. \(s_{m}\) is the source node of session \(m\). \(M\) represents the set of sessions. Obviously, each node is the source node of one session. Packets from the source nodes traverse one or multiple wireless hops before arriving at the sink node. Both common nodes and multimedia nodes can relay data packets. Multimedia nodes are initialized with higher energy than common nodes. The sink node is assumed to have enough energy in the running process. \(\overline{x}\) denotes the time average value of x(\(t\)), which is a generic variable. \(\overline{x}\) is calculated using \(\overline{x}=\underset{t\rightarrow\infty}{\lim}t\sum_{t=0}^{t-1}E(x(\tau))\). The network runs in a time-slotted fashion. There are two channels in the networks, the control channel and the data channel. The radio frequencies used by the two channels are different. Nodes exchange control information on the control channel. When a node broadcasts local information on the control channel, other nodes can gain the information through monitoring the control channel. Data packets are transmitted on the data channel. If the link (\(n\),\(j\)) that is between node \(n\) and \(j\) is used for data packets transmission in time slot \(t\), we set \(\alpha_{u_{j}}(t)=1\). If the link (\(n\),\(j\)) is idle in time slot \(t\), \(\alpha_{u_{j}}(t)=0\). In this model, link scheduling is subjected to the following constraint:  
\[\sum\
olimits_{j<O(n)}\alpha_{u_{j}}(t)+\sum\
olimits_{i<t(n)}\alpha_{u_{j}}( t)\leq 1\,. \tag{1}\]  
\(O(n)\) represents the set of nodes that can receive packets from node \(n\). \(I(n)\) denotes the set of nodes which can send packets to node \(n\). Constraint (1) implies that each node can either transmit or receive data in the same time slot. Assume that node \(n\) is the sending node and node \(i\) is the receiving node of the link (\(n\),\(i\)). The transmission power of node \(n\) is subjected to the following constraint:  
\[0\leq p_{u}^{T}\leq p_{n,\max}^{T}\,, \tag{2}\]  
where \(p_{n,\max}^{T}\) is the maximum transmission power that node \(n\) can support. The SINR (Signal to Interference plus Noise Ratio) at the receiving node \(i\) can be calculated as follows:  
\[\mathit{SINR}_{i}=\frac{G_{u_{i}}p_{u}^{T}K_{u_{i}}}{\sum\limits_{k \leftarrow\alpha,k\
eq i}G_{u}p_{u_{k}}^{T}+n_{i}}\,, \tag{3}\]  
where \(k\) is the target node of the transmission from sending node \(k\). \(K_{u_{i}}\) denotes the processing gain of the CDMA system. \(G_{u_{i}}\) is the transmission loss from node \(n\) to node \(i\). In this paper, \(G_{u_{i}}=\frac{1}{d_{u_{i}}^{4}}\), where \(d_{u_{i}}\) is the distance between node \(n\) and node \(i\). \(n_{i}\) represents the noise at node \(i\). The transmission capacity of link (\(n\),\(i\)) can be derived as:  
\[C_{u_{i}}=B\cdot\log(1+\mathit{SINR}_{i})\,, \tag{4}\]  
where \(B\) denotes the bandwidth of data channel. If \(\mathit{SINR}_{i}\) is high enough, \(C_{u_{i}}\) can also be calculated as follows:  
\[C_{u_{i}}\approx B\cdot\log(\mathit{SINR}_{i})\,. \tag{5}\]  
In the wireless networks, a link may be shared by several sessions. In the same time slot, the total data amount of all sessions transmitted on one link is constrained by the transmission data amount the link can support in a time slot. The constraint is as follows:  
\[\sum\limits_{m<S(n,i)}\mu_{u_{i}}^{(n)}(t)\leq C_{u_{i}}(t)\cdot t_{slot}\,, \tag{6}\]  
where \(S(n,i)\) is the set of the sessions on link \((n,i)\). \(t_{slot}\) is the duration of a time slot. \(C_{u_{i}}(t)\) denotes the transmission capacity of link \((n,i)\) in time slot \(t\).