A list,

1 Filtering Filtering is the operation of filtering out the frequency of a specific band in the signal, which is an important measure to suppress and prevent interference. It is a probabilistic theory and method to estimate another stochastic process based on the result of observing one random process. Filtering is divided into classical filtering and modern filtering. Classical filtering: The concept of classical filtering is an engineering concept based on Fourier analysis and transformation. According to advanced mathematical theory, any signal that meets certain conditions can be regarded as a superposition of an infinite number of sine waves. In other words, the engineering signal is a linear superposition of sinusoids of different frequencies, which are called the frequency component or harmonic component of the signal. Filter: A circuit that allows the normal passage of a signal component within a certain frequency range and prevents the passage of another frequency component. It’s called a classical filter or filter circuit. In fact, every electronic system has its own band width (the limit of the maximum frequency of the signal), and the frequency characteristic reflects this basic characteristic of the electronic system. The filter is an engineering application circuit designed according to the influence of circuit parameters on the frequency band width. Modern filter uses analog electronic circuit to filter analog signal, its basic principle is to use the frequency characteristics of the circuit to realize the selection of frequency components in the signal. According to frequency filtering, the signal is regarded as an analog signal superimposed by sinusoidal waves of different frequencies, and the signal filtering is realized by selecting different frequency components. 1. When higher frequency components of the signal are allowed to pass through the filter, the filter is called a high-pass filter. 2. When lower frequency components of the signal are allowed to pass through the filter, the filter is called a low pass filter. 3. Set the cut-off frequency of low frequency band as FP1, and the cut-off frequency of high frequency band as FP2:1) The filter whose signal frequency between FP1 and FP2 can be attenuated by signals of other frequencies is called bandpass filter. 2) Conversely, a filter whose frequency is attenuated between FP1 and FP2 is called a band-stop filter. The behavior of an ideal filter is usually described by an amplitude-frequency characteristic diagram, also known as the amplitude-frequency characteristic of the filter circuit.

2 Fourier transform The Fourier transform is an integral transform, it’s a change from time to frequency. Fourier principle states that any continuous measured sequence or signal can be represented as an infinite superposition of sinusoidal signals of different frequencies. It can be said that the Fourier transform transforms the previously difficult time domain signal into a frequency signal (the spectrum of the signal) that is easy to analyze. The frequency of image is the indicator of the intensity of gray scale change in the image (the reflection and existence mode of knowledge in individual psychology), and it is the gradient of gray scale in plane space. In the image is a gray level change is very slow area, the corresponding frequency value is very low, and vice versa. In a purely mathematical sense, the Fourier transform is treated by converting a function into a series of periodic functions. In terms of physical effects, the Fourier transform transforms the image from the spatial domain to the frequency domain, and the inverse transform transforms the image from the frequency domain to the spatial domain. In other words, the physical meaning of Fourier transform is to transform the gray distribution function of the image into the frequency distribution function of the image, and the inverse Fourier transform is to transform the frequency distribution function of the image into the gray distribution function.

Properties of the Fourier transform

Nature of translation



1

2

Formula (1) shows that multiplying f(x,y) by an exponential is equivalent to moving the transformed center of the frequency domain to a new position

Formula (2) shows that multiplying F(u,v) with an exponential term is equivalent to moving its transformed spatial center to a new position

Formula (2) shows that the translation of f(x,y) does not affect the amplitude of its Fourier transform

Allocation rate











Ii. Source code

clear all
close
clc;
disp('Calculating the parameters of the reference template... ')
for i=1:10
fname=sprintf('%d0.mp3',i- 1);
[x,fs]=audioread(fname);
sound(x,fs);
  [x1 x2]=vad(x);
%   x1=abs(round(x1));
%   x2=abs(round(x2));
  m=mfcc(x);
  m=m(x12 -:x24 -, :); ref(i).mfcc=m;end

disp('Analyzing voice signals... ')
for i=1:10
fname=sprintf('%d0.mp3',i- 1);
%[x,fs,bit]=audioread(fname,[2000.2512]); % sampling % [x,fs]=audioread(fname,[2000.2512]); %sound(x,fs); % Voice signal figure(I); subplot(3.3.1);
plot(x(1:256)); % Time domain graph of the original speech signal % title('Raw signal')
subplot(3.3.2) [h,w]=freqz(x,fs); % Frequency response graph of the original speech signal hr=abs(h); % The system amplitude-frequency response plot(w,hr); title('amplitude frequency diagram');
xlabel('Frequency in rad mple')
ylabel('Magnitude in dB')
subplot(3.3.3) hphase=angle(h); hphase=unwrap(hphase); % Calculate the system phase frequency response plot(w,hphase); title('Phase frequency diagram');
xlabel('Frequency in rad mple')
ylabel('Phase in degrees')
y=fft(x,512); % Fourier transform % mag=abs(y);
mag1=10*log10(mag);
f=fs*(0:255) /512;
subplot(3.3.4)
plot(f,mag(1:256)); %FFT spectrum map % title('FFT signal after transformation')
iff=ifft(y,512); % Inverse Fourier transform % ifm=abs(iff);
subplot(3.3.5)
plot(f,ifm(1:256))
title('Signal after IFFT') % STFT Ts=1/fs;
%N=T/Ts;
N=512;
Nw=20; % window function length L=Nw/2; % The window function moves Tn=(n-NW)/L+1; % Calculate how many segments to divide data x into NFFT =32; %FFT length Tn=round(Tn); TF=zeros(Tn,nfft); % will store 3d spectrogram, first clear zerofor i=1:Tn
    xw=x((i- 1) *10+1:i*10+10); % Temp = FFT (xw, NFFT); FFT transform % temp = fftshift (temp); % spectrum to0Frequency as the centerfor j=1:nfft TF(i,j)=temp(j); Save the spectra in TFend
end
subplot(3.3.6)
fnew= ((1:nfft)-nfft/2)*fs/nfft;
tnew=(1:Tn)*L*Ts;
[F,T]=meshgrid(fnew,tnew);
mesh(F,T,abs(TF))
title('Short-time Fourier transform time-frequency diagram')
subplot(3.3.7)
contour(F,T,abs(TF))
title('Contour represents')
end
function cost=testdtw(t,r)
[r1,c1]=size(t);
[r2,c2]=size(r);
distance=zeros(r1,r2);
for n=1:r1
    for m=1:r2
        tr=(t(n,:)-r(m,:)).^2;
        distance(n,m)=sqrt(sum(tr)/c1);
        %distance(n,m)=sqrt(sum(tr)/c1);
    end
end
D=zeros(r1,1);
function f=enframe(x,win,inc)
nx=length(x(:));
nwin=length(win);
if (nwin == 1)
   len = win;
else
   len = nwin;
end
if (nargin < 3)
   inc = len;
end
function cost=Idtw(t,r)
[r1,c1]=size(t);
[r2,c2]=size(r);
distance=zeros(r1,r2);
for n=1:r1
    for m=1:r2
        tr=(t(n,:)-r(m,:)).^2;
        distance(n,m)=sqrt(sum(tr)/c1);
        %distance(n,m)=sqrt(sum(tr)/c1);
    end
end
Copy the code

3. Operation results



















Fourth, note

Version: 2014 a