Simulate the outage probability that the recieve SNR is greater than $SNR_{th} = constant$
34 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have finished the probability of the qpsk,passing flat fading channel.And now i have to write the outage probability that the received SNR is greater than $SNR_{th}=3$ with N0=1(SNR=0dB),N0=12(SNR=3dB),N0=14(SNR=6dB),N0=18(SNR=9dB),and N0=116(SNR=12dB)
My problem is that i don't know how to write the code about outage probability,outage_prob=1-(exp(−SNRth/(Eb/N0)),i have write the outage probability in this code below,but the simulation is wrong,because it always said that outage probability is 1.
Can anyone show me how to write the outage probability code according the what i have to write?
clear symbol_number=1e5; EbN0_db=0:1:10; EbN0_1=(1)*10.^(EbN0_db/10); EbN0_2=(1/2)*10.^(EbN0_db/10); EbN0_3=(1/4)*10.^(EbN0_db/10); EbN0_4=(1/8)*10.^(EbN0_db/10); EbN0_5=(1/16)*10.^(EbN0_db/10); EbN0_choose=EbN0_1;
for(n=1:length(EbN0_db)) symbol_inphase=2*(round(rand(1,symbol_number))-0.5); symbol_quadrature=2*(round(rand(1,symbol_number))-0.5); symbol=symbol_inphase + 1i*symbol_quadrature; w=(1/sqrt(2*EbN0_choose(n)))*(randn(1,symbol_number)+1i*randn(1,symbol_number)); vComplexNoise = sqrt(1/2) * (randn(1,symbol_number) + (1i * randn(1,symbol_number))); H = abs(vComplexNoise); receive=symbol.*H+w; symbol_inphase_=sign(real(receive)); symbol_quadrature_=sign(imag(receive)); sim_error_prob_inphase=sum(sum(symbol_inphase~=symbol_inphase_))/(symbol_number); sim_error_prob_quadrature=sum(sum(symbol_quadrature~=symbol_quadrature_))/(symbol_number); sim_error_prob_sym(n)=mean([sim_error_prob_inphase sim_error_prob_quadrature]); theoretical_ber(n) = qfunc(sqrt(2 * EbN0_choose(n))); end sim_error_prob_bit=sim_error_prob_sym./2;
%outage probability% for (EbN0_db=3:1:10); outage_prob=1-(exp(-EbN0_db./sim_error_prob_sym)) end
%plot the picture semilogy(EbN0_db,theoretical_ber,'rx-')%theoretical hold on semilogy(EbN0_db,sim_error_prob_sym,'mx-')%simulation semilogy(EbN0_db,sim_error_prob_bit,'bx-')
Antworten (1)
Mohammad Ali
am 13 Jun. 2022
For Outage probability, after generating your channel gains, you have to calculate SNR according to your recieved signal at reciever. Then start a for loop if give the condition "if SNR(i) < SNR(th) then j=j+1" where j can be defined above as j=0. Now Outage prob. = j/itration.
1 Kommentar
Najeeb Ud Din
am 3 Aug. 2022
What if I need to find outage prob between user n destination with RIS in between
Siehe auch
Kategorien
Mehr zu Waveform Generation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!