I was analyzing the following code for the MRC scheme from the book MIMO-OFDM Wireless Communications with MATLAB. Here, I am not able to understand based on what logic the sigma value calculated sigma=sqrt(0.5/(10^(SNRdB/10)))

It would be very helpful if anyone could give me any hints on the calculation of sigma from SNRdB


clear, clf
L_frame=130; N_packet=4000; 
b=2; % Set to 1/2/3/4 for BPSK/QPSK/16QAM/64QAM
SNRdBs=[0:2:20]; sq2=sqrt(2);
for iter=1:3
   if iter==1, NT=1; NR=1; gs='-kx'; % SISO
    elseif iter==2, NT=1; NR=2; gs='-^'; % Numbers of Tx/Rx antennas
    else  NT=1; NR=4; gs='-ro'; % 
   for i_SNR=1:length(SNRdBs)
      for i_packet=1:N_packet
         symbol_data=randi([0, 1],L_frame*b,NT);
         X=temp.';   % frlg=length(X);
         Hr = (randn(L_frame,NR)+j*randn(L_frame,NR))/sq2;
         H = reshape(Hr,L_frame,NR); Habs = sum(abs(H).^2,2); Z=0;
         for i=1:NR
            R(:,i) = sum(H(:,i).*X,2)/sq_NT + sigma*(randn(L_frame,1)+j*randn(L_frame,1));
            Z = Z + R(:,i).*conj(H(:,i));
         for m=1:P
         [y1,i1] = min(d1,[],2);   Xd=sym_tab(i1).';
         temp1 = X>0;  temp2 = Xd>0;
      BER(iter,i_SNR) = sum(noeb_p)/(N_packet*L_frame*b);
   end% end of FOR loop for SNR
   semilogy(SNRdBs,BER(iter,:),gs), hold on, axis([SNRdBs([1 end]) 1e-6 1e0])
title('BER perfoemancde of MRC Scheme'), xlabel('SNR[dB]'), ylabel('BER') 
grid on, set(gca,'fontsize',9)
legend('SISO','MRC (Tx:1,Rx:2)','MRC (Tx:1,Rx:4)')

1 Answer 1

  • $\text{SNR}$ is commonly defined as $ \text{SNR} = P_s$/$P_n$ where $P_s$ is the power (variance) or the signal and $P_n$ the power (variance) of the noise. You have: $$\begin{align} &\text{SNR}_{db} = 10\cdot \log_{10}(P_s/P_n)\\ \implies & P_n = \cfrac{P_s}{10^{\text{SNR}_{db}/10}} \end{align}$$

  • Standard deviation, commonly referred to as $\sigma$, is the square root of the variance. For example, the standard deviation of the noise samples, $\sigma_{P_n}$, is: $$\sigma_{P_n} = \sqrt{P_n}$$

In your case, assuming the signal variance is $0.5$:

P_s = 0.5; %signal variance
P_n = P_s / 10^(SNRdb/10); %noise variance
sigma = sqrt(P_n); %noise standard deviation
  • $\begingroup$ Thanks for the answer. I was wondering -- from where the parameter 0.5 has come. Of course, if we assume signal variance is 0.5 that makes sense, although nowhere they mentioned this assumption. $\endgroup$
    – Aragorn
    Commented Oct 18, 2022 at 10:42
  • $\begingroup$ Agreed, but I can only assume that's what they're assuming since I have no access to the text... $\endgroup$
    – Jdip
    Commented Oct 18, 2022 at 10:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.