\section{Introduction}
	Future wireless networks are expected to face unprecedented demands for continuous and ubiquitous connectivity due to the increasing number of mobile users, the evolving deployment of \ac{IoT} networks, and the growing number of novel use cases. Increasing \ac{BS} density and using relays may be a straightforward solution to cope with this unforeseen situation, but it comes at the cost of high capital and operational expenditures. Alternatively, a green and an energy-efficient solution that utilizes reconfigurable
	intelligent surfaces (RIS) in terrestrial networks (TNs) has been introduced \cite{huang2019reconfigurable}.
	RIS constitutes a large number of low-cost and nearly passive elements, which can be configured to reflect the incident \ac{RF} signal to a desired direction \cite{di2020smart,huang2019reconfigurable}.
	
	However, the deployment of RIS in terrestrial environments involves several challenges, such as placement flexibility and channel impairments including excessive path loss and shadowing effects. Instead, in \cite{alfattani2021aerial}, we proposed the integration of RIS with non-terrestrial systems and discussed its prospects for wireless systems and services. Since  energy consumption is a critical issue in aerial platforms, equipping them with a massive number of active antennas would exaggerate the issue. Alternatively, mounting aerial platforms with RIS can provide an energy-efficient solution \cite{ye2022non,shang2022uav,li2022energy,jeon2022energy, aung2022energy}. In addition, due to the favorable wireless channel conditions in non-terrestrial networks (NTN), \ac{RIS}  can support panoramic full-angle reflection serving wider areas with strong line-of-sight (LoS) links \cite{lu2021aerial,ye2022non}. Further, in \cite{alfattani2021link}, we showed that RIS-mounted \ac{HAPS} has the potential to outperform other RIS-mounted aerial platforms, due to the large size of \ac{HAPS}.
	
	To reap the benefits of RIS-mounted HAPS, in \cite{alfattani2022beyond}, we proposed a novel \textit{beyond-cell communications} approach. This approach offers service to the stranded terrestrial \acp{UE}, whose either channel conditions are below the required quality-of-service (QoS), or are located in a cell with fully loaded \ac{BS}. In particular, the stranded UEs get service from a dedicated ground \ac{CS} through the HAPS-RIS. We showed that HAPS-RIS can work in tandem with legacy TNs to support unserved UEs. We also discussed the optimal power and RIS units allocation design schemes to maximize the system throughput and the worst UE rate.
	
However, due to practical limitations on system resources, including \ac{CS} power and HAPS size (equivalently, the number of RIS units), it might be infeasible to serve all unsupported UEs by CS through HAPS-RIS. 
Accordingly, we formulated a novel optimization problem to maximize the \ac{RE} of the system. 
	\begin{itemize}
	    \item A novel resource-efficient optimization problem that maximizes the percentage of connected \acp{UE} while minimizing the usage of RIS units and transmit power is formulated.  
	    \item Since the resulting problem is a \ac{MINLP} and hard to solve, a low complexity two-stage algorithm is proposed to solve it.
	    \item Through numerical results, we study the impact of HAPS size and QoS requirements of \acp{UE} on the percentage of connected UEs and demonstrate significant improvements in \ac{RE} of the system.
	\end{itemize}
	
	The rest of the letter is organized as follows. In Section \ref{Sec:model},
	the system model is described. Section \ref{Sec:Problem_form} presents the problem formulation. The proposed solution and the algorithm for solving the optimization problem are discussed in Section \ref{Sec:Solution}. Numerical results and discussion are presented in Section \ref{Sec:Results}. Finally, Section \ref{Sec:conclstion} concludes the letter. 
	\begin{figure}[h]
		\centering
	
		\includegraphics[width=0.6\linewidth]{new_model_HAPS-RIS.pdf}
		\caption{System model for HAPS-RIS assisting beyond cell communications.}
		\label{fig:model}
	\end{figure}
	
	\section{System Model} \label{Sec:model}
    We consider a typical urban region consists of $K$ UEs, $L$ terrestrial \acp{BS}, a single HAPS-RIS, and one \ac{CS}, as depicted in Fig.~\ref{fig:model}. The UEs are assumed to suffer from severe shadowing and blockages, and NLoS paths, which are typical characteristics of propagation media in urban regions. Based on channel conditions between the \acp{BS} and the UEs, and the maximum serving capacity of the \acp{BS}, a set of $\mathcal{K}_1 = \{1,\ldots,K_1\}$ UEs will be supported by  direct links from the BSs (referred to as \textit{within-cell} communications \cite{alfattani2022beyond}).
	The set of remaining UEs $\mathcal{K}_2 = \{1,\ldots,K_2\}$, which cannot form direct connection with the terrestrial \ac{BS} will be served by the \ac{CS}  via HAPS-RIS (referred to as \textit{beyond-cell} communications \cite{alfattani2022beyond}). The CS is located somewhere in the HAPS coverage area. Note that $\mathcal{K} = \mathcal{K}_1 \cup \mathcal{K}_2$. We assume that the \ac{CS} serves the stranded UEs in set $\mathcal{K}_2$ using orthogonal subcarriers, and hence, there will be no inter-UE interference. Further, both \textit{within-cell} and \textit{beyond-cell} communications occur in two orthogonal frequency bands, while keeping the subcarrier bandwidth $B_{\rm UE}$ same for both types of communications. As a result, the signals from  \textit{within-cell} UEs will not interfere with the signals from  \textit{beyond-cell} UEs and vice versa.
	
	We assume that \textit{within-cell} UEs are connected optimally with terrestrial  BSs, and hence, our focus in this work is on \textit{beyond-cell} communications. Accordingly, the received signal at UE $k \in \mathcal{K}_2$ on subcarrier $m$ can be expressed as
	\begin{equation}
	\label{eq:Rx_signal}
	y_{k m}=\sqrt{P^{\rm CS}_{k m}} h_{k m}  \mathrm{\Phi}_{k} \;x_{{k m}}+w_{km},
	\end{equation}
	where $P^{\rm CS}_{km}$ denotes the transmit power of UE $k$ and $w_{km}$ denotes the additive white Gaussian noise (AWGN) $\sim \mathcal{CN}(0,N_0B_{\rm UE})$, where $N_0$ is the noise power spectral density. $h_{k m}$ denotes the effective channel gain from the \ac{CS} to the HAPS-RIS and from the HAPS-RIS to UE $k$, and is given by 
	\begin{equation}
	h_{k m} = \sqrt{G^{\rm CS} G_{r}^{k} (\textsf{PL}^{\rm{CS-HAPS}-\textit{k}})^{-1}},    
	\end{equation}
	where $G^{\rm CS}$ denotes the
	antenna gain of  the control station, and $G_{r}^{k}$ is the receiver antenna gain of UE  $k$. $\textsf{PL}^{\text{CS-HAPS}-k} = \textsf{PL}^{\rm{CS}-\rm{HAPS}} \textsf{PL}^{\text{HAPS}-k}$ denotes the effective path loss between the \ac{CS} and UE $k$ via HAPS-RIS. Further, $\mathrm{\Phi_{k}}$ represents the reflection gain of the RIS corresponding to UE $k$, and is expressed as
	\begin{equation}
	\mathrm{\Phi}_{k}=\sum_{i=1}^{N_{k}} \rho_i e^{-j  \left(\phi_i - \theta_{i}-\theta_{k}\right)},
	\end{equation}
	where $\rho_i$ denotes the reflection loss corresponding to RIS unit $i$. $\theta_{i}$ and $\theta_{k}$ represent the corresponding phases between RIS unit $i$ and both the control station and UE $k$, respectively. $\phi_i$ represents the adjusted phase shift of RIS unit $i$, and $N_{k}$ represents the total number of RIS units allocated to UE $k$. 
	
	Using \eqref{eq:Rx_signal}, the \ac{SNR} at UE $k$ can be written as
	\begin{comment}
	\begin{equation}\label{eq:SNR}
	\gamma_{k^\prime}= \frac{P_{k^\prime}^{\rm CS} \left| h_{k^\prime}  \mathrm{\Phi_{k^\prime}}\right|^2} {\sum_{i=1,i \neq {k^\prime}}^{K_2} P_{i}^{\rm CS}\left| h_{i}  \mathrm{\Phi_{i}}\right|^2 + \sigma^2 B}
	\end{equation}
	\end{comment}
	
	\begin{equation}\label{eq:SNR}
	\gamma_{k}= \frac{P_{km}^{\rm CS} \left| h_{k m}  \mathrm{\Phi}_{k}\right|^2} { N_0 B_{\rm UE}},
	\end{equation}
	and the corresponding achievable rate can be expressed as
	\begin{equation}\label{eq:R_K2}
	R_{k} = B_{\rm UE} \log_2(1+\gamma_{k}).
	\end{equation}

	
	\section{Problem Formulation}\label{Sec:Problem_form}
	
	Using power efficiently at the \ac{CS} for transmitting signals, and at the HAPS-RIS for activating the RIS units offer greener environment and longer refueling intervals for HAPS. 
	Also, in case of a large UE density or strict QoS requirement, it might infeasible to serve all unserved UEs by the CS via HAPS-RIS. 
	Therefore, we need to select as many UEs that can be supported by the \ac{CS}, while using as minimum system resources (transmit power and RIS units) as possible. Accordingly, we define a novel performance metric known as resource efficiency as follows:
	\begin{definition}
	Resource efficiency (RE) of the beyond-cell communication system, $\eta$, is defined as the ratio between the
	percentage of served UEs and the average power consumption in dBm by each supported UE, which includes the consumption towards signal transmission and RIS units configuration:
	
	\begin{equation}
	    \eta = \dfrac{\frac{1}{K}\Big(K_1+\sum_{k=1}^{K_2}u_{k}\Big)}{\frac{1}{|\mathcal{U}|}\sum_{k=1}^{K_2}  \Big(P_{k m}^{\rm CS}u_k + P_{\rm RIS}N_ku_k\Big)},
	\end{equation}
	where $u_k$ is the indicator variable, if $u_k=1$, user $k$ will get service by HAPS-RIS, otherwise not if $u_k=0$. In the denominator, the tersm $\sum_{k=1}^{K_2} P_{k m}^{\rm CS}u_k$ and $\sum_{k=1}^{K_2}P_{\rm RIS}N_ku_k$ represent the total transmit power consumption at the \ac{CS} and the total power consumed by the RIS units for all supported UEs, respectively. $P_{\rm RIS}$ denotes the consumed power by each RIS unit for phase shifting, which is dependent on the RIS configuration technology and its resolution. Finally, $|\mathcal{U}|$ denotes the cardinality of the set, which constitutes the UEs supported by the CS via HAPS-RIS.
	\end{definition}
	
	
	In the following, we formulate the resource-efficient UEs maximization problem.
	
		It can be expressed as
		\begin{comment}
    		\begin{subequations}
    		\begin{align}
    		\label{eq:P4} & \max _{\mathrm{\Phi}_{k},N_{k},P_{k m}^{\rm CS}} \dfrac{\mathcal{PC}}{\sum_{k=1}^{K_2}  N_{k}}  \\
    		\label{p4:c1} & \text { s.t. } \textcolor{black}{ L \leq L_{\rm max}} \\
    		\label{p1_throu:c2} &\quad R_{k} \geq R_{th}, \enspace \forall k=1,2, \ldots, K_2 \\
    		\label{p1_throu:c3} &\quad  \sum_{k=1}^{K_2}  N_{k} \leq N_{\rm max} \\
    		\label{p1_throu:c4} &\quad
    		0\leq \theta_{n} \leq 2\pi,
    		\enspace  \forall n=1,2, \ldots, N_{ \rm max} \\
    	
    		\label{p1_throu:c5} &\quad\sum_{k=1}^{K_2} P_{k m}^{\rm CS} \leq P_{\rm max}^{\rm CS}
    		\\
    		\label{p1_throu:c6} &\quad N_{k \rm min} \leq N_{k} \leq N_{k \rm max}\\	
    		\label{p1_throu:c7} &\quad P_{k \rm min}^{\rm CS} \leq P_{k m}^{\rm CS} \leq P_{k \rm max}^{\rm CS},
    		\end{align}
    		\end{subequations}
		\end{comment}
		\begin{subequations}
			\label{eq:RIS-efficiency}
			\begin{align}
			\label{eq:P4-2}
			&\max _{u_{k},\mathrm{\Phi}_{k},N_{k},P_{k m}^{\rm CS}} \et
			\\
			\label{p4:c1} & \text { s.t. } L \leq L_{\rm max}, \\
			\label{p1:c1} &\quad R_{k}  \geq u_{k} R_{\rm th}, \enspace \forall k=1,2, \ldots, K_2, \\
			\label{p1:c2} &\quad  \sum_{k=1}^{K_2}  u_{k}N_{k}  \leq  N_{\rm max}, \\
			\label{p1:c3} &\quad 
			\theta_{n} \in \{0, 2\pi\},
			\enspace  \forall n=1,2, \ldots, N_{\rm max}, \\
			\label{p1:c4} &\quad\sum_{k=1}^{K_2} u_{k}P_{k m}^{\rm CS}  \leq P_{\rm max}^{\rm CS},
			\\
			\label{p1:c5} &\quad  N_{k} \in \{N_{k, \rm min}, N_{k, \rm{max}}\} ,\enspace \forall k=1,2, \ldots, K_2,
			\\	
			\label{p1:c6} &\quad  0 \leq P_{k m}^{\rm CS}  \leq u_{k} P_{k, \rm max}^{\rm CS} ,\enspace \forall k=1,2, \ldots, K_2,\\
			\label{p1:c7} &\quad u_{k} \in \{0,1\},
			\end{align}
		\end{subequations}
		where
		$P^{\rm CS}_{\rm max}$ denotes the maximum available transmit power at the \ac{CS}.  $N_{k,\rm max}$ and $P_{k, \rm max}^{\rm CS}$ denote the maximum number of RIS units and the amount of power allocated to UE $k$, respectively. (\ref{p4:c1}) limits the  number of BSs in the area. Constraint (\ref{p1:c1}) guarantees that each selected UE satisfies the threshold rate, $R_{\rm th}$, requirement. Constraint (\ref{p1:c2}) ensures the total number of RIS units allocated to the supported UEs does not exceed the maximum number of available RIS units, $N_{\rm max}$, which is limited by the HAPS size. Constraint (\ref{p1:c3}) determines the range of the adjustable phase shift for each RIS unit. Constraint (\ref{p1:c4}) guarantees that the total allocated power by the \ac{CS} to the selected UEs is less than the maximum available power. Finally, constraints (\ref{p1:c5}) and (\ref{p1:c6}) ensure feasible and fair allocation of both RIS units and \ac{CS} power to each UE.
		
		
		


		
		
		\begin{comment}
		\begin{subequations}
		\label{eq:power-efficiency}
		\begin{align}
		\label{eq:P5} & \max _{\mathrm{\Phi}_{k},N_{k},P_{k m}^{\rm CS}} \dfrac{\mathcal{PC}}{\sum_{k=1}^{K_2} \Big( P^{\rm CS}_{k m}}  \\
		\label{p5:c1} & \text { s.t. } (\ref{p4:c1})-(\ref{p1:c7}) .
		\end{align}
		\end{subequations}
		\end{comment}
		








		
		

	\section{Proposed Solution} \label{Sec:Solution}




	\begin{comment}
	To maximize the number of \textit{within-cell} UEs connection, we set $L=L_{max}$. 
	Then, for the \textit{beyond-cell} UEs, the problem of maximizing the percentage of connected UEs using minimal number of RIS units can be re-written as:

	Accordingly, \eqref{eq:RIS-efficiency} is a combinatorial hard problem, which may involve high complex computation. Therefore, we propose a low-complexity practical approach to solve it as described in Algorithm~\ref{Algo1}. 
	\end{comment}
		
	Since problem (\ref{eq:RIS-efficiency}) is an \ac{MINLP}, it is hard to solve optimally with lower complexity. Therefore, we develop a low-complexity algorithm to solve it suboptimally. The main step of the proposed algorithm involves solving \eqref{eq:RIS-efficiency} in two stages. 
		
		In the first stage, we maximize the numerator of (\ref{eq:P4-2})  by maximizing the number of UEs, which can establish direct connection with TNs (i.e., by setting $L=L_{\rm max}$), and then finding the set of maximum feasible UEs $ \in \mathcal{K}_2$, which can be supported by the CS via HAPS-RIS.  
		To this end, we first sort the channel gains of all UEs. Secondly, under the assumptions of equal power allocation to each UE and perfect reflection of each RIS unit, we allocate the minimum required number of RIS units to each UE as follows:
	\begin{equation}\label{eq:N_k}
	N_{k} = \Biggl\lceil \sqrt{\frac{N_0 B_{\rm UE} (2^{\frac{R_{\rm min}}{B_{\rm UE}}}-1)}{P_{k m}^{\rm CS} \left| h_{k}  \right|^2}}\Biggr\rceil.
	\end{equation}
	

    The initial RIS units allocation starts with UEs with the best channel conditions until all RIS units are utilized. As a result, a set $\mathcal{U}$ with the largest number of feasible UEs is determined. 
	
    In the second stage,
		the denominator of  (\ref{eq:P4-2}) is minimized by optimally allocating the \ac{CS} power and RIS units to each UE belongs to set $\mathcal{U}$. This is accomplished by solving the following optimization problem:
		\begin{subequations}\label{eq:min_N_general}
			\begin{align}
			\label{eq:min_N}
			&\min _{\mathrm{\Phi}_{k},N_{k},P_{k m}^{\rm CS}} \sum_{k=1}^{|\mathcal{U}|}  P_{k m}^{\rm CS} + P_{\rm RIS}N_k \\
			\label{p3:c1} &\text { s.t. }  R_{k} \geq R_{th}, \enspace \forall k=1,2, \ldots, |\mathcal{U}|, \\
			\label{p1_throu:c3} &\quad  \sum_{k=1}^{K_2}  N_{k} \leq N_{\rm max}, \\
			\label{p1_throu:c4} &\quad
			\theta_{n} \in \{0, 2\pi\},
			\enspace  \forall n=1,2, \ldots, N_{ \rm max}, \\
		
			\label{p1_throu:c5} &\quad\sum_{k=1}^{K_2} P_{k m}^{\rm CS} \leq P_{\rm max}^{\rm CS},
			\\
			\label{p1_throu:c6} &\quad N_{k} \in \{N_{k, \rm min} ,N_{k, \rm max}\}, \enspace \forall k=1,2, \ldots, |\mathcal{U}|,\\	
			\label{p1_throu:c7} &\quad 0 \leq P_{k m}^{\rm CS} \leq P_{k, \rm max}^{\rm CS}, \enspace \forall k=1,2, \ldots, |\mathcal{U}|.
			\end{align}
		\end{subequations}
		
		Without loss of generality, problem \eqref{eq:min_N_general} can be re-written as
		\begin{subequations}\label{eq:min_N_modified}
			\begin{align}
			\label{eq:min_N_modified_a}
			&\min _{\mathrm{\Phi}_{k},N_{k},P_{k m}^{\rm CS}} \sum_{k=1}^{|\mathcal{U}|}  P_{k m}^{\rm CS} + P_{\rm RIS}N_k \\
			\label{p3:c1_modified} &\text { s.t. }  \frac{1}{\gamma_{k}} \leq \frac{1}{\gamma_{\rm min}}, \enspace \forall k=1,2, \ldots, |\mathcal{U}|, \\
			\label{p1_throu:c3_mod} &\quad \quad \eqref{p1_throu:c3} - \eqref{p1_throu:c7}.  
			\end{align}
		\end{subequations}
		
		Problem \eqref{eq:min_N_modified} is a  mixed-integer linear program (MILP) and to solve it efficiently, we relax $N_{k}$ and $\theta$ to be the continuous variables. The final solution can be obtained as $N_{k} \approx \lceil N^*_{k} \rceil$ and $\theta_{n} \approx \lceil \theta^*_{n} \rceil$. Consequently, the objective and the constraints of \eqref{eq:min_N_modified} become posynomials, and can be solved optimally using geometric programming (GP) technique \cite{boyd2007tutorial}. The pseudo-code of the proposed two-stage algorithm is described in Algorithm~\ref{Algo1}.  
	 
	
	\begin{comment}
	\subsubsection{Power-efficient UEs maximization}
	{\color{black}
		By following a similar procedure of the previous section, and the same steps 1--8 of Algorithm \ref{Algo1},  we can obtain the maximum set of UEs to be supported by HAPS-RIS. Then, a similar problem to \eqref{eq:min_N_general} can be formulated with the objective of minimizing the CS power, as follow
		\begin{subequations}\label{eq:min_PCS_general}
			\begin{align}
			\label{eq:min_PCS}
			&\min _{\mathrm{\Phi}_{k},N_{k},P_{k m}^{\rm CS}} \sum_{k=1}^{|\mathcal{U}|}  P_{k m}^{\rm CS} \\
			\label{p4_Pcs:c1} &\text { s.t. }   \eqref{p3:c1}-\eqref{p1_throu:c7}
			\end{align}
		\end{subequations}
	
		Then, by converting the constraints of \eqref{eq:min_PCS_general} to an equivelent or an approximate posynomial one, as in \eqref{eq:min_N_modified}, geometric optimization techniques can be applied to obtain optimal allocation of power and RIS units.
		
	
	\end{comment}
	
	\begin{algorithm}[h]
		\caption{Efficient maximization of connected UEs}
		\label{Algo1}
		\begin{algorithmic}[1]
		    \State  Set $L= L_{\rm max}$ and obtained set $\mathcal{K}_2$.
			\State \textbf{Input:} $h_{k}, k\in \{1, 2, \ldots, K_2\}$. 
			\State  Sort $K_2$ UEs in descending order based on their channel gains $K_{S2}\leftarrow K_2$
			\For{$k = 1 \dots K_{S2}$} \;  
			\While{$\sum_{k=1}^{K_{S2}}  N_{k}  \leq N_{\rm max}$} 
			\State $P_{k m}^{\rm CS}=P_{\rm max}^{\rm CS}/K_{s2}$
		
			\State Obtain initial $N_{k}$ from (\ref{eq:N_k}).
			\EndWhile
			\EndFor 
			\State \textbf{Stage-1 Output:} Selected UEs $\mathcal{U}$.
			\State Solve optimally
			\eqref{eq:min_N_modified}
			for the set $\mathcal{U}$.  
			\State \textbf{Stage-2 Output:} $P_{k m}^{\text{CS}*}$ and $N^*_{k}$ ($\forall k=1,\ldots,|\mathcal{U}|$).
		\end{algorithmic}
	\end{algorithm}

	\section{Numerical Results and Discussion} \label{Sec:Results}
	







	
		In this section, we present and discuss the performance of the  proposed  algorithm. For he purpose of comparison, we employ a benchmark approach, which first allocates equal power to all UEs and then selects the UEs with the highest channel gains to be served first with the minimum number of RIS units until the QoS requirement is satisfied.
	
	
	
	
	
		
		
		
		In the simulation setup, we consider an urban square area of 10 km by 10 km consisting of $L=4$ terrestrial BSs serving $K=100$ uniformly randomly distributed UEs with a minimum separation distance of 100 m among them. We assume that the terrestrial BSs are optimally placed in the considered region. The channel gains between all the UEs and the terrestrial BSs are obtained by following the 3GPP standards \cite{3gpp38901study}. The carrier frequency is set to $f_c=2$ GHz with shadowing standard deviation $\sigma=8$ dB. Unless stated otherwise, the minimum rate for a direct connection between a UE and a BS is $R_{\rm th} = 2$ Mb/s. The maximum available bandwidth to each BS is $B_{\rm BS}=50$ MHz, and subcarrier bandwidth for each UE is set to $B_{\rm UE}=2$ MHz. Accordingly, a UE will be connected to a terrestrial BS that provides the highest data rate, and the collection of such UEs forms the set $\mathcal{K}_1$. Consequently, the collection of stranded UEs forms the other set $\mathcal{K}_2$.
		
	
		On the other hand, the effective channel gains from the \ac{CS} to all the UEs in set  $\mathcal{K}_2$ through HAPS-RIS are obtained using the standardized 3GPP channel model between a HAPS and terrestrial nodes in urban environments \cite{3gpp2017Technical,alfattani2021link}.
		 This model considers dry air atmospheric attenuation, and corresponding atmosphere parameters are selected based on the mean annual global reference atmosphere \cite{itu1999p}. Further, we assume each UE has 0 dB antenna gain, and noise power spectral density $N_0 = -174$ dBm/Hz. We further set  $P_{\rm max}^{\rm CS} =$  33 dBm, and $G^{\rm CS}=$ 43.2 dBm \cite{3gpp2017Technical} in all of the simulations, unless stated otherwise. 
		The values of other parameters are as follow: $P_{\rm RIS} =7.8$ mW\cite{huang2019reconfigurable}, $P_{k, \rm max}^{\rm CS}=30$ dBm, $N_{k, \rm min}=1000$ units and $N_{k, \rm max}=50,000$ units.
			{\color{black}
		
		
	
	
		\begin{comment}
		
		
		
		\begin{figure}[h]
		\centering
		\includegraphics[width=0.9\linewidth]{figures/UEs_BSs_connection_diff_freq.pdf}
		\caption{Relation between BSs  densities and the percentage of UEs with direct connection for different frequencies.}
		\label{fig:connection_diff_freq} 
		\end{figure}
		\subsection{Relation between BSs  densities and UEs direct connection}
		Note that the percentage of UEs supported by the \ac{CS} via HAPS-RIS depends on the number of UEs that failed to connect with any terrestrial BS directly. 
		The chances of UEs being supported by the BSs directly rely on the BSs and UEs densities and the carrier frequency. For a fixed density of BS, as the density of UEs increases, the percentage of UEs with direct connection drops because BSs cannot serve more users beyond their maximum loading capacities.
		Fig.~\ref{fig:connection_diff_freq} illustrates the fact that the percentage of UEs with direct connection increases as the density of BSs increases.
		However, as the carrier frequency increases to provide high data rate communications, the percentage of UEs with direct connection significantly drops even with the large number of BSs.
		For instance, four BSs communicating at $f_c \leq 2$ GHz are sufficient to support more than 80\% of UEs directly connected to BSs, whereas more than 20 BSs are required to support 80\% of UEs communicating at $f_c \geq 10$ GHz. Therefore, HPAS-RIS may offer a cost-effective solution in such situations than just increasing the density of the BSs.
		
		
		
		
		\begin{figure}[h]
		\centering
		\includegraphics[width=0.9\linewidth]{figures/BSs_vs_connection_v2.pdf}
		\caption{Relation between BSs and UEs densities and (BSs-UEs) direct connection. \textcolor{red}{To be corrected}}
		\label{fig:direct_percent} 
		\end{figure}
		
		
		
		\subsection{UEs with direct connection vs UEs supported by HAPS-RSS}
		By neglecting interference effect in (\ref{eq:SNR}), the relation between the number of RIS units and the achievable rate for a UE supported by HAPS-RSS can be obtained.
		Fig. \ref{fig:N_vs_Rate} shows that the average data rate for K1 UEs with direct connection to BSs  is about 23 Mb/s. However, K2 UEs supported by HAPS-RSS can satisfy the minimum rate requirement with about 4,000 RSS units, and are able to achieve the average rate of direct connection with approximately 12,000 units.
		
		\begin{figure}[t]
		\centering
		\includegraphics[width=0.9\linewidth]{figures/N_vs_Rate.pdf}
		\caption{The relation between the number of RIS units on HAPS and a UE achievable rate.}
		\label{fig:N_vs_Rate} 
		\end{figure}
		
		\subsection{RSS units allocation schemes}
		The total amount of RIS units placed on HAPS surface is limited by the HAPS size. Generally, HAPS nodes are giant platforms whose lengths are typically between 100 and
		200 m for aerostatic airships, whereas aerodynamic HAPS  have wingspans between 35 and 80 m. Since the size of each RIS unit is proportional to the  wavelength ($\lambda$), [$0.1\lambda$×$0.1\lambda$ -- $0.2\lambda$×$0.2\lambda$], the surface of HAPS can accommodates large number of reflectors. To maximize the number of supported UEs, efficient allocation schemes of RSS units should be selected. 
		In Fig. \ref{fig:schemes}, we compare between different allocation schemes. Initially, the percentage  of connected UEs ($R\geq R_{min}$) with direct connection to BSs
		is around 43\%.   However, using HAPS increases the percentage of connected UEs in all the allocation schemes. Equal and proportional schemes have  almost the same performance, with slight higher percentage of connected UEs with the proportional scheme. Equal scheme basically serves all the K2 UEs with same amount of the RSS units, whereas the proportional scheme allocate RSS units to each K2 UEs proportionally based on their channel gain.
		The min scheme serves UEs with the lowest channel gain first until all the RSS units are utilized, whereas the max scheme gives the priority for UEs with the highest channel gain.
		As seen in Fig. \ref{fig:schemes}, max scheme has the best performance in terms of the connected UEs with the limited number of RSS units. 
		
		
		\begin{figure}[t]
		\centering
		\includegraphics[width=0.9\linewidth]{figures/allocation_schemes.pdf}
		\caption{Comparison of different allocation schemes of RSS units.}
		\label{fig:schemes} 
		\end{figure}
	
		
		
		\begin{figure*}[h]
		\begin{subfigure}{0.35\textwidth}
		\centering
		\includegraphics[width=\linewidth]{figures/av_opt_schemes.pdf}
		\caption{Average UE rate.}
		\label{fig:sfig1}
		\end{subfigure}%
		\begin{subfigure}{0.35\textwidth}
		\centering
		\includegraphics[width=\linewidth]{figures/worstR_opt_schemes.pdf}
		\caption{Worst UE rate.}
		\label{fig:sfig2}
		\end{subfigure}
		\begin{subfigure}{0.35\textwidth}
		\centering
		\includegraphics[width=\linewidth]{figures/throu_opt_schemes.pdf}
		\caption{Sum rate of the UEs belong to set $\mathcal{K}_2$.}
		\label{fig:sfig3}
		\end{subfigure}
		\caption{Comparison of different allocation strategies.}
		\label{fig:opt_comp}
		\end{figure*}   
		
		\subsection{Comparison between allocation schemes} 
		\subsubsection{Sum rate and worst UE rate maximization based allocation}
		In this simulation,  we set $N_{k, min}=1000$ , $N_{k, max}=10,000$ RIS units and $P_{k, min}^{\rm CS}=15$ dBm and $P_{k, max}^{\rm CS}=20$ dBm. 
		
		Fig. \ref{fig:opt_comp} compares the performances of the achievable average UE rate, worst UE rate, and the sum rate of UEs belongs to set $\mathcal{K}_2$ based on the optimized power and RIS units allocation strategy. The optimized allocation is compared to the \textit{proportional} allocation strategy for benchmark purpose. 
		
		It can be observed that the \textit{max throughput} allocation scheme achieved the best performance in terms of the average UEs rate, and the sum rate of the UEs belongs to set $\mathcal{K}_2$. However, in terms of the worst UE performance, the \textit {max min R} allocation scheme significantly improves the rate of the UE with the weakest channel gain, and it substantially outperforms the \textit{max throughput} and the \textit{proportional allocation} schemes. Note that the improvement in the worst UE rate leads to the degradation of the sum and average UE rates. Since the \textit{max min R} scheme distributes the system resources fairly and maximizes the fairness among all the UEs, it results in performance loss for the whole system. It is worth noting that performance enhancement for the worst UE rate by \textit{max min R}  scheme is about 15\%, while the degradation in terms of the average rate or the throughput is less than 1\% to the optimized \textit{max throughput} allocation scheme.
		
		
		
		\subsubsection{RIS units minimization based allocation}
		Fig. \ref{fig:R_min_vs_N} shows the variation of the minimum number of RIS units required with the different values of the minimum rate requirements of the UE. The number of RIS units and power $P_{k m}^{\rm CS}$ corresponding to all $\mathcal{K}_2$ UEs that satisfy the minimum rate requirements are obtained by solving the problem \eqref{eq:min_N_2}. It can be observed that an almost linear relationship exists between the rate requirement and the required minimum number of RIS units. Moreover, by doubling the rate required for the UEs, the RIS unit requirement is increased by 100\%.   Fig. \ref{fig:R_min_vs_N} also shows the relationship between the different values of maximum transmit power available at the \ac{CS} $P_{max}^{\rm CS}$ and the optimized number of RIS units. It can be observed that by increasing  $P_{max}^{\rm CS}$ by 1 dB, the minimum required the number of RIS units is reduced by about 11\%.
		
		\begin{figure}
		\centering
		\includegraphics[scale=0.6]{figures/min_N_allocation_dif_PCS.pdf}
		\caption{Relation between $R_{min}$ for  $\mathcal{K}_2$ UEs and optimized total
		required RIS units.}
		\label{fig:R_min_vs_N} 
		\end{figure}
		\end{comment}
		
		\subsection{Resource-efficiency maximization}
        Fig. \ref{fig:max_UES_minPCS} plots the normalized RE obtained using Algorithm~\ref{Algo1} (on the left-hand side y-axis) and the percentage of connected UEs ( on the right-hand side y-axis) versus different values of minimum rate requirement $R_{\rm min}$. It also compares the performance of Algorithm~\ref{Algo1} with the benchmark approach. The maximum number of RIS units mounted on HAPS is set to $N_{\rm max}=220,000$ units. It can be observed that as the QoS (represented by $R_{\rm min}$) increases, the percentage of connected UEs and the RE drops. However, this performance degradation is more significant in terms of the percentage of connected UEs than the RE. Furthermore, we observed that the RE obtained using Algorithm~\ref{Algo1} significantly outperforms the one obtained using the benchmark approach. This is due to the fact that Algorithm~\ref{Algo1} optimizes allocation of both power and RIS units to UEs.
		
	
		 
		
		
		
		
	
	
	
	
	
	
	
	

	\begin{comment}
		\begin{figure}
			\centering
		
	
		\includegraphics[scale=0.6]{figures/max_UEs_connectedRatio_bench_vs_Algo_normalized.pdf}
			\caption{RIS-efficiency of connected UEs  for different $R_{\rm min}$.}
			\label{fig:max_UEs_connectedRatio_bench_vs_Algo} 
		\end{figure}
		\end{comment}	
		
	\begin{comment}

		Fig.~\ref{fig:max_UES_minPCS} plots and compares
		normalized efficiency
		of the power-efficient allocation and 
		the benchmark approach for varying $R_{\rm min}$ requirements. The power-efficient allocation is obtained by
		solving \eqref{eq:power-efficiency} using Algorithm~\ref{Algo1}.
		 We observe that the proposed approach is always more power-efficient than the  benchmark approach
		 However, the percentage of connected UEs and the power efficiency decreases when the QoS requirements is high for all UEs.
		 	\end{comment}
	}
	







	
	\begin{figure}
		\centering
	
	
		\includegraphics[scale=0.6]{max_UES_minP_total_normalized_modified.pdf}
	
	
		\caption{Resource-efficiency performance of connected UEs  for different $R_{\rm min}$.}
		\label{fig:max_UES_minPCS} 
	\end{figure}
		
	
		\subsection{Percentage of connected UEs}
		\begin{figure}
			\centering
			\includegraphics[scale=0.6]{max_UEs_connected_bench_vs_Algo.pdf}
			\caption{Maximizing connected UEs performance for different $N_{\rm max}$.}
			\label{fig:max_UES_algo} 
		\end{figure}

			\begin{figure}
			\centering
		\includegraphics[scale=0.6]{max_UEs_connected_bench_vs_Algo_different_PCS_max.pdf}
			\caption{Maximizing connected UEs performance for different $P_{\rm max}^{\rm CS}$.}
		\label{fig:max_UES_algo_diff_PCS} 
		\end{figure}
		Figs. \ref{fig:max_UES_algo} and \ref{fig:max_UES_algo_diff_PCS} plot and compare the percentage of connected UEs obtained through Algorithm~\ref{Algo1}, the benchmark approach, and \textit{within-cell} communication approach for different values of the number of RIS units $N_{\rm max}$  available at the HAPS, and maximum power $P_{\rm max}^{\rm CS}$ available at the \ac{CS}, respectively. 

In Fig. \ref{fig:max_UES_algo}, to study the impact of $N_{\rm max}$, we consider only the second term (i.e., $P_{\rm RIS}N_k$) of the objective function in (\ref{eq:min_N_modified_a}). The selected range of $N_{\rm max}$ is set between 10,000 and 220,000 units. This range corresponds to a total RIS area between  9 $\rm m^2$ and 198 $\rm m^2$ at carrier frequency of 2 GHz \footnote{This represents a limited area on a typical HAPS surface, as the length of an airship is between	100-200 m, whereas aerodynamic HAPS  have wingspans between 35m and 80 m. The size of each RIS unit is $(0.2\lambda)^2$ \cite{kurt2021vision}.}. In Fig. \ref{fig:max_UES_algo_diff_PCS}, only the first term of (\ref{eq:min_N_modified_a}) (i.e., $P_{km}^{\rm CS}$) is considered to study the effect of $P_{\rm max}^{\rm CS}$ on the percentage of connected UEs.  The maximum transmit power of CS is set to vary between 30 dBm and 35 dBm, and $N_{\rm max}$ is set to 150,000 units. It can be observed from the figures that the percentage of connected UEs increases with the maximum power of the \ac{CS} $P_{\rm max}^{\rm CS}$, and the maximum number of RIS units $N_{\rm max}$  (or the size of HAPS). These behaviours are intuitive as making available more system resources ($P_{\rm max}^{\rm CS}$ and $N_{\rm max}$) allow more number of stranded users to be served by the \ac{CS} via HAPS-RIS.  

Figs. \ref{fig:max_UES_algo} and \ref{fig:max_UES_algo_diff_PCS} also show that the performance of the proposed approach is 1-3 \% higher than the
benchmark approach. Moreover, $P_{\rm max}^{\rm CS}$ has more significant impact than $N_{\rm max}$ on the percentage of connected UEs. By increasing $P_{\rm max}^{\rm CS}$ by 2 dB, the percentage of connected UEs increases about 4\%, whereas  doubling of the RIS size is needed to achieve the same increase in the percentage of connected UEs.

Furthermore, it can be observed from the figures that 76\%  UEs are served through \textit{within-cell} communication approach, and the \ac{CS} supports the remaining UEs via HAPS-RIS. Hence, \textit{beyond-cell} communications via HAPS-RIS is able to complement  TNs.
		
		
	
	
	
	\section{Conclusion}\label{Sec:conclstion}
	\textcolor{black}{In this letter, we investigated the resources optimization of \textit{beyond-cell} communications that use HAPS-RIS technology to complement TNs by supporting  unserved UEs.
    In particular, given the limitations of the CS power and HAPS-RIS size, it might not be feasible to support all unserved UEs.
    Therefore, we formulated
    a novel resource-efficient optimization problem that
    simultaneously maximizes the percentage of connected UEs using minimal \ac{CS} power and RIS units.
     The results show the capability of the \textit{beyond-cell} communications approach to support a larger number of UEs. Further, the results show the superiority of the proposed solutions over the benchmark approach and demonstrate the impact of the HAPS size and the QoS requirement on the percentage of connected UEs and the efficiency of the system.  } 

	\bibliographystyle{IEEEtran}
	
\section{Introduction}
	Future wireless networks are expected to face unprecedented demands for continuous and ubiquitous connectivity due to the increasing number of mobile users, the evolving deployment of \ac{IoT} networks, and the growing number of novel use cases. Increasing \ac{BS} density and using relays may be a straightforward solution to cope with this unforeseen situation, but it comes at the cost of high capital and operational expenditures. Alternatively, a green and an energy-efficient solution that utilizes reconfigurable
	intelligent surfaces (RIS) in terrestrial networks (TNs) has been introduced \cite{huang2019reconfigurable}.
	RIS constitutes a large number of low-cost and nearly passive elements, which can be configured to reflect the incident \ac{RF} signal to a desired direction \cite{di2020smart,huang2019reconfigurable}.
	
	However, the deployment of RIS in terrestrial environments involves several challenges, such as placement flexibility and channel impairments including excessive path loss and shadowing effects. Instead, in \cite{alfattani2021aerial}, we proposed the integration of RIS with non-terrestrial systems and discussed its prospects for wireless systems and services. Since  energy consumption is a critical issue in aerial platforms, equipping them with a massive number of active antennas would exaggerate the issue. Alternatively, mounting aerial platforms with RIS can provide an energy-efficient solution \cite{ye2022non,shang2022uav,li2022energy,jeon2022energy, aung2022energy}. In addition, due to the favorable wireless channel conditions in non-terrestrial networks (NTN), \ac{RIS}  can support panoramic full-angle reflection serving wider areas with strong line-of-sight (LoS) links \cite{lu2021aerial,ye2022non}. Further, in \cite{alfattani2021link}, we showed that RIS-mounted \ac{HAPS} has the potential to outperform other RIS-mounted aerial platforms, due to the large size of \ac{HAPS}.
	
	To reap the benefits of RIS-mounted HAPS, in \cite{alfattani2022beyond}, we proposed a novel \textit{beyond-cell communications} approach. This approach offers service to the stranded terrestrial \acp{UE}, whose either channel conditions are below the required quality-of-service (QoS), or are located in a cell with fully loaded \ac{BS}. In particular, the stranded UEs get service from a dedicated ground \ac{CS} through the HAPS-RIS. We showed that HAPS-RIS can work in tandem with legacy TNs to support unserved UEs. We also discussed the optimal power and RIS units allocation design schemes to maximize the system throughput and the worst UE rate.
	
However, due to practical limitations on system resources, including \ac{CS} power and HAPS size (equivalently, the number of RIS units), it might be infeasible to serve all unsupported UEs by CS through HAPS-RIS. 
Accordingly, we formulated a novel optimization problem to maximize the \ac{RE} of the system. 
	\begin{itemize}
	    \item A novel resource-efficient optimization problem that maximizes the percentage of connected \acp{UE} while minimizing the usage of RIS units and transmit power is formulated.  
	    \item Since the resulting problem is a \ac{MINLP} and hard to solve, a low complexity two-stage algorithm is proposed to solve it.
	    \item Through numerical results, we study the impact of HAPS size and QoS requirements of \acp{UE} on the percentage of connected UEs and demonstrate significant improvements in \ac{RE} of the system.
	\end{itemize}
	
	The rest of the letter is organized as follows. In Section \ref{Sec:model},
	the system model is described. Section \ref{Sec:Problem_form} presents the problem formulation. The proposed solution and the algorithm for solving the optimization problem are discussed in Section \ref{Sec:Solution}. Numerical results and discussion are presented in Section \ref{Sec:Results}. Finally, Section \ref{Sec:conclstion} concludes the letter. 
	\begin{figure}[h]
		\centering
	
		\includegraphics[width=0.6\linewidth]{new_model_HAPS-RIS.pdf}
		\caption{System model for HAPS-RIS assisting beyond cell communications.}
		\label{fig:model}
	\end{figure}
	
	\section{System Model} \label{Sec:model}
    We consider a typical urban region consists of $K$ UEs, $L$ terrestrial \acp{BS}, a single HAPS-RIS, and one \ac{CS}, as depicted in Fig.~\ref{fig:model}. The UEs are assumed to suffer from severe shadowing and blockages, and NLoS paths, which are typical characteristics of propagation media in urban regions. Based on channel conditions between the \acp{BS} and the UEs, and the maximum serving capacity of the \acp{BS}, a set of $\mathcal{K}_1 = \{1,\ldots,K_1\}$ UEs will be supported by  direct links from the BSs (referred to as \textit{within-cell} communications \cite{alfattani2022beyond}).
	The set of remaining UEs $\mathcal{K}_2 = \{1,\ldots,K_2\}$, which cannot form direct connection with the terrestrial \ac{BS} will be served by the \ac{CS}  via HAPS-RIS (referred to as \textit{beyond-cell} communications \cite{alfattani2022beyond}). The CS is located somewhere in the HAPS coverage area. Note that $\mathcal{K} = \mathcal{K}_1 \cup \mathcal{K}_2$. We assume that the \ac{CS} serves the stranded UEs in set $\mathcal{K}_2$ using orthogonal subcarriers, and hence, there will be no inter-UE interference. Further, both \textit{within-cell} and \textit{beyond-cell} communications occur in two orthogonal frequency bands, while keeping the subcarrier bandwidth $B_{\rm UE}$ same for both types of communications. As a result, the signals from  \textit{within-cell} UEs will not interfere with the signals from  \textit{beyond-cell} UEs and vice versa.
	
	We assume that \textit{within-cell} UEs are connected optimally with terrestrial  BSs, and hence, our focus in this work is on \textit{beyond-cell} communications. Accordingly, the received signal at UE $k \in \mathcal{K}_2$ on subcarrier $m$ can be expressed as
	\begin{equation}
	\label{eq:Rx_signal}
	y_{k m}=\sqrt{P^{\rm CS}_{k m}} h_{k m}  \mathrm{\Phi}_{k} \;x_{{k m}}+w_{km},
	\end{equation}
	where $P^{\rm CS}_{km}$ denotes the transmit power of UE $k$ and $w_{km}$ denotes the additive white Gaussian noise (AWGN) $\sim \mathcal{CN}(0,N_0B_{\rm UE})$, where $N_0$ is the noise power spectral density. $h_{k m}$ denotes the effective channel gain from the \ac{CS} to the HAPS-RIS and from the HAPS-RIS to UE $k$, and is given by 
	\begin{equation}
	h_{k m} = \sqrt{G^{\rm CS} G_{r}^{k} (\textsf{PL}^{\rm{CS-HAPS}-\textit{k}})^{-1}},    
	\end{equation}
	where $G^{\rm CS}$ denotes the
	antenna gain of  the control station, and $G_{r}^{k}$ is the receiver antenna gain of UE  $k$. $\textsf{PL}^{\text{CS-HAPS}-k} = \textsf{PL}^{\rm{CS}-\rm{HAPS}} \textsf{PL}^{\text{HAPS}-k}$ denotes the effective path loss between the \ac{CS} and UE $k$ via HAPS-RIS. Further, $\mathrm{\Phi_{k}}$ represents the reflection gain of the RIS corresponding to UE $k$, and is expressed as
	\begin{equation}
	\mathrm{\Phi}_{k}=\sum_{i=1}^{N_{k}} \rho_i e^{-j  \left(\phi_i - \theta_{i}-\theta_{k}\right)},
	\end{equation}
	where $\rho_i$ denotes the reflection loss corresponding to RIS unit $i$. $\theta_{i}$ and $\theta_{k}$ represent the corresponding phases between RIS unit $i$ and both the control station and UE $k$, respectively. $\phi_i$ represents the adjusted phase shift of RIS unit $i$, and $N_{k}$ represents the total number of RIS units allocated to UE $k$. 
	
	Using \eqref{eq:Rx_signal}, the \ac{SNR} at UE $k$ can be written as
	\begin{comment}
	\begin{equation}\label{eq:SNR}
	\gamma_{k^\prime}= \frac{P_{k^\prime}^{\rm CS} \left| h_{k^\prime}  \mathrm{\Phi_{k^\prime}}\right|^2} {\sum_{i=1,i \neq {k^\prime}}^{K_2} P_{i}^{\rm CS}\left| h_{i}  \mathrm{\Phi_{i}}\right|^2 + \sigma^2 B}
	\end{equation}
	\end{comment}
	
	\begin{equation}\label{eq:SNR}
	\gamma_{k}= \frac{P_{km}^{\rm CS} \left| h_{k m}  \mathrm{\Phi}_{k}\right|^2} { N_0 B_{\rm UE}},
	\end{equation}
	and the corresponding achievable rate can be expressed as
	\begin{equation}\label{eq:R_K2}
	R_{k} = B_{\rm UE} \log_2(1+\gamma_{k}).
	\end{equation}

	
	\section{Problem Formulation}\label{Sec:Problem_form}
	
	Using power efficiently at the \ac{CS} for transmitting signals, and at the HAPS-RIS for activating the RIS units offer greener environment and longer refueling intervals for HAPS. 
	Also, in case of a large UE density or strict QoS requirement, it might infeasible to serve all unserved UEs by the CS via HAPS-RIS. 
	Therefore, we need to select as many UEs that can be supported by the \ac{CS}, while using as minimum system resources (transmit power and RIS units) as possible. Accordingly, we define a novel performance metric known as resource efficiency as follows:
	\begin{definition}
	Resource efficiency (RE) of the beyond-cell communication system, $\eta$, is defined as the ratio between the
	percentage of served UEs and the average power consumption in dBm by each supported UE, which includes the consumption towards signal transmission and RIS units configuration:
	
	\begin{equation}
	    \eta = \dfrac{\frac{1}{K}\Big(K_1+\sum_{k=1}^{K_2}u_{k}\Big)}{\frac{1}{|\mathcal{U}|}\sum_{k=1}^{K_2}  \Big(P_{k m}^{\rm CS}u_k + P_{\rm RIS}N_ku_k\Big)},
	\end{equation}
	where $u_k$ is the indicator variable, if $u_k=1$, user $k$ will get service by HAPS-RIS, otherwise not if $u_k=0$. In the denominator, the tersm $\sum_{k=1}^{K_2} P_{k m}^{\rm CS}u_k$ and $\sum_{k=1}^{K_2}P_{\rm RIS}N_ku_k$ represent the total transmit power consumption at the \ac{CS} and the total power consumed by the RIS units for all supported UEs, respectively. $P_{\rm RIS}$ denotes the consumed power by each RIS unit for phase shifting, which is dependent on the RIS configuration technology and its resolution. Finally, $|\mathcal{U}|$ denotes the cardinality of the set, which constitutes the UEs supported by the CS via HAPS-RIS.
	\end{definition}
	
	
	In the following, we formulate the resource-efficient UEs maximization problem.
	
		It can be expressed as
		\begin{comment}
    		\begin{subequations}
    		\begin{align}
    		\label{eq:P4} & \max _{\mathrm{\Phi}_{k},N_{k},P_{k m}^{\rm CS}} \dfrac{\mathcal{PC}}{\sum_{k=1}^{K_2}  N_{k}}  \\
    		\label{p4:c1} & \text { s.t. } \textcolor{black}{ L \leq L_{\rm max}} \\
    		\label{p1_throu:c2} &\quad R_{k} \geq R_{th}, \enspace \forall k=1,2, \ldots, K_2 \\
    		\label{p1_throu:c3} &\quad  \sum_{k=1}^{K_2}  N_{k} \leq N_{\rm max} \\
    		\label{p1_throu:c4} &\quad
    		0\leq \theta_{n} \leq 2\pi,
    		\enspace  \forall n=1,2, \ldots, N_{ \rm max} \\
    	
    		\label{p1_throu:c5} &\quad\sum_{k=1}^{K_2} P_{k m}^{\rm CS} \leq P_{\rm max}^{\rm CS}
    		\\
    		\label{p1_throu:c6} &\quad N_{k \rm min} \leq N_{k} \leq N_{k \rm max}\\	
    		\label{p1_throu:c7} &\quad P_{k \rm min}^{\rm CS} \leq P_{k m}^{\rm CS} \leq P_{k \rm max}^{\rm CS},
    		\end{align}
    		\end{subequations}
		\end{comment}
		\begin{subequations}
			\label{eq:RIS-efficiency}
			\begin{align}
			\label{eq:P4-2}
			&\max _{u_{k},\mathrm{\Phi}_{k},N_{k},P_{k m}^{\rm CS}} \et
			\\
			\label{p4:c1} & \text { s.t. } L \leq L_{\rm max}, \\
			\label{p1:c1} &\quad R_{k}  \geq u_{k} R_{\rm th}, \enspace \forall k=1,2, \ldots, K_2, \\
			\label{p1:c2} &\quad  \sum_{k=1}^{K_2}  u_{k}N_{k}  \leq  N_{\rm max}, \\
			\label{p1:c3} &\quad 
			\theta_{n} \in \{0, 2\pi\},
			\enspace  \forall n=1,2, \ldots, N_{\rm max}, \\
			\label{p1:c4} &\quad\sum_{k=1}^{K_2} u_{k}P_{k m}^{\rm CS}  \leq P_{\rm max}^{\rm CS},
			\\
			\label{p1:c5} &\quad  N_{k} \in \{N_{k, \rm min}, N_{k, \rm{max}}\} ,\enspace \forall k=1,2, \ldots, K_2,
			\\	
			\label{p1:c6} &\quad  0 \leq P_{k m}^{\rm CS}  \leq u_{k} P_{k, \rm max}^{\rm CS} ,\enspace \forall k=1,2, \ldots, K_2,\\
			\label{p1:c7} &\quad u_{k} \in \{0,1\},
			\end{align}
		\end{subequations}
		where
		$P^{\rm CS}_{\rm max}$ denotes the maximum available transmit power at the \ac{CS}.  $N_{k,\rm max}$ and $P_{k, \rm max}^{\rm CS}$ denote the maximum number of RIS units and the amount of power allocated to UE $k$, respectively. (\ref{p4:c1}) limits the  number of BSs in the area. Constraint (\ref{p1:c1}) guarantees that each selected UE satisfies the threshold rate, $R_{\rm th}$, requirement. Constraint (\ref{p1:c2}) ensures the total number of RIS units allocated to the supported UEs does not exceed the maximum number of available RIS units, $N_{\rm max}$, which is limited by the HAPS size. Constraint (\ref{p1:c3}) determines the range of the adjustable phase shift for each RIS unit. Constraint (\ref{p1:c4}) guarantees that the total allocated power by the \ac{CS} to the selected UEs is less than the maximum available power. Finally, constraints (\ref{p1:c5}) and (\ref{p1:c6}) ensure feasible and fair allocation of both RIS units and \ac{CS} power to each UE.
		
		
		


		
		
		\begin{comment}
		\begin{subequations}
		\label{eq:power-efficiency}
		\begin{align}
		\label{eq:P5} & \max _{\mathrm{\Phi}_{k},N_{k},P_{k m}^{\rm CS}} \dfrac{\mathcal{PC}}{\sum_{k=1}^{K_2} \Big( P^{\rm CS}_{k m}}  \\
		\label{p5:c1} & \text { s.t. } (\ref{p4:c1})-(\ref{p1:c7}) .
		\end{align}
		\end{subequations}
		\end{comment}
		








		
		

	\section{Proposed Solution} \label{Sec:Solution}




	\begin{comment}
	To maximize the number of \textit{within-cell} UEs connection, we set $L=L_{max}$. 
	Then, for the \textit{beyond-cell} UEs, the problem of maximizing the percentage of connected UEs using minimal number of RIS units can be re-written as:

	Accordingly, \eqref{eq:RIS-efficiency} is a combinatorial hard problem, which may involve high complex computation. Therefore, we propose a low-complexity practical approach to solve it as described in Algorithm~\ref{Algo1}. 
	\end{comment}
		
	Since problem (\ref{eq:RIS-efficiency}) is an \ac{MINLP}, it is hard to solve optimally with lower complexity. Therefore, we develop a low-complexity algorithm to solve it suboptimally. The main step of the proposed algorithm involves solving \eqref{eq:RIS-efficiency} in two stages. 
		
		In the first stage, we maximize the numerator of (\ref{eq:P4-2})  by maximizing the number of UEs, which can establish direct connection with TNs (i.e., by setting $L=L_{\rm max}$), and then finding the set of maximum feasible UEs $ \in \mathcal{K}_2$, which can be supported by the CS via HAPS-RIS.  
		To this end, we first sort the channel gains of all UEs. Secondly, under the assumptions of equal power allocation to each UE and perfect reflection of each RIS unit, we allocate the minimum required number of RIS units to each UE as follows:
	\begin{equation}\label{eq:N_k}
	N_{k} = \Biggl\lceil \sqrt{\frac{N_0 B_{\rm UE} (2^{\frac{R_{\rm min}}{B_{\rm UE}}}-1)}{P_{k m}^{\rm CS} \left| h_{k}  \right|^2}}\Biggr\rceil.
	\end{equation}
	

    The initial RIS units allocation starts with UEs with the best channel conditions until all RIS units are utilized. As a result, a set $\mathcal{U}$ with the largest number of feasible UEs is determined. 
	
    In the second stage,
		the denominator of  (\ref{eq:P4-2}) is minimized by optimally allocating the \ac{CS} power and RIS units to each UE belongs to set $\mathcal{U}$. This is accomplished by solving the following optimization problem:
		\begin{subequations}\label{eq:min_N_general}
			\begin{align}
			\label{eq:min_N}
			&\min _{\mathrm{\Phi}_{k},N_{k},P_{k m}^{\rm CS}} \sum_{k=1}^{|\mathcal{U}|}  P_{k m}^{\rm CS} + P_{\rm RIS}N_k \\
			\label{p3:c1} &\text { s.t. }  R_{k} \geq R_{th}, \enspace \forall k=1,2, \ldots, |\mathcal{U}|, \\
			\label{p1_throu:c3} &\quad  \sum_{k=1}^{K_2}  N_{k} \leq N_{\rm max}, \\
			\label{p1_throu:c4} &\quad
			\theta_{n} \in \{0, 2\pi\},
			\enspace  \forall n=1,2, \ldots, N_{ \rm max}, \\
		
			\label{p1_throu:c5} &\quad\sum_{k=1}^{K_2} P_{k m}^{\rm CS} \leq P_{\rm max}^{\rm CS},
			\\
			\label{p1_throu:c6} &\quad N_{k} \in \{N_{k, \rm min} ,N_{k, \rm max}\}, \enspace \forall k=1,2, \ldots, |\mathcal{U}|,\\	
			\label{p1_throu:c7} &\quad 0 \leq P_{k m}^{\rm CS} \leq P_{k, \rm max}^{\rm CS}, \enspace \forall k=1,2, \ldots, |\mathcal{U}|.
			\end{align}
		\end{subequations}
		
		Without loss of generality, problem \eqref{eq:min_N_general} can be re-written as
		\begin{subequations}\label{eq:min_N_modified}
			\begin{align}
			\label{eq:min_N_modified_a}
			&\min _{\mathrm{\Phi}_{k},N_{k},P_{k m}^{\rm CS}} \sum_{k=1}^{|\mathcal{U}|}  P_{k m}^{\rm CS} + P_{\rm RIS}N_k \\
			\label{p3:c1_modified} &\text { s.t. }  \frac{1}{\gamma_{k}} \leq \frac{1}{\gamma_{\rm min}}, \enspace \forall k=1,2, \ldots, |\mathcal{U}|, \\
			\label{p1_throu:c3_mod} &\quad \quad \eqref{p1_throu:c3} - \eqref{p1_throu:c7}.  
			\end{align}
		\end{subequations}
		
		Problem \eqref{eq:min_N_modified} is a  mixed-integer linear program (MILP) and to solve it efficiently, we relax $N_{k}$ and $\theta$ to be the continuous variables. The final solution can be obtained as $N_{k} \approx \lceil N^*_{k} \rceil$ and $\theta_{n} \approx \lceil \theta^*_{n} \rceil$. Consequently, the objective and the constraints of \eqref{eq:min_N_modified} become posynomials, and can be solved optimally using geometric programming (GP) technique \cite{boyd2007tutorial}. The pseudo-code of the proposed two-stage algorithm is described in Algorithm~\ref{Algo1}.  
	 
	
	\begin{comment}
	\subsubsection{Power-efficient UEs maximization}
	{\color{black}
		By following a similar procedure of the previous section, and the same steps 1--8 of Algorithm \ref{Algo1},  we can obtain the maximum set of UEs to be supported by HAPS-RIS. Then, a similar problem to \eqref{eq:min_N_general} can be formulated with the objective of minimizing the CS power, as follow
		\begin{subequations}\label{eq:min_PCS_general}
			\begin{align}
			\label{eq:min_PCS}
			&\min _{\mathrm{\Phi}_{k},N_{k},P_{k m}^{\rm CS}} \sum_{k=1}^{|\mathcal{U}|}  P_{k m}^{\rm CS} \\
			\label{p4_Pcs:c1} &\text { s.t. }   \eqref{p3:c1}-\eqref{p1_throu:c7}
			\end{align}
		\end{subequations}
	
		Then, by converting the constraints of \eqref{eq:min_PCS_general} to an equivelent or an approximate posynomial one, as in \eqref{eq:min_N_modified}, geometric optimization techniques can be applied to obtain optimal allocation of power and RIS units.
		
	
	\end{comment}
	
	\begin{algorithm}[h]
		\caption{Efficient maximization of connected UEs}
		\label{Algo1}
		\begin{algorithmic}[1]
		    \State  Set $L= L_{\rm max}$ and obtained set $\mathcal{K}_2$.
			\State \textbf{Input:} $h_{k}, k\in \{1, 2, \ldots, K_2\}$. 
			\State  Sort $K_2$ UEs in descending order based on their channel gains $K_{S2}\leftarrow K_2$
			\For{$k = 1 \dots K_{S2}$} \;  
			\While{$\sum_{k=1}^{K_{S2}}  N_{k}  \leq N_{\rm max}$} 
			\State $P_{k m}^{\rm CS}=P_{\rm max}^{\rm CS}/K_{s2}$
		
			\State Obtain initial $N_{k}$ from (\ref{eq:N_k}).
			\EndWhile
			\EndFor 
			\State \textbf{Stage-1 Output:} Selected UEs $\mathcal{U}$.
			\State Solve optimally
			\eqref{eq:min_N_modified}
			for the set $\mathcal{U}$.  
			\State \textbf{Stage-2 Output:} $P_{k m}^{\text{CS}*}$ and $N^*_{k}$ ($\forall k=1,\ldots,|\mathcal{U}|$).
		\end{algorithmic}
	\end{algorithm}

	\section{Numerical Results and Discussion} \label{Sec:Results}
	







	
		In this section, we present and discuss the performance of the  proposed  algorithm. For he purpose of comparison, we employ a benchmark approach, which first allocates equal power to all UEs and then selects the UEs with the highest channel gains to be served first with the minimum number of RIS units until the QoS requirement is satisfied.
	
	
	
	
	
		
		
		
		In the simulation setup, we consider an urban square area of 10 km by 10 km consisting of $L=4$ terrestrial BSs serving $K=100$ uniformly randomly distributed UEs with a minimum separation distance of 100 m among them. We assume that the terrestrial BSs are optimally placed in the considered region. The channel gains between all the UEs and the terrestrial BSs are obtained by following the 3GPP standards \cite{3gpp38901study}. The carrier frequency is set to $f_c=2$ GHz with shadowing standard deviation $\sigma=8$ dB. Unless stated otherwise, the minimum rate for a direct connection between a UE and a BS is $R_{\rm th} = 2$ Mb/s. The maximum available bandwidth to each BS is $B_{\rm BS}=50$ MHz, and subcarrier bandwidth for each UE is set to $B_{\rm UE}=2$ MHz. Accordingly, a UE will be connected to a terrestrial BS that provides the highest data rate, and the collection of such UEs forms the set $\mathcal{K}_1$. Consequently, the collection of stranded UEs forms the other set $\mathcal{K}_2$.
		
	
		On the other hand, the effective channel gains from the \ac{CS} to all the UEs in set  $\mathcal{K}_2$ through HAPS-RIS are obtained using the standardized 3GPP channel model between a HAPS and terrestrial nodes in urban environments \cite{3gpp2017Technical,alfattani2021link}.
		 This model considers dry air atmospheric attenuation, and corresponding atmosphere parameters are selected based on the mean annual global reference atmosphere \cite{itu1999p}. Further, we assume each UE has 0 dB antenna gain, and noise power spectral density $N_0 = -174$ dBm/Hz. We further set  $P_{\rm max}^{\rm CS} =$  33 dBm, and $G^{\rm CS}=$ 43.2 dBm \cite{3gpp2017Technical} in all of the simulations, unless stated otherwise. 
		The values of other parameters are as follow: $P_{\rm RIS} =7.8$ mW\cite{huang2019reconfigurable}, $P_{k, \rm max}^{\rm CS}=30$ dBm, $N_{k, \rm min}=1000$ units and $N_{k, \rm max}=50,000$ units.
			{\color{black}
		
		
	
	
		\begin{comment}
		
		
		
		\begin{figure}[h]
		\centering
		\includegraphics[width=0.9\linewidth]{figures/UEs_BSs_connection_diff_freq.pdf}
		\caption{Relation between BSs  densities and the percentage of UEs with direct connection for different frequencies.}
		\label{fig:connection_diff_freq} 
		\end{figure}
		\subsection{Relation between BSs  densities and UEs direct connection}
		Note that the percentage of UEs supported by the \ac{CS} via HAPS-RIS depends on the number of UEs that failed to connect with any terrestrial BS directly. 
		The chances of UEs being supported by the BSs directly rely on the BSs and UEs densities and the carrier frequency. For a fixed density of BS, as the density of UEs increases, the percentage of UEs with direct connection drops because BSs cannot serve more users beyond their maximum loading capacities.
		Fig.~\ref{fig:connection_diff_freq} illustrates the fact that the percentage of UEs with direct connection increases as the density of BSs increases.
		However, as the carrier frequency increases to provide high data rate communications, the percentage of UEs with direct connection significantly drops even with the large number of BSs.
		For instance, four BSs communicating at $f_c \leq 2$ GHz are sufficient to support more than 80\% of UEs directly connected to BSs, whereas more than 20 BSs are required to support 80\% of UEs communicating at $f_c \geq 10$ GHz. Therefore, HPAS-RIS may offer a cost-effective solution in such situations than just increasing the density of the BSs.
		
		
		
		
		\begin{figure}[h]
		\centering
		\includegraphics[width=0.9\linewidth]{figures/BSs_vs_connection_v2.pdf}
		\caption{Relation between BSs and UEs densities and (BSs-UEs) direct connection. \textcolor{red}{To be corrected}}
		\label{fig:direct_percent} 
		\end{figure}
		
		
		
		\subsection{UEs with direct connection vs UEs supported by HAPS-RSS}
		By neglecting interference effect in (\ref{eq:SNR}), the relation between the number of RIS units and the achievable rate for a UE supported by HAPS-RSS can be obtained.
		Fig. \ref{fig:N_vs_Rate} shows that the average data rate for K1 UEs with direct connection to BSs  is about 23 Mb/s. However, K2 UEs supported by HAPS-RSS can satisfy the minimum rate requirement with about 4,000 RSS units, and are able to achieve the average rate of direct connection with approximately 12,000 units.
		
		\begin{figure}[t]
		\centering
		\includegraphics[width=0.9\linewidth]{figures/N_vs_Rate.pdf}
		\caption{The relation between the number of RIS units on HAPS and a UE achievable rate.}
		\label{fig:N_vs_Rate} 
		\end{figure}
		
		\subsection{RSS units allocation schemes}
		The total amount of RIS units placed on HAPS surface is limited by the HAPS size. Generally, HAPS nodes are giant platforms whose lengths are typically between 100 and
		200 m for aerostatic airships, whereas aerodynamic HAPS  have wingspans between 35 and 80 m. Since the size of each RIS unit is proportional to the  wavelength ($\lambda$), [$0.1\lambda$×$0.1\lambda$ -- $0.2\lambda$×$0.2\lambda$], the surface of HAPS can accommodates large number of reflectors. To maximize the number of supported UEs, efficient allocation schemes of RSS units should be selected. 
		In Fig. \ref{fig:schemes}, we compare between different allocation schemes. Initially, the percentage  of connected UEs ($R\geq R_{min}$) with direct connection to BSs
		is around 43\%.   However, using HAPS increases the percentage of connected UEs in all the allocation schemes. Equal and proportional schemes have  almost the same performance, with slight higher percentage of connected UEs with the proportional scheme. Equal scheme basically serves all the K2 UEs with same amount of the RSS units, whereas the proportional scheme allocate RSS units to each K2 UEs proportionally based on their channel gain.
		The min scheme serves UEs with the lowest channel gain first until all the RSS units are utilized, whereas the max scheme gives the priority for UEs with the highest channel gain.
		As seen in Fig. \ref{fig:schemes}, max scheme has the best performance in terms of the connected UEs with the limited number of RSS units. 
		
		
		\begin{figure}[t]
		\centering
		\includegraphics[width=0.9\linewidth]{figures/allocation_schemes.pdf}
		\caption{Comparison of different allocation schemes of RSS units.}
		\label{fig:schemes} 
		\end{figure}
	
		
		
		\begin{figure*}[h]
		\begin{subfigure}{0.35\textwidth}
		\centering
		\includegraphics[width=\linewidth]{figures/av_opt_schemes.pdf}
		\caption{Average UE rate.}
		\label{fig:sfig1}
		\end{subfigure}%
		\begin{subfigure}{0.35\textwidth}
		\centering
		\includegraphics[width=\linewidth]{figures/worstR_opt_schemes.pdf}
		\caption{Worst UE rate.}
		\label{fig:sfig2}
		\end{subfigure}
		\begin{subfigure}{0.35\textwidth}
		\centering
		\includegraphics[width=\linewidth]{figures/throu_opt_schemes.pdf}
		\caption{Sum rate of the UEs belong to set $\mathcal{K}_2$.}
		\label{fig:sfig3}
		\end{subfigure}
		\caption{Comparison of different allocation strategies.}
		\label{fig:opt_comp}
		\end{figure*}   
		
		\subsection{Comparison between allocation schemes} 
		\subsubsection{Sum rate and worst UE rate maximization based allocation}
		In this simulation,  we set $N_{k, min}=1000$ , $N_{k, max}=10,000$ RIS units and $P_{k, min}^{\rm CS}=15$ dBm and $P_{k, max}^{\rm CS}=20$ dBm. 
		
		Fig. \ref{fig:opt_comp} compares the performances of the achievable average UE rate, worst UE rate, and the sum rate of UEs belongs to set $\mathcal{K}_2$ based on the optimized power and RIS units allocation strategy. The optimized allocation is compared to the \textit{proportional} allocation strategy for benchmark purpose. 
		
		It can be observed that the \textit{max throughput} allocation scheme achieved the best performance in terms of the average UEs rate, and the sum rate of the UEs belongs to set $\mathcal{K}_2$. However, in terms of the worst UE performance, the \textit {max min R} allocation scheme significantly improves the rate of the UE with the weakest channel gain, and it substantially outperforms the \textit{max throughput} and the \textit{proportional allocation} schemes. Note that the improvement in the worst UE rate leads to the degradation of the sum and average UE rates. Since the \textit{max min R} scheme distributes the system resources fairly and maximizes the fairness among all the UEs, it results in performance loss for the whole system. It is worth noting that performance enhancement for the worst UE rate by \textit{max min R}  scheme is about 15\%, while the degradation in terms of the average rate or the throughput is less than 1\% to the optimized \textit{max throughput} allocation scheme.
		
		
		
		\subsubsection{RIS units minimization based allocation}
		Fig. \ref{fig:R_min_vs_N} shows the variation of the minimum number of RIS units required with the different values of the minimum rate requirements of the UE. The number of RIS units and power $P_{k m}^{\rm CS}$ corresponding to all $\mathcal{K}_2$ UEs that satisfy the minimum rate requirements are obtained by solving the problem \eqref{eq:min_N_2}. It can be observed that an almost linear relationship exists between the rate requirement and the required minimum number of RIS units. Moreover, by doubling the rate required for the UEs, the RIS unit requirement is increased by 100\%.   Fig. \ref{fig:R_min_vs_N} also shows the relationship between the different values of maximum transmit power available at the \ac{CS} $P_{max}^{\rm CS}$ and the optimized number of RIS units. It can be observed that by increasing  $P_{max}^{\rm CS}$ by 1 dB, the minimum required the number of RIS units is reduced by about 11\%.
		
		\begin{figure}
		\centering
		\includegraphics[scale=0.6]{figures/min_N_allocation_dif_PCS.pdf}
		\caption{Relation between $R_{min}$ for  $\mathcal{K}_2$ UEs and optimized total
		required RIS units.}
		\label{fig:R_min_vs_N} 
		\end{figure}
		\end{comment}
		
		\subsection{Resource-efficiency maximization}
        Fig. \ref{fig:max_UES_minPCS} plots the normalized RE obtained using Algorithm~\ref{Algo1} (on the left-hand side y-axis) and the percentage of connected UEs ( on the right-hand side y-axis) versus different values of minimum rate requirement $R_{\rm min}$. It also compares the performance of Algorithm~\ref{Algo1} with the benchmark approach. The maximum number of RIS units mounted on HAPS is set to $N_{\rm max}=220,000$ units. It can be observed that as the QoS (represented by $R_{\rm min}$) increases, the percentage of connected UEs and the RE drops. However, this performance degradation is more significant in terms of the percentage of connected UEs than the RE. Furthermore, we observed that the RE obtained using Algorithm~\ref{Algo1} significantly outperforms the one obtained using the benchmark approach. This is due to the fact that Algorithm~\ref{Algo1} optimizes allocation of both power and RIS units to UEs.
		
	
		 
		
		
		
		
	
	
	
	
	
	
	
	

	\begin{comment}
		\begin{figure}
			\centering
		
	
		\includegraphics[scale=0.6]{figures/max_UEs_connectedRatio_bench_vs_Algo_normalized.pdf}
			\caption{RIS-efficiency of connected UEs  for different $R_{\rm min}$.}
			\label{fig:max_UEs_connectedRatio_bench_vs_Algo} 
		\end{figure}
		\end{comment}	
		
	\begin{comment}

		Fig.~\ref{fig:max_UES_minPCS} plots and compares
		normalized efficiency
		of the power-efficient allocation and 
		the benchmark approach for varying $R_{\rm min}$ requirements. The power-efficient allocation is obtained by
		solving \eqref{eq:power-efficiency} using Algorithm~\ref{Algo1}.
		 We observe that the proposed approach is always more power-efficient than the  benchmark approach
		 However, the percentage of connected UEs and the power efficiency decreases when the QoS requirements is high for all UEs.
		 	\end{comment}
	}
	







	
	\begin{figure}
		\centering
	
	
		\includegraphics[scale=0.6]{max_UES_minP_total_normalized_modified.pdf}
	
	
		\caption{Resource-efficiency performance of connected UEs  for different $R_{\rm min}$.}
		\label{fig:max_UES_minPCS} 
	\end{figure}
		
	
		\subsection{Percentage of connected UEs}
		\begin{figure}
			\centering
			\includegraphics[scale=0.6]{max_UEs_connected_bench_vs_Algo.pdf}
			\caption{Maximizing connected UEs performance for different $N_{\rm max}$.}
			\label{fig:max_UES_algo} 
		\end{figure}

			\begin{figure}
			\centering
		\includegraphics[scale=0.6]{max_UEs_connected_bench_vs_Algo_different_PCS_max.pdf}
			\caption{Maximizing connected UEs performance for different $P_{\rm max}^{\rm CS}$.}
		\label{fig:max_UES_algo_diff_PCS} 
		\end{figure}
		Figs. \ref{fig:max_UES_algo} and \ref{fig:max_UES_algo_diff_PCS} plot and compare the percentage of connected UEs obtained through Algorithm~\ref{Algo1}, the benchmark approach, and \textit{within-cell} communication approach for different values of the number of RIS units $N_{\rm max}$  available at the HAPS, and maximum power $P_{\rm max}^{\rm CS}$ available at the \ac{CS}, respectively. 

In Fig. \ref{fig:max_UES_algo}, to study the impact of $N_{\rm max}$, we consider only the second term (i.e., $P_{\rm RIS}N_k$) of the objective function in (\ref{eq:min_N_modified_a}). The selected range of $N_{\rm max}$ is set between 10,000 and 220,000 units. This range corresponds to a total RIS area between  9 $\rm m^2$ and 198 $\rm m^2$ at carrier frequency of 2 GHz \footnote{This represents a limited area on a typical HAPS surface, as the length of an airship is between	100-200 m, whereas aerodynamic HAPS  have wingspans between 35m and 80 m. The size of each RIS unit is $(0.2\lambda)^2$ \cite{kurt2021vision}.}. In Fig. \ref{fig:max_UES_algo_diff_PCS}, only the first term of (\ref{eq:min_N_modified_a}) (i.e., $P_{km}^{\rm CS}$) is considered to study the effect of $P_{\rm max}^{\rm CS}$ on the percentage of connected UEs.  The maximum transmit power of CS is set to vary between 30 dBm and 35 dBm, and $N_{\rm max}$ is set to 150,000 units. It can be observed from the figures that the percentage of connected UEs increases with the maximum power of the \ac{CS} $P_{\rm max}^{\rm CS}$, and the maximum number of RIS units $N_{\rm max}$  (or the size of HAPS). These behaviours are intuitive as making available more system resources ($P_{\rm max}^{\rm CS}$ and $N_{\rm max}$) allow more number of stranded users to be served by the \ac{CS} via HAPS-RIS.  

Figs. \ref{fig:max_UES_algo} and \ref{fig:max_UES_algo_diff_PCS} also show that the performance of the proposed approach is 1-3 \% higher than the
benchmark approach. Moreover, $P_{\rm max}^{\rm CS}$ has more significant impact than $N_{\rm max}$ on the percentage of connected UEs. By increasing $P_{\rm max}^{\rm CS}$ by 2 dB, the percentage of connected UEs increases about 4\%, whereas  doubling of the RIS size is needed to achieve the same increase in the percentage of connected UEs.

Furthermore, it can be observed from the figures that 76\%  UEs are served through \textit{within-cell} communication approach, and the \ac{CS} supports the remaining UEs via HAPS-RIS. Hence, \textit{beyond-cell} communications via HAPS-RIS is able to complement  TNs.
		
		
	
	
	
	\section{Conclusion}\label{Sec:conclstion}
	\textcolor{black}{In this letter, we investigated the resources optimization of \textit{beyond-cell} communications that use HAPS-RIS technology to complement TNs by supporting  unserved UEs.
    In particular, given the limitations of the CS power and HAPS-RIS size, it might not be feasible to support all unserved UEs.
    Therefore, we formulated
    a novel resource-efficient optimization problem that
    simultaneously maximizes the percentage of connected UEs using minimal \ac{CS} power and RIS units.
     The results show the capability of the \textit{beyond-cell} communications approach to support a larger number of UEs. Further, the results show the superiority of the proposed solutions over the benchmark approach and demonstrate the impact of the HAPS size and the QoS requirement on the percentage of connected UEs and the efficiency of the system.  } 

	\bibliographystyle{IEEEtran}
	