KeYang8 / WITT

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

请教一下信道部分的代码

WenBingo opened this issue · comments

您好,在您的channel.py中,为什么在计算sigma的时候分母要乘以2 --->> sigma = np.sqrt((1) / (2 * 10 ** (chan_param / 10)))

    elif self.chan_type == 2 or self.chan_type == 'rayleigh':
        channel_tx1 = channel_in1
        sigma = np.sqrt((1) / (2 * 10 ** (chan_param / 10)))
        chan_output1 = self.rayleigh_noise_layer(channel_tx1,
                                                               p,
                                                               std=sigma,
                                                               name="rayleigh_chan_noise")
        return chan_output1

因为我们用的是复数信道

这里的sigma指的是复数噪声的实部或者虚部服从(0,sigma)的正态分布。我们方案中将功率进行了归一化 所以信号的功率等于1。噪声的功率Pn=Ps/(10 ** (chan_param / 10))其中Ps=1。而噪声的功率等于实部的方差和虚部的方差相加,所以实部和虚部的方差都等于Pn/2,所以sigma=np.sqrt((1) / (2 * 10 ** (chan_param / 10)))