Ennis
Newbie level 3
- Joined
- Apr 18, 2013
- Messages
- 4
- Helped
- 0
- Reputation
- 0
- Reaction score
- 0
- Trophy points
- 1,281
- Activity points
- 1,303
Is the value of channel coefficients same?
Please help me. Very urgent
Please help me. Very urgent
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
of which channel...please elaborate your question
yes they change and how fast they change that depends upon coherence time of channel.
clear;
clc;
avg_gama_b = [0 5 10 15 20 25 30 ];
limit = [1e2 1e3 1e3 1e4 1e4 1e4 1e5 ];
power_dist = 1;
power_dist_pmt = sqrt ( power_dist ./2 );
omega = sum(power_dist);
omega_db = 10*log10(omega);
eb_by_n0 = avg_gama_b - omega_db;
sim_point = length(eb_by_n0);
ser = zeros(1, sim_point); %vector of BER's
for j = 1:sim_point
sym_error = 0;
for o=1:limit(j)
b = rand();
if b > 0.5, b = 1; else b = -1; end
s = b;
signal_power = 10*log10(sum( s .^ 2 ));
noise_power = power(10, (signal_power - eb_by_n0(j))/10);
sigma_n = sqrt(noise_power);
n = (sigma_n/sqrt(2)) * (randn() + 1i * randn());
alpha = power_dist_pmt .* (randn() + 1i * randn());
% alpha = abs(alpha);
% n = sigma_n * randn();
r = n + alpha*s;
if real(r) > 0, b_hat = 1; else b_hat = -1; end
if b ~= b_hat
sym_error = sym_error +1;
end
end
ser(j) = sym_error / limit(j);
end
ser_matlab = berfading(eb_by_n0, 'psk', 2, 1);
figure, semilogy( avg_gama_b, ser,'-sb', eb_by_n0, ser_matlab,'-or'), xlabel('average SNR'), ylabel('Error Probability'),
title(['BPSK in Rayleigh'] );
grid on;
hleg1 = legend('my BPSK BER', 'MATLAB BPSK BER');
set(hleg1,'Location','SouthWest');
set(hleg1,'Interpreter','none');