高斯和拉普拉斯MatLab项目

时间:2015-08-07 11:01:26

标签: matlab signal-processing gaussian

我不确定如何解决这个问题,我们非常感谢任何帮助。

“生成高斯随机变量和拉普拉斯随机变量。选择a = 0(零均值)

使用以下情况传输序列:

高斯噪声(方差0.1和1)并使用两个比较器:第一个将比较单个样本为0,第二个比较100个样本的平均值(假设在比特间隔内取得)并再次与0比较。

如果大于0,则该位应该为1,否则为0。对于不等概率和相同阈值0(可能不是最佳)的情况,将重复比较。

拉普拉斯噪声(方差0.1和1)是潜在的污染。重复这个过程。

请注意,在这种情况下,无论相等或不相等的概率,探测器都不是最佳的。序列是

等概率:10001011000111101001不等概率:11001111011011101101“

关于从哪里开始的任何建议?

我所做的是:

    %% Delevoped by Group 03
%James Hayek, Ashas Pathan, Paul Kieliszek
%Matlab Group Project
%Professor Mohammed Feknous 
%NJIT ECE 321 Random Signals and Noise

%% Clearing and closing all other open programs withing MatLab
close all
clc

%% Generation of a signal bpsk modulation
%This takes a set of random numbers and converts them to bits 0's & 1's
%The 2*X-1 will create -1's in place of the 0's from the bit conversion.
signal_i = 2*(rand(1,10^5)>0.5)-1;
signal_q = zeros(1,10^5);
%In communication systems we have two components
%which is why we have singal i and q
scatterplot(signal_i + 1i*signal_q);

%% Combining for complex representation
signal = complex(signal_i, signal_q);

p_signal = mean(abs(signal).^2) %Power of the signal

e_signal = (abs(signal).^2); %Energy of the signal

%% Adding some noise of a known variance
for var = 1/50:1/10:0.5
    noise = 1/sqrt(2)*(randn(1,10^5)+j*randn(1,10^5))*sqrt(var);

    addNoise = signal + noise;

%Plotting the above conditions to a graph
    figure(1);
    plot(real(addNoise),imag(addNoise),'*');
    drawnow('expose');
end

for snr = 0:1:10 %dB
    snr_lin = 10^(snr/10);
    ebno_lin = 10^((snr-3)/10);
    var = p_signal/snr_lin; %This is how we are finding noise variance
    var_ebno = p_signal/ebno_lin;

    noise = 1/sqrt(2)*(randn(1,10^5)+j*randn(1,10^5))*sqrt(var_ebno);

    addNoise = signal + noise; %We have now averaged/esimated
    %the noise to remove it from the signal plotting it to a second graph.

%Plotting the above conditions to a graph
    figure(2);
    plot(real(addNoise),imag(addNoise),'*');
    drawnow('expose');
end

%By pressing run, you will see an animation of the generated Gaussian
%Randon signal with noise for graph 1, and the estimated noise removed for
%graph 2.

这是解决此问题的正确方法吗?

0 个答案:

没有答案