蜂窝小区同频干扰的Matlab仿真_第1页
蜂窝小区同频干扰的Matlab仿真_第2页
蜂窝小区同频干扰的Matlab仿真_第3页
蜂窝小区同频干扰的Matlab仿真_第4页
蜂窝小区同频干扰的Matlab仿真_第5页
已阅读5页,还剩12页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、Lab4:1. Write a program to calculate the signal interference ratio (SIR) in the forward link, and repeats it by randomly changing the position of the MS. After a number of simulations, use the simulated results to draw the histogram of the SIR (S=I). Try to obtain histograms with different path loss

2、 exponent n and cluster size N. Conclude your results.The co-channel interference in the forward link can be characterized in figure 1. A MS will be interfered by the co-channel base station. In our simulation, we consider the 18 co-channel cell, including 6 cells in the first loop and 12 cells in t

3、he second, no matter what the cluster size N is. Figure 1 forward link co-channel interference(1) Firstly, we should randomly choose the position of the MS in the cell. Since the cell is hexagon which is hard to handle we cut and paste it into a square. As we can see in figure 2, the center of the c

4、oordination is the center of the cell. The square we choose is ABCD. We then randomly choose a pair of x and y as the coordinate of MS. If MS locates in triangle 1 we cut and paste it to triangle 3 and if it locates in triangle 2 we move it to triangle 4. We assume the range of the base station is 0

5、.1 as radius of cluster is 1. For the MS who located within this area, we change its distance to be 0.1 as it is too close to the base staion.Figure 2 randomly choose the position of MS in a cellMatlab code: RandPOS.mfunction z = RandPOS(m) %* get random value of x,y within a square *%x = 1.5*rand(m

6、,1)-1; y = sqrt(3)*rand(m,1)-0.5*sqrt(3); %* use for loop to cut the square into a hexagon *%for k=1:m if x(k)-1 & x(k)(1+x(k)*sqrt(3) x(k)=x(k)+1.5; y(k)=y(k)-sqrt(3)/2; elseif x(k)-1 & x(k)-0.5 & y(k)-(1+x(k)*sqrt(3) x(k)=x(k)+1.5; y(k)=y(k)+sqrt(3)/2; end %* if the MS is too nearly to the base st

7、ation *% if sqrt(x(k)2+y(k)2)0.1 x(k)=0.1; y(k)=0; end end z=x+j*y;(2) Secondly, we should calculate the coordinate of co-channel base station. As we know the cluster size N we can calculate the (i, j) pair by the formulaN=i2+i*j+j2. Matlab code: ClusterN.mfunction ii,jj = ClusterN(N) for a = 0:sqrt

8、(N) for b = 0:sqrt(N) if a2+b2+a*b = N ii = a; jj = b; end; %end if end; %for jj end;(3) Taking N=7 as example, we can calculate the coordinate by referring to figure 3. According to the value of I j pair and angles in the figure we can get the coordinate of the first loop by the formula: location(k

9、)=3(iejpi6+jpi3k-1+jejpi6+jpi3k), where k=1, 2.6. The second loop can be calculated by the first loop. There are two kinds of second loop co-channel base station. One can be calculated by double the coordinate of the first loop points. The other can be done by adding coordinates of adjacent first lo

10、op point as it is the diagnose of a parallelogram. Examples of those two kinds of points, point 1 and 2, can be found in figure 3diagnose of a parallelogramdouble the coordinate of the first loop pointsFigure 3 calculate coordinate of co-channel base station by I J pairMatlab code: AdjCel.mfunction

11、CelLoc = AdjCel(N) ii,jj = ClusterN(N) CelLoc = zeros(18,1)+j*zeros(18,1); CelLoc(1) = sqrt(3)*( ii*exp(j*pi/6) + jj*exp(j*pi/6+j*pi/3); for k=2:6 CelLoc(k) = CelLoc(k-1)*(0.5+sqrt(3)/2*j); end; for i = 1:6 CelLoc(2*i+5) = CelLoc(i)+CelLoc(i); CelLoc(2*i+6) = CelLoc(i)+CelLoc(i+1); end; CelLoc(18) =

12、 CelLoc(6)+CelLoc(1);(4) Now we have coordinates of MS and co-channel base station, so we can calculate SIR by the formula SIR=(dms)-ni=118(dbsi)-n , where dms stands for the distance from MS to the center while dbsi stands for the distance from the co-channel base station to the MS. We simulated it

13、 100000 times.Matlab code:clear all close all N = input(the cluster size N =); n = input(the path loss exponent n =)M = 100000; MSPos = RandPOS(M); CelLoc = AdjCel(N); ds = (abs(MSPos).-n; ditemp1 = abs(MSPos*(ones(18,1)-ones(M,1)*CelLoc); ditemp2 = ditemp1.-n; di = ditemp2*ones(18,1); SIR = 10*log(

14、ds./di); hist(SIR,-20:250) title(Histogram); xlabel(SIR(dB); ylabel(numbers of MS);(5) Rsults:We will simulate the SIR of the co-interference of the forwarding link with different cluster size N and path lose exponent n and plaint the histogram of each condition. To make a comparison, we chose two g

15、roup of n and N as: When n=3.6, we let N=1,3,4,7,12.When N=7, we let n=2,3,3.5,4.Figure 5 histogram of SIR while N=1, n=3.6(dd0)-n . d0 is the range of the base station.If the random MS is too nearly to the base station, dd0 or d=0, the SIR will be too high. So when dd0, we let d=d0 to remove the BS

16、.The smallest value of d is 0.1. It related the largest value of SIR.Figure 6 histogram of SIR while N=3, n=3.6Figure 7 histogram of SIR while N=4, n=3.6Figure 8 histogram of SIR while N=7, n=3.6Figure 9 histogram of SIR while N=12, n=3.6Figure 10 histogram of SIR while N=7, n=2Figure 11 histogram o

17、f SIR while N=7, n=3Figure 12 histogram of SIR while N=7, n=3.5Figure 13 histogram of SIR while N=7, n=4We can see from the histogram that the average SIR increase with N increase. Since the distance between the cluster and the co-interference cell is larger when N is larger, so the co-interference

18、is smaller. For a constant cluster size N, the SIR is larger as the path lose exponent becomes larger. Since when n is changing, the co-interference power is reduced much more than the signal power. Even though the system will lose more power, the SIR is becomes larger.2. Write a program to calculat

19、e the SIR in the reverse link, and repeats it by randomly changing the positions of the MSs. ( Note that the interferences in the reverse link are generated by co-channel MSs and is different from the interference in the forward link. ) After a number of simulations, use the simulated results to dra

20、w the histogram of the SIR. Try to obtain histograms with different path loss exponent n and cluster size N. Conclude your results.The co-channel interference in the reverse link can be characterized in figure 4. A BS will be interfered by the co-channel MS. In our simulation, we consider the 18 co-

21、channel cell, including 6 cells in the first loop and 12 cells in the second, no matter what the cluster size N is.Figure 14 reverse link co-channel interferenceThe procedure is pretty much the same as forward link we talked about early. Firstly we randomly choose the position of MSs in the target c

22、ell and co-channel cells. In order to doing this we can use the randPOS function in forward link. The coordinates of MSs can be calculated by adding it to coordinates of co-channel base station. Then we calculate the SIR by formula SIR=(dbs)-ni=118(dmsi)-n where dbs stands for the distance between t

23、he target BS and MS while dmsi stands for the distance from the co-channel MS to the center. Matlab code:% Reverse Link close all clear all N = input(the cluster size N =); n = input(the path loss exponent n =);M = 100000; MSPos = RandPOS(M); CelLoc = AdjCel(N); pos=ones(18,M);for i=1:18 pos(i,:)=Ra

24、ndPOS(M);endIntMS = pos+ones(M,1)*CelLoc; ds = (abs(MSPos).-n; ditemp = (abs(IntMS).-n; di = ditemp*ones(18,1); SIR = 10*log(ds./di); hist(SIR,-20:150) title(pdf of SIR); xlabel(SIR(dB); ylabel(pdf); We will simulate the SIR of the co-interference of the forwarding link with different cluster size N

25、 and path lose exponent n and plaint the histogram of each condition. As what we did for the forward link. To make a comparison, we chose two group of n and N as: When n=3.6, we let N=1,3,4,7,12.When N=7, we let n=2,3,3.5,4.The result is :Figure 15 histogram of SIR while N=1, n=3.6Figure 16 histogra

26、m of SIR while N=3, n=3.6Since we have removed the base station when generate the random position of MS.when distance of MS 0.1, we let it to be point (0.1, 0) . For the forward link, there is largest value SIR when it is 0.1 and it is a constant. For the reverse link, when the randomly MS is at (0.1,0), but the MS on the co-interference cell is also randomly, so the SIR of this situation is not a c

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论