How do I create a matched filter for signal detection?

50 ビュー (過去 30 日間)
James
James 2011 年 4 月 7 日
コメント済み: Ted Shultz 2020 年 4 月 19 日
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
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..??

サインインしてコメントする。

採用された回答

Honglei Chen
Honglei Chen 2011 年 4 月 7 日
You can refer to the following thread:
http://www.mathworks.com/matlabcentral/answers/4502-matched-filter

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatched Filter and Ambiguity Function についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by