资源简介
基于无线的chan定位算法,前辈总结多年实现的Chan,,,,用于室内定位,学习参考
代码片段和文件信息
%Chan定位算法
function [admse_Chan3]=Chan(X1Y1X2Y2X3Y3X4Y4X5Y5X6Y6X7Y7)
C = 300000000; % 光速(米每秒)
R = 1000; % 小区半径(米)
Rn = R/1000; %(km)
x_delta = 0;
y_delta = 0;
e = 0;
% stda = 0.01;
% 蜂窝系统各基站坐标
X1 = 0;
Y1 = 0;
X2 = R*(1+sqrt(3)/2);
Y2 = 0;
X3 = R*(sqrt(3)/2);
Y3 = R*(-3/2);
X4 = R*(-sqrt(3)/2);
Y4 = R*(-3/2);
X5 = R*(-1-(sqrt(3)/2));
Y5 = 0;
X6 = R*(-sqrt(3)/2);
Y6 = R*(3/2);
X7 = R*(sqrt(3)/2);
Y7 = R*(3/2);
% KM = XM^2 + YM^2
K1 = Ka(X1Y1);
K2 = Ka(X2Y2);
K3 = Ka(X3Y3);
K4 = Ka(X4Y4);
K5 = Ka(X5Y5);
K6 = Ka(X6Y6);
K7 = Ka(X7Y7);
% XM_1 = XM - X1;YM_1 = YM - X1
X2_1 = Xab(X2X1);
Y2_1 = Xab(Y2Y1);
X3_1 = Xab(X3X1);
Y3_1 = Xab(Y3Y1);
X4_1 = Xab(X4X1);
Y4_1 = Xab(Y4Y1);
X5_1 = Xab(X5X1);
Y5_1 = Xab(Y5Y1);
X6_1 = Xab(X6X1);
Y6_1 = Xab(Y6Y1);
X7_1 = Xab(X7X1);
Y7_1 = Xab(Y7Y1);
% 随机产生MS的位置(x,y)
u = rand(1);
y = (R/2)*(1-sqrt(u));
v = (sqrt(3)*((R/2)-y))*rand(1);
x = sqrt(3)*y + v;
% x = 300;
% y = 800;
% 计算MS到各基站的距离
R1 = distance(X1Y1xy);
R2 = distance(X2Y2xy);
R3 = distance(X3Y3xy);
R4 = distance(X4Y4xy);
R5 = distance(X5Y5xy);
R6 = distance(X6Y6xy);
R7 = distance(X7Y7xy);
num = 5;
PPP=1000;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Chan算法
for i = 1:num
sgma = i*30;
for ss = 1:PPP
% RM_1为带误差的距离差
R2_1 = Rab(R2R1) + gngauss(sgma);
T2_1(ss) = R2_1/C;
R3_1 = Rab(R3R1) + gngauss(sgma);
T3_1(ss) = R3_1/C;
R4_1 = Rab(R4R1) + gngauss(sgma);
T4_1(ss) = R4_1/C;
R5_1 = Rab(R5R1) + gngauss(sgma);
T5_1(ss) = R5_1/C;
R6_1 = Rab(R6R1) + gngauss(sgma);
T6_1(ss) = R6_1/C;
R7_1 = Rab(R7R1) + gngauss(sgma);
T7_1(ss) = R7_1/C;
end
% 各TDOA测量值的方差
T2_1_fangcha = var(T2_1);
T3_1_fangcha = var(T3_1);
T4_1_fangcha = var(T4_1);
T5_1_fangcha = var(T5_1);
T6_1_fangcha = var(T6_1);
T7_1_fangcha = var(T7_1);
for k = 1:PPP
% 假设MS到BSi的距离与MS到BS1的距离差为:R2_1=Ri-R1产生的
相关资源
- prony 算法
- 蚁群算法论文+源代码
- 基于粒子群算法的非合作博弈的matl
- 协同进化遗传算法求解函数优化问题
- pri传统分选算法
- 基于RSSI的VIRE定位算法
- 相关向量机的快速算法
- Gardner_for _MPSK(PSK的符号同步算法)
- 粒子群算法优化pid源码 matlab仿真.ra
- 系数绝对值最大 图像融合MATLAB算法
- 灰度共生矩阵特征值不错的算法
- MATLAB烟花算法源代码
- lvq学习算法源码matlab
- EMD 算法MATLAB 程序
- 增广拉格朗日法.zip
- 世上最牛的23个图像跟踪算法MATLAB程序
- matlab2007B数模乘公交看奥运_搜索法+
- Norden E.Huang的FEEMD算法
- 基于遗传算法的旅游全国的路径最优
- 密钥生成CQG量化
- 密钥生成CQ量化
- dijkstra算法改进的matlab程序能求出两点
- 基于OFDMA系统的多用户资源分配算法,
- 基于遗传算法的机器人路径规划matl
- 基于FPGA分布式算法FIR滤波器verilog代码
- 自动寻峰谷算法matlab实现
- AR模型算法的matlab实现和实验分析
- Dijkstra最短路径算法的Matlab实现
- 多种群遗传算法的函数优化算法(源
- 随机梯度下降算法的MATLAB实现
评论
共有 条评论