A list,

Matched filter is a very important filter, widely used in communication, radar and other systems. The mathematical formula for the derivation of matched filters looks very responsible, and is detailed in many textbooks such as communication systems, radar systems, and stochastic signal processing. At the beginning, along the derivation process, basically can also be derived, but there is no understanding of its inherent meaning, can be said to be completely submerged in the sea of formula derivation. Teacher Zhang Zhizhong can be said to be one of the pioneers of new China’s radar business. As far as the current reading range is concerned, Mr. Zhang explained the matched filter most thoroughly in his early book “Radar Signal Selection and Processing”. As an aside, the book, published in 1979, is full of philosophical speculation, which makes people read with lingering fragrance and gives us a full appreciation of the broad and profound academic literacy of the older generation of scientists. The so-called optimal filter is in fact the optimal under a certain criterion. The optimal criterion corresponding to the matching filter is maximum output signal to noise ratio (SNR). And the other prerequisite is in the background of white noise. In many places, the result is that the expression for the matched filter is H(f)=S*(f), that is, the frequency response of the matched filter is the conjugate of the frequency response of the input signal. Again, this looks pretty simple, but how do you physically understand a matched filter? On the one hand, the amplitude-frequency characteristics of the matched filter are exactly the same as those of the input signal. That is to say, the stronger the signal is at the frequency point, the greater the amplification of the filter is; The weaker the signal at the frequency point, the smaller the filter’s magnification. This is the Matthew effect in signal processing. In other words, the matching filter is to let the signal through as much as possible, regardless of the characteristics of the noise. Because one premise of matching filter is white noise, that is, the power spectrum of noise is flat, the same at each frequency point. So, in this case, letting the signal through as much as possible actually implies minimizing the noise. Isn’t that what maximizes the SNR of the output? On the other hand, the phase-frequency characteristic of matched filter is completely opposite to that of input signal. In this way, after matching the filter, the phase of the signal is 0, which is just able to achieve the coherent superposition of the signal in the time domain. However, the phase of noise is random and only incoherent superposition can be achieved. This ensures the maximum output SNR in time domain. In fact, in the amplitude-frequency characteristic and phase frequency characteristic of signal and system, amplitude-frequency characteristic represents frequency characteristic more, while phase frequency characteristic represents time characteristic more. The matched filter, whether in the time domain or in the frequency domain, can fully ensure that the signal passes through as much as possible, and the noise passes through as little as possible, so that the maximum SNR output can be obtained. In fact, the distinctive feature of the matched filter, as its name suggests, is that it matches the input signal. Once the input signal changes, the original matched filter can no longer be called matched filter. From this, we can easily think of the concept of correlation, the physical meaning of correlation is to compare the similarity of two signals. If two signals are exactly the same, isn’t that a match? In fact, another name for a matching filter is correlation reception, and they represent exactly the same thing. However, the matching filter focuses on the expression in the frequency domain, while the correlation receiver focuses on the expression in the time domain.

Ii. Source code

function c=melcepst(s,fs,w,nc,p,n,inc,fl,fh)
%MELCEPST Calculate the mel cepstrum of a signal C=(S,FS,W,NC,P,N,INC,FL,FH)
%
%
% Simple use: c=melcepst(s,fs)	% calculate mel cepstrum with 12 coefs, 256 sample frames
%				  c=melcepst(s,fs,'e0dD') % include log energy, 0th cepstral coef, delta and delta-delta coefs
%
% Inputs:
%     s	 speech signal
%     fs  sample rate in Hz (default 11025)
%     nc  number of cepstral coefficients excluding 0 'th coefficient (default 12)
%     n   length of frame (default power of 2 <30 ms))
%     p   number of filters in filterbank (default floor(3*log(fs)) )
%     inc frame increment (default n/2)
%     fl  low end of the lowest filter as a fraction of fs (default = 0)
%     fh  high end of highest filter as a fraction of fs (default = 0.5)
%
%		w   any sensible combination of the following:
%
%				'R'  rectangular window in time domain
%				'N'	Hanning window in time domain
%				'M'	Hamming window in time domain (default)
%
%		      't'  triangular shaped filters in mel domain (default)
%		      'n'  hanning shaped filters in mel domain
%		      'm'  hamming shaped filters in mel domain
%
%				'p'	filters act in the power domain
%				'a'	filters act in the absolute magnitude domain (default)
%
%			   '0'  include 0 'th order cepstral coefficient
%				'e'  include log energy
%				'd'	include delta coefficients (dc/dt)
%				'D'	include delta-delta coefficients (d^2c/dt^2)
%
%		      'z'  highest and lowest filters taper down to zero (default)
%		      'y'  lowest filter remains at 1 down to 0 frequency and
%			   	  highest filter remains at 1 up to nyquist freqency
%
%		       If 'ty' or 'ny' is specified, the total power in the fft is preserved.
%
% Outputs:	c     mel cepstrum output: one frame per row
%


%      Copyright (C) Mike Brookes 1997
%
%      Last modified Thu Jun 15 09:14:48 2000
%
%   VOICEBOX is a MATLAB toolbox for speech processing. Home page is at
%   http://www.ee.ic.ac.uk/hp/staff/dmb/voicebox/voicebox.html
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   This program is free software; you can redistribute it and/or modify
%   it under the terms of the GNU General Public License as published by
%   the Free Software Foundation; either version 2 of the License, or
%   (at your option) any later version.
%
%   This program is distributed in the hope that it will be useful,
%   but WITHOUT ANY WARRANTY; without even the implied warranty of
%   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%   GNU General Public License for more details.
%
%   You can obtain a copy of the GNU General Public License from
%   ftp:/ / prep.ai.mit.edu/pub/gnu/COPYING-2.0 or by writing to
%   Free Software Foundation, Inc.,675 Mass Ave, Cambridge, MA 02139, USA.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

if nargin<2 fs=11025; end
if nargin<3 w='M'; end
if nargin<4 nc=12; end
if nargin<5 p=floor(3*log(fs)); end
if nargin<6 n=pow2(floor(log2(0.03*fs))); end
if nargin<9
   fh=0.5;   
   if nargin<8
     fl=0;
     if nargin<7
        inc=floor(n/2);
     end
  end
end

if any(w=='R')
   z=enframe(s,n,inc);
elseif any (w=='N')
   z=enframe(s,hanning(n),inc);
else
   z=enframe(s,hamming(n),inc);
end
f=rfft(z. ');
[m,a,b]=melbankm(p,n,fs,fl,fh,w);
pw=f(a:b,:).*conj(f(a:b,:));
pth=max(pw(:))*1E-6;
if any(w=='p')
   y=log(max(m*pw,pth));
else
   ath=sqrt(pth);
   y=log(max(m*abs(f(a:b,:)),ath));
end
c=rdct(y). ';
nf=size(c,1);
nc=nc+1;
if p>nc
   c(:,nc+1:end)= []; elseif p<nc c=[c zeros(nf,nc-p)]; endif ~any(w=='0')
   c(:,1) = [];end
if any(w=='e')
   c= [log(sum(pw)). ' c];
end
Copy the code

3. Operation results





Fourth, note

Version: 2014 a