error in snr estimation graph

2 views (last 30 days)
Shweta
Shweta on 2 May 2014
Answered: chiranjit on 12 May 2014
Hello all,
I have written a following code for snr estimation of QPSK signal. My estimated snr values are matching with true snr values for snr above 4dB but for snr values less than 4dB, my estimated snr values are not matching with true snr values. The matlab code is as follows:
clc
clear
% Generate data.
M = 4; % Alphabet size
Pd = 500; % Length of data
x = randint(Pd,1,M); % Random bit stream
ini_phase = pi/4; %ini_phase
psksig = pskmod(x,M,ini_phase); % PSK signal
snr_theory = 0:2:10; % Theoretical value of SNR
QQ = 10.^(snr_theory/10); % SNR in decimal
c4=mean((psksig.*conj(psksig)).^2);
c6=mean((psksig.*conj(psksig)).^3);
for a = 1:length(snr_theory)
for n=1:500
rxsig = awgn(psksig,snr_theory(a));% Add Gaussian noise
M2 = mean(rxsig.*conj(rxsig)); % Second order Moments
M4 = mean((rxsig.*conj(rxsig)).^2); % Fourth order Moments
M6 = mean((rxsig.*conj(rxsig)).^3); % Sixth order moment
m=((M2*M4)/M6);
v=[((m1.*c6)-c4) ((9.*m1.*c4)-c4-4) ((18.*m1)-6) ((6.*m1)-2)];
r=roots(v);
snr_est_M2M4M6(n) = 10*log10(abs(r(1)));
M2M4M6_snr_est(a) = mean(snr_est_M2M4M6); % estimation value
end
end
figure(1);
%plot estimation value
plot(snr_theory,snr_theory);
hold on
plot(snr_theory,M2M4M6_snr_est,'-o');
hold off
The plot that is generated is as follows:

Answers (1)

chiranjit
chiranjit on 12 May 2014
contact at chiranjitshee at gmail dot com

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!