Simulate and Compare All the Different Techniques of Space Diversity Combining

download Simulate and Compare All the Different Techniques of Space Diversity Combining

of 1

Transcript of Simulate and Compare All the Different Techniques of Space Diversity Combining

  • 7/25/2019 Simulate and Compare All the Different Techniques of Space Diversity Combining

    1/1

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Name: Ibrahim Osama Al-Nahhal.% ECE MSc student in E-JUST.% Objective: This program simulate and compare the different techniques of% space diversity combining.%% SC == selection combining.% SSC == switch and stay combining or threshold selection comnining.% MRC == maximun ration combining.% EGC == equal gain combining.%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    clcclearM = input('Enter the number of Diversity ');r = sqrt((1.5*randn(1,M)).^2+(1.5*randn(1,M)).^2); % Received signal amplitude (Rayleigh)a2 = r.^2;

    %%%%%%%%%%%%%%%%%%%%%% SC %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%ticmx=a2(1);

    for i = 1:M if a2(i)>mx mx=a2(i); endendgammatotal_SC = 10*log10(mx)toc%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    %%%%%%%%%%%%%%%%%%%%%% SSC %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%ticVT=6;for i = 1:M

    if a2(i)>VT VT=a2(i); break endendgammatotal_SSC = 10*log10(VT)toc%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    %%%%%%%%%%%%%%%%%%%%%% MRC %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%ticgammatotal_MRC = 10*log10(sum(r.^2))toc

    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

    %%%%%%%%%%%%%%%%%%%%%% EGC %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%ticgammatotal_EGC = 10*log10(((sum(abs(r))).^2)./M)toc%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%