monte_carlo仿真实验我要分享

monte_ Monte Carlo simulation experiment

关注次数: 243

下载次数: 0

文件大小: 4.96 kB

代码分类: 其他

开发平台: matlab

下载需要积分: 2积分

版权声明:如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

代码描述

中文说明:%二进制系统的monte carlo仿真:%目的:为了顾及数字通信系统的差错概率。%先仿真产生随机变量r0,r1,它们构成了检测器的输入。首先产生一个具有等概率出现并且互为统计独立的二进制0和1序列。%为了实现产生等概率0和1序列,方法:用一个产生范围在(0,1)内的均匀随机数的随机数发生器,如果产生的随机数在(0,0.5)内为0%若产生一个0,那么r0=P+n0;r1=n1;     若产生一个1:那么r0=n0;r1=P+n1;      信号相关器%利用两个高斯白噪声发生器产生加性噪声分量n0和n1,它们的均值是0,方差为P*N0/2。 为了方便将信号能量P进行归一化处理 SNR=P/N0


English Description:

%Monte Carlo simulation of binary system objective: to consider the error probability of digital communication system. %Firstly, random variables R0 and R1 are generated by simulation, which constitute the input of the detector. Firstly, a binary 0 and 1 sequence with equal probability and statistical independence is generated. %In order to generate equal probability 0 and 1 sequences, methods: a random number generator is used to generate uniform random numbers in the range of (0,1), if the generated random number is 0% in the range of (0,0.5), if a 0 is generated, then R0 = P + N0; R1 = N1; & nbsp; & nbsp; if a 1: is generated, then R0 = N0; R1 = P + N1; & nbsp; & nbsp; & nbsp; The signal correlator uses two Gaussian white noise generators to generate additive noise components N0 and N1, whose mean value is 0 and variance is p * N0 / 2. In order to normalize the signal energy P, SNR = P / N0


代码预览

相关推荐