RIS-aided D2D Communication Design for URLLC Packet Delivery

In this paper, we consider a smart factory scenario where a set of actuators receive critical control signals from an access point (AP) with reliability and low latency requirements. We investigate jointly active beamforming at the AP and passive phase shifting at the reconfigurable intelligent surface (RIS) for successfully delivering the control signals from the AP to the actuators within a required time duration. The transmission follows a two-stage design. In the first stage, each actuator can both receive the direct signal from AP and the reflected signal from the RIS. In the second stage, the actuators with successful reception in the first stage, relay the message through the D2D network to the actuators with failed receptions. We formulate a non-convex optimization problem where we first obtain an equivalent but more tractable form by addressing the problem with discrete indicator functions. Then, Frobenius inner product based equality is applied for decoupling the optimization variables. Further, we adopt a penalty-based approach to resolve the rank-one constraints. Finally, we deal with the $\ell_0$-norm by $\ell_1$-norm approximation and add an extra term $\ell_1-\ell_2$ for sparsity. Numerical results reveal that the proposed two-stage RIS-aided D2D communication protocol is effective for enabling reliable communication with latency requirements.


I. INTRODUCTION
Ultra-reliable and low-latency communication (URLLC) is one of the pillar technologies in 5G and 6G mobile communication networks. It is an enabler for a wide range of missioncritical applications including factory automation, smart grid, tactile internet, intelligent transportation system, telesurgery, and virtual/augmented reality (VR/AR) [1]. These applications pose great challenges for end-to-end packet delivery. More specifically, a URLLC packet has to be delivered to the destination successfully within sub-millisecond latency and extremely high reliability. This calls for new technologies and transmission mechanism design to satisfy such strict qualityof-service (QoS) requirements.
One promising technology is the reconfigurable intelligent surface (RIS) which has attracted interest recently. RIS, a metasurface composed of massive low-cost and passive reflecting elements, is able to reshape and reconfigure the wireless environment by intelligently adjusting the amplitudes This work was supported in part by the Swedish Research Council (VR), ELLIIT, and CENIIT, in part supported by the the National Key R&D Program of China (2020YFB1806604), the Fundamental Research Funds for the Central Universities +2020JBZD005, the NSFC, China (61871027, 62031008, U1834210) and the China Scholarship Council (CSC) Grant #202007090174. and/or phase shifts of reflecting elements [2][3][4]. As a result, integrating RIS into a communication system can improve the desired signal at the destination and facilitate reliable end-toend communication. Moreover, as compared to active relays, RIS can work in a full-duplex mode without causing selfinterference and thermal noise and its energy consumption is low owing to its passive nature [5]. Hence, the deployment of cost-effective RIS is important for enabling URLLC packet delivery. The authors in [6] investigated the resource allocation design problem of a multicell RIS-aided OFDMA system for weighted sum throughput maximization subject to all URLLC users' QoS requirements.
Another potential technology is device-to-device (D2D) communication. In most mission-critical scenarios, devices (e.g. sensors, actuators, machines) are in close proximity to each other. Thus, the channel between devices is significantly more reliable than that between the access point (AP) and the devices [7]. By exploiting the benefits of a D2D network, successful URLLC packet delivery can be enabled. In [8], a D2D-based two-phase transmission protocol was proposed for industrial automation scenarios to achieve URLLC.
Recently, works considering the combination of both RIS and D2D technologies for system performance optimization have appeared. The authors in [9] found that by integrating RIS into a D2D network as well as optimizing the transmit power and discrete phase shifts of RIS elements, the interference of D2D networks can be significantly decreased. In [10], authors investigated a problem of joint power control of D2D users and passive beamforming for an RIS-aided D2D communication network to maximize energy efficiency. Unfortunately, the existing RIS-aided D2D communication design cannot be applied to URLLC packet transmission directly since these studies were based on Shannon's capacity with assumptions of infinite blocklength and zero error probability. Thus, the delay performance will be underestimated and the reliability performance will be overestimated [11]. This necessitates the URLLC packet transmission design in an RIS-assisted D2D network under the finite blocklength regime.
In this paper, we consider an RIS-aided D2D network to achieve downlink multiusers' URLLC packet delivery in smart factory scenarios. The system involves two stages. In the first stage, each actuator's received signal consists of two parts -a direct signal from the AP and a reflected signal from the RIS. In the second stage, actuators with successful reception in the first stage help relay critical messages to the ones who failed to receive via the D2D network and they use maximum-ratio combining (MRC) to jointly decode the message received in two stages. The main contributions of this paper are summarized as follows.
• To the best of our knowledge, this paper is the first to consider the two-stage RIS-aided D2D communication protocol for URLLC packet delivery. To enable all actuators' reliable communication, a joint active and passive beamforming optimization problem is formulated. • Instead of the common alternating optimization method, we first transform the original problem into an equivalent but more tractable form. Then we leverage the Frobenius inner product based equality for product decomposition and penalty-based method for tackling rank-one constraints. Eventually, we address the 0 -norm by 1 -norm approximation plus 1 − 2 for sparsity. • A low-complexity penalized successive convex approximation (SCA) based iterative algorithm is proposed to obtain suboptimal solutions. Simulation results demonstrate the superiority of the proposed two-stage RIS-aided D2D communication protocol.

II. SYSTEM MODEL
We consider a downlink communication system in a smart factory with one AP equipped with N t antennas and K single-antenna actuators indexed by k = {1, · · · , K}. All the actuators must successfully receive critical control messages in terms of short packets within a time window of τ seconds. As shown in Fig. 1, there are M reflecting elements on the RIS. The phase shift matrix of RIS is denoted by Φ Φ Φ = diag(φ 1 , · · · , φ M ), where φ m = e jθm and θ m ∈ [0, 2π] is the phase shift of the m-th reflecting element. Assume that the phase shifts of all elements are calculated by the AP and then fed back to the RIS controller through the dedicated RIS control link.  Two stages are involved in the RIS-assisted D2D cooperative communication system. We assume that the two stages have the same transmission duration, i.e., τ 1 = τ 2 = 0.5τ . In the first stage with duration of τ 1 seconds, each actuator can receive the direct signal from AP and the reflected signal from the RIS. In the second stage with duration of τ 2 seconds, the actuators who have successfully decoded the signal in the first stage can act as relays to forward the signal to the actuators with failed recepetion via the D2D network, and they jointly decode the message received in two stages by MRC. The twostage RIS-aided D2D communication protocol is described in detail as below.

A. RIS-aided first-stage transmission
In the first stage with duration of τ 1 seconds, the transmitted signal at the AP is given by where w ∈ C Nt×1 is the beamforming vector for broadcasting at the AP, and s denotes the combined symbol intended for all actuators. Without loss of generality, we assume E{|s| 2 } = 1.
The received signal at the actuator k can be expressed as where h k ∈ C Nt×1 , F ∈ C M ×Nt , g k ∈ C M ×1 denote the channels from the AP to the actuator k, from the AP to the RIS, and from the RIS to the actuator k, respectively, z is the additive white Gaussian noise (AWGN). By substituting (1) into (2), we can obtain the signal-tonoise ratio (SNR) of the k-th actuator in the first stage as γ Based on the normal approximation of the achievable rate for short packet communication under quasi-static AWGN channel conditions [12], we can characterize the maximum achievable rate of actuator k over L 1 = τ 1 B channel uses in the first stage by where B is the bandwidth, D is the number of data bits, This asymptotic expression characterizes the relationship between the achievable rate, transmission time (channel uses) and decoding error probability. From (4), the decoding error probability can be written as (5) Let ε th denote the maximum allowed packet error probability (PEP). Note that f γ In order to indicate which actuator successfully decodes the message in the first stage, we define an indicator as follows

B. Second-stage D2D transmission
In the second stage with duration of τ 2 seconds, the actuators with successful decoding in the first stage help to relay the signal to others via the D2D network. Here, we assume that the actuators acting as relays simply forward the signal at their full power, i.e., power control is not performed since the global CSI of the D2D network is not available. The transmit signal of the actuator k in the second stage can be given by where P is the common transmit power for all actuators. Then, in the second stage, if the actuator k cannot decode the message successfully in the first stage, its received signal can be expressed as where d jk ∈ C is the channel from the actuator j to actuator k, z At the end of this stage, the actuator k jointly decodes the message based on the signals received in both two stages by using MRC. Accordingly, the received SNR at actuator k can be written as whered jk = d jk σ k . Then, the maximum achievable rate of actuator k over L 2 = τ 2 B channel uses in the second stage can be characterized by where ε (II) k is the decoding error probability of actuator k in the second stage. Likewise, based on equation (10), ε (II) k can be represented as (11) Similar to our observation from (5), it is easy to obtain that ε k . Hence, the maximum PEP threshold ε th corresponds to the minimum SNR γ

III. PROBLEM FORMULATION
In this paper, we aim to jointly design the active and passive beamforming at the AP and RIS respectively to maximize the number of actuators that can receive the critical control signals successfully under the two-stage RIS-aided D2D communication protocol. Mathematically, the joint optimization problem can be formulated as Constraint (13b) is the transmit power budget at the AP. The constraint (13c) refers to the unit-modulus constraint for each RIS element. Our ultimate goal is to guarantee that all actuators can successfully receive the mission-critical control signals from AP after the two-stage transmission, i.e., K k=1 a Note that the larger the number of actuators with successful reception in the first stage is, the higher the probability of the remaining actuators having successful reception in the second stage with the aid of D2D network will be. This is mainly because of the high SNR of the direct D2D link between two actuators in proximity. Moreover, actuators which act as relays in the second stage are determined by the optimization results in the first stage. Thus, the original problem can be transformed into an alternative problem that to maximize the number of successful decoding actuators in the first stage. As a result, fewer remaining actuators are required to reach the SNR threshold γ (II) th for reliable reception in the second stage. Therefore, problem P1 can be reformulated as

IV. SUBOPTIMAL JOINT ACTIVE AND PASSIVE BEAMFORMING DESIGN
In this section, the suboptimal joint active and passive beamforming design for problem P2 is given.

A. Problem Transformation
Note that in problem P2, a (I) k is a discrete function of γ (I) k . The discrete nature makes it difficult to apply the standard optimization techniques. In view of this, we introduce a set of auxiliary variables q = [q 1 , · · · , q k ] T to transform problem P2 into an equivalent but more tractable form, which can be written as P3 : min (13b), (13c).
Here, nonzero element q k means the actuator k cannot decode the critical signal successfully. Consequently, maximizing the number of successful actuators in the first stage is equivalent to minimizing the number of nonzero elements in vector q. Now, our focus turns to solve problem P3. Its difficulty mainly includes 0 -norm in the objective function, the nonconvex constraint (15b) due to the coupling of w and Φ Φ Φ in the form of a product, and unit-modulus constraint (13c).
First, to address the coupling problem, let where W = ww H , V = vv H . Here, W and V have to satisfy the positive semidefinite constraints W 0, V 0, and the rank-one constraints rank(W) = 1, rank(V) = 1.
It is necessary to remark that W and V remain coupled together in the form of a product in (16). However, we can leverage the following equality to decompose the product, which is given by where A, B F = Tr(A H B) is the Frobenius inner product.
Here, W and R k VR H k are both N t -by-N t matrices. By utilizing the Hermitian property of W, i.e., W = W H , we can exercise the above equality for product decomposition. Therefore, γ (I) k can be equivalently written as k is not joint concave with respect to W, V, based on the first-order condition, we can obtain the lower bound of the convex function W + R k VR H k 2 F , which is given by where W (i) , V (i) are feasible points in the i-th iteration. Thus, γ (I) k can be approximated as Lemma 1. For any A ∈ H n , the constraint that A is rank-one is equivalent to Proof. For any A ∈ H n , the inequality holds where σ i is the i-th singular value of matrix A. And the equality holds if and only if A is rank-one. Thus, the implicit constraint of Hermitian matrix A, i.e., A * − A 2 ≥ 0 functions simultaneously with the constraint (21), which requires that A * − A 2 = 0, namely A is a rank-one matrix. This completes the proof.
According to Lemma 1, rank-one constraints of W, V can be equivalently reformulated as Then we adopt the penalty-based method by moving the constraint (22) into the objective function, thereby resulting in the following optimization problem P4 : min where α, β > 0 are penalty factors penalizing the violation of the constraint (22). Since penalty terms are in a form of difference-of-convex (DC) function, we apply the first-order Taylor series approximation to W 2 and V 2 , which are given by where λ λ λ max (W) denotes the eigenvector corresponding to the largest eigenvalue of matrix W, and W (i) , V (i) are feasible points in the i-th iteration. Hence, the penalty terms related to W, V can be represented as Finally, let us deal with the 0 -norm in the objective function. We first utilize q 1 to approximate q 0 . Note that this approximation may sometimes be loose. In view of this, we add a penalty term η( q 1 − q 2 ) to make the number of zero elements in vector q as many as possible, where η > 0 is a penalty parameter. In general, q 1 ≥ q 2 always holds true where the equality holds when vector q has at most one nonzero element. The two terms q 1 and q 1 − q 2 function simultaneously. As a result, the number of zero elements in vector q can be maximized while minimizing the value of nonzero elements (if exists) so that the SNR requirement in the second stage can be easier to reach. Note that q 1 − q 2 is in a form of DC function, we exploit the first-order Taylor series approximation of q 2 . Thus, the penalty term can be approximated as where q (i) is a feasible point in the i-th iteration. Therefore, we have the following penalized convex optimization problem which can be solved by standard convex tools like CVX.

B. Algorithm Design
According to the preceding analysis, we propose a penalized SCA based algorithm to solve problem P2, which is summarized in Algorithm 1. By iteratively solving a sequence of problem P5 at feasible points, we can obtain a stationary-point solution of problem P2 after convergence [14].

V. NUMERICAL RESULTS
In this section, we evaluate the performance of the proposed two-stage RIS-aided D2D communication protocol. The latency requirement is set as τ = 1 ms, each stage with 0.5 ms. We consider the AP equipped with N t = 4 antennas is located at (0 m, 0 m) transmitting critical control signals to K = 10 actuators. All actuators are randomly and uniformly distributed on a circle centered at (80 m, 0 m) with radius 20 m. The RIS with M = 16 reflecting elements is deployed at (50 m, 10 m).
The channel h k form AP to actuator k is modeled as where L 0 = (λ c /4π) 2 is a constant with λ c being the wavelength of the carrier frequency (2.4 GHz), d a,k is the distance form AP to actuator k, α a,k is the corresponding path loss exponent, β a,k is a Rician factor. h LoS k and h NLoS k represent the deterministic LoS and Rayleigh fading components, respectively. The channels from AP to RIS and from RIS to actuators are also generated in a similar manner. The path loss exponents for AP-actuator, AP-RIS, RIS-actuator channels are α a,k = 4, α a,r = α r,k = 2. The Rician factors for AP-actuator, AP-RIS, RIS-actuator channels are β a,k = 0, β a,r = β r,k = 4. The large-scale fading of the D2D link is 35.3 + 37.6 log 10 (d) in dB and the corresponding small-scale fading is modeled as Rician fading with Rician factor 4. Other parameters are listed in Table I.  Fig. 2, we can easily find that when RIS is integrated into the communication system, all actuators can achieve reliable communication within a larger range of data bits (i.e. 700 bits in transmission schemes 1 and 2, whereas without assistance of RIS, all actuators can only communicate reliably within the range of 500 bits in transmission scheme 3 and 400 bits in scheme 4. This demonstrates that RIS plays an important role in promoting reliable communication and URLLC-related applications. Moreover, it is observed that MRC has a more significant effect on the no RIS-assisted transmission schemes 3 and 4 than that on the RIS-aided schemes 1 and 2. This is because RIS can greatly improve the received SNR of the desired signal at the actuator. More specifically, for problem P5, RIS aims at maximizing the number of actuators with successful decoding in the first stage while minimizing the gap of failed actuators' received SNR and SNR threshold γ  To further understand the two-stage RIS-assisted D2D communication protocol, we plot the average number of actuators with successful decoding in stage I and II under RIS and no RIS-assisted transmission schemes for different D in Fig.  3. As can be seen from Fig. 3 (a), when the number of data bits is small (i.e. not larger than 400 bits), all actuators can just rely on the first-stage RIS-aided transmission to achieve reliable communication. As the number of data bits D increases, second-stage D2D communication starts to function for message relaying towards the failed actuators in the first stage through strong D2D links. As a contrast, actuators have to depend on the D2D network for reliable communication from D = 300 bits under the no RIS-assisted scheme, which is shown in Fig. 3 (b). Thus, whether the RIS is introduced or not, when the number of data bits is large, the second-stage D2D-assisted transmission is indispensable. But with RIS, the burden of D2D network is lower and it will be easier to enable reliable communication, namely  Finally, in Fig. 4, we plot the average transmit power required at the AP under RIS and no RIS-assisted schemes for different number of data bits. As expected, for both schemes, the required transmit power of AP increases as the number of data bits increases, and when D is relatively large, AP serves all actuators with full power for reliable communication. Notably, as compared to the no RIS-assisted scheme, the transmit power of AP can be considerably reduced by integrating the RIS into the communication system when the number of data bits is not larger than 600. This shows another superiority of introducing RIS other than improving the quality of the received signal.

VI. CONCLUSION
In this work, we proposed a two-stage RIS-aided D2D communication protocol to enable that all actuators in the smart factory can receive the critical control signals from AP successfully. Towards this end, the active beamforming at the AP and the passive phase shifts at the RIS needed to be jointly optimized. By tackling the indicator functions, we first obtained an alternative continuous form. Different from the common alternating optimization technique, we utilized the Frobenius inner product based equality to decouple the optimization variables. Then, we exploited the penalty-based approach for solving rank-one constraints. In addition, 1norm was applied to approximate 0 norm and we added an extra term 1 − 2 for sparsity. Numerical results validated the efficacy of the proposed protocol. Specifically, it can achieve reliable communication in a wider range of data bits as compared to the no RIS-assisted D2D communication protocol. Also, the proposed protocol can considerably reduce the transmit power consumption at the AP. The case of corresponding imperfect design will be studied in the future work.