3D-PPP分布,2D-PPP分布的Matlab实现

来源:互联网 发布:mastercam数控车编程 编辑:程序博客网 时间:2024/06/15 19:47

3D\2D-PPP泊松点分布

研究无人机仿真场景经常遇到无人机服从三维或二位PPP分布,计算的目标为中断概率。

在Matlab的环境下,matlab自带一维poisson点生成函数:poissrnd(lambda,m,n)

一维的Poisson过程和Poisson分布,从时间的角度似乎更加容易解释:事件发生的次数,两件事情发生的平均间隔时间服从指数分布。

对于2维或者三维来说,即:随机抽样出来的样本点在范围内服从均匀分布,样本点之间的距离服从指数分布

2维3维的Poisson点分布的仿真便是基于上述概念进行的。在文献中有这样两种方法 ^1:

“Two distinct ways can be used to generate realisations of homogeneous Poisson process. One is to use the property that the spatial differences (areas in 2D case) between successive point events follow an exponential distribution with parameter λ (the density of the Poisson process). Different implementations can be derived to explore this property in 2D and 3D cases. The other way is to simulate the Poisson variable N(A) directly. Simulation of N(A) may sometimes be time-consuming, the implementation nevertheless is simpler and less error prone. In the current exercise, direct Poisson variable simulation is used.”

仿真上可以使用两种不同的方式来产生均匀泊松过程的实现:

  1. 使用连续点事件之间的空间差异(2D情况下的区域)遵循参数λ(泊松过程的密度)的指数分布的属性。 在2D和3D下可以使用。

  2. 直接模拟泊松变量N(A)。这种方法耗时较长,实现方式更简单,更容易出错。

具体的方法可以参考 ^1, 通过确定点数进行随机分布

%%% Part1 %%%Lambda = 20;  % Lambda:poisson(Lambda)u = unifrnd(0,1)M = 0;while u >= exp(-Lambda)%判定条件    u = u*unifrnd(0,1);    M=M+1;end     %取点个数R = poissrnd(Lambda,1,M) %%% Part2 %%%a = 0; c = 0;b = 100; d =100;e = 0; f = 100;     %取[0,100]*[0,100]的布点区域;Nall = M;% A = [];% B = [];while M > 0         %scatter in the [0,100]*[0,100]    M = M-1;    u1 = unifrnd(0,1);    A(Nall-M) = (b-a)*u1;    u2 = unifrnd(0,1);    B(Nall-M) = (d-c)*u2;    u3 = unifrnd(0,1);    C(Nall-M) = (f-e)*u3;    figure(1)    %base stations 分布图    plot3(A(Nall-M),B(Nall-M),C(Nall-M),'r^');    hold on;    plot(A(Nall-M),B(Nall-M),'b.')    hold onendgrid on

当然肯定还有其它的方法比如循环 ^5,没有深入研究。推荐文献[4],帮助理解。


[1] POISSON A program for spatial point generation using Poisson proces
[2] Generating Homogeneous Poisson Processes - Raghu Pasupathy
[3] http://bbs.csdn.net/topics/390026337
[4] https://wenku.baidu.com/view/598c77e6f524ccbff12184d1.html
[5] http://muchong.com/html/201507/9122820_2.html#pcomment