This simulation code package is mainly used to reproduce the results of the following paper [1]:

[1] C. Jiang, T. Zheng, J. Zhu, S. Xu, and L. Dai, "Dimension-independent channel estimation for RIS-assisted communications: From cascaded to separate," IEEE Trans. Wireless Commun., vol. 25, pp. 17770-17784, May 2026.

*********************************************************************************************************************************
If you use this simulation code package in any way, please cite the original paper [1] above. 
 
The author in charge of this simulation code pacakge is: Chao Jiang (email: jiangc24@mails.tsinghua.edu.cn).

Reference: We highly respect reproducible research, so we try to provide the simulation codes for our published papers (more information can be found at: http://oa.ee.tsinghua.edu.cn/dailinglong/publications/publications.html). 

Copyright reserved by the Broadband Communications and Signal Processing Laboratory (led by Dr. Linglong Dai), the State Key Laboratory of Space Network and Communications, Department of Electronic Engineering, Tsinghua University, Beijing 100084, China. 

*********************************************************************************************************************************
Abstract of the paper: 
Channel estimation in reconfigurable intelligent surface (RIS) assisted communications requires high pilot overhead due to numerous RIS elements incapable of signal processing. Recently, research on sensing RIS has provided a dimension-independent channel estimation scheme with merely three pilots. Nevertheless, it assumes that the BS-RIS channel is perfectly known to the RIS and remains invariant over a prolonged period, while inducing high hardware and power consumption. To address these issues, this paper introduces a generalized approximate message passing (GAMP) based channel estimation framework to achieve dimension-independent estimation of separate channels, without the assumption of known BS-RIS channel. Specifically, we first formulate the channel estimation problem in RIS assisted communications as a compressive phase retrieval problem. Based on the phaseless power observations, we leverage the GAMP algorithm to retrieve original sparse signals, which inherently supports the sparse-sampling sensing RIS architecture. Furthermore, by exploiting the intrinsic mapping between the sparse representations of the channels and the power observations in the angular domain, we propose a learned GAMP network to enhance the convergence stability and estimation accuracy. Finally, simulation results demonstrate that the proposed approach can efficiently estimate both the BS-RIS and UE-RIS channels with four pilots, while eliminating the requirement for prior knowledge of the BS-RIS channel and significantly reducing hardware and power consumption.

*********************************************************************************************************************************
 If you want to train the models from scratch, you can follow these steps:

Step1: Generate the dataset based on "generate_dataset.m" and change the data_root (Please change random seed when generating training and test datasets).

Step2: Run "train.py" to train the proposed learned GAMP framework.

Step3: Run "test.m" to test the performances of different schemes and save the results.

Step4: Run "plot_g.m", "plot_f.m", "plot_SE.m", and "plot_cdf.m" to visualize the simulation results.