Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Integral2 with Bivariate nakagami m distribution

Status
Not open for further replies.

HellSpawn82

Electrical
Oct 30, 2015
2
Hello, I am trying to use Bivariate Nakagami-m distribution for calculating E{Perr}... To check myself I've tried to Integrate only the Bivariate Nakagami pdf using integral2 over [-inf,inf] range. Of course I expect to get - 1. Before using the Nakagami pdf I've tried with Normal distribution and have used the following code:

xmu = 0;
ymu = 0;
xvar = 1;
yvar = 1;
rho = 0.5;
xsd = sqrt(xvar);
ysd = sqrt(yvar);
covxy = rho*xsd*ysd;
C = [xvar covxy; covxy yvar];
A = inv(C);
dist2D = @(X,Y) 1./(2.*pi.*sqrt(det(C))) .* exp(-0.5 .* (A(1,1).*(X-xmu).^2 + 2.*A (1,2).*(X-xmu).*(Y-ymu) + A(2,2).*(Y-ymu).^2));

q = integral2(dist2D,-inf,inf,-inf,inf,'RelTol',0,'AbsTol',1e-12)

The result is as expected: q=1

When trying to perform same thing over Bivariate Nakagami-m distribution, but in the following range [0,inf,0,inf] - I get the following message:

Warning: Minimum step size reached near x = 3.38583e+21. There may be a singularity, or the tolerances may be too tight for this problem. > In integralCalc/checkSpacing (line 456) In integralCalc/iterateScalarValued (line 319) In integralCalc/vadapt (line 132) In integralCalc (line 83) In integral2Calc>@(xi,y1i,y2i)integralCalc(@(y)fun(xi*ones(size(y)),y),y1i,y2i,opstruct.integralOptions) (line 17) In integral2Calc>@(x)arrayfun(@(xi,y1i,y2i)integralCalc(@(y)fun(xi*ones(size(y)),y),y1i,y2i,opstruct.integralOptions),x,ymin(x),ymax(x)) (line 17) In integralCalc/iterateScalarValued (line 314) In integralCalc/vadapt (line 132) In integralCalc (line 83) In integral2Calc>integral2i (line 20) In integral2Calc (line 7) In integral2 (line 106) In plotNakagami2D (line 9) Warning: The integration was unsuccessful.

I am using the following code:
m=0.5;
r=0.5;
k=(2*m^m)/(gamma(m)*(sqrt(r))^(m-1)); a=(2*m)/(1-r); dist2D = @(h1,h2) k*a.*((h1/sqrt(mean(h1.^2))).*(h2/sqrt(mean(h2.^2)))).^m .* exp((-a/2).*((h1/sqrt(mean(h1.^2))).^2+(h2/sqrt(mean(h2.^2))).^2)) .* besseli(m-1,a.*sqrt(r).*(h1/sqrt(mean(h1.^2))).*(h2/sqrt(mean(h2.^2))));
q = integral2(dist2D,-0,inf,-0,inf)

The Bivariate Nakagami-m distribution used is taken from eq.(64) in the following paper: "On the Bivariate Nakagami-m Cumulative Distribution Function: Closed-Form Expression and Applications", by Lopez-Martinez, F. J., Morales-Jimenez D., Martos-Naya E., & Paris J. F.

Can please someone help me to perform the integration?

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor