david87
Junior Member level 1
Hi all,
I need to calculate the pathloss exponent using MMSE estimate. I have done some calculations and trying it in Matlab to find n. By theoretical calculations, i got n=4.4 but i dint get it while implementing in Matlab. please check Matlab code below which i have tried.
d=[100 200 1000 3000]; %%%distance in metres
do=100; %%%close in reference distance
PL_do=0; %%%reference path loss
n=sym('n');
p1=[0 -20 -35 -70];
for i=1:length(d)
p(i)=-10*n*log(d(i)/do); %%log distance model( here close in reference dist Received power is zero)
j1(i)=p1(i)^2+p(i)^2-(2*p1(i)*p(i));
end
j1=sum(j1);
j_derivative= diff(j1,1);
n_MMSE=solve(j_derivative)
Here, for j i have used (a-b)^2 formula for (p1-p)^2 to implement MMSE and then taking sum of the values and differentiating and equating it to zero to find n. Please tell me if the code is correct for MMSE to find n?
Regards,
David
I need to calculate the pathloss exponent using MMSE estimate. I have done some calculations and trying it in Matlab to find n. By theoretical calculations, i got n=4.4 but i dint get it while implementing in Matlab. please check Matlab code below which i have tried.
d=[100 200 1000 3000]; %%%distance in metres
do=100; %%%close in reference distance
PL_do=0; %%%reference path loss
n=sym('n');
p1=[0 -20 -35 -70];
for i=1:length(d)
p(i)=-10*n*log(d(i)/do); %%log distance model( here close in reference dist Received power is zero)
j1(i)=p1(i)^2+p(i)^2-(2*p1(i)*p(i));
end
j1=sum(j1);
j_derivative= diff(j1,1);
n_MMSE=solve(j_derivative)
Here, for j i have used (a-b)^2 formula for (p1-p)^2 to implement MMSE and then taking sum of the values and differentiating and equating it to zero to find n. Please tell me if the code is correct for MMSE to find n?
Regards,
David