# A Cross-Layer Optimization QoS Scheme in Wireless Multimedia Sensor Networks
## 3 Problem Formation and Dynamic Algorithm  
### Design Throughput Utility Optimization Problem  
The traditional optimization problem for cross-layer control is to maximize the sum utilities, which is designed as:  
\[\begin{split}\text{maximize}&\sum_{n\leq t}U_{n}(r_{n })\\ \text{subject to}&\overset{\leftarrow}{r\in\Lambda}\, \end{split} \tag{15}\]  
where \(\Lambda\) represents the capacity region of the network. \(\overset{\leftarrow}{r}=(\overset{\leftarrow}{r_{n}},m\in M)\) denotes the time average throughput of session \(m\). The constraint means that the network stability is guaranteed.  
However, (15) seeks to maximize the total utilities and cause extreme utility unfairness. (15) is also not applicable to real-time services. Aiming at this issue, the \"pseudo utility\" function \(\text{U}_{n}(r_{n})\)[46] was used instead of the utility function \(U_{n}(r_{n})\) in the optimization problem. \(\text{U}_{n}(r_{n})\) is defined as:  
\[\text{U}_{n}(r_{n})=\int_{r_{n}}^{r_{n}}\frac{1}{U_{n}(y)}dy,\ \ \ r_{L}\leq r_{n}\leq r_{n}\, \tag{16}\]  
where \(r_{L}\geq 0\) denotes the minimum transmission rate required by service \(m\). \(r_{n}\leq\infty\) is the maximum transmission rate required by service \(m\).  
Following the design principle of the utility function in [46], the utility function \(U_{n}(r_{n})\) for real-time services will be given by a sigmoid function as follows:  
\[U_{n}(r_{n})=\begin{cases}0&\text{if }r_{n}\leq B_{min}\\ \frac{1}{1+e^{-(2r_{n}-3)}}&\text{if }B_{min}\leq r_{n}\leq B_{max}\\ 1&\text{if }r_{n}\geq B_{max}\end{cases}\, \tag{17}\]where \(B_{min}\) and \(B_{max}\) are the minimum and maximum bandwidth constraints on the sigmoid. \(a\) is used to control the slope of the sigmoid. \(b\) is set to be \(\dfrac{B_{max}-B_{min}}{2}+B_{min}\).  
The utility function \(U_{n}(r_{n})\) for non-real-time services is designed as:  
\[U_{n}(r_{n})=\log(r_{n}+1). \tag{18}\]  
Obviously, \(U_{n}(r_{n})\) designed in (18) and \(U_{n}(r_{n})\) designed in (17) with \(r_{n}\in[r_{L},r_{H}]\) are both positive ascending functions.  
The utility-fair optimization problem is defined as:  
\[\begin{array}{ll}\text{maximize}&\sum\limits_{n=M}U_{n}(r_{n})\\ &\text{subject to}&\overset{\_}{r}\in\Lambda\.\end{array} \tag{19}\]  
The derivative of \(U_{n}(r_{n}):U_{n}^{{}^{\prime}}(r_{m})=\dfrac{1}{U_{n}(r_{m})}\). As \(U_{n}(r_{n})\) is a positive ascending function, we can get \(U_{n}^{{}^{\prime}}(r_{n})>0\) and \(U_{n}^{{}^{\prime}}(r_{n})<0\). Therefore, the optimization problem (19) is a convex optimization problem.  
\(\overline{\eta_{n}}\) can be used to limit the lower bound of \(\dfrac{r_{n}}{r_{n}}\), which is introduced in Section 2.2. The utility-fair optimization problem \(P1\) in this paper is defined as follows:  
\[\begin{array}{ll}\text{maximize}&1/B_{F}^{2}\cdot\sum\limits_{n=M}U_{n}( \overline{I_{n}})\\ &\text{subject to}&\overset{\_}{r}\in\Lambda,\\ &0\overset{\_}{r}\leq\lambda,\\ &\overset{\_}{\eta}\leq\tau,\\ &(\text{l}),(2)\end{array} \tag{20}\]  
where \(B_{F}\) represents the size of packet buffer in each node of the sensor network.