You are on page 1of 56

American International University- Bangladesh (AIUB)

Faculty of Engineering (EEE)

Course Name : Telecommunication Engineering Lab


Semester : Fall Sec : A
Lab Instructor : Sharmin Jahan

Experiment No : 8
Experiment Name : Radio Resource Allocations and Scheduling in 4G Cellular Mobile

Student Name: Ahmed Shadab Student ID: 17-33334-1

Group Members ID Name


1. 17-33335-1 Ahmed Shabab
2. 17-33892-1 Chowdhury, Safwan Ahmad
3. 17-35300-2 SHAKHAWAT HOSEN
4. 17-34368-1 Md. Sabbir Khan
5. 17-33583-1 Md Masrikul Islam

Report Date :

Marking Rubrics (to be filled by Lab Instructor)


Proficient Good Acceptable Secured
Category Unacceptable [1]
[5] [4] [3] Marks
All information, All Information Most information
Theoretical Much information
measures and variables provided that is correct, but some
Background, Methods missing and/or
are provided and sufficient, but more information may be
& procedures sections inaccurate.
explained. explanation is needed. missing or inaccurate.
Experimental Data and
All of the criteria are Most criteria are met, results don’t match
Experimental results
Data Acquisition and met; results are but there may be some exactly with the
are missing or
Results described clearly and lack of clarity and/or theoretical values
incorrect;
accurately; incorrect information. and/or analysis is
unclear.
Demonstrates thorough Hypotheses are clearly
Conclusions don’t
and sophisticated stated, but some Some hypotheses
match hypotheses, not
understanding. concluding statements missing or misstated;
Discussion supported by data; no
Conclusions drawn are not supported by data conclusions not
integration of data from
appropriate for or data not well supported by data.
different sources.
analyses; integrated.
Writing is strong and
Writing is clear and
easy to understand;
easy to understand; Most of the required
ideas are fully
ideas are connected; criteria are met, but
elaborated and
Writing & effective transitions some lack of clarity, Very unclear, many
connected; effective
organization between sentences; typographic, spelling, errors.
transitions between
minor typographic, or grammatical errors
sentences; no
spelling, or are present.
typographic, spelling,
grammatical errors.
or grammatical errors.

Total Marks
Comments:
(Out of 20):
Title: Radio Resource Allocations and Scheduling in 4G Cellular Mobile
Communications

Abstract:

User resource scheduling is usually carried out on the basis of the channel
condition calculation between the user device (UE) and the macro base station
(BS). The UE provides the macro BS with the channel details via uplink
transmissions. This report derives the LTE- Advance system and other scheduling
process.

Introduction:

Resource Allocation Type specifies the way in which the scheduler allocate
resource blocks for each transmission. Just in terms of flexibility, the way to give
the maximum flexibility of resource block allocation would be to use a string of a
bit map (bit stream), each bit of which represent each resource block. This way you
would achieve the maximum flexibility, but it would create too much complication
of resource allocation process or too much data (too long bit map) to allocate the
resources. So LTE introduces a couple of resource allocation types and each of the
resource allocation type uses a predefined procedures.

Theory and Methodology:

In LTE-Advanced systems in order to have a wider range, CCs are aggregated.


Assuming CCs with a bandwidth of 20 MHz each, each CC consists of 100
resource blocks (RBs); each RB comprises 12 OFDMA subcarriers; the bandwidth
of each subcarrier is 15 kHz. Figure 8.1 depicts a standard LTE CC frequency
distribution.
Figure 8.1: A typical LTE component carrier frequency distribution in a 20-MHz
spectrum

The entire spectrum for all types of users is prevalent in co-channel allocation. It is
possible to distribute resources in various ways: either co-channel allocation with
no spectrum fragmentation or co-channel allocation with spectrum fragmentation.
Both cell types may use the entire spectrum in co-channel assignment with no
spectrum fragmentation without interference coordination coordination (Figure
8.3). On the other hand, the spectrum is divided into S segments in co-channel
assignment with spectrum fragmentation (with factor "S").

Just one segment can be reached by a femtocell, while a macrocell can access the
entire spectrum (Figure 8.4). In addition, the entire spectrum can be used by both
cell types in co-channel assignment with distributed planning, and femtocells are
self-configured (Figure 8.5). A centralized dynamic frequency planning (C- DFP)
is used to delegate services to all femtocells in co-channel assignment with
centralized planning (López-Pérez et al., 2009). Usually, the co-channel
assignment suffers from inter-cell interference, especially during the peak load.
The co-channel allocation, however, provides good spectrum usage.
Generic Scheduling Strategy

1.Round Robin Scheduling

In the time domain, the Round Robin (RR) scheduler is considered for user
admission control. As it offers the best fairness criteria of all schedulers, the RR
scheduler can be used for layer-3 carrier load balancing. All CCs can be accessed
by LTE-Advanced users. In carrier aggregation, however, LTE users can access
only one CC. In all CCs, the RR scheduler functions to spread the load equally.
Therefore the RR scheduler actually searches for the CC when there is an arrival,
which has the least number of users (Wang et al., 2010). Once the CC with the
least number of allocated users is identified, the new arrival (user) is assigned to
that CCC (Figure 8.6). This guarantees the maximum load and the consistent
distribution of users in all CCs.
2. Max-SNR Scheduling

In terms of SINR for scheduling users in each time slot, the Max-SNR (MSNR) or
Max Rate (Ramli et al., 2009) scheduler takes into account the current or
instantaneous channel situation. The scheduling decision metric can
mathematically be expressed as follows (Arora and Agathoklis, 2005):

where ki j( ) is the selected user in the ith CC at the jth RB in time  ; is k,j,i() the
SINR of the user k in the ith CC at the jth RB in time  .

3. Proportional Fair Scheduling

The Proportional Equal (PF) scheduler generates an optimal demand for


throughput thus ensuring optimal output of fairness. By taking into account the
instantaneous channel state information from the user device (UE) via uplink by a
control signaling channel, the PF scheduler ensures this.

The PF scheduling algorithm is based on maximizing the scheduling metric, i.e.,


the PF scheduler schedules only the user with the highest efficiency metric for any
RB j in any TTI (max PM). It can be expressed as follows mathematically (Wang
et al., 2010):
Schedulers in LTE-Advanced Systems

Two groups of users exist on LTE-Advanced systems: LTE users and LTE-
Advanced users. The scheduler's main function is to assign RBs in the CC to user
packets. In their respective buffers, the created traffic from user devices (UEs)
awaits (queues). The scheduler decides to assign traffic to what RB or based on a
variety of factors, such as priority, state of the channel, size of the packet, type of
traffic, etc.
Implementation of Schedulers

CQI input from UEs, both in the time and frequency domain, plays a crucial role in
proper scheduling operations. The efficiency metric of the PF scheduler is
determined based on the instantaneous channel quality, since the packet scheduler
considered in this study is the PF scheduler. Figure 8.9 demonstrates a standard
CQI reporting and radio resource control in LTE systems.

The Connection Adaption (LA) purpose is to adapt the modulation and coding
scheme to the variable channel, both in time and in frequency (MCS). To this end,
the CQI report is used in the physical layer by consulting with the CQI manager.
CQI codewords that are passed on by UEs are processed by the CQI manager. Two
blocks are comprised of LA: Inner Loop LA (ILLA) and Outer Loop LA (OLLA).
The OLLA manages the BLER and offers an offset margin (based on the obtained
NACK or ACK) that is subtracted from the CQI manager's calculated SINR before
the ILLA uses the SINR. Based on the CQI study and the offset given by the
OLLA, the ILLA estimates instantaneous assisted throughput and MCS
(Pokhariyal et al., 2007).
System Architecture

A dense urban deployment is considered in the device model. There is a single


macrocell considered. Within the macrocell coverage, a number of macro users
(per cell for a 3-sector site) is assumed (Figure 8.10). The cell structure in the
device architecture is shown in Figure 8.10, where macro users are randomly and
uniformly distributed in the macro cell.
Mathematical Analysis

The transmission power of a CC is expressed in the aggregated device bandwidth


by PTCC(i), where I denotes the CC index. PTRB(j) represents the transmission
power of an RB, where j represents the RB index in a particular CC. Assume that
all CCs and all RBs have the same transmission power; for any I and any J, the
transmission power per RB can be expressed as

where XALL is the total number of RB in a TTI for a CC.

The SINR at RB j in a particular TTI can be expressed as

The FDPS gain is approximated for a single carrier by the following expression,
assuming the uniform distribution of user locations throughout the cell.
The throughput in RB j can be expressed in terms of the mutual information (MI)
by employing Shannon’s formula, as given below [18] [20].

where 0.6 is the implementation loss factor that takes into account MCS and
HARQ in LTE systems and is the SINR in dB at RB j .

The Mutual Information (MI) Effective SINR metric (MIESM) [21] is adopted for
the system level simulation to obtain the average throughput per user during the
course of the simulation runtime.

For the PF scheduler, the average MI ( -) over all RBs over all users in a CC is
obtained, and then the effective SINR, eff per RB per TTI is estimated from the
average MI by inverse mapping as shown in Fig.6. The inverse mapping function
between -10 dB and 22 dB SINR can be mathematically expressed for the PF
scheduler as

Hence, the system level spectrum efficiency for the PF scheduler per RB per TTI
can be expressed as

Jain’s fairness index is adopted for the evaluation of the user fairness performance
to define the degree of fairness among users. Mathematically, the fairness index
can be expressed as follows [17].
where K represents the total number of user and uk represents the total number of
RB allocated to user k over the simulation runtime.

Apparatus: A laptop/PC with MATLAB installed

Simulation Procedure

Simulation parameters and assumptions, based on the device architecture


explained, are mainly taken from[12] and are listed in Table 8.1. In LTE-Advanced
systems, these parameters are viewed as standard values
Simulation Result

Figure: Generic Resourse scheduler’s spectral efficiency and fairness


performances.

Comments: In the first graph the green line MM-SE shows the best efficiency and
in the second graph the blue line RR-Fair shows the best fairness.

Experiment report question-answer

Question 01

What is the role of schedulers in cellular mobile communications?

Answer: Scheduling algorithms are fundamental components in the process of


resource management in mobile communication networks with heterogeneous QoS
requirements such as delay, delay jitter, packet loss rate or throughput. The random
characteristics of the propagation environment and the use of complex physical
layers in order to combat this random behavior further complicates the design of
simple, efficient, scalable and fair scheduling algorithms.
Question 02

Explain which of the schedulers provides best performance in terms of fairness and
spectral efficiency?

Answer: The Proportional Equal (PF) scheduler generates an optimal demand for
throughput thus ensuring optimal output of fairness. By taking into account the
instantaneous channel state information from the user device (UE) via uplink by a
control signaling channel, the PF scheduler ensures this.

Question 03

For optimal trade-off between fairness and spectral efficiency, which scheduler do
you consider? Explain in brief.

Answer: In the time domain, the Round Robin (RR) scheduler is considered for
user admission control. As it offers the best fairness criteria of all schedulers, the
RR scheduler can be used for layer-3 carrier load balancing. All CCs can be
accessed by LTE-Advanced users

Discussion:

The Radio Resource Allocation is made in the eNB by the PS, this task is too
complex, as it requires taking into account several factors at the same time, plus it
must be immediate (real time). In this experiment we learnt about different
scheduling process and its role. And as the matlab code is 16 page long and needed
more coding knowledge for it so we skipped it. Other then this we got a clear idea
of different Scheduler roles.

References:

AIUB Telecommunication Engineering Lab Manual


Matlab code:
%*****************************************************************
*********

% Exp 09: Radio Resource allocations and scheduling in 4G Cellular Mobile


Communications

%*****************************************************************
********

% System Input

%*****************************************************************
*********

RB=50; % Total Resource block

TTimax=100; % Maximum TTI=TTimax = 100 ms;

tc=1;

tt=TTimax;

Tsimtime=1000; % keep it as fixed so that the users can be assumed static

% during the simulation run time.

simtime=Tsimtime/TTimax;

%*****************************************************************
********

%..........................................................................

% Variable Assignment: Part 1

%..........................................................................

Bcc=20; % Per CC bandwidth in MHz

KM=10; % 10 users per sector

PtMmax=26;
MMPtM=PtMmax;

PFPtM=PtMmax;

MG=14; % Macrco BS Antenna Gain (14 dBi)

GK=1.38; % FDPS gain for users > 13

alph=0.6; % Implementation Loss factor

PLow=10; % outdoor wall penetration loss for indoor UMeNB = 20 dB assumed


or 10 dB

%Conversion from RB to CC level: BPS/Hz=180KHz/20 MHz

thfac=1/RB;

ther_nois=-121.27; % thermal noise = -100.8 dBm at the receiver (20 MHz)

NF_MacBS=5; % Macro BS Noise Figure = 5 dB

NF_FemBS=8; % Femto BS Noise Figure = 8 dB

NF_MS=9; % UE/Mobile Station Noise Figure = 9 dB

%..........................................................................

AUMeNB=15; % no. of UMeNB users in a cell with 20 usr in a sector or 10 usr

AUMeNBout=round(0.2*AUMeNB); % no. of outdoor UMeNB users

psu=AUMeNB; % per sector users

gg=psu; % total users in a 3 sectored cell;

%=========================================================
=================

sentime=10;

SimRRath_sen=randi([0 0],1,sentime);

SimMMath_sen=randi([0 0],1,sentime);
SimPFath_sen=randi([0 0],1,sentime);

SimRRjf_sen=randi([0 0],1,sentime);

SimMMjf_sen=randi([0 0],1,sentime);

SimPFjf_sen=randi([0 0],1,sentime);

SimRRath_sen_avg=randi([0 0],1,sentime);

SimMMath_sen_avg=randi([0 0],1,sentime);

SimPFath_sen_avg=randi([0 0],1,sentime);

SimRRjf_sen_avg=randi([0 0],1,sentime);

SimMMjf_sen_avg=randi([0 0],1,sentime);

SimPFjf_sen_avg=randi([0 0],1,sentime);

SimRRath_sen_avg_x=0;

SimMMath_sen_avg_x=0;

SimPFath_sen_avg_x=0;

SimRRjf_sen_avg_x=0;

SimMMjf_sen_avg_x=0;

SimPFjf_sen_avg_x=0;

%=========================================================
=================

%.............................

% Distance of Users: UPdate

%.............................

for uc=1:gg
for uc1=1:RB

if uc<=AUMeNB

DM=rand+2*randi([35 576],1,1);

DsM(1,uc)=DM;

ShdMM(uc,uc1)=rand+randi([-8 7],1,1); %shadowing effect with std. 8dB

end

end

end

%=========================================================
=================

% FOR ALL USER

thy=0;

thyjf=0;

thyjfPF=0;

thy_PFG=0;

%=========================================================
================

thy_PFGRR=0;

thyjfRR=0;
RRz1=randi([0 0],1,RB);

thy_PFGMM=0;

thyjfMM=0;

MMz1=randi([0 0],1,RB);

%=========================================================
================

% ALL USERS

SimPFjf=randi([0 0],1,simtime);

SimPFath=randi([0 0],1,simtime);

SimRRath=randi([0 0],1,simtime);

SimRRjf=randi([0 0],1,simtime);

SimMMath=randi([0 0],1,simtime);

SimMMjf=randi([0 0],1,simtime);

%=========================================================
==============

RR11=0;

MM11=0;

PF11=0;

MPF11=0;

MPF11_2=0;

MPF11_3=0;

MPF11_32=0;

%===================================
PFfair=randi([0 0],1,gg);

MPFfair=randi([0 0],1,gg);

MPFfair_2=randi([0 0],1,gg);

MPFfair_3=randi([0 0],1,gg);

MPFfair_32=randi([0 0],1,gg);

RRfair=randi([0 0],1,gg);

MMfair=randi([0 0],1,gg);

RRfr=randi([0 0],1,gg);

PFfr=randi([0 0],1,gg);

MMfr=randi([0 0],1,gg);

RRjf=randi([0 0],1,tt);

PFjf=randi([0 0],1,tt);

MPFjf=randi([0 0],1,tt);

MPFjf_2=randi([0 0],1,tt);

MPFjf_3=randi([0 0],1,tt);

MPFjf_32=randi([0 0],1,tt);

MMjf=randi([0 0],1,tt);

MMa=randi([0 0],1,gg);

PFa=randi([0 0],1,gg);

MPFa=randi([0 0],1,gg);

MPFa_2=randi([0 0],1,gg);
MPFa_3=randi([0 0],1,gg);

MPFa_32=randi([0 0],1,gg);

MMa_res=randi([0 0],1,gg);

PFa_res=randi([0 0],1,gg);

MPFa_res=randi([0 0],1,gg);

MPFa_2_res=randi([0 0],1,gg);

MPFa_3_res=randi([0 0],1,gg);

MPFa_32_res=randi([0 0],1,gg);

MPFsq=randi([0 0],1,tt);

MPFsq_2=randi([0 0],1,tt);

MPFsq_3=randi([0 0],1,tt);

MPFsq_32=randi([0 0],1,tt);

RRsq=randi([0 0],1,simtime);

MMsq=randi([0 0],1,simtime);

PFsq=randi([0 0],1,simtime);

PFrs_1=randi([0 0],gg,RB);

PFrs_2=randi([0 0],gg,RB);

MMrs=randi([0 0],gg,RB);

%=========================================================
================
%=========================================================
===============

% RR Scheduler

%=========================================================
==

krRR=1;

%=========================================================
==============

%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++

% simulation Time

%+++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++

%=========================================================
=================

for sim=1:simtime

% disp('******************************');

disp(['Simulation snapshot = ',num2str(sim)]);

%disp(['Simulation total time in ms = ',num2str(simtime*TTimax)]);

%disp(['Simulation current time in ms = ',num2str(sim*TTimax)]);

%disp('******************************');

%=========================================================
=================

szRR=1;
szMM=1;

szPF=1;

sz=1;

%.............................

% Distance of Users: UPdate

%.............................

for uc=1:gg

for uc1=1:RB

if uc<=AUMeNB

ShdMM(uc,uc1)=ShdMM(uc,uc1)+0.2; %shadowing effect with std. 8dB

if ShdMM(uc,uc1)>7

ShdMM(uc,uc1)=ShdMM(uc,uc1)-0.2;

elseif ShdMM(uc,uc1)<-8

ShdMM(uc,uc1)=ShdMM(uc,uc1)+0.2;

end

ShdM(uc,uc1)=ShdMM(uc,uc1);
end

end

end

%=========================================================
=================

PF_PSE=randi([0 0],TTimax,gg);

MPF_PSE=randi([0 0],TTimax,gg);

MPF_2_PSE=randi([0 0],TTimax,gg);

PF_PSE_11=randi([0 0],1,gg);

MPF_PSE_11=randi([0 0],1,gg);

MPF_2_PSE_11=randi([0 0],1,gg);

PF_PSE_11_C=randi([0 0],1,gg);

MPF_PSE_11_C=randi([0 0],1,gg);

MPF_2_PSE_11_C=randi([0 0],1,gg);

RayM=randi([-50 5],gg,RB)+rand;

RicH=randi([-60 2],gg,RB)+rand+5; % 5 dB is for LOS component

IM=randi([0 0],gg,RB);

IH=randi([0 0],gg,RB);

%=========================================================
=================

%************* Transmission Time


Interval*********************************
%=========================================================
=================

for TTI=1:TTimax % TTimax in time intervals

disp(['TTI = ',num2str(TTI)]);

%=========================================================
=================

PFclth=0;

MMclth=0;

RRclth=0;

MPFclth=0;

MPFclth_2=0;

MPFclth_3=0;

MPFclth_32=0;

PFclth_res=0;

MMclth_res=0;

RRclth_res=0;

MPFclth_res=0;

MPFclth_2_res=0;

MPFclth_3_res=0;
MPFclth_32_res=0;

PFrs_1=randi([0 0],gg,RB);

PFrs_2=randi([0 0],gg,RB);

SINR_1=randi([0 0],gg,RB);

SINR_2=randi([0 0],gg,RB);

%=========================================================
=================

x=rem(TTI,5); % time=50 TTI for 3km/hr and for 150 km/hr time=1 TTI

if x==0

RayM=randi([-50 5],gg,RB)+rand;

IM=randi([0 0],gg,RB);

end

%=========================================================
=================

Rec_SINR_RR=randi([0 0],1,RB);

Rec_SINR_MM=randi([0 0],1,RB);

%=========================================================
================

for sched=1:3 % all Schedulers

%=========================================================
================
if sched==1 % Round Robin scheduler

%=========================================================
================

%================ Round Robin Scheduler


===================================

%=========================================================
================

%.........................................................................

% Round Robin Scheduler : START

%.........................................................................

if krRR>gg

krRR=1;

end

%......................

if krRR<=AUMeNB

DisM=DsM(1,krRR);

end

%..........................................................................
RRr1=randi([0 0],1,RB);

for j=1:RB

%..........................................................................

if krRR<=AUMeNB

%==================================

if krRR<=AUMeNBout

% pathloss estimation outdoor UMeNB

RRPLM=15.3+37.6*log10(DisM)+6;

%PFPLM=34.5+35*log10(DisM)+6;

else

% pathloss estimation indoor UMeNB

RRPLM=15.3+37.6*log10(DisM)+PLow+6;

% PFPLM=34.5+35*log10(DisM)+PLow+6;

end

%===================================

% MenB transmitting power

RRPtM=PtMmax;

% macro BS antenna gain and multiuser diversity gain

gainM=MG+GK;

%path Loss for macro cell

pathlossMRR=RRPLM;
% Receiver Thermal Noise and Noise Figure

noise=ther_nois+NF_MS;

% fading: Shadowing and fast fading

fadingMRR=ShdM(krRR,j)+RayM(krRR,j);

% fadingM=ShdM(1,kr)+RayM(kr,j);

%received power without fading

RRPrM1=RRPtM+gainM-pathlossMRR-noise;

%received power with fading

RRPrM=RRPrM1+fadingMRR;

%received power with fading and interference (SINR-Macro users)

RRz=RRPrM-IM(krRR,j);

% PFz=PFPrM;

Rec_SINR_RR(1,j)=RRz;

%...........................................................

% Instantaneous Throughput Estimation

%...........................................................

if RRz<-10

RRr1(1,j)=0;

elseif RRz>22

RRr1(1,j)=4.4;
else

RRV=10.^(RRz/10);

RRr1(1,j)=alph*log2(1+RRV);

end

%...........................................................

% Instantaneous Throughput Estimation

%...........................................................

if RRz<-10

RRr1(1,j)=0;

elseif RRz>22

RRr1(1,j)=4.4;

else

RRV=10.^(RRz/10);

RRr1(1,j)=alph*log2(1+RRV);

end

end

RRz1(1,j)=RRz;

URR(1,j)=krRR;

RRclth=RRclth+RRr1(1,j); % Total cell thrpts for RR scheduler

%====================================================
end % if RB loop

%.....................................................................

% Cell throughputs estimation: RR Scheduler

%.....................................................................

RR11=RR11+RRclth;

if TTI==TTimax

%=========================================================
==

% Average Spectral efficiency (bps/Hz/cell):RR Scheduler

RRsq(1,sim)=(RR11/RB)/(sim*TTimax);

avMIRR=RRsq(1,sim);

SINReffRR=10*log10(2^(avMIRR/alph)-1); %in dB

LTEA_thrbRR=alph*log2(1+10^(SINReffRR/10));

thy_PFGRR=LTEA_thrbRR+thy_PFGRR;
SimRRath(1,sim)=thy_PFGRR/sim;

%=========================================================
=====

end

%...................................................................

%..................Fairness Factor estimation: RR scheduler.........

%...................................................................

RRfair(1,krRR)=RRfair(1,krRR)+RB;

%=========================================================
=============

%.....................................

% Fairness index OF RR scheduler FOR ALL USERS

%.....................................

if TTI==TTimax

RRsd=0;

RRfn=0;

for fa=1:gg
RRf=RRfair(1,fa);

RRfr(1,fa)=RRf;

RRfn=RRfn+RRfr(1,fa);

RRf1=RRfr(1,fa);

RRf2=RRf1^2;

RRsd=RRsd+RRf2;

end

RRsmn=RRfn^2;

RRsmd=RRsd*gg;

if RRsmd==0

RRsmd=1;

end

%Jain fairness Index

RRjf(1,sim)=RRsmn/RRsmd;

thyjfRR=RRjf(1,sim)+thyjfRR;
%++++++++++++++++++++++++++++++++++++++++++++

% Fairness Index:Generic PF-Scheduler

SimRRjf(1,sim)=thyjfRR/sim;

%++++++++++++++++++++++++++++++++++++++++++++

end

%....................................................................

krRR=krRR+1;

%=========================================================
=================

%end main loop: Round Robin scheduler

%=========================================================
=================

elseif sched==2 % Max-SNR scheduler

%=========================================================
================

%================ Max-SNRn Scheduler


====================================

%=========================================================
================

%.........................................................................
% Max SINR Scheduler : START

%.........................................................................

for kr=1:gg % Number of users per CC

if kr<=AUMeNB

DisM=DsM(1,kr);

end

MMr1=randi([0 0],1,RB);

%..........................................................................

for j=1:RB % number of users selected by TD-Scheduler for current TTI

%..........................................................................

if kr<=AUMeNB % 2.1.1 UMeNB

%..........................................................................

if kr<=AUMeNBout

MMPLM=15.3+37.6*log10(DisM); % pathloss estimation outdoor UMeNB (1


to3)

else

MMPLM=15.3+37.6*log10(DisM)+PLow; % pathloss estimation indoor UMeNB


(4 to 10)
end

%..................

% MenB transmitting power

MMPtM=PtMmax;

% macro BS antenna gain and multiuser diversity gain

gainM=MG+GK;

%path Loss for macro cell

pathlossMMM=MMPLM;

% Receiver Thermal Noise and Noise Figure

noise=ther_nois+NF_MS;

% fading: Shadowing and fast fading

fadingMMM=ShdM(kr,j)+RayM(kr,j);

% fadingM=ShdM(1,kr)+RayM(kr,j);

%received power without fading

MMPrM1=MMPtM+gainM-pathlossMMM-noise;

%received power with fading

MMPrM=MMPrM1+fadingMMM;

%received power with fading and interference (SINR-Macro users)

MMz=MMPrM-IM(kr,j);

% PFz=PFPrM;

Rec_SINR_MM(1,j)=MMz;
end

%.........................................

MMz1(1,j)=MMz; % SINR in all RBs

end % RBs for loop 'end'

for jj=1:RB

MMrs(kr,jj)=MMz1(1,jj); %SINR of all users in all RBs per CC;

end

end

%..........................................................................

% Max SNR Scheduler

%..........................................................................

for pa=1:RB % number of RBs

for qa=1:gg % Number of users

MMba=MMrs(qa,pa);
MMha(1,qa)=MMba;

end

[ma,na]=max(MMha);

Ua(1,pa)=na; %Scheduled user number

Uta(1,pa)=ma; %Maximum SINR in all RBs

%.........................................................................

%...........Fairness......................................................

for MMqa=1:gg % Number of users

if MMqa==na

MMfair(1,MMqa)=MMfair(1,MMqa)+1;

end

end

%.........................................................................

%...........thrpts estimation.............................................

if ma<-10 % Maximum thrpts in RB pa of the schled user

MMr1(1,pa)=0;

elseif ma>22
MMr1(1,pa)=4.4;

else

MMV=10.^(ma/10);

MMr1(1,pa)=alph*log2(1+MMV);

end

%......................................................................

MMclth=MMclth+MMr1(1,pa); % Total cell thrpts for MM scheduler

end

%......................................................................

%.........................................................................

% Cell throughputs estimation: MM Scheduler

%.........................................................................

%.....................................................................

% Cell throughputs estimation: RR Scheduler

%.....................................................................

MM11=MM11+MMclth;

if TTI==TTimax
%=========================================================
==

% Average Spectral efficiency (bps/Hz/cell):RR Scheduler

MMsq(1,sim)=(MM11/RB)/(sim*TTimax);

avMIMM=MMsq(1,sim);

SINReffMM=10*log10(2^(avMIMM/alph)-1); %in dB

LTEA_thrbMM=alph*log2(1+10^(SINReffMM/10));

thy_PFGMM=LTEA_thrbMM+thy_PFGMM;

SimMMath(1,sim)=thy_PFGMM/sim;

%=========================================================
=====

end

%..........................................................................

%..................Fairness index MM scheduler............................

%..........................................................................
if TTI==TTimax

MMsd=0;

MMfn=0;

for fa=1:gg

MMf=MMfair(1,fa);

MMfr(1,fa)=MMf;

MMfn=MMfn+MMfr(1,fa);

MMf1=MMfr(1,fa);

MMf2=MMf1^2;

MMsd=MMsd+MMf2;

end

MMsmn=MMfn^2;

MMsmd=MMsd*gg;

if MMsmd==0

MMsmd=1;

end

%Jain fairness Index


MMjf(1,sim)=MMsmn/MMsmd;

thyjfMM=MMjf(1,sim)+thyjfMM;

%++++++++++++++++++++++++++++++++++++++++++++

% Fairness Index:Generic PF-Scheduler

SimMMjf(1,sim)=thyjfMM/sim;

%++++++++++++++++++++++++++++++++++++++++++++

end

%..........................................................................

%=========================================================
=================

%end main loop: Max-Min scheduler

%=========================================================
=================

elseif sched==3 %PF & MPF Scheduler

%=======================PF
Scheduler======================================

%..........................................................................

% Main Program : scheduling

%..........................................................................
for kr=1:gg % Number of users per CC

%.....................

if kr<=AUMeNB

DisM=DsM(1,kr);

end

%.......................

PFr1=randi([0 0],1,RB);

Rec_SINR=randi([0 0],1,RB);

%=========================================================
=================

%=========================================================
================

for j=1:RB

if kr<=AUMeNB

if kr<=AUMeNBout

% pathloss estimation outdoor UMeNB

PFPLM=15.3+37.6*log10(DisM)+6;
%PFPLM=34.5+35*log10(DisM)+6;

else

% pathloss estimation indoor UMeNB

PFPLM=15.3+37.6*log10(DisM)+PLow+6;

% PFPLM=34.5+35*log10(DisM)+PLow+6;

end

%=========================================================
=====

% MenB transmitting power

PFPtM=PtMmax;

% macro BS antenna gain and multiuser diversity gain

gainM=MG+GK;

%path Loss for macro cell

pathlossM=PFPLM;

% Receiver Thermal Noise and Noise Figure

noise=ther_nois+NF_MS;

% fading: Shadowing and fast fading

fadingM=ShdM(kr,j)+RayM(kr,j);

% fadingM=ShdM(1,kr)+RayM(kr,j);

%received power without fading

PFPrM1=PFPtM+gainM-pathlossM-noise;
%received power with fading

PFPrM=PFPrM1+fadingM;

%received power with fading and interference (SINR-Macro users)

PFz=PFPrM-IM(kr,j);

% PFz=PFPrM;

Rec_SINR(1,j)=PFz;

%...........................................................

% Instantaneous Throughput Estimation

%...........................................................

if PFz<-10

PFr1(1,j)=0;

elseif PFz>22

PFr1(1,j)=4.4;

else

PFV=10.^(PFz/10);

PFr1(1,j)=alph*log2(1+PFV);

end

end
end

%................................................

for jj=1:RB

%Throughputs of all users in all RBs per CC;

PFrs_1(kr,jj)=PFr1(1,jj);

SINR_1(kr,jj)= Rec_SINR(1,jj);

end

%..............................................

%=========================================================
=================

end % kr=1:gg; main loop: PF Scheduler

%=========================================================
=================

% PF Scheduler: Average user throughputs Estimation for TTI=1:Initial value

%..........................................................................

if TTI==1

for i=1:gg
for i1=1:RB

PFr(i,i1)=1; %initial Throughputs at all RBs fr all users

end

end

end

% Proportional Fair Scheduler: performance metric (PM) estimation

%................................................................

for ss1=1:gg

for ss2=1:RB

dd1=PFrs_1(ss1,ss2);

dd2=PFr(ss1,ss2);

if dd2==0

dd2=0.1;

end

c(ss1,ss2)=dd1/dd2; %PM estimation per user per RB (per CC)

end

end
% PF Scheduler: PM comparison of users at each RB

%.......................................................

for p=1:RB % number of RBs

for q=1:gg % Number of users

% PM of all users at any RB

PFb=c(q,p);

PFh(1,q)=PFb;

end

%..............................................................

% Sorting of users - PF/MPF Scheduler

%..............................................................

% sort in ascending order at each RB

[aa dd]=sort(PFh);

%...............................................................

% PF-Scheduler: First max value

U(1,p)=dd(1,gg); %Scheduled user number


n=U(1,p);

Ut(1,p)=aa(1,gg); %scheduled user PM at RB

%........................................................................

%Fairness PF Scheduler.......

for PFqa=1:gg

if PFqa==n

PFfair(1,PFqa)=PFfair(1,PFqa)+1;

end

end

% Total cell thrpts for PF scheduler

for jt=1:gg

if jt==n

PFclth=PFclth+PFrs_1(jt,p);

end

end

end

%........................................................................
%*****************************************************************
********

%...............................................

% throughputs estimation: Generic-PF Scheduler

%...............................................

%PF11=PF11+PFclth*thfac;

PF11=PF11+PFclth;

if TTI==TTimax

%=========================================================
==

% Average Spectral efficiency (bps/Hz/cell):PF Scheduler

PFsq(1,sim)=(PF11/RB)/(sim*TTimax);

avMI=PFsq(1,sim);

SINReff=10*log10(2^(avMI/alph)-1); %in dB

LTEA_thrb=alph*log2(1+10^(SINReff/10));

thy_PFG=LTEA_thrb+thy_PFG;

SimPFath(1,sim)=thy_PFG/sim;
%=========================================================
=====

end

%=========================================================
==============

%.....................................

% Fairness index Generic PF scheduler FOR ALL USERS

%.....................................

if TTI==TTimax

PFsd=0;

PFfn=0;

for fa=1:gg

PFf=PFfair(1,fa);

%PFfr(1,fa)=PFf/TTimax;

PFfr(1,fa)=PFf;

PFfn=PFfn+PFfr(1,fa);
PFf1=PFfr(1,fa);

PFf2=PFf1^2;

PFsd=PFsd+PFf2;

%==============================================

% RBs allocated to any user (avg. peak spectral

% efficiency

%==============================================

% PF_PSE(sim,fa)=PFfair(1,fa);

%==============================================

end

PFsmn=PFfn^2;

PFsmd=PFsd*gg;

if PFsmd==0

PFsmd=1;

end

%Jain fairness Index

PFjf(1,sim)=PFsmn/PFsmd;

thyjfPF=PFjf(1,sim)+thyjfPF;
%++++++++++++++++++++++++++++++++++++++++++++

% Fairness Index:Generic PF-Scheduler

SimPFjf(1,sim)=thyjfPF/sim;

%++++++++++++++++++++++++++++++++++++++++++++

end

%=========================================================
===============

%..........................................................................

%PART1: Average throughput Updates

%..........................................................................

tc1=1-(1/tc);

tc2=(1/tc);

for pp=1:gg

for qq=1:RB

if pp==U(1,qq);

raPF=tc2*PFrs_1(pp,qq);

else
raPF=0;

end

e2=tc1*PFr(pp,qq);

% avg thrpts updates for PF Scheduler

PFr(pp,qq)=e2+raPF;

end

end

%=========================================================
================

%END : PF Scheduler

%=========================================================
================

end % if sched

end % sched ; scheduler loop

%=========================================================
=================

tc=tc+1;

%=========================================================
=================

end %TTimax -- THE NUMBER OF TIME SLOTS

%.........................................................................
%=========================================================
================

%=========================================================
=================

end % simtime

%=========================================================
=================

%*****************************************************************
*********

% END OF THE PROGRAM

%!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

%*****************************************************************
*********

%!!!!!!!!!!!!!!!!!!!!!! OUTPUT !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

%*****************************************************************
*********

% ROUND ROBIN

%subplot 211

%s=100:100:1000;

%plot(s,SimRRath),grid

%legend('RR-THR')

%subplot 212

%s=100:100:1000;

%plot(s,SimRRjf),grid

%legend('RR-FAIR')
%MAX-SNR

%subplot 211

%s=100:100:1000;

%plot(s,SimMMath),grid

%legend('MM-THR')

%subplot 212

%s=100:100:1000;

%plot(s,SimMMjf),grid

%legend('MM-FAIR')

%PROPORTIONAL FAIR

%subplot 211

%s=100:100:1000;

%plot(s,SimPFath),grid

%legend('PF-THR')

%subplot 212

%s=100:100:1000;

%plot(s,SimPFjf),grid

%legend('PF-FAIR')

% ALL SCHEDULERS

subplot 211

s=100:100:1000;

plot(s,SimRRath,s,SimMMath,s,SimPFath),grid

legend('RR-THR','MM-THR','PF-THR')
subplot 212

s=100:100:1000;

plot(s,SimRRjf,s,SimMMjf,s,SimPFjf),grid

legend('RR-FAIR','MM-FAIR','PF-FAIR')

%=========================================================
=================

You might also like