电平交叉速率 (LCR)和平均淡入淡出持续时间(AFD)(Matlab代码实现)

 👨‍🎓个人主页:研学社的博客     

💥💥💞💞欢迎来到本博客❤️❤️💥💥

🏆博主优势:🌞🌞🌞博客内容尽量做到思维缜密,逻辑清晰,为了方便读者。

⛳️座右铭:行百里者,半于九十。

📋📋📋本文目录如下:🎁🎁🎁

目录

💥1 概述

📚2 运行结果

🎉3 参考文献

🌈4 Matlab代码实现


💥1 概述

电平交叉 率 最 早 是 由 Lee[9 推 导 出 来 的 其定量描述 了 移 动 信 道 衰 落 速 率 与 衰 落 深 度 的 关系. 对于 个给定的信号电平 其电平交叉率为:

 

 电平交叉速率(LCR)和平均淡入淡出持续时间(AFD)是描述通道如何随时间变化的两个统计数据。虽然LCR和AFD提供与通道相干时间和多普勒扩频相同的信息,但它们更容易推导并允许实际测量。

📚2 运行结果

 

 

 

 

 

 

 

 

 

部分代码:

%  AutoCorrelation 
hv=subs(h_f,f,fr);                         % filter gain for each frequency
hv_double=double(hv);                      % convert gains into double 
Autocorr=xcorr(hv_double);                 % Autocorrelation
Autocorr=real(Autocorr*(1/max(Autocorr)));  % normalize AutoCorr
%% choose the values from AutoCorrelation to plot
L=ceil(length(Autocorr)/4);           
AutocorrPlot=Autocorr(L:end-L+1);  % remove the first and fourth quarters
plot(fr/fd,AutocorrPlot)           % Plot AutoCorrelation with rexpect to f/fd
title('Third Order Filter (fd=100Hz, w0=2*pi*fd/1.2 , zeta=0.175)')
xlabel('f/fd')
ylabel('AutoCorrelation')
xlim([-5 5])
grid on
[pks,locs] = findpeaks(AutocorrPlot);  % find peak values and their locations
hold on
scatter(fr(locs)./fd,AutocorrPlot(locs),'filled','blue')
stem(fr(locs)./fd,AutocorrPlot(locs),':r','linewidth',2)

%% plot autcorrelation at positive side
L2=ceil(length(AutocorrPlot)/2);            
AutocorrPlot_P=AutocorrPlot(L2:end);        % Positive side of autocorr.
fr_P=fr(L2:end);                            % Positive frequencies
figure
plot(fr_P/fd,AutocorrPlot_P)
title('Third Order Filter (fd=100Hz, w0=2*pi*fd/1.2 , zeta=0.175)')
xlabel('f/fd (positive frequencies)')
ylabel('AutoCorrelation at Positive frequencies')
xlim([0 5])
grid on

%% using autocorrelatio function
figure
autocorr(hv_double,length(hv_double)-1);
% PSD 
a=abs((hv_double).^2);
figure
plot(fr/fd,a)
xlim([-2 2])
title('Third Order Filter (fd=100Hz, w0=2*pi*fd/1.2 , zeta=0.175)')
xlabel('fr/fd')
grid on
ylabel('PSD')
[pks,locs] = findpeaks(a);
% max_pks_L=locs(find(max(pks)));
hold on
scatter(fr(locs)/fd,a(locs),'filled','r')
stem(fr(locs)/fd,a(locs),'filled','.-.r','linewidth',1.5)
plot([-2 2],[max(a) max(a)],'.-.green','linewidth',1.5)


%% Impulse response of Digital Filter (channel)
[numZ denZ ts]=tfdata(tf_z,'v');
figure
[h,n] = impz(numZ,denZ);
%% find n0 : at this point h(n) become negligible
[pks,locs] = findpeaks(h);
nv=0.01;                  % negligible value  as a percentage of maximum value
b=find(pks>=(nv*max(pks)));
peak_no=min(pks(b));
n0=max(locs(b));
%% plot impulse response
subplot(2,1,1)
plot(n.*ts,h)
xlabel('time [sec]')
title('Impulse response of channel "3rd order filter" using plot')
grid
hold on
scatter(n0.*ts,peak_no,'filled','r')
subplot(2,1,2)
stem(n,h)
xlabel('n [samples]')
title('Impulse response of channel "3rd order filter using stem"')
grid
hold on
scatter(n0,peak_no,'filled','r')

%% normalizing the filter H(Z)
 numZ_N=numZ./sqrt(sum(h.^2));      % normalize numerator of H(z)
 tf_Z_N=tf(numZ_N,denZ,ts);

%% Generating an input signal with unit power => (power_db = 0)
% Ip is vector (n0 ,1) , simulation time:T=0.1 sec
IP_no=(1/(sqrt(2))).*(randn(1,n0)+(1j*randn(1,n0)));
IP_T=(1/(sqrt(2))).*(randn(1,length(t))+(1j*randn(1,length(t))));
IP=[IP_no IP_T];                      % first n0 bits for transient response
% Output from filter
Y=filter(numZ_N,denZ,IP);              % output from filter
Y_T=Y(n0+1:end);                       % output after removing transients
% Output in DB
 Y_T_db=20.*log10(abs(Y_T));        % output when length of input=T  in dB
% root mean square value of input signals
rms_Y_T=rms(abs(Y_T));                  % rms of output length = T
rms_Y_T_db=20.*log10(abs(rms_Y_T));     % rms of output length = T in dB
ten_dB_below=rms_Y_T_db-10;
%% plotting output from filters

🎉3 参考文献

部分理论来源于网络,如有侵权请联系删除。

[1]黄敏,李兵兵,贾琼,曾海.基于电平交叉率的多普勒频移估计方法[J].华中科技大学学报(自然科学版),2012,40(03):18-21.DOI:10.13245/j.hust.2012.03.010.

🌈4 Matlab代码实现

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

荔枝科研社

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

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

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

打赏作者

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

抵扣说明:

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

余额充值