# Phase Shift Design in RIS Empowered Wireless Networks: From Optimization to AI-Based Methods
## 1 Introduction  
It is well-known that line-of-sight (LoS) propagation is a desirable but rarely occurring scenario for wireless communications. A standard technique to address this issue is to deploy more active nodes, such as base stations (BSs), access points, or relays to improve coverage and compensate for the high propagation loss in a non-LoS environment. However, this approach will incur high energy consumption and deployment/backhaul/maintenance costs. Worse still, this can also cause severe and complicated network interference issues. Recently, reconfigurable intelligent surfaces (RISs), which are passive devices equipped with large numbers of low cost reflective elements, have emerged as a promising technology to overcome the above challenges. Compared with the conventional active nodes approach, which actively transmits the signals, an RIS shapes the incoming signal by adjusting the the phase shifts of the reflecting elements, and could provide virtual LoS links between a BS and mobile users even the direct LoS path is blocked. A simple scenario is illustrated in Figure 1, where there is one BS and one user, each with a single antenna. The equivalent channel from the user to the BS is the multiplication of the channel from the user to the RIS, the amplitude and phase shifts of the RIS reflective elements, and the channel from the RIS to the BS. Clearly, the RIS provides an unprecedented way of controlling the channel quality. In particular, with a similar reasoning as with the traditional equal gain combining, it has been shown in this simple scenario that the maximum signal-to-noise ratio (SNR) is achieved when the RIS phase shift matches the combined phase of the user to RIS channel and the RIS to BS channel [1]. Since RIS operation is free of noise amplification and self interference [2], RISs have significant potential to enhance both spectral and energy efficiencies in urban environments [3]. Furthermore, due to the passive nature of RISs, they can be flexibly deployed in building facades, indoor walls, aerial platforms, roadside billboards, vehicle windows, etc. While RISs could be game-changing, the phase shift design in a practical modern communication system would be more complicated than as shown in the simple scenario of Figure 1. In a practical communication system, an RIS would serve more than one user at any particular time. Simply matching the channel of one user may hurt the communication quality of other users. In general, the phase shifts need to be optimized to balance the communication needs of all users, and more often than not, the RIS phase shifts will be optimized together with other communication resources. To illustrate the importance of optimizing the phase shifts together with other resources, we consider a vehicle-to-everything (V2X) system in Figure 2, which consists of a BS located on the left side of the map, an RIS located at the intersection, and three intelligent vehicles marked in different colors. Each car is equipped with a front camera and LiDAR that capture data from the environment. These sensed data need to be transmitted to the BS for cooperative perception, remote driving, or vehicle platooning. Due to significant shadowing effects, the received signal power reduces quickly with distance away from the intersection, and high data rate transmission could not be achieved. One can either take a longer duration for transmission, which is not desirable as outdated data is not useful in an intelligent traffic system, or use lossy compression to reduce the amount of data to be sent, which would unfortunately compromise the integrity of information if the compression loss is too much. We illustrate the consequences of the latter option and show how an RIS might help to mitigate them. In particular, we use the simulation platform of Car Learning to Act (CARLA) and Pytorch in Ubuntu 18.04 with a GeForce GTX 1080 GPU for graphic rendering and generation of vivid sensing data [4].