{'fraction_non_alphanumeric': 0.04970870137192257, 'fraction_numerical': 0.014940800601390716, 'mean_word_length': 3.8933333333333335, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
MISO Wireless Localization in The Presence of Reconfigurable Intelligent Surface

Reconfigurable Intelligent Surface (RIS) plays a pivotal role in the sixth generation networks to enhance communication rate and localization accuracy. In this letter, we propose a positioning algorithm in a RIS-assisted environment, where the Base Station (BS) is multi-antenna, and the Mobile Station (MS) is single-antenna. We show that our method can achieve a high-precision positioning if the line-of-sight (LOS) is obstructed and three RISs are available. We send several known signals to the receiver in different time slots and change the phase shifters of the RISs simultaneously in a proper way, and we propose a technique to eliminate the destructive effect of the angle-of-departure (AoD) in order to determine the distances between each RISs and the MS. The accuracy of the proposed algorithm is better than the algorithms which do not estimate the AoD, shown in the numerical result section.

Some of the pragmatic approaches for wireless localization are time of arrival (TOA) [5], time differential of arrival (TDOA) [5], received signal strength (RSS) [5], angle of arrival (AOA) [5], and roundtrip time of flight (RTOF) [5] approaches. In the 6G networks, RISs can be used to achieve the position of the MS with higher precision [6]. In this regard, authors in [7], [8], [6] have proposed some methods in order to bound the localization error, but they have not proposed any practical method. In [9], a novel algorithm for a high-precision localization has been proposed, where the transmitter and the receiver are single-antenna, and two (or more) RISs are available in the environment. Moreover, authors in [10] have explained some challenges, opportunities, and research directions that a RIS-assisted environment may experience.
In this letter, we consider RISs with passive elements and propose a localization algorithm to determine the location of the MS, where the line-of-sight is obstructed, and the Base Station (BS) is multi-antenna. We assume that there are three RISs in the environment, and we aim to find the distances between each RIS and the MS to determine its location. To this end, we use the method proposed in [9]. Our system model is, however, more generalized since we have considered the angle-of-departure (AoD) and the angle-of-arrival (AoA). In the proposed algorithm, the AoA and the AoD from the RISs to the MS, which are unknown, are eliminated.
For AoD elimination, we send a known signal from the BS to the MS several times and change the phase shifter of one of the RISs simultaneously while the phase shifters of other RISs are fixed. We can then find the strongest received signal at the MS to be able to calculate the distance between the RIS and the MS. Repeating this process for other RISs, we can obtain the distances between each RIS and the MS.
This letter is organized as follows. In Section II, we elaborate the system model. Then, in Section III, we introduce our localization algorithm and evaluate the performance of our method through a simulation in Section IV. Finally, the conclusion is presented in Section V.

II. SYSTEM MODEL
We consider a wireless localization system, where the BS is equipped with N B antennas, the MS is single-antenna, and three RISs are equipped with N R Γ elements for Γ ∈ {1, 2, 3}.
In this letter, we assume that the LOS is obstructed and propose a localization algorithm for a three-dimensional scenario, where antennas and RISs are equipped with uniform linear arrays; however, we assume that the height of the MS is zero in respect to the BS and RISs. We aim to determine the location of the MS while the location of the BS and RISs are given. Fig. 1 illustrates the system model. We have considered the first RIS in this figure, and other RISs can be shown in a similar way. We also use a channel model similar to models used in [7], [8]. Given that we assume there is no LOS, there is no direct link between the BS and the MS; therefore, there are three indirect links between the BS and the MS via three RISs. Each link has two tandem channels, connecting the BS to the MS via one RIS. The channels between the BS and each RIS are defined as: d is the separation between BS's antennas, and λ is the wavelength of transmitted signal. ρ B,Rh and τ B,R Γ are free space path loss and phase shift due to the delay between BS and MS, and θ B,R Γ and φ B,R Γ are the AoD and AoA, respectively. If we replace α r (φ B,R Γ ) and α t (θ B,R Γ ) in (1) we have: where H B,R Γ ∈ C N R Γ ×N B , whose entry in the m-th row and n-th column is The channels between each RIS and MS are defined as: (3), H R Γ ,M can be written as: where We note that ρ A,B and τ A,B can be obtained as: where ∆R E,F is the distance between nodes E and F , µ is path loss exponent, and c is the speed of light.
Then, the channel between the BS and the MS via each RIS can be formulated as: where control matrix at Γ-th RIS, defined as: If we replace H B,R Γ from (2), H R Γ ,M from (3), and Ω Γ (ω Γ ) from (7) in (6), the i-th entry of is as follows: (8) can be written as: From (9), we cannot determine Λ Γ (ω Γ ) since θ R Γ ,M is unknown; however, we can set theω Γ as our desired value, and we will obtain Λ Γ (ω Γ ) in the next section. Moreover, we can rewrite the (8) as follows: Finally, the entire channel between BS and MS can be formulated as: We assume that no cross link exists between the RISs 1 . Transmitter sends a known signal denoted by x ∈ C N B ×1 , and the received signal can be expressed as: where n is a complex additive white Gaussian noise with variance σ 2 .

III. LOCALIZATION ALGORITHM
In this section, the noise effect is ignored; however, we consider it in the numerical results.
Then, the third signal is:ỹ By noticing that H Γ (0) = −H Γ (π), and solving the three equations form (13) to (15), we obtain each term as follows: For simplicity, we assumed: As a result, the received signals by the MS when ω 1 = ω 2 = ω 3 = 0 are obtained from (16). Now, we consider ω 1 = ω 2 = 0, and ω 3 to be a arbitrary angle. Then, a known signal x ∈ C N B ×1 is sent to the MS. From (12) and (17) we have: Therefore, y 3 (ω 3 ) can be obtained as: whereỹ is the received signal, and y 1 (0), y 2 (0) are ones obtained in (16). We replace H Γ (ω Γ ) from (10) in (17) to obtain y 3 (ω 3 ) as way: In the last equality, we assumed that [x] i = x. The value of the sigma in (20) is known since θ B,R 3 is known. We suppose that Ξ 3 = N B t=1 e −j(t−1)k cos(θ B,R 3 ) . Consequently y 3 (ω 3 ) can be written as: By calculating absolute value of both sides of (21) we have: As a reminderω 3 = [(1 − 1) 3 , · · · , (N R Γ − 1) 3 ] T . We sweep the phase shift of the third RIS, 3 , from 0 to 2π, and send the known signal x for each 3 . Then, the maximum value of |y 3 (ω 3 )| can be obtained for someω 3 =ω * 3 (ω * 3 is not unique). Since by changingω 3 just Λ 3 (ω 3 ) changes according to (21), we have: According to (9), Λ 3 (ω 3 ) is a geometric series. Therefore, its maximum value happens when e j[k(cos φ B,R 3 −cos θ R 3 ,M )+ 3 ] = 1. Therefore, for optimum valuesω * 3 , we have: As a result, the maximum value of |y 3 (ω 3 )| in (25) can be written as: is known (the distances between the BS and RISs are given), we can obtain the distance between Γ-th RIS and MS as follows: In a similar way, we can findω * 1 andω * 2 . Thus, the distances between RISs and MS are known as follows: Remark: The proposed algorithm can be applied to RISs with rectangular arrays, which is almost similar to RISs with linear arrays. Nevertheless, because of the simplicity and the lack of space, we consider the RISs with linear arrays. In the scenario with rectangular arrays, there are two AoA and two AoD from the BS to the RISs, and there are two AoD from each RIS to the MS. To determine the distances between each RIS and the MS, effect of two AoD from the RISs to the MS must be removed. To this end, each should be eliminated separately using the proposed algorithm. Other parts of this scenario are straightforward.

IV. NUMERICAL RESULTS
In this section, we use the simulation in order to illustrate the accuracy of the proposed algorithm in some scenarios. The position of the BS, RISs, and the MS are shown by B = θ B,R 1 = π/6, θ B,R 2 = π/3, θ B,R 3 = π/4, θ R 1 ,M = π/6, θ R 2 ,M = π/3, θ R 3 ,M = π/4. Note that the minimum distance between RISs and the BS is 20m, which is more than 100 times λ = 15cm, so the BS and the MS are in the far field of the RISs, which is compatible with the system model.
The actual location of the MS, estimated location of the MS when the noise is equal to zero, and estimated location of the MS with the noise effect when the received SNR = 12dB have been plotted in Fig. 2. It demonstrates that the estimated location error is zero when the noise is equal to zero. With the noise effect, however, the error exists, but the estimated location curve is a close approximation of the location curve without the noise. .001cm, f = 2GHz, N R 1 = N R 2 = N R 3 = 10, and N B = 20. Note that we set d = λ 150 = 0.001cm since for larger d, the location estimation error of the algorithm in [9] not estimating the AoD is very large and is not comparable with the error of the proposed algorithm. In order to simulate the system model in [9], we set N B = 1 and use no estimation for AoD (the main differences between the proposed algorithm and the algorithm in [9]). The location estimation error versus the received SNR is shown in Fig. 5 for our algorithm and the algorithm in [9]. As it can be seen, the accuracy of the proposed algorithm is much better since the base station is multi-antenna and AoD is estimated.

V. CONCLUSION
We proposed an algorithm to determine the position of an MS in a RIS-assisted environment.
We illustrated that wireless localization is feasible when a BS and three RISs are available, and  LOS is obstructed. We used a novel technique to eliminate the destructive effect of the AoD from the RISs to the MS. Moreover, we calculated the location estimation error versus the received SNR and versus the number of elements in each RIS in numerical results, and as expected, in the both cases the error approaches zero as the received SNR and number of elements increase.
In this letter, we considered a scenario with obstructed LOS. The direction of our future research is to generalize our proposed algorithm to scenarios, in which there exist LOS links and MSs are multi-antenna. Fig. 6. Comparison of the location estimation error versus the received SNR in the proposed algorithm and the bound in [7].