基于非线性最小二乘法 (NLLS) 实现伪距数据的 UAV 轨迹跟踪附matlab代码

该项目使用非线性最小二乘法分析来确定UAV轨迹,并通过匹配真实轨迹进行验证。同时,计算了包括几何DOP、位置DOP、水平DOP、垂直DOP和时间DOP在内的五种DOP值,这些值反映了GPS定位数据的精度。低DOP值意味着更好的定位测量。文章还涉及了GPS定位问题的解决方案,如通过增加卫星数量来提高定位准确性。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

✅作者简介:热爱科研的Matlab仿真开发者,修心和技术同步精进,matlab项目合作可私信。

🍎个人主页:Matlab科研工作室

🍊个人信条:格物致知。

更多Matlab仿真内容点击👇

智能优化算法       神经网络预测       雷达通信       无线传感器        电力系统

信号处理              图像处理               路径规划       元胞自动机        无人机 

⛄ 内容介绍

This project consists of two primary tasks. The first is to use non-linear least squares (NLLS) analysis to find a UAV trajectory given pseudorange data and validating this result by matching them to the true UAV trajectory (also given). The second is to calculate the dilution of precision (DOP) of the calculated UAV trajectory.

The DOP is a measure of the accuracy of any given GPS position data. Five different types of 1 DOPs will be calculated: Geometric DOP, Position DOP, Horizontal DOP, Vertical DOP and time DOP. They are a function of the variances in x,y,z,t (clock bias) components: Vx , Vy , Vz & Vt .Geometric DOP is the error due to the geometric orientation of the satellites in space. Position DOP is the error in the 3D position of the UAV. Horizontal DOP is the error in the horizontal position of the UAV while Vertical DOP is the error in the altitude of the UAV. Time DOP is the error due to the time accuracy.

The lower the DOP values, the better the instantaneous position measurement of the UAV. A good GDOP or PDOP is considered to be <5 while values >10 for PDOP are very poor. HDOP is expected to be between 2-3. VDOP is expected to be higher than HDOP as a result of all the satellites being above the receiver whereas for the horizontal coordinates, data is received from all sides of the UAV.

GPS Positioning Problem

Suppose a receiver is located on a flat 2D earth. Two GPS satellites can be used to pinpoint its location on earth, provided that if the range of the two satellites is represented by a circle there will be two intersections, of which only one will be located on earth. This is given no range error. Suppose there is a range error in GPS gps satellites, the intersection of the two range circles will now have shifted, resulting in an incorrect position estimation of the receiver on the earth.

This issue can be resolved by having a third GPS satellite resolve the location of the receiver. Provided that all GPS satellites have the same clock/range error, all three range circle will intersect at the receiver position. This can be used to calculate the clock bias, hence the range error. Similarly in 3D space, we need four satellites to pinpoint receiver location.

⛄ 部分代码

% Clear workspace, close all open figure & clear the command windowclear allclose all;clc;% Extract the data from the text file% Add other folders to pathaddpath('../data', '../lib/', '../lib/conversion');% Load constantsconstants();% Initialise Ground Station Position% Defining Sydney Ground Station Coordinateslat        = deg2rad(-34.76);long       = deg2rad(150.03);alt        = 680;pos_llh_gs = [lat;long;alt];% File Nameuav_data_fpath = 'UAVPosition_F1.txt';% Import pseudorange datapseudo_data = importdata('GPS_pseudorange_F1.txt');% Load ECEF position values of satellitesload ECEFPos%% Categorising time values% Vernal Equinox timeequinox_time = 7347737.336;% Store time datatimes     = pseudo_data(:,1) - equinox_time;% Obtain the unique time values% nTimes is an array containing the total number of occurences of single time% value% timeVal is an array containing all unique timevalues[total_occurences time_values] = hist(times(:),unique(times));% Cummulative Time Arraycummulative_times = cumsum(total_occurences);% Increment time values% timeVal = timeVal + 1;%% Observed UAV Positions% Obtain the polar coordinates of UAV w.r.t Ground Station[pos_UAV_Cart_obs,pos_UAV_Pol_Obs, pos_ECEF_gs, UAVVel, UAVPos] = UAVpolarCoor(time_values,...                                         cummulative_times, pseudo_data, ECEFPos, pos_llh_gs);%% Extract true UAV Position data from text files% % Obtain polar coordinates of true measurements[pos_UAV_Pol_True, pos_UAV_Cart_True] = extractUAVtrue(uav_data_fpath,equinox_time);%% Catalog the position of the satellites during UAV Tracking% Find satellite position w.r.t ground station[pos_Sat_Pol_Obs] = findSatPos(ECEFPos, pos_ECEF_gs, pos_llh_gs);%% Calculate the DOP for each time value% Calculate the best and worst satellite configurations according to DOP[bestSatConfig, worstSatConfig, DOP, maxDOPIndex, minDOPIndex] = findDOP(UAVVel, pos_Sat_Pol_Obs);%% Save relevant data as a structured array for plottingplotData.timeArray         = times;plotData.pos_UAV_Cart_obs  = pos_UAV_Cart_obs;plotData.pos_UAV_Pol_Obs   = pos_UAV_Pol_Obs;plotData.pos_ECEF_gs       = pos_ECEF_gs;plotData.UAVVel            = UAVVel;plotData.UAVPos            = UAVPos;plotData.pos_UAV_Pol_True  = pos_UAV_Pol_True;plotData.pos_UAV_Cart_True = pos_UAV_Cart_True;plotData.pos_Sat_Pol_Obs   = pos_Sat_Pol_Obs;plotData.bestSatConfig     = bestSatConfig;plotData.worstSatConfig    = worstSatConfig;plotData.DOP               = DOP;plotData.maxDOPIndex       = maxDOPIndex;plotData.minDOPIndex       = minDOPIndex;plotData.nTimes            = total_occurences;plotData.pseudo_data       = pseudo_data;plotData.cumArray          = cummulative_times;%% Plot graphsplotq1B(plotData)

⛄ 运行结果

⛄ 参考文献

[1] 强明辉,张京娥.基于MATLAB的递推最小二乘法辨识与仿真[J].自动化与仪器仪表, 2008(6):3.DOI:10.3969/j.issn.1001-9227.2008.06.002.

[2] 熊学亮,陈淑娟,汤万龙.应用最小二乘法实现新疆建筑气象参数数据拟合[J].数学学习与研究, 2016(20):2.DOI:CNKI:SUN:SXYG.0.2016-20-130.

[3] 王海鹏,赵莉,王殿生,等.基于MATLAB的均匀设计实验数据多元非线性最小二乘拟合[J].化学工程与装备, 2010(9):4.DOI:10.3969/j.issn.1003-0735.2010.09.011.​

⛳️ 代码获取关注我

❤️部分理论引用网络文献,若有侵权联系博主删除
❤️ 关注我领取海量matlab电子书和数学建模资料

🍅 仿真咨询

1.卷积神经网络(CNN)、LSTM、支持向量机(SVM)、最小二乘支持向量机(LSSVM)、极限学习机(ELM)、核极限学习机(KELM)、BP、RBF、宽度学习、DBN、RF、RBF、DELM实现风电预测、光伏预测、电池寿命预测、辐射源识别、交通流预测、负荷预测、股价预测、PM2.5浓度预测、电池健康状态预测、水体光学参数反演、NLOS信号识别、地铁停车精准预测、变压器故障诊断
2.图像识别、图像分割、图像检测、图像隐藏、图像配准、图像拼接、图像融合、图像增强、图像压缩感知
3.旅行商问题(TSP)、车辆路径问题(VRP、MVRP、CVRP、VRPTW等)、无人机三维路径规划、无人机协同、无人机编队、机器人路径规划、栅格地图路径规划、多式联运运输问题、车辆协同无人机路径规划
4.无人机路径规划、无人机控制、无人机编队、无人机协同、无人机任务分配
5.传感器部署优化、通信协议优化、路由优化、目标定位
6.信号识别、信号加密、信号去噪、信号增强、雷达信号处理、信号水印嵌入提取、肌电信号、脑电信号
7.生产调度、经济调度、装配线调度、充电优化、车间调度、发车优化、水库调度、三维装箱、物流选址、货位优化
8.微电网优化、无功优化、配电网重构、储能配置
9.元胞自动机交通流 人群疏散 病毒扩散 晶体生长

基于MATLAB的CDMA通信系统仿真-基于MATLAB的CDMA通信系统仿真.rar CDMA通信系统的MATLAB仿真 摘 要:在简要介绍MATLAB语言的基础上,对使用MATLAB语言仿真的CDMA通信系统进行描述。关键词:仿真;码分多址;扩频 1 仿真语言矩阵实验室(MATLAB:Matrix Laboratory)是一种以矩阵运算为基础的交互式的程序语言。与其它计算机语言相比,具有简洁和智能化程度高的特点,而且适应科技专业人员的思维方式和书写习惯,因而用其编程和调试,可以大大提高工作的效率。 目前MATLAB已经成为国际上最流行的软件之一,除了可提供传统的交互式的编程方法之外,还能提供丰富可靠的矩阵运算、图形绘制、数据处理、图像处理和方便的Windows编程工具等。因而出现了各种以MATLAB为基础的工具箱,应用于自动控制、图像信号处理、生物医学工程、语音处理、信号分析、时序分析与建模、优化设计等广泛的领域,表现出了一般高级语言难以比拟的优势。较为常见的MATLAB工具箱有:控制系统工具箱、系统辩识工具箱、多变量频率设计工具箱、分析与综合工具箱、神经网络工具箱、最优化工具箱、信号处理工具箱、模糊推理系统工具箱,以及通信工具箱等。在MATLAB通信工具箱中有SLMULINK仿真模块和MATLAB函数,形成一个运算函数和仿真模块的集合体,用来进行通信领域的研究、开发、系统设计和仿真。通信工具箱中的模块可供直接使用,并允许修改,使用起来十分方便,因而完全可以满足使用者设计和运算的需要。 MATLAB通信工具箱中的系统仿真,分为用SIMULINK模块框图进行仿真和用MATLAB函数进行的仿真两种。在用SIMULINK模块框图的仿真中,每个模块,在每个时间步长上执行一次,就是说,所有的模块在每个时间步长上同时执行。这种仿真被称为时间流的仿真。而在用MATLAB函数的仿真中,函数按照数据流的顺序依次执行,意味着所处理的数据,首先要经过一个运算阶段,然后再激活下一个阶段,这种仿真被称为数据流仿真。某些特定的应用会要求采用两种仿真方式中的一种,但无论是哪种,仿真的结果是相同的。 下面即对使用M-ATLAB语言仿真CDMA通信系统进行描述。 2 仿真框图 CDMA是指在各发送端使用不相同、相互(准)正交的地址码调制所传送的信息,而在接收端在利用码型的(准)正交性,通过相关检测,从混合信号中选出相应的信号的一种技术。实现CDMA的理论基础是扩频通信,即在发送端将待发送的数据随机码进行调制,实现频谱扩展,然后进行传输,而在接收端则采用同样的编码进行解扩及相关处理,恢复原始的数据信息。扩频通信有直接序列(DS)、跳频(FH)、线性调频(chirp)、跳时(TH)等方式。采用扩频通信的优点很多,如抗干扰、抗噪声、抗多径衰落的能力强,能在低功率谱密度下工作,保密性好,可多址复用和任意选址及进行高度测量等等。因此,扩频通信作为新型的通信技术,已引起人们的特别关注,得到了迅速的发展和广泛的应用。以美国Quacomm公司为首推出的IS-95CDMA移动通信系统,以W-CDMA、CDMA2000、TD-SCD-MA为主流的第三代移动通信系统的标准化建设等,不仅确立了CDMA系统在移动通信中的稳固地位,也把扩频CDMA系统的研究、应用和发展推向了新的阶段。 本文讨论的CDMA通信系统的仿真,采用的是直扩方式,信息调制采用的是DPSK调制方式,随机码采用的是31位GOLD序列,仿真框图如图1所示。 matlab_dsp.JPG 更多内容,请看件!
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

matlab科研助手

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值