Matlab绘制信道响应三维图、二维图和包络面

前言

信道响应是关于时延tau和时间变量t的函数,其中:

  • 时延tau对应的是一个个抽头
  • 时间变量t是每一个抽头随时间变化的抽头系数

物理意义上,时延tau对应路径的数量,时间变量t对应多普勒效应。

参考论文:

F.-X. Socheleau, C. Laot, J.-M. Passerieux, “Stochastic Replay of non-WSSUS Underwater Acoustic Communication Channels Recorded at Sea”, IEEE Transactions on Signal Processing, vol. 59, No. 10, pp. 4838-4849, 2011.

开源代码:

https://drive.google.com/file/d/1njQQu2AtZdM6lrwqFyocBPdkcW6jb0-C/view?usp=sharing

获取信道矩阵

信道矩阵channel_demo.mat需要包含以下字段:

  • Ts1: sampling rate of h in time (t), 时域采样周期(单位:秒)
  • Ts2: sampling rate of h in delay (tau)
  • g_lk: channel taps,shape为(t, tau)

绘制信道响应三维图

clc
clear
close all

figure

load 'channel_demo.mat';

tau=[0:size(g_lk,1)-1]*Ts2;
t=[0:size(g_lk,2)-1]*Ts1;

mesh(tau*1E3,t,abs(g_lk).');
view(60,20);
axis([0 6 0 60 0 1]);
xlabel('\tau (ms)','fontsize',12);
xlabh = get(gca,'XLabel');
set(xlabh,'Position',get(xlabh,'Position') + [-1.8 0 0.25])
ylabel('t (s)','fontsize',12);
ylabh = get(gca,'YLabel');
set(ylabh,'Position',get(ylabh,'Position') + [1.8 0 0.25])
title('Original probed channel','fontsize',14,'fontweight','b');

在这里插入图片描述

绘制信道响应二维图

clc
close all
clear all


%% 加载信道响应矩阵
load 'NCS1_001.mat';

channelResponse = h;
tau=[0:size(channelResponse,1)-1]/fs_tau;
tau = tau*1e3;
t=[0:size(channelResponse,2)-1]/fs_t;

%% 计算功率响应
powerResponse = 10*log10(abs(channelResponse).^2);

%% 限幅
min_db = -60
max_db = -45
powerResponse(powerResponse<min_db) = min_db;
powerResponse(powerResponse>max_db) = max_db;


%% 绘制功率响应图
figure;
imagesc(tau, t, powerResponse);
xlabel('tau/ms');
ylabel('t/s');
colormap(gca,hot);
colorbar
title('信道功率响应图');

在这里插入图片描述

绘制包络面

clc
clear
close all

figure

load 'channel_demo.mat';

tau=[0:size(g_lk,1)-1]*Ts2;
t=[0:size(g_lk,2)-1]*Ts1;

plot(t,abs(sum(g_lk)));grid on;

xlabel('t (s)','fontsize',12);
axis([0 60 0 3]);
title('Envelope','fontsize',14,'fontweight','b');

在这里插入图片描述

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值