## 3 Power Allocation of SCO\(-\)AN
### SQP and ISQP Algorithm
\begin{array}{c}\varepsilon\\ H_{1}(d,\mu,\lambda)\\ H_{2}(d,\mu,\lambda)\\ \Phi(\varepsilon,d,\lambda)\end{array} \right)=0, \tag{60}\]  
The Jacobian matrix of \((H_{z})\) is  
\[H^{\prime}(z)=\left( \begin{array}{cccc}1&0&0&0\\ 0&\textbf{B}_{k}&-(\textbf{A}_{k}^{\varepsilon})^{T}&-(\textbf{A}_{k}^{ \Gamma})^{H}\\ 0&\textbf{A}_{k}^{\varepsilon}&0&0\\ \
u&D_{2}(z)A_{k}^{\Gamma}&0&D_{1}(z)\end{array} \right), \tag{61}\]  
where \(\
u=\
abla_{\varepsilon}\Phi(\varepsilon,d,\lambda)=(\
u_{1},\
u_{2},\ldots, \
u_{m})^{T}\) and  
\[\
u_{i}=-\frac{2\varepsilon}{\sqrt{\lambda_{i}^{2}+\left[g_{i}(x_{k},y_{k})+( \textbf{A}_{k}^{\Gamma})_{i}d\right]^{2}+2\varepsilon^{2}}}, \tag{62}\]  
\[ \begin{array}{l}D_{1}(z)=diag(a_{1}(z),a_{2}(z),\ldots,a_{m}(z)),\\ D_{2}(z)=diag(b_{1}(z),b_{2}(z),\ldots,b_{m}(z)),\end{array}  \tag{63}\]  
where  
\[ \begin{array}{l}a_{i}(z)=1-\frac{\lambda_{i}}{\sqrt{\lambda_{i}^{2}+\left[g_ {i}(x_{k},y_{k})+(\textbf{A}_{k}^{\Gamma})_{i},d\right]^{2}+2\varepsilon^{2} }},\\ b_{i}(z)=1-\frac{g_{i}(x_{k},y_{k})+(\textbf{A}_{k}^{\Gamma})_{i}d}{\sqrt{ \lambda_{i}^{2}+\left[g_{i}(x_{k},y_{k})+(\textbf{A}_{k}^{\Gamma})_{i}d\right] ^{2}+2\varepsilon^{2}}},\end{array}  \tag{64}\]  
here, we make \(\gamma\in(0,1)\) and a non-negative functions \(\psi(z)\) is  
\[\psi(z)=\gamma\|H(z)\|\min\{1,\|H(z)\|\}. \tag{65}\]Sequence quadratic program (SQP) is an iterative algorithm, the basic idea of SQP is to apply approximate Newton method to the first-order optimality condition of constrained optimization problem. In each iteration step, a quadratic programming problem with the quadratic approximation of Lagrange function as the objective function and the linearization of the original constraint as the constraint condition are solved. The full SQP is shown as follows:  
Step 0: Set \(\beta\)=0.5, \(\sigma\)=0.2, \(\varepsilon\)=\(1\times 10^{-6}\), the initial vector \(d_{0}=(1,1,1)^{\mathsf{T}}\), \(\mu_{0}=0\), \(\lambda_{0}=(0,0,0)^{\mathsf{T}}\), \(z_{0}=(\varepsilon_{0},d_{0},\mu_{0},\lambda_{0})\), \(\overline{z}_{0}=(\varepsilon_{0},0,0,0)\), \(i=0\)  
Step 1: If \(\|H(z_{i})\|\leq 0\), stop iteration, else, \(\psi_{i}=\psi(z_{i})\), \(\psi_{i}\) is shown in (37), \(H(z_{i})\) is shown in (32). Step 2: Solve the equations \(H(z_{i})+H^{\prime}(z_{i})\Delta z_{i}=\psi\overline{z}_{0}\) and then get the solution of the equations: \(\Delta z_{i}=(\Delta\varepsilon_{i},\Delta d_{i},\Delta\mu_{i},\Delta\lambda_ {i})\)  
Step 3: Let \(m\) be the smallest non-negative integer \(m\) that satisfies the following inequality: \(H(z_{i}+\beta^{m}\Delta z_{i})\leq[1-\sigma(1-\gamma\varepsilon_{0})\beta^{m} )]\|H(z_{i})\|\) where \(\alpha_{i}=\rho^{m_{i}},z_{i+1}=z_{i}+\alpha_{i}\Delta z_{i}\)  
Step 4: \(i=i+1\), go to step1  
**Algorithm 1** SQP  
We adopt a improved sequence quadratic program (ISQP) which is based on improvements from sequence quadratic program. At the beginning of the iteration, the initial matrix in (52), \(B(x,\mu,\lambda)\) is set as the identity matrix in ISQP. In SQP, the initial matrix is designed as  
\[W(x,y,u,\lambda)=\
abla^{2}(f(x,y))-\sum\limits_{i=1}^{l}u_{i}\times\
abla^{ 2}(h_{i}(x,y))-\sum\limits_{i=1}^{m}\lambda_{i}\times\
abla^{2}(g_{i}(x,y)), \,\
abla^{2}(*)\]  
the Hessian matrix of \((*)\). A second order partial derivative should be calculated in each iteration of SQP. The complexity of \(W(x,y,u,\lambda)=\
abla^{2}(f(x,y))-\sum\limits_{i=1}^{l}u_{i}\times\
abla^{ 2}(h_{i}(x,y))-\sum\limits_{i=1}^{m}\lambda_{i}\times\
abla^{2}(g_{i}(x,y))\) trivially is much larger than that of \(B(x,y,\mu,\lambda)\).