Abstract:This paper studies an uplink dual-functional sensing and communication system aided by a reconfigurable intelligent surface (RIS), whose reflection pattern is optimally configured to trade-off sensing and communication functionalities. Specifically, the Bayesian Cram\'er-Rao lower bound (BCRLB) for estimating the azimuth angle of a sensing user is minimized while ensuring the signal-to-interference-plus-noise ratio constraints for communication users. We show that this problem can be formulated as a novel fractionally constrained fractional programming (FCFP) problem. To deal with this highly nontrivial problem, we extend a quadratic transform technique, originally proposed to handle optimization problems containing ratio structures only in objectives, to the scenario where the constraints also contain ratio structures. First, we consider the case where the fading coefficient is known. Using the quadratic transform, the FCFP problem is turned into a sequence of subproblems that are convex except for the constant-modulus constraints which can be tackled using a penalty-based method. To further reduce the computational complexity, we leverage the constant-modulus conditions and propose a novel linear transform. This new transform enables the FCFP problem to be turned into a sequence of linear programming (LP) subproblems, which can be solved with linear complexity in the dimension of reflecting elements. Then, we consider the case where the fading coefficient is unknown. A modified BCRLB is used to make the problem more tractable, and the proposed quadratic transform-based algorithm is used to solve the problem. Finally, numerical results unveil nontrivial and effective reflection patterns that the RIS can be configured to generate to facilitate both functionalities.