91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

本人翻遍了CSDN都找不到一個正確的TOA定位算法程序,唯一找到的一個是用最小二乘解的(參考文獻N. Patwari, J. N. Ash, S. Kyperountas, A. O. Hero, R. L. Moses, and N. S. Correal, "Locating the nodes: cooperative localization in wireless sensor networks," IEEE Signal Processing Magazine, vol. 22, no. 4, pp. 54-69, 2005.),性能無法達到克拉美羅界。 因此本人自己重新寫了一個程序,參考該領域著名學者K. C. Ho的文章(參考文獻Z. Ma and K. C. Ho, "TOA localization in the presence of random sensor position errors," in 2011 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), 2011, pp. 2468-2471.)。該算法適用于傳感器位置有誤差/無誤差的情況,算法性能能夠達到克拉美羅界。示例程序中給出了CRLB的程序,場景為傳感器有誤差的情況。程序運行結果與參考文獻一致。 (搞不懂現在的人都是要什么50積分,多分享下不好嗎?) ******特別提示******:本代碼多處使用了Matlab 2016a以后支持的新語法,舊版本無法正常運行的,請自行修改代碼或更新Matlab版本!!!

資源截圖

代碼片段和文件信息

%?Z.?Ma?and?K.?C.?Ho?“TOA?localization?in?the?presence?of?random?sensor?
%?position?errors“?in?2011?IEEE?International?Conference?on?Acoustics?
%?Speech?and?Signal?Processing?(ICASSP)?2011?pp.?2468-2471.

%?by?Y.?Sun?UESTC?2018.12.15

clear;close?all;clc;

senPos?=?[?300?100?150
???????????400?150?100
???????????300?500?200
???????????350?200?100
???????????-100?100?-100
???????????200?-300?-200]‘;
souLoc?=?[[2000;2500;3000][600;650;550]];

nsePwr?=?10^(-10/10);
errPwrdB?=?-60:10:0;
errPwr?=?10.^(errPwrdB/10);

[NM]?=?size(senPos);
mon?=?1000;
%?measurements?noise
rng(‘Default‘);
nseTmp?=?zeros(Mmon);
for?m?=?1:mon
????nseTmp(:m)?=?randn(M1);
end
nseTmp?=?nseTmp?-?mean(nseTmp2);

%?sensor?position?errors
rng(12);
errTmp?=?zeros(M*N1);
for?m?=?1:mon
????errTmp(:m)?=?randn(M*N1);
end
errTmp?=?errTmp?-?mean(errTmp2);

Qr?=?nsePwr?*?eye(M);
J?=?diag([1?1?1?2?2?2?10?10?10?40?40?40?20?20?20?3?3?3]);

%?distant?source
ro(:1)?=?sqrt(sum((souLoc(:1)-senPos).^21))‘;
ro(:2)?=?sqrt(sum((souLoc(:2)-senPos).^21))‘;

for?u?=?1:2
????for?n?=?1:length(errPwr)
????????Qs?=?errPwr(n)*J;
????????
????????%?CRLB
????????for?i?=?1:M
????????????du(i:)?=?(souLoc(:u)-senPos(:i))‘./ro(iu);
????????????ds(i(1:N)+(i-1)*N)?=?-(souLoc(:u)-senPos(:i))‘./ro(iu);
????????end
????????X?=?du‘/Qr*du;
????????Y?=?du‘/Qr*ds;
????????Z?=?ds‘/Qr*ds?+?inv(Qs);
????????CRB?=?inv(X)?+?X\Y/(Z-Y‘/X*Y)*Y‘/X;
????????crlb(un)?=?trace(CRB);
????????
????????%?simulation
????????for?m?=?1:mon
????????????r?=?ro(:u)?+?sqrt(Qr)*nseTmp(:m);
????????????senPosNsed?=?senPos?+?reshape(chol(Qs)‘*errTmp(:m)NM);
????????????
%?????????????h1?=?r.^2?-?diag(senPosNsed‘*senPosNsed);
%?????????????G1?=?-2*[senPosNsed‘-0.5*ones(M1)];
%?????????????psi1?=?(G1‘*G1)\G1‘*h1;
%?????????????
%?????????????V1?=?2*diag(r);
%?????????????for?s?=?1:M
%?????????????????O1(s(1:N)+(s-1)*N)?=?(psi1(1:N)-senPosNsed(:s))‘;
%?????????????end
%?????????????W1?=?inv(V1*Qr*V1‘+O1*Qs*O1‘);
%?????????????psi2?=?(G1‘*W1*G1)\G1‘*W1*h1;
%?????????????C1?=?inv(G1‘*W1*G1);
%?????????????
%?????????????h2?=?[psi2(1:N).^2;psi2(4)];
%?????????????G2?=?[eye(N);ones(1N)];
%?????????????V2?=?diag([2*psi2(1:N);1]);
%?????????????W2?=?inv(V2*C1*V2‘);
%?????????????psi3?=?(G2‘*W2*G2)\G2‘*W2*h2;
%?????????????
%?????????????u1e?=?sign(psi2(1:N)).*sqrt(psi3);
????????????u1e?=?TOA_2WLS_Cart(senPosNsedrQrQs);
????????????err1(m)?=?norm(u1e-souLoc(:u));
????????end
????????mse(un)?=?mean(err1.^2);
????end
end

figure;
plot(errPwrdB10*log10(mse(1:))‘o‘‘linewidth‘1.5‘DisplayName‘‘distant‘);hold?on;grid?on;
plot(errPwrdB10*log10(mse(2:))‘^‘‘linewidth‘1.5‘DisplayName‘‘near‘);
plot(errPwrdB10*log10(crlb(1:))‘-‘‘linewidth‘1.5‘DisplayName‘‘CRLB-distant‘);
plot(errPwrdB10*log10(crlb(2:))‘--‘‘linewidth‘1.5‘DisplayName‘‘CRLB-near‘);
legend(‘show‘‘location‘‘best‘)

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????2993??2018-12-15?19:35??testTOAErrCartesian.m
?????文件????????1446??2018-12-15?15:04??TOA_2WLS_Cart.m

評論

共有 條評論