How do I create a matched filter for signal detection?
이전 댓글 표시
Hello, I am doing a project and I need to compare the accuracy of signal detection using cross correlation and a matched filter. I have pulse train with added noise, I have managed to use the xcorr function to correlate my signal with the oulse train and I get a good result! However I am struggling to create a Matched filter algorithm. My cross correlation code is below. Any help will be greatly appreciated. Thank you.
fs = 1.5e6;%sample rate of 1,500,000
twin=0: (1/150)/fs: 0.01e-3;
tpulse = ([1:150]-1)*(1/fs);
fc =130e3;%centre frequency of 130kHz
w = 2*pi*fc;%omega
y = real(exp([-1i*w*tpulse]));%sin wave
a = hann(150);%hanning window to give it click profile
y2 = y.*a';
Nclick=10 %number of clicks;
start=((1:Nclick)*100e-6)/(1/fs); % defines a vector of start positions
y3=zeros(1,length(twin));
for ii=1:length(start);
y3(start(ii):start(ii)+length(y2)-1)=y2;
end;
SNR=0.2; % signal to noise 20%
noise=rand(1,length(y3));
y4=y3+noise;
c = xcorr2(y4,y2);
Also does the SNR value I've assigned have any effect on my signal?
댓글 수: 1
Yateesh
2011년 4월 12일
when i am running the above code in my matlab..its saying "the specified module could not be found".. what can be the problem..??
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Matched Filter and Ambiguity Function에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!