How do I create a matched filter for signal detection?
47 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaire
Yateesh
le 12 Avr 2011
when i am running the above code in my matlab..its saying "the specified module could not be found".. what can be the problem..??
Réponse acceptée
Honglei Chen
le 7 Avr 2011
You can refer to the following thread:
http://www.mathworks.com/matlabcentral/answers/4502-matched-filter
1 commentaire
Ted Shultz
le 19 Avr 2020
hyperlinked version of above answer: http://www.mathworks.com/matlabcentral/answers/4502-matched-filter
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Matched Filter and Ambiguity Function dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!