当前位置:网站首页>Matlab simulation of vertical handover between MTD SCDMA and TD LTE dual networks
Matlab simulation of vertical handover between MTD SCDMA and TD LTE dual networks
2022-07-26 03:02:00 【I love c programming】
Catalog
3. Preview of some simulation drawings
4. Source code acquisition method
1. Algorithm description
TD-SCDMA And TD-LTE Coverage radius within the scope of common coverage 1000m;
TD-SCDMA Central coordinates (0,0), Coverage radius 1000m;
Two TD-LTE The center coordinate of the base station is (150,0)(-150,0) Coverage radius is 170m;
Within this range, the user takes 0-15m/s Random walk at the speed of , The walking route can be fixed ( You have to go through two LTE Base station overlap area ) Or random directionless ( here , In order to verify the general verification , Move at a constant speed and in a specified direction , But users are always within the coverage of the cell )
The network that the mobile terminal initially accesses in the scenario is TD-SCDMA The Internet , Relevant network parameters .
Define the terminal moving speed
Definition 3 Move in and move out thresholds of networks power thresholds
Define different types of business weights
Switching decision module : The switching decision module is mainly used to measure 3 The received signals of two networks moved to the capital , Judge whether the hard access conditions are met , Schedule other decision parameters after meeting the hard access conditions . The decision strategy here adopts the two-dimensional income weighting method, and other decision parameters include : Receiving power 、 Handover delay 、 Maximum transmission rate 、 Price .
· Get voice service 、 The network revenue of data service in deciding strategy , And which network to access during the time period , The results are reasonable
· Get voice service 、 Data business stay RSS Under the condition of decision and with the addition of switching decision strategy Switching times Comparison of the figure , The results are reasonable
stay RSS When both networks are satisfied , Then the network parameters are determined according to the switching ( use Receiving power 、 Maximum transmission rate 、 Time delay 、 Cost price ), And the relative weight of the network parameters combined with the handover decision ( I want to use the relative weight analysis Analytic hierarchy process It is not a fixed parameter . Finally, according to different business types ( Voice service / Data business / Video service ) According to the two-dimensional cost ( Or income ) Function weighting method is used to determine which network is most suitable for access .
2. Partial procedure
% Key points that mobile devices must pass through
VP_ms = [-600,300; %A
-290,105; %B
-20, 40; %C
0, 40; %D
20, 40; %E
250,120; %F
600,500] ;%G
type = 1;% Business types :1: Voice service ,2: Data business ,3: Video model
% Access to various networks , Off power threshold
Rss_tds_in = -55;%dbm
Rss_tds_out = -70;%dbm
Rss_tdl1_in = -50;%dbm
Rss_tdl1_out = -65;%dbm
Rss_tdl2_in = -50;%dbm
Rss_tdl2_out = -65;%dbm
% Define the distance the user moves
Xp = 0;
Yp = 0;
% Define simulation time parameters
delta = 0.01;
Time = 300;
t = 0;
% Array counter
Ind = 0;
Ind2 = 0;
% Receiving power 、 Maximum transmission rate 、 Time delay 、 Cost price
% The received power is measured
POW_tds = 0;
Rb_tds = 1.28;
DLY_tds = 20;
MNY_tds = 0.3;
POW_tdl1 = 0;
Rb_tdl1 = 8;
DLY_tdl1 = 40;
MNY_tdl1 = 0.2;
POW_tdl2 = 0;
Rb_tdl2 = 8;
DLY_tdl2 = 45;
MNY_tdl2 = 0.1;
% Receiving power 、 Maximum transmission rate 、 Time delay 、 Cost price
% w1 = 0.2;
% w2 = 0.3;
% w3 = 0.3;
% w4 = 0.2;
ViewS = 20;% Reduce memory consumption , Sample display results
% Define a hierarchical matrix
C = zeros(4,4);
%%
% Initialization of the scene
%X,Y by MB Moving path , Over time X,Y The change value of , Used for loop simulation
[X,Y] = func_Simu_Scene(P_tds,P_tdl1,P_tdl2,VP_ms,R_tds,R_tdl);
save My_Result\Simu_Scene.mat
%%
% Main circulation
% Defining variables
Len = min(Time/delta,floor((length(X)-Sp_ms)/Sp_ms));
% Defining network ID Variable
ClK = zeros(Len,1);
IDs = zeros(Len,3);
RSS_tdss = zeros(Len,1);
RSS_tdl1s = zeros(Len,1);
RSS_tdl2s = zeros(Len,1);
Networkcontribution_tdss = zeros(Len,1);
Networkcontribution_tdl1s = zeros(Len,1);
Networkcontribution_tdl2s = zeros(Len,1);
IDs2 = zeros(Len,1);
while (t < Time & Ind < length(X)-Sp_ms)
% computing time
t
t = t + delta;
Ind = Ind + Sp_ms;
Ind2 = Ind2 + 1;
% According to the coordinate position , obtain MB The current area of
Xp = X(Ind);
Yp = Y(Ind);
% According to different regions , Make sure there are several networks
ID = func_NET_ID(Xp,Yp,P_tds,P_tdl1,P_tdl2,R_tds,R_tdl);
% Calculation RSS value
RSS_tds = func_Rss_cal(Xp,Yp,Sp_ms,P_tds ,F_tds,t,Pow_tds,ISFAST);
RSS_tdl1 = func_Rss_cal(Xp,Yp,Sp_ms,P_tdl1,F_tdl,t,Pow_tdl,ISFAST);
RSS_tdl2 = func_Rss_cal(Xp,Yp,Sp_ms,P_tdl2,F_tdl,t,Pow_tdl,ISFAST);
% Judge the alternative network at every moment
% Carry out layered calculation , This depends on the business model , And different
% Receiving power 、 Maximum transmission rate 、 Time delay 、 Cost price
% Under normal circumstances , We assume that the received power varies with time , The other three parameters are fixed , So as to calculate the network contribution value in real time
% here , The solution of layered method W, I refer to another article , It's more convenient
if type == 1% Voice service , We think time delay is the most important
% Receiving power 、 Maximum transmission rate 、 Time delay 、 Cost price
C=[1 5 1/7 3;
1/5 1 1/3 1/2;
7 3 1 2;
1/3 2 1/2 1];
end
% Calculate weights W
for i = 1:4
w2(i) = (C(i,1)*C(i,2)* C(i,3)* C(i,4))^0.25;
end
for i = 1:4
w(i) = w2(i)/sum(w2);
end
w1 = w(1);
w2 = w(2);
w3 = w(3);
w4 = w(4);
% Be careful , Here's the matrix C The establishment of the , It has a certain subjectivity , So I won't set it , You change it , You can change other business models for simulation
% Be careful , Here's the matrix C The establishment of the , It has a certain subjectivity , So I won't set it , You change it , You can change other business models for simulation
% Calculate the network contribution weight by the above layered method
% Receiving power 、 Maximum transmission rate 、 Time delay 、 Cost price
% Turn power dbm Convert to standard power w
PP_tds = 10^(RSS_tds/20);
PP_tdl1 = 10^(RSS_tdl1/20);
PP_tdl2 = 10^(RSS_tdl2/20);
% Composition matrix , And Planning
Rs = [PP_tds ,Rb_tds ,DLY_tds ,MNY_tds;
PP_tdl1,Rb_tdl1,DLY_tdl1,MNY_tdl1;
PP_tdl2,Rb_tdl2,DLY_tdl2,MNY_tdl2];
[r,c] = size(Rs);
for j = 1:c
Mins = min(Rs(:,j));
Maxs = max(Rs(:,j));
for i = 1:r
R(i,j) = (Rs(i,j)-Mins)/(Maxs);
end
end
% It means a network
if ID(2) == 0 & ID(3) == 0
Networkcontribution_tds = w1*R(1,1) +w2*R(1,2) +w3*R(1,3) +w4*R(1,4);
Networkcontribution_tdl1 = 0;
Networkcontribution_tdl2 = 0;
end
% Express 2 A network
if ID(2) == 0 & ID(3) > 0
Networkcontribution_tds = w1*R(1,1) +w2*R(1,2) +w3*R(1,3) +w4*R(1,4);
Networkcontribution_tdl1 = 0;
Networkcontribution_tdl2 = w1*R(3,1) +w2*R(3,2) +w3*R(3,3) +w4*R(3,4);
end
if ID(3) == 0 & ID(2) > 0
Networkcontribution_tds = w1*R(1,1) +w2*R(1,2) +w3*R(1,3) +w4*R(1,4);
Networkcontribution_tdl1 = w1*R(2,1) +w2*R(2,2) +w3*R(2,3) +w4*R(2,4);
Networkcontribution_tdl2 = 0;
end
% The alternative set is three networks
if ID(1) > 0 & ID(2) > 0 & ID(3) > 0
Networkcontribution_tds = w1*R(1,1) +w2*R(1,2) +w3*R(1,3) +w4*R(1,4);
Networkcontribution_tdl1 = w1*R(2,1) +w2*R(2,2) +w3*R(2,3) +w4*R(2,4);
Networkcontribution_tdl2 = w1*R(3,1) +w2*R(3,2) +w3*R(3,3) +w4*R(3,4);
end
% According to the network contribution value , To choose the network
[V,I] = max([Networkcontribution_tds,Networkcontribution_tdl1,Networkcontribution_tdl2]);
% Save the results of each cycle
ClK(Ind2) = t-delta;
IDs(Ind2,1) = ID(1);
IDs(Ind2,2) = ID(2);
IDs(Ind2,3) = ID(3);
RSS_tdss(Ind2) = RSS_tds;
RSS_tdl1s(Ind2) = RSS_tdl1;
RSS_tdl2s(Ind2) = RSS_tdl2;
Networkcontribution_tdss(Ind2) = Networkcontribution_tds;
Networkcontribution_tdl1s(Ind2) = Networkcontribution_tdl1;
Networkcontribution_tdl2s(Ind2) = Networkcontribution_tdl2;
IDs2(Ind2) = I;
end
3. Preview of some simulation drawings




4. Source code acquisition method
Get the way 1:
Click the download link :
Access method 2:
Blog resource item , Search for resources with the same name as blog .
Access method 3:
If the download link fails , Blogger wechat contact .
01_059_m
边栏推荐
猜你喜欢

Literature speed reading | in the face of danger, anxious people run faster?

规范自己debug的流程
![[sql] case expression](/img/05/1bbb0b5099443f7ce5f5511703477e.png)
[sql] case expression

Arthas download and startup

Have you ever seen this kind of dynamic programming -- the stock problem of state machine dynamic programming (Part 1)

ShardingSphere数据分片

图像识别(六)| 激活函数

信息系统项目管理师必背核心考点(五十)合同内容约定不明确规定

How to design automated test cases?

Win11大小写提示图标怎么关闭?Win11大小写提示图标的关闭方法
随机推荐
What if the test / development programmer gets old? Lingering cruel facts
Article setting top
[SQL] 自连接的用法
循环与分支(一)
Standardize your own debug process
Win11更改磁盘驱动器号的方法
测试/开发程序员老了怎么办?挥之不去残酷的事实......
26 points that must be paid attention to for stability test
[steering wheel] how to transfer the start command and idea: VM parameters, command line parameters, system parameters, environment variable parameters, main method parameters
Swin Transformer【Backbone】
File operation (I) -- File introduction and file opening and closing methods
Binary search 33. search rotation sort array
(9) Attribute introspection
How can users create data tables on Web pages and store them in the database
STM32 - PWM learning notes
[C Advanced] deeply explore the storage of data (in-depth analysis + interpretation of typical examples)
[NOIP2001 普及组] 最大公约数和最小公倍数问题
【方向盘】使用IDEA的60+个快捷键分享给你,权为了提效(Live Template&Postfix Completion篇)
Three years of software testing experience, salary has been stuck at 10K, how to improve and develop automated testing?
[C language] deeply understand integer lifting and arithmetic conversion