{'fraction_non_alphanumeric': 0.04702960049679156, 'fraction_numerical': 0.009873732146553509, 'mean_word_length': 4.379245072931745, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 2, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Multi-Active Multi-Passive (MAMP)-IRS Aided Wireless Communication: A Multi-Hop Beam Routing Design

Prior studies on intelligent reflecting surface (IRS) have mostly considered wireless communication systems aided by a single passive IRS, which, however, has limited control over wireless propagation environment and suffers severe product-distance path-loss. To address these issues, we propose in this paper a new multi-active multi-passive (MAMP)-IRS aided wireless communication system, where a number of active and passive IRSs are deployed to assist the downlink communication in complex environment, by establishing a multi-hop reflection path across active and passive IRSs. An optimization problem is formulated to maximize the achievable rate of a typical user by designing the active-and-passive IRS routing path as well as the joint beamforming of the BS and selected active/passive IRSs. To draw useful insights into the optimal design, we first consider a special case of the single-active multi-passive (SAMP)-IRS aided system. For this case, we propose an efficient algorithm to obtain its optimal solution by first optimizing the joint beamforming given any SAMP-IRS routing path, and then optimizing the routing path by using a new path decomposition method and graph theory. Next, for the general MAMP-IRS aided system, we show that its challenging beam routing optimization problem can be efficiently solved by a new two-phase approach. Its key idea is to first optimize the inner passive-IRS beam routing between each two active IRSs for effective channel power gain maximization, followed by an outer active-IRS beam routing optimization for rate maximization. Last, numerical results are provided to demonstrate the effectiveness of the proposed MAMP-IRS beam routing scheme.

number of active and passive IRSs are deployed to assist the communication between a base station (BS) and a remote user in complex environment, by establishing a multi-hop reflection path across active and passive IRSs. In particular, the active IRSs enable to opportunistically amplify the reflected signal along the multi-reflection link, thus effectively compensating for the severe product-distance pathloss. For the new MAMP-IRS aided system, an optimization problem is formulated to maximize the achievable rate of a typical user by designing the active-and-passive IRS routing path as well as the joint beamforming of the BS and selected active/passive IRSs. To draw useful insights into the optimal design, we first consider a special case of the single-active multi-passive (SAMP)-IRS aided system.
For this case, we propose an efficient algorithm to obtain its optimal solution by first optimizing the joint beamforming given any SAMP-IRS routing path, and then optimizing the routing path by using a new path decomposition method and graph theory. Moreover, we show that the active IRS should be selected to establish the beam routing path when its amplification power and/or number of active reflecting elements are sufficiently large. Next, for the general MAMP-IRS aided system, we show that its challenging beam routing optimization problem can be efficiently solved by a new two-phase approach. Its key idea is to first optimize the inner passive-IRS beam routing between each two active IRSs for effective channel power gain maximization, followed by an outer active-IRS beam routing optimization for rate maximization. Last, numerical results are provided to validate our analytical results and demonstrate the effectiveness of the proposed MAMP-IRS beam routing scheme as compared to various benchmark schemes.
Part of this work will be presented at the 2022 IEEE Global Communications Conference, Rio de Janeiro, Brazil [1]. Y. Zhang

I. INTRODUCTION
Intelligent reflecting surface (IRS) has emerged as a promising technology to smartly reconfigure the wireless propagation environment by dynamically tuning its reflecting elements [2]- [4].
Specifically, IRS is a planar metasurface composed of a large number of reflecting elements, each of which is able to independently control the amplitude and/or phase of the incident signal, thereby collaboratively reconfiguring the wireless channels. Moreover, different from the conventional active transmitters and relays, IRS passively reflects the signals without installing costly radio-frequency (RF) chains for signal transmission/reception, hence significantly reducing the hardware and energy cost. These appealing features thus have motivated substantial research recently to incorporate IRS into traditional wireless systems for improving the communication performance (see, e.g., [5]- [13]).
In the existing works on IRS, most of them have considered the basic wireless communication system aided by a single passive IRS [14]- [20]. However, employing only a single passive IRS usually has limited control over the wireless channels, which may not be able to unlock the full potentials of IRS. For example, in complex environment (e.g., corridors in an indoor setting), there may not exist a blockage-free reflection link between the base station (BS) and a remote user via a single IRS only [21]- [23]. To address this issue, new research efforts have been recently devoted to designing more efficient multi-IRS aided systems by deploying two or more IRSs in the network. This thus enables multiple IRSs to collaboratively establish double-or multi-hop signal reflection paths from the BS to the users so as to bypass the obstacles in between (see, e.g., [24]- [29]). In particular, the authors in [24] showed that under the lineof-sight (LoS) channel model, the double-IRS aided single-user system can achieve a higher scaling order of the passive beamforming gain than the conventional single-IRS counterpart, i.e., O(M 4 ) versus O(M 2 ) [15] with M denoting the number of passive reflecting elements.
Moreover, the authors in [25] showed that even with the channel estimation error and training overhead taken into account, two cooperative IRSs can still achieve significant rate improvement over the conventional single-IRS system. In addition, it was shown in [26] that deploying two cooperative IRSs near the BS and users achieves superior performance than the single-IRS system, in terms of the maximum signal-to-noise ratio (SNR) and multi-user effective channel rank. Furthermore, for the more complex environment (e.g., smart factories) wherein deploying two IRSs may not be able to provide virtual LoS communication links, a multi-IRS aided system was proposed in [28], where the remote user is served by the BS via a multi-reflection link with the signal consecutively reflected by a set of selected IRSs. To balance the tradeoff between the multiplicative passive beamforming gain and product-distance path-loss, efficient beam routing algorithms were proposed to maximize the effective channel power gain. Besides, the more general multi-IRS aided multi-user communication system was further studied in [29], where an efficient recursive algorithm was proposed to maximize the minimum received signal power among all users. However, despite the prominent multiplicative passive beamforming gain, the double/multi-passive-IRS aided systems still suffer severe product-distance path-loss arising from the double/multi-hop signal reflection.
To deal with the above issue, a new type of IRS architecture, called active IRS, has been recently proposed [30]- [32]. Specifically, equipped with low-power reflection-type amplifiers (e.g., tunnel diode and negative impedance converter), active IRS is capable of reflecting incident signals with power amplification in a full-duplex mode, thus effectively compensating for the product-distance path-loss at a modest energy and hardware cost [30]- [36]. Moreover, active IRS generally outperforms the conventional amplify-and-forward (AF) relay, since the latter usually operates in a half-duplex mode and thus suffers lower spectrum efficiency. These promising features thus have motivated upsurging research interests recently on active-IRS aided systems. For example, it was shown in [30] and [31] that given the same IRS location, the active-IRS aided system tends to achieve better performance than the passive-IRS counterpart thanks to the power amplification gain. Besides, the authors in [33] compared the optimal IRS placement strategy and the achievable rate for the active-and passive-IRS aided wireless systems, and showed that active IRS attains a higher rate than passive IRS when its amplification power is sufficiently large and/or number of active reflecting elements is relatively small. Moreover, it was revealed in [35] that under the total system energy consumption constraint, active IRS is superior to passive IRS when its number of reflecting elements is small and the total power budget is sufficiently large. Furthermore, to reap both the active-IRS power amplification gain and passive-IRS beamforming gain, the authors in [36] proposed a new hybrid active-passive IRS architecture consisting of both active and passive reflecting elements, based on which they devised an optimal active/passive elements allocation strategy for rate maximization. However, this hybrid IRS architecture may increase both the hardware and design complexity, which thus limits its large-scale deployment in practice. Instead, deploying multiple active and passive IRSs in a distributed manner is expected to significantly improve the communication performance in complex environment, which, however, has not been studied in the existing literature. In particular, it remains unknown how to leverage active and passive IRSs for constructing effective multi-hop beam routing paths and whether the newly added active IRSs can bring significant performance gain to the multi-IRS aided wireless communication system. Motivated by the above, we consider in this paper a new multi-active multi-passive (MAMP)-IRS aided wireless communication system as shown in Fig. 1, where a number of active and passive IRSs are deployed to assist the downlink communication via establishing a cascaded LoS link for each user. Compared with the conventional multi-passive-IRS aided wireless system [28], the new MAMP-IRS system enables to amplify the reflected signal opportunistically along the multi-reflection link with the aid of active IRSs, thus effectively compensating for the severe multi-reflection path-loss at the expense of a modest higher energy/hardware cost. However, the new MAMP-IRS beam routing optimization problem is also much more challenging, since it needs to strike a new trade-off between maximizing the power amplification gain of selected active IRSs and minimizing the accumulated amplification noise at the user. To this end, we formulate an optimization problem for maximizing the achievable rate of a typical user by jointly designing the MAMP-IRS beam routing as well as the beamforming of the BS and selected active/passive IRSs. The main contributions of this paper are summarized as follows.
• First, to obtain useful insights, we consider a special system setup with one active IRS and multiple passive IRSs deployed, termed as single-active multi-passive (SAMP)-IRS aided wireless communication. The corresponding SAMP-IRS beam-routing optimization problem is shown to be non-convex, which is in general difficult to be solved optimally. To address this issue, we first obtain the optimal beamforming of the BS and selected (active/passive) IRSs for any feasible SAMP-IRS routing path. Then, we show that the SAMP-IRS routing optimization problem can be equivalently decomposed into two separate sub-path routing designs, corresponding to the multi-reflection path from the BS to the active IRS and that from the active IRS to the user, respectively; thus significantly reducing the routing design complexity. Subsequently, an efficient graph-optimization algorithm is proposed to obtain the optimal SAMP-IRS routing path by using graph theory. In particular, we show that the active IRS should be selected to establish the beam routing path when its amplification power and/or number of active reflecting elements are sufficiently large.
• Second, we consider the general case of the MAMP-IRS aided system. The corresponding rate maximization problem is much more challenging than that of the SAMP-IRS case due to the (possible) cascaded power amplification and accumulated amplification noise arising from selected active IRSs. To tackle this difficulty, we first show that the MAMP-IRS beam routing optimization problem can be efficiently solved by a new two-phase approach, which first optimizes the inner passive-IRS beam routing between each two active IRSs for effective channel power gain maximization, and then optimizes the outer active-IRS beam routing for maximizing the achievable rate. In particular, to solve the challenging (outer) active-IRS routing problem, we approximate the receive SNR by its lower bound which is asymptotically accurate in the high-SNR regime. As such, the problem is transformed into a more tractable form and then solved by an efficient graph-optimization algorithm.
• Last, we provide numerical results to corroborate our theoretical findings on the new MAMP-IRS aided system as well as validate the effectiveness of the proposed MAMP-IRS beam routing scheme. It is shown that the MAMP-IRS aided system achieves significantly higher rate than the multi-passive-IRS aided system under various system setups. It is also observed that our proposed MAMP-IRS beam routing scheme greatly outperforms the other benchmark schemes.
The remainder of this paper is organized as follows. Sections II and III introduce the system model and problem formulation for the MAMP-IRS aided system, respectively. In Sections IV and V, we propose efficient algorithms to design the multi-hop beam routing in the SAMP-IRS and MAMP-IRS aided systems, respectively. Numerical results are presented in Section VI to evaluate the performance of the proposed MAMP-IRS beam routing design, followed by the conclusions given in Section VII.

Notations:
The superscript (·) H denotes the Hermitian transpose. For a complex vector x, x denotes the ℓ 2 -norm, and ∠(·) denotes the phase of each element in x. | · | denotes the absolute denoted by J a , and J p (i.e., J a ∪J p = J ), respectively. Besides, the number of elements/antennas of each node is denoted by U j , ∀j ∈J , e.g., U 0 = T , U j = N, ∀j ∈ J a and U j = M, ∀j ∈ J p .

A. Channel Model
Let H 0,j , j ∈ J denote the channel from the BS to the active/passive IRS j; H i,j , i, j ∈ J , i = j represent the channel from IRS i to IRS j; and h H i,J+1 , i ∈ J denote the channel from the IRS to the user, where the dimension of each channel depends on the number of antennas/elements of the associated nodes. The above channels are modeled as follows.
Similar to [28], we consider the dominant LoS channel components for the IRS reflection design, while treating all non-LoS (NLoS) components as part of environment scattering, which has been shown to have a marginal effect on the user performance [29]. 3 Moreover, the information of the LoS availability for all links is assumed to be known a priori, which can be practically acquired by using e.g., efficient offline/online IRS beam training methods [21], [38]. For each communication link involved, we denote by a i,j , i, j ∈J the channel state indicator, where a i,j = 1 indicates that there exists an LoS link between nodes i and j, and a i,j = 0 otherwise.
Then, if a i,j = 1 for i, j ∈ J , i = j, the inter-IRS channel, H i,j , can be modeled as denotes the complex channel gain for the link with d i,j being the link distance, β denoting the reference channel gain at a distance of 1 meter (m), and λ denoting the carrier wavelength. Moreover, ϑ r i,j (or θ r i,j ) denotes the azimuth (or elevation) angle-of-arrival (AoA) at node j from node i; ϑ t i,j (or θ t i,j ) denotes the azimuth (or elevation) angle-of-departure (AoD) from node i to node j; and a r and a t denote respectively the receive and transmit steering vectors. Specifically, based on the uniform rectangular array (URA) model for the IRS, a r can be modeled as a r ϑ r denote respectively the numbers of horizontal and vertical elements of node j, and the function u is defined as u(ζ, U) [1, e −πζ , . . . , e −(U −1)πζ ]. Following the above, the transmit steering vector, a t , can be similarly defined. Besides, the BS→IRS channel, H 0,j , can be modeled as where a H t ϑ t 0,j , U 0 = u H ( 2d I λ cos θ t 0,j , U 0 ) is the transmit steering vector of the BS based on the uniform linear array (ULA) model. The IRS→user channel can be modeled as

B. Signal Reflection Model of Active/Passive IRS
First, for each passive IRS j ∈ J p , we denote by Ψ j = diag e φ j,1 , e φ j,2 , · · · , e φ j,M its passive reflection matrix, where we set the reflection amplitude as one (i.e., its maximum value) to maximize the signal reflection power, and φ j,m ∈ [0, 2π) represents the phase-shift at its passive element m ∈ M {1, · · · , M}. Next, for each active IRS ℓ ∈ J a , we denote its reflection matrix by Ψ ℓ = diag η ℓ,1 e φ ℓ,1 , η ℓ,2 e φ ℓ,2 , · · · , η ℓ,N e φ ℓ,N , where η ℓ,n and φ ℓ,n represent the reflection amplitude and phase-shift at each active element n ∈ N {1, · · · , N}, respectively. Moreover, based on the LoS channel model, it can be easily shown that without loss of optimality, all active reflecting elements for each active IRS ℓ should adopt the same amplification factor, i.e., 1 , e φ ℓ,2 , · · · , e φ ℓ,N . It is worth noting that each active IRS incurs non-negligible thermal noise at its reflecting elements. For each active IRS, we denote its amplification noise by n F ∈ C N ×1 , which is assumed to follow the independent circularly symmetric complex Gaussian with σ 2 F denoting the amplification noise power.

III. PROBLEM FORMULATION
In this section, we formulate an optimization problem for maximizing the user's achievable rate by designing the MAMP-IRS beam routing.
It is noted that the signal models for the MAMP-IRS beam routing with and without the active IRSs involved are in different forms. Thus, we divide the MAMP-IRS beam routing design into two cases and formulate their corresponding optimization problems. For ease of exposition, we first define the feasible routing path as follows.
Definition 1 (Feasible routing path). Let Ω = {s 1 , s 2 , . . . , s K } denote a multi-reflection routing path, where K represents the number of selected active/passive IRSs and s k ∈ J with k ∈ K {1, · · · , K} denotes the node-index of the k-th selected IRS. Then, Ω is feasible if the following a 0,s 1 = a s K ,J+1 = 1.
Note that the condition in (1) ensures that each IRS in J is selected at most once; the condition in (2) enforces that there exists an LoS link between any two adjacent nodes along the routing path Ω; and the last condition in (3) guarantees that the multi-reflection routing path Ω starts from the BS and terminates at the user. Based on the above definition, we then introduce the signal models for the two cases without and with active IRSs involved.

A. Passive-IRS Multi-reflection Signal Model
First, consider the case where the active IRSs are assumed not selected when establishing the multi-reflection path. LetΩ = {s 1 , s 2 , . . . , sK} define a feasible routing path from the BS to the user via passive IRSs only, whereK is the number of selected passive IRSs and sk ∈ J p withk ∈K {1, · · · ,K} denotes the node-index of thek-th selected passive IRS. Then the BS→user equivalent channel is given bỹ As such, the received signal at the user via the multi-reflection pathΩ with passive IRSs only is given asỹ where x denotes the transmitted signal at the BS with power P B , w B ∈ C T ×1 denotes the normalized beamforming vector of the BS with ||w B || 2 = 1, n 0 denotes the received Gaussian noise at the user with power σ 2 . The corresponding achievable rate of the user in bits/second/Herz (bps/Hz) is thus given byR pas = log 2 (1 +γ pas ), where the receive SNR is Based on the above, the optimization problem for the case with passive-IRS involved in the beam routing only can be formulated as (P1) : max It can be verified that problem (P1) is a non-convex optimization problem, due to the integer variables {sk}, unit-modulus constraint in (7a), as well as the intrinsic coupling betweeng H BU and w B in the objective function, which is thus difficult to solve. Generally speaking, there is no standard algorithm for solving this non-convex problem optimally. Nevertheless, it has been shown in [28] that the optimal solution to problem (P1) can be obtained by first designing the joint beamforming of the BS and passive IRSs, and then solving the passive-IRS routing problem by using graph theory. The details are omitted for brevity.

B. MAMP-IRS Multi-reflection Signal Model
Next, we consider the case where active IRSs are involved in the multi-reflection path.
Specifically, let Ω = {s 1 , s 2 , . . . , s K } denote a feasible routing path from the BS to the user, which includes K a active IRSs and K p passive IRSs with K a + K p = K. Moreover, for the K a selected active IRSs, we denote by µ(k a ) the routing-index of the k a -th selected active IRS and hence node s µ(ka) is an active IRS, i.e., s µ(ka) ∈ J a . Then, the node-indices of the selected active IRSs are given by K a {µ(1), · · · , µ(k a ), · · · , µ(K a )}, while {s kp |s kp ∈ J p , , and g H s µ(Ka) ,J+1 denote the effective channels from the BS to the first selected active IRS, from the k a -th selected active IRS to the (k a + 1)-th selected active IRS, and from the K a -th selected active IRS to the user, respectively, which are given by As such, the BS→user equivalent channel over the routing path Ω can be modeled as It is worth mentioning that each selected active IRS amplifies both the incident signal and nonnegligible amplification noise at each active reflecting element. Let G 0,s µ(ka) denote the effective channel from the BS to the selected active IRS s µ(ka) , defined as Then, due to the active-IRS amplification power constraint, we have [33] where P s µ(ka) denotes the maximum amplification power of the selected active IRS s µ(ka) .
Based on the above, the received signal at the user across multiple active and passive IRSs is given by denotes the effective cascaded channel from the selected active IRS s µ(ka) to the user. and s µ(2) = s 4 ∈ Ω. According to (9), the BS→user channel is given by where we have g H Then, we can easily obtain the corresponding signal model according to (12) and the amplification power constraints in (11), which are omitted for brevity.
Based on the signal model in (12), the achievable rate of the user aided by MAMP-IRS is Our goal is to maximize the user's achievable rate in the case of MAMP-IRS beam routing by jointly optimizing the multi-reflection routing path, as well as the beamforming of the BS, active IRSs, and passive IRSs. Mathematically, this optimization problem can be formulated as where the constraints (1)-(3) ensure that the beam routing path is feasible; (11) enforces the amplification power constraints for the selected active IRSs; g H 0,J+1 and g H s µ(ka) ,J+1 are given in (9) and (13), respectively, which are determined by the routing path Ω and the joint beamforming of the BS, active IRSs, and passive IRSs; (16a) guarantees that there is at least one active IRS in the selected routing path; (16b) and (16c) are the unit-modulus constraints imposed by the active and passive IRSs, respectively. Note that problem (P2) is a non-convex optimization problem due to the unit-modulus constraints and the intrinsic coupling among w B , Ψ s kp , Φ s µ(ka) , and η s µ(ka) in the objective function and path feasibility constraints (1)-(3). Moreover, problem (P2) is much more challenging than that of the passive-IRS case (i.e., problem (P1)), since 1) the selected active IRSs introduce additional amplification power constraints; 2) the active IRSs make the beam routing path design highly coupled; 3) each selected active IRS incurs non-negligible amplification noise that is determined by the beam routing path.
To solve problem (P2), we first consider a special SAMP-IRS case in Section IV where only one active IRS is involved in the beam routing path and obtain useful insights into the optimal SAMP-IRS beam routing design. Then, we further consider the general case in Section V where multiple active IRSs are involved in the beam routing and propose an efficient algorithm to obtain a near-optimal solution to problem (P2).

IV. MULTI-HOP BEAM ROUTING FOR SAMP-IRS AIDED WIRELESS COMMUNICATION
For the SAMP-IRS aided wireless system with one active IRS and (K − 1) passive IRSs, we denote by µ(1) the routing-index of the single active IRS, i.e., s µ(1) ∈ J a . As such, the BS→user equivalent channel given in (9) can be simplified as Moreover, for the SAMP-IRS case, problem (P2) reduces to : Nonetheless, it is still challenging to solve problem (P3) due to the unit-modulus constraints and the intrinsic coupling between the two sub-paths (see, e.g., the objective function and constraints in (18a)-(18c)). To address this issue, an efficient method is proposed in the next subsection to obtain the optimal solution to problem (P3).

A. Proposed Solution to Problem (P3)
To solve problem (P3), we first optimize the joint beamforming of the BS and IRSs for any given multi-reflection path, based on which we further optimize the SAMP-IRS routing path.

1) Joint Beamforming Optimization Given any SAMP-IRS
The optimal solution to problem (P4) is given as follows, which is proved in [1].
Lemma 1. Given any feasible SAMP-IRS routing path Ω, the optimal solution to problem (P4) is given by where a t (s k ) a t (ϑ t s k ,s k+1 , θ t s k ,s k+1 , U s k ) and a r (s k ) a r (ϑ r s k ,s k+1 , θ r s k ,s k+1 , U s k ), s k ∈ Ω with a t (s K ) a t (ϑ t s K ,J+1 , θ t s K ,J+1 , U s K ) and a r (s 1 ) a r (ϑ r 0,s 1 , θ r 0,s 1 , U s 1 ).
Lemma 1 shows that the optimal joint beamforming design of the BS and active/passive IRSs are closely determined by the SAMP-IRS routing path (see, (20)- (23)). Specifically, the active-IRS amplification factor is determined by the path-loss of the BS→active IRS reflection link.
The smaller the path-loss, the smaller the amplification factor.
2) SAMP-IRS Routing Optimization: Given the optimal beamforming design in Lemma 1, we where f BA (Ω) and f AU (Ω) represent respectively the end-to-end channel power gain of the BS→active IRS and active IRS→user reflection sub-paths. Substituting (24)-(26) into problem (P3) yields the following equivalent problem for the SAMP-IRS routing optimization.
Although much simpler, problem (P5) is still challenging to solve due to the coupling between the two sub-paths in the objective function and constraints of (1)-(3). To deal with this challenge, we first present an important result below.
Lemma 2. The solution to problem (P5) can be obtained by solving the following two subproblems separately.
Proof: First, we consider the effect of f AU on the receive SNR given any f BA . Since the receive SNR is given by γ SAMP is equivalent to maximizing f AU and independent of f BA . Second, we consider the effect of f BA given any f AU . The corresponding receive SNR is given by , for which we can easily show that ∂γ SAMP ∂f BA > 0. This indicates that regardless of the routing path from the active IRS to user, it is always optimal to maximize f BA for maximizing γ SAMP . These lead to the conclusion that maximizing the receive SNR over the multi-reflection path can be equivalently transformed to the channel power gain maximization for the two sub-paths. Combining the above results with (24) and (25) leads to the desired result, thus completing the proof.
Remark 1 (Decomposable routing path). Lemma 2 shows an interesting result that the SAMP-IRS routing design can be equivalently decomposed into two separate sub-path routing designs, which can be intuitively explained as follow. First, the BS→active IRS reflection path determines the incident signal power at the active IRS. The larger the incident signal power, the smaller the effective received noise at the user and hence a higher SNR. Second, the active IRS→user reflection path determines the path-loss of the reflected signal. The smaller the path-loss, the larger the received signal power and hence a higher SNR.
Then, by taking the logarithm of (29) and (30) (1) )|a j,s µ(1) = 1, j ∈ V BA }. In addition, the weight between any two Next, problem (P7.a) can be solved by using the graph-optimization algorithm. It is worth noting that different from the conventional graph with positive edge weights only, there may exist negative edge weights in the constructed graph G BA (i.e., d i,j < M √ β). Thus, we devise an efficient algorithm below to solve problem (P7.a) by taking into account the cases with and without negative weights, respectively [28]. Specifically, if there are no negative weights, the classical Dijkstra algorithm can be directly applied to solve problem (P7.a). On the other hand, if there exist negative weights, the classical Dijkstra algorithm cannot guarantee to attain the optimal solution in general as it operates in a greedy manner. Thus, we resort to a recursive algorithm (i.e., dynamic programming) to solve the all hops shortest paths (AHSP) problem [39], aiming to find the shortest paths from a given source to any other node in the constructed graph for all possible hop counts. Accordingly, the shortest path of the SSPP can be easily obtained, with the details omitted due to limited space.

B. Select Active IRS for Beam Routing or Not?
In this subsection, we compare the achievable rates of the multi-hop beam routing designs with and without the active IRS involved, based on which we shed key insights into the active-IRS selection for beam routing.
First, consider the SAMP-IRS beam routing design with the active IRS. Let f * BA and f * AU denote the maximum channel power gains of the BS→active IRS and active IRS→user paths, which are determined by the inter-IRS distances and number of passive reflecting elements. Then the corresponding achievable rate is given by R * SAMP = log 2 (1 + γ * SAMP ), where the maximum SNR is Next, for the passive-IRS beam routing design, we denote byf * BU = |(g H BU ) * w * B | 2 the maximum achievable channel power gain [28]. Then the achievable rate is given byR * pas = log 2 (1 +γ * pas ), where its maximum SNR isγ * pas = P Bf Theorem 1. For the SAMP-IRS aided wireless communication system, the active IRS should be selected for beam routing (i.e., R * SAMP ≥R * pas ), if Based on Theorem 1, the effects of active-IRS amplification power and number of active reflecting elements on the active-IRS selection for beam routing are characterized as follows.
Corollary 1 (Effect of amplification power). Given the number of active reflecting elements N, we have R * SAMP ≥R * pas , if the amplification power P s µ(1) satisfies Corollary 1 shows that it is preferred to select the active IRS for cooperatively constructing a multi-reflection path if the active-IRS amplification power is sufficiently large. This is intuitively expected since a higher amplification power will lead to a higher amplification factor.
Corollary 2 (Effect of number of active reflecting elements). Given the active amplification power P s µ(1) , we have R * SAMP ≥R * pas , if the number of active reflecting elements N satisfies Corollary 2 indicates that it is desirable to select the active IRS for beam routing if the number of active reflecting elements is sufficiently large. This is expected since the achievable rate of the SAMP-IRS beam routing has a power scaling order of O(N).
Remark 2 (What determines the beam routing path?). Lemma 2 shows that if the active IRS is involved in the beam routing, the best routing path is determined by the passive IRSs only via e.g., the number of passive reflecting elements M and inter-IRS distances; while it is independent of the configurations (e.g., size and amplification factor) of active IRS. However, the optimal beam routing design in the proposed SAMP-IRS aided wireless system is jointly determined by the active and passive IRSs. Specifically, if the active-IRS amplification power P s µ(1) and/or number of active elements N are sufficiently large, the active IRS should be selected for cooperative beam routing and vice versa.

V. MULTI-HOP BEAM ROUTING FOR MAMP-IRS AIDED WIRELESS COMMUNICATION
In this section, we consider the general MAMP-IRS aided wireless communication system where multiple active and passive IRSs cooperatively form a multi-reflection path to assist the downlink communication. For this case, we first characterize the receive SNR for the end-to-end MAMP-IRS beam routing path. Then, we approximate it into a more tractable form and propose an efficient algorithm to obtain a near-optimal solution to problem (P2) by using graph theory.
The results can be straightforwardly combined with that of the passive-IRS-only case to yield the optimal MAMP-IRS beam routing similarly as in Section IV-A2, with the details omitted for brevity.

A. Proposed Solution to Problem (P2)
Similar to the case of SAMP-IRS beam routing, to solve problem (P2), we first optimize the joint beamforming design for any feasible MAMP-IRS routing path Ω, based on which we further optimize the routing path.

1) Joint Beamforming Optimization Given any MAMP-IRS
The optimal solution to problem (P8) is obtained by using the similar method as for Lemma 1.

2) MAMP-IRS Routing Optimization:
With the optimal joint beamforming design in Lemma 3, we then define (P9) : max Note that problem (P9) is a combinatorial optimization problem due to the discrete optimization variables (i.e., Ω), which is difficult to solve optimally in general. To address this issue, we first present an important lemma as follows.
Lemma 4. Given any active-IRS beam routing path that specifies the indices of active IRSs in Ω, i.e., Ω act = {s µ(1) , s µ(2) , · · · , s µ(Ka) }, problem (P9) reduces to K a +1 subproblems, corresponding to the passive-IRS beam routing optimization for maximizing the effective channel power gain of the sub-paths from the BS to the first active IRS s µ(1) (given in (40)), from the last active IRS s µ(Ka) to the user (given in (42)), as well as that between each two adjacent (selected) active IRSs along Ω act (given in (41)).

Proof: See Appendix A.
Lemma 4 can be regarded as a general version of Lemma 2, which shows that given any active-IRS routing path Ω act , the complicated MAMP-IRS routing optimization problem (i.e., problem (P9)) can be equivalently decomposed into a set of independent subproblems for the passive-IRS beam routing. More importantly, it also indicates that regardless of the active-IRS routing path, the optimal passive-IRS routing path between each two active IRSs is always the one that maximizes the effective cascaded channel power gain. These facts thus motivate us to develop a new hierarchical MAMP-IRS beam routing design for solving problem (P9), with two key procedures elaborated as follows.
• Phase 1 (Inner passive-IRS beam routing): The first phase aims to determine the optimal passive-IRS routing paths between each two active IRSs and that between the BS/user and each active IRS. Take the passive-IRS routing between two active IRSs as an example. If there exists a feasible path (consisting of passive IRSs only) between active IRSs i and j with i, j ∈ J a , its inner passive-IRS routing optimization problem can be formulated as whereΩ i,j {s 1 , s 2 , · · · , sK i,j } denotes the passive-IRS routing path between the two active IRSs withK i,j denoting the number of passive IRSs in the path. Moreover, f i,j (Ω i,j ) is the effective channel power gain between active IRSs i and j, which is given by The optimal solution to problem (P10) can be obtained by following the similar procedures in Section IV-A2, which is denoted by f * i,j . • Phase 2 (Outer active-IRS beam routing): Given the optimal inner passive-IRS beam routing designed in Phase 1 as well as the corresponding effective channel power gains of the paths among active IRSs (i.e., f * i,j ), the second phase aims to optimize the outer active-IRS routing path for maximizing the achievable rate. This problem is formulated as Problem (P11) is still challenging to solve since the objective function is highly complicated due to the intrinsic coupling of Ω act in the objective function and constraint (43). Hence, to make the problem more tractable, an explicit expression for the receive SNR is presented below.
Lemma 5. Given the optimal joint beamforming in Lemma 3 and the maximum effective channel power gains between each two active IRSs in (46), the receive SNR at the user over the MAMP-IRS routing path given in (47a) can be equivalently expressed as where γ i represents the per-hop SNR between nodes (i − 1) and i ∈Ω act {Ω act , J + 1}, defined as Note that the denominator of the objective function is a complicated function of the per-hop SNR of all selected active IRSs, which is determined by the active-IRS routing path Ω act . To tackle this difficulty, we first obtain a more tractable lower bound for the receive SNR given in (48), which shall facilitate the design of a near-optimal MAMP-IRS routing path. Next, we show that the SNR lower bound in (51) asymptotically approaches the exact SNR in (48) in the high-SNR regime.
Corollary 3 (High-SNR regime). In the high-SNR regime (i.e., γ i ≫ 1, ∀i ∈Ω act ), it holds Proof: In the high-SNR regime, we have 1 γ i ≪ 1, ∀i ∈Ω act , and thus 1 1 γ ka ≈ 0, thus leading to the desired result in (52). Corollary 3 is intuitively expected since the receive SNR in (51) is an approximation of (48) by adding several non-dominant terms to the denominator, which thus have a negligible effect in the high-SNR regime. To show this, we numerically illustrate the accuracy of the obtained receive SNR lower bound in Fig. 3 under the system setup with 8 and 10 reflection hops (i.e., K a = 7 and K a = 9) and N = 100. It is observed that the achievable rate based on the SNR lower-bound in (51) is very close to that of the exact receive SNR, when the per-hop SNR is larger than 10 dB. Moreover, it is worth noting that the high-SNR condition can be achieved easily in the considered MAMP-IRS aided wireless system. For example, for an indoor system with P B = 20 dBm, β = −46 dB, d = 12 m, σ 2 F = −70 dBm, and σ 2 = −80 dBm, the corresponding per-hop SNR can easily reach 20 dB. While for the low-SNR regime, i.e., γ < 10 dB, the obtained receive-SNR lower bound may lead to the modest underestimation of the actual achievable rate.
With Theorem 2, problem (P12) can be approximated as follows by replacing the objective function with its lower bound. In the following, we propose an efficient algorithm to solve problem (P13) by using graph theory similarly as in Section IV-A2.
First, maximizing γ (low) MAMP in problem (P13) is equivalent to minimizing 1 (55) Then, problem (P13) can be reformulated as Lemma 6. The solution to problem (P14) can be obtained by solving the following problem Proof: Let Ω * act denote the optimal active-IRS routing path with K * a selected active IRSs. Thus, it can be easily shown that minimizing 1/γ (low) MAMP is equivalent to the following twolayer problem: 1) the inner layer is to optimize the active-IRS routing path Ω act for minimizing ϕ(K a , {s µ(ka) } Ka ka=1 ) given any feasible K a ; 2) the outer layer is to search the optimal K a for minimizing N × ϕ(K a , {s µ(ka) } Ka ka=1 ) − 1/N Ka .
To solve the inner problem, we first take the logarithm of ϕ(K a , {s µ(ka) } Ka ka=1 ) and then transform the inner problem into the following form It is observed that problem (P16) has a similar form with problems (P7.a) and (P7.b). Thus, the proposed graph-optimization algorithms in Section IV-A2 can be readily applied to solve problem (P16). Next, the outer problem can be solved by an exhaustive search for the optimal number of active IRSs.
Remark 3 (Computation Complexity Analysis). First, for Phase 1, we say there is an interactive-IRS edge between each two active IRSs (and between the BS/user and active IRS) if there exists a feasible all-passive-IRSs routing path in between. The total number of inter-active-IRS edges is denoted by E act . Then, for the passive-IRS routing design between each two active IRSs, its worst-case complexity is O(J p |E|) where E denotes the edge set of the whole graph.
Hence, the worst-case complexity of Phase 1 is O(E act J p |E|) [28]. Next, the complexity of Phase 2 depends on the inner-layer and outer-layer problems. For the inner-layer active-IRS beam routing optimization, its routing graph can be represented by where V 0,J+1 denotes the set of the BS, user, and active IRSs; and E 0,J+1 denotes the interactive-IRS edge set. Given the number of selected active IRSs, K a , the worst-case complexity for solving the inner problem is O(K a |E 0,J+1 |) [39]. Accounting for the outer-layer search for the optimal K a , the worst-case complexity of Phase 2 is O( Ja Ka=1 K a |E 0,J+1 |) = O(J 2 a |E 0,J+1 |). To summarize, the overall (worst-case) computation complexity of the proposed MAMP-IRS beam

VI. NUMERICAL RESULTS
In this section, we present numerical results to demonstrate the effectiveness of the proposed MAMP-IRS beam routing scheme, while the SAMP-IRS case is its special case whose results can be obtained by setting K a = 1 (see the conference version [1] for more details). The simulation setup is as follows unless otherwise specified. We set P B = 20 dBm, T = 4, λ = 0.06 m, β = (λ/4π) 2 = −46 dB, σ 2 = −80 dBm, and σ 2 F = −70 dBm [33]. Moreover, we consider the same amplification power for all active IRSs, i.e., P ℓ = P F = 10 dBm, ∀ ℓ ∈ J a . As shown in Fig. 4, three active IRSs (marked as red circles), i.e., J a = 3, and seven passive IRSs  active IRSs tend to provide a higher active beamforming gain and a power amplification gain in the considered MAMP-IRS aided system.

B. Effect of System Parameters on the Achievable Rate
Next, for rate performance comparison, we consider the following four benchmark schemes: 1) MAMP-IRS with optimal beam routing, which traverses all feasible routing paths and selects the one that achieves the maximum receive SNR given in (48); 2) MAMP-IRS with myopic beam routing, which sequentially selects IRSs with the minimum edge weight for routing until reaching the user; 3) MAMP-IRS with random beam routing, for which the IRSs are selected randomly; 4) all-passive-IRSs scheme, for which the three active IRSs are replaced by three passive IRSs and the corresponding beam routing design is obtained by using the similar methods in [28].

1) Effect of the Active-IRS Amplification Power:
We compare in Fig. 5(a) the achievable rates of different MAMP-IRS beam routing schemes versus the active-IRS amplification power with M = 1500 and N = 100. First, it is observed that the achievable rates of different MAMP-IRS beam routing schemes monotonically increase with the active-IRS amplification power. Second, the proposed MAMP-IRS beam routing scheme achieves close rate performance to the optimal scheme and significantly outperforms the random and greedy benchmark schemes. Third, the achievable rate of the MAMP-IRS aided system is much higher than that of the all-passive-IRSs scheme at a modest higher energy cost, and the gap increases with the active-IRS amplification power. This is expected since a higher P F tends to provide a higher power amplification gain.
2) Effect of the Number of Per-Active-IRS Reflecting Elements: Fig. 5(b)     MAMP-IRS beam routing scheme achieves near-optimal rate performance as compared to the optimal scheme and greatly outperforms the random and greedy benchmarks. In particular, the achievable rate of the proposed scheme increases much faster than the other benchmark schemes.
This is expected because the proposed MAMP-IRS beam routing scheme can fully exploit the active-IRS performance gain as compared to the other schemes. Fig. 5(c), we show the effects of the number of active IRSs on the achievable rate with N = 500 and M = 1500. First, the achievable rate of the MAMP-IRS aided system monotonically increases with the number of active IRSs. This is because, in the proposed scheme, all active IRSs tend to be involved in the beam routing path to enhance the achievable rate, thus leading to an increasing rate with the number of active IRSs.

3) Effect of the Number of Active IRSs: In
However, the achievable rates of the random and greedy schemes tend to saturate when J a is sufficiently large, e.g., J a ≥ 4, since the added active IRSs are not involved in their beam routing paths. Last, the rate gap between the MAMP-IRS aided system and passive IRSs aided system increases with the number of active IRSs. observed that with an increasing Rician factor, the achievable rates for all schemes first increase and then saturate when the Rician factor is sufficiently high. Moreover, even in the low-Ricianfactor regime, the proposed MAMP-IRS beam routing scheme still achieves relatively high data rate and greatly outperforms the other benchmark schemes.

VII. CONCLUSIONS
In this paper, we studied the multi-hop beam routing design for a new MAMP-IRS aided wireless system, where a number of active and passive IRSs cooperatively establish a virtual LoS multi-reflection path from the BS to the user. In particular, for the special case of the SAMP-IRS aided system, we showed that the active IRS should be selected to establish the beam routing path when its amplification power and/or number of active reflecting elements are sufficiently large. Moreover, for the general MAMP-IRS aided wireless system, we proposed an efficient method to obtain a suboptimal beam routing design by using the hierarchical routing design method, receive SNR approximation, and graph theory. Numerical results demonstrated that the proposed MAMP-IRS aided system attained substantial performance gains over various benchmark schemes under different system settings. In the future, it is an interesting direction to study efficient active/passive IRS placement strategy under the site/topology constraints to further improve the MAMP-IRS beam routing performance. Moreover, this work also opens up a new research direction for hybrid IRS aided wireless networks consisting of both active and passive IRSs. APPENDIX A For any two adjacent active IRSs along any given active-IRS routing path Ω act , denoted by s µ(i) , s µ(i+1) ∈ Ω act , the cascaded channel power gain in between is defined as f s µ(i) ,s µ(i+1) . Similar to Lemma 2, we first consider the effect of f s µ(i) ,s µ(i+1) on the receive SNR in problem (P9), the receive SNR is given by . (58) It can be verified from (58) that ∂γ (i) MAMP ∂fs µ(i) ,s µ(i+1) > 0, and hence maximizing γ (i) MAMP is equivalent to maximizing f s µ(i) ,s µ(i+1) and independent of f s µ(j) ,s µ(j+1) , ∀s µ(j) , s µ(j+1) ∈ Ω act , s µ(j) = s µ(i) .
As such, one can easily conclude that, for any other adjacent active IRSs in Ω act , similar result can be easily obtained as above. This leads to the result that maximizing the receive SNR over any given active-IRS routing path can be equivalently transformed to the channel power gain maximization of a set of sub-paths, thus completing the proof.
Consequently, the receive SNR is obtained as For each selected active IRS s µ(t) ∈ Ω act , the amplification power constraint needs to be satisfied Multiplying both the numerator A and denominator B by Ka t=1 P s µ(t) , the numerator A now becomesÃ = N Ka Ka+1 ka=1 P s µ(ka−1) f * s µ(ka−1) ,s µ(ka) and the denominator B is given bỹ Let γ i P s µ(i−1) f * s µ(i−1) ,s µ(i) /σ 2 F denote the per-hop SNR between nodes s µ(i−1) and s µ(i) , based on which the numeratorÃ and the denominatorB can be respectively rewritten as The equivalent SNR expression in MAMP-IRS aided system is then given by where (a) is obtained by dividing both the numerator and the denominator by Ka+1 ka=1 γ ka . Combining the above steps leads to the desired result.