基于MATLAB的CFAR检测仿真,得到平均CFAR检测。
完整程序:
clc;
clear;
close all;
warning off;
addpath(genpath(pwd));
cfar = phased.CFARDetector('NumTrainingCells',200,'NumGuardCells',50,'Method','CA');
% Expected probability of False Alarm (no units)
pfa_expected = 1e-2;
% Setting parameters for CFAR Detector object
cfar.ThresholdFactor = 'Auto';
cfar.ProbabilityFalseAlarm = pfa_expected;
% Assume 10dB SNR ratio
npower = db2pow(-10);
% Total number of points
Total_points = 1e3;
%Number of trials done
Num_of_Trials = 1;
% Total cells in window
Num_of_Cells = 251;
% Index of Cell Under test
Cut_Id = 126;
% To obtain the detection threshold
cfar.ThresholdOutputPort = true;
% Seed to generate random number
rs = RandStream('mt19937ar','Seed',2010);
%Modeling Received Signal
rsamp = randn(rs,Total_points,1)+1i*randn(rs,Total_points,1);
Rx_Signal = linspace(1,10,Total_points)';
Rx_sld = abs(sqrt(npower*Rx_Signal./2).*rsamp).^2;文章来源:https://www.toymoban.com/news/detail-505368.html
% Applying CFAR funtion to get thresholds
[x_detected,th] = cfar(Rx_sld,1:length(Rx_sld));
plot(1:length(Rx_sld),Rx_sld,1:length(Rx_sld),th,find(x_detected),Rx_sld(x_detected),'o')
legend('Signal','Threshold','Detections','Location','northwest')
title('Cell Averaging CFAR Detection ')
xlabel('Time Index')
ylabel('Threshold')文章来源地址https://www.toymoban.com/news/detail-505368.html
到了这里,关于基于MATLAB的CFAR检测仿真程序分享的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!