水下声呐定位声线跟踪算法

声波传播速度是海洋中最重要的声学参数,它是影响声波在海洋中传播的最基本的物理量参数。有关测量研究表明,水中声速是温度、盐度和静压力的函数,声速随着温度、盐度和压力的增加而增加。海洋的不均匀性和多变性强烈地影响着海洋中的声传播,海水中的声速变化也体现出随着空间和时间变化的复杂性。
多波束测深的本质是测量不同方向上声波传播的时间,利用声波在水中的传播速度,进而计算声波在水中传播的水平距离和深度。在多波束测深声呐一次测量过程中,一个覆盖扇面内存在多个波束对于非垂直入射的波束,即使其入射角度不变,在不同声速环境下的传播轨迹将完全不同。因此水中声速分布情况将对多波束测深结果产生根本的影响,准确获取水中的声速是多波束测量的基础。
声速对多波束测深结果的影响过程是一个综合的复杂过程,主要体现在两个方面一是表层声速对测深结果的影响二是声速剖面对测深结果的影响,且二者是相互影响的。因此,在多波束测深声呐中,即使准确测量了波束方向和传播时间,如果不能根据实际声速分布结构计算测深结果,也将带来较大的测深误差,使测量结果偏离真实地形,从而带来测深假象。由声速引起的测深假象不给予正确的消除,将使测量结果不可用。

一般而言,声速在水平方向上的变化较小,因此可以假设声速只随着深度的变化而变化,而在水平面方向上不变即声速c为深度z的函数c(z),称之为海水中声速的垂直分层模型。声速的垂直分层模型是对实际海洋中声速结构的一种近似理想模型,是解决除远程声速传播问题的基本假设。在分层介质模型中,声速沿垂直深度的分布称为声速剖面,声速剖面一般比较复杂且随着海水介质改变。
————————————————

Matlab仿真分析
下面给出的是基于分层常梯度模型的声线追踪:
function [cos_alfa1,t1, x1, z1] = Sound_Ray_Tracing_core(cos_alfa0,c0,c1,z,t,over_flag)
% **************** 基于射线声学的恒定声速梯度的声线追踪计算核心 *********************
% **************** 输入参数
% *** cos_alfa0 入射掠射角余弦
% *** c0 入射声速(超出时为上一层的入射声速)
% *** c1 射出声速(超出时为上一层的射出声速)
% *** z 层厚(超出时为上一层的厚度)
% *** t 总传播时间
% *** over_flag 表示数据超出声速剖面给出的范围
% **************** 输出参数
% *** cos_alfa1 射出掠射角余弦
% *** t1 实际的传播时间增量
% *** x1 实际的水平传播距离增量
% *** z1 实际的垂直传播距离增量
% *********** 最后更新 20180611
% *** 更新内容:首次编写

%%

if over_flag == 0 %表示没有超出给定的范围
a = (c1 - c0)/z/c0; %求声速梯度 注意正负号区分
if a ~= 0 %声速梯度不等于0的时候
alfa0 = acos(cos_alfa0); %求入射掠射角
cos_alfa1 = cos_alfa0/c0c1; %求射出掠射角余弦
alfa1 = acos(cos_alfa1); %求射出掠射角
sin_alfa0 = sin(alfa0); %求入射掠射角正弦
sin_alfa1 = sin(alfa1); %求出射掠射角正弦
x_max = z/tan((alfa0+alfa1)/2); %求声线最大可能的水平距离增量
t_max = (log((1+sin_alfa0)/(1-sin_alfa0)) - log((1+sin_alfa1)/(1-sin_alfa1)))/(2
ac0); %求最大可能的传播时间增量
t_max = abs(t_max); %保证为正数
if t_max > t %说明声线到达终点了
t1 = t; %返回实际的时间增量
A = log((1+sin_alfa0)/(1-sin_alfa0)) - 2
ac0t;
sin_alfa2 = (exp(A) - 1)/(exp(A) + 1); %重新求到达掠射角正弦
alfa2 = asin(sin_alfa2); %求实际的到达掠射角
cos_alfa2 = cos(alfa2); %重新求到达掠射角余弦
cos_alfa1 = cos_alfa2;
c2 = cos_alfa2/cos_alfa0c0; %求实际到达点的声速
z1 = (c2/c0 - 1)/a; %求实际达到点的深度增量
x1 = z1/tan((alfa0+alfa2)/2); %求实际达到点的水平距离增量
else %声线还没有到达终点
t1 = t_max; %返回实际的时间增量
x1 = x_max; %返回实际的水平距离增量
z1 = z; %返回实际的深度增量
end
else %声速梯度等于0的时候 为常声速层
cos_alfa1 = cos_alfa0;
alfa0 = acos(cos_alfa0); %求入射掠射角
sin_alfa0 = sin(alfa0); %求入射掠射角正弦
t1 = z/sin_alfa0/c0; %返回实际的时间增量
x1 = z/sin_alfa0
cos_alfa0; %返回实际的水平距离增量
z1 = z; %返回实际的深度增量
end
else
a = (c1 - c0)/z/c0; %求声速梯度 注意正负号区分
alfa0 = acos(cos_alfa0); %求入射掠射角
sin_alfa0 = sin(alfa0); %求入射掠射角正弦
t1 = t; %返回实际的时间增量
A = log((1+sin_alfa0)/(1-sin_alfa0)) - 2ac0t;
sin_alfa2 = (exp(A) - 1)/(exp(A) + 1); %重新求到达掠射角正弦
alfa2 = asin(sin_alfa2); %求实际的到达掠射角
cos_alfa2 = cos(alfa2); %重新求到达掠射角余弦
cos_alfa1 = cos_alfa2;
c2 = cos_alfa2/cos_alfa0
c0; %求实际到达点的声速
z1 = (c2/c0 - 1)/a; %求实际达到点的深度增量
x1 = z1/tan((alfa0+alfa2)/2); %求实际达到点的水平距离增量
end
function [xx,zz,tracing_time] = Sound_Ray_Tracing(field_angle, Echo_time, z_s, Sound_velocity_profile)
% **************** 基于射线声学的恒定声速梯度的声线追踪计算 *********************
% ********* 输入参数
% ****** field_angle 波束角
% ****** Echo_time 回波总时间
% ****** z_s 开始追踪的深度
% ****** Sound_velocity_profile 声速剖面
% ********* 输出参数
% ****** xx 水平距离累计
% ****** zz 深度累计
% ****** tracing_time 各段总时间累计

data_points = size(Sound_velocity_profile,1); %得到声速剖面的数据点数

%%

Grazing_angle0 = pi/2 - abs(field_angle); %初始化掠射角

for k = 1:data_points
if Sound_velocity_profile(k,1) > z_s %当分层深度首次大于z_s时
break;
end
end

if k == 1 %如果初始深度小于声速剖面的最小值 向上外推声速剖面值
x0 = Sound_velocity_profile(1,1);
x1 = Sound_velocity_profile(2,1);
y0 = Sound_velocity_profile(1,2);
y1 = Sound_velocity_profile(2,2);
c_temp = y0 - (y1 - y0)/(x1 - x0)(x0 - z_s);
depth = [z_s; Sound_velocity_profile(:,1)]; %初始化深度
Sound_velocity = [c_temp; Sound_velocity_profile(:,2)]; %初始化声速
else
x0 = Sound_velocity_profile(k-1,1);
x1 = Sound_velocity_profile(k,1);
y0 = Sound_velocity_profile(k-1,2);
y1 = Sound_velocity_profile(k,2);
c_temp = y1 - (y1 - y0)/(x1 - x0)
(x1 - z_s);
depth = [z_s; Sound_velocity_profile(k:end,1)]; %初始化深度
Sound_velocity = [c_temp; Sound_velocity_profile(k:end,2)]; %初始化声速
end

data_points1 = length(depth);

for i = 1:data_points1 - 1
if i == 1 %第一层
cos_alfa0 = cos(Grazing_angle0); %初始化入射掠射角余弦
c0 = Sound_velocity(i); %初始化当前层入射处的声速
c1 = Sound_velocity(i+1); %初始化当前层射出处的声速
z = depth(i+1) - depth(i); %初始化当前层厚度
t = Echo_time/2; %初始化总时间
[cos_alfa1,t1, x1, z1] = Sound_Ray_Tracing_core(cos_alfa0,c0,c1,z,t,0);
tracing_time(i) = t12; %得到该层总传播时间
xx(i) = x1; %得到累计水平距离
zz(i) = z_s + z1; %得到累计深度距离
else
cos_alfa0 = cos_alfa1;
c0 = Sound_velocity(i); %初始化当前层入射处的声速
c1 = Sound_velocity(i+1); %初始化当前层射出处的声速
z = depth(i+1) - depth(i); %初始化当前层厚度
t = Echo_time/2 - tracing_time(i-1)/2; %初始化剩余总时间
[cos_alfa1,t1, x1, z1] = Sound_Ray_Tracing_core(cos_alfa0,c0,c1,z,t,0);
tracing_time(i) = tracing_time(i-1) + t1
2; %得到截止到目前层的总传播时间
xx(i) = xx(i-1) + x1; %得到累计水平距离
zz(i) = zz(i-1) + z1; %得到累计深度距离
end
if tracing_time(i) >= Echo_time %如果追踪总时间大于等于需要追踪的总时间 则跳出循环
break;
end
end

if tracing_time(i) < Echo_time %还没有到达最终的追踪时间
i = data_points;
cos_alfa0 = cos_alfa1;
c0 = Sound_velocity(i-1); %初始化当前层入射处的声速
c1 = Sound_velocity(i);
z = depth(i) - depth(i-1); %初始化当前层厚度
t = Echo_time/2 - tracing_time(i-1)/2; %初始化剩余总时间
[cos_alfa1,t1, x1, z1] = Sound_Ray_Tracing_core(cos_alfa0,c0,c1,z,t,1);
tracing_time(i) = tracing_time(i-1) + t1*2; %得到截止到目前层的总传播时间
xx(i) = xx(i) + x1; %得到累计水平距离
zz(i) = zz(i) + z1; %得到累计深度距离
end

tracing_time = [0, tracing_time];
xx = [0,xx];
zz = [z_s ,zz];

if field_angle < 0
xx = - xx; %水平累计坐标为负值
end
clc;
close all;
clear all;
%%

data_points = 50;
depth_down = (1:data_points)/data_points100;
depth_down = depth_down’;
Sound_velocity_down = 1480 - 1
depth_down;

Sound_velocity_profile = [depth_down,Sound_velocity_down]; %获取声速剖面

figure;
plot(depth_down, Sound_velocity_down,’*-’);
grid on;
xlabel(‘深度m’);
ylabel(‘声速m/s’);
title(‘深度VS声速’);

%%
c = Sound_velocity_down(1); %表面声速
field_angle = 85/180pi; %初始入射角
Echo_time = 2
30/cos(field_angle)/c; %需要追踪的总时间
z_s = 0.7; %开始追踪的深度


[xx,zz,tracing_time] = Sound_Ray_Tracing(field_angle, Echo_time, z_s, Sound_velocity_profile);
[horizontal_dis,depth,time_total,total_dis] = acustic_speed_fix(field_angle, Echo_time, z_s, Sound_velocity_profile);

depth1 = tracing_timec/2cos(field_angle) + z_s;
horizontal_dis1 = tracing_timec/2sin(field_angle);
figure;
plot(horizontal_dis1,-depth1,’*-’);
hold on;
grid on;
plot(xx,-zz,'r-’);
legend(‘按表面恒定声速计算的声线’,‘按水平分层恒定声速梯度模型计算的追踪声线’);
xlabel(‘水平距离m’);
ylabel(‘深度m’);
string = [‘初始入射角’,num2str(field_angle/pi
180),‘°’];
title(string);

  • 2
    点赞
  • 30
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值