基于Matlab模拟认知无线电中的能量检测

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

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

🍊个人信条:格物致知。

更多Matlab仿真内容点击👇

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

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

⛄ 内容介绍

该代码用于绘制简单能量检测的接收者操作特征曲线,当主信号为实高斯信号,噪声为 加性白实高斯。

⛄ 完整代码

clc

close all

clear all

L = 500;

snr_dB = -10; % SNR in decibels

snr = 10.^(snr_dB./10); % Linear Value of SNR

Pf = 0.01:0.01:1; % Pf = Probability of False Alarm

%% Simulation to plot Probability of Detection (Pd) vs. Probability of False Alarm (Pf) 

for m = 1:length(Pf)

    m

    i = 0;

for kk=1:10000 % Number of Monte Carlo Simulations

 n = randn(1,L); %AWGN noise with mean 0 and variance 1

 s = sqrt(snr).*randn(1,L); % Real valued Gaussina Primary User Signal 

 y = s + n; % Received signal at SU

 energy = abs(y).^2; % Energy of received signal over N samples

 energy_fin =(1/L).*sum(energy); % Test Statistic for the energy detection

 thresh(m) = (qfuncinv(Pf(m))./sqrt(L))+ 1; % Theoretical value of Threshold, refer, Sensing Throughput Tradeoff in Cognitive Radio, Y. C. Liang

 if(energy_fin >= thresh(m))  % Check whether the received energy is greater than threshold, if so, increment Pd (Probability of detection) counter by 1

     i = i+1;

 end

end

Pd(m) = i/kk; 

end

plot(Pf, Pd)

hold on

%% Theroretical ecpression of Probability of Detection; refer above reference.

thresh = (qfuncinv(Pf)./sqrt(L))+ 1;

Pd_the = qfunc(((thresh - (snr + 1)).*sqrt(L))./(sqrt(2).*(snr + 1)));

plot(Pf, Pd_the, 'r')

hold on

⛄ 运行结果

⛄ 参考文献

[1] 刘永姣. 认知无线电中基于能量检测的频谱感知技术研究[D]. 南开大学.

[2] 刘义贤, 季飞, 余华. 认知无线电网络中基于噪声功率估计的能量检测性能[J]. 电子与信息学报, 2011, 33(006):1487-1491.

[3] 张晓, 王金龙, 吴启晖. 认知无线电中一种基于循环谱的能量检测算法[J]. 电路与系统学报, 2010, 15(3):6.

[4] 胡富平. 基于能量检测的认知无线电协作频谱检测研究[D]. 华中科技大学.

❤️部分理论引用网络文献,若有侵权联系博主删除

❤️ 关注我领取海量matlab电子书和数学建模资料

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

matlab科研助手

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

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

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

打赏作者

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

抵扣说明:

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

余额充值