[Sound source localization] Comparison of sound source localization algorithms based on matlab different spatial spectrum estimation [including Matlab source code 545]

1. Introduction

MUSIC algorithm is a method based on matrix feature space decomposition. From a geometric point of view, the observation space of signal processing can be decomposed into a signal subspace and a noise subspace. Obviously, these two spaces are orthogonal. The signal subspace is composed of eigenvectors corresponding to the signal in the data covariance matrix received by the array, and the noise subspace is composed of eigenvectors corresponding to all the smallest eigenvalues ​​(noise variance) in the covariance matrix.
1 Algorithm principle The
MUSIC algorithm is an important cornerstone of the spatial spectrum estimation direction finding theory. as follows:

(1) Regardless of the shape of the direction-finding antenna array, and regardless of the dimensionality of the incident angle of the incoming wave, assuming that the array is composed of M elements, the matrix form of the array output model can be expressed as: Y(t)=AX (t)+N(t)

Among them, Y is the observed complex vector of array output data; X is the unknown spatial signal complex vector; N is the additive noise in the array output vector; A is the direction matrix of the array; here, the expression of A matrix is ​​determined by the atlas Said.

The processing task of the MUSIC algorithm is to try to estimate the number D of the spatial signal incident on the array, the intensity of the spatial signal source and the direction of the incoming wave.

(2) In actual processing, the data obtained by Y is a limited number of samples (also called snapshots or snapshots) within a limited time period. During this time, it is assumed that the direction of the incoming wave does not change and the noise is the same as the signal Uncorrelated white noise defines the second moment of the array output signal: Ry.

(3) The core of the MUSIC algorithm is to perform eigenvalue decomposition on Ry, and use eigenvectors to construct two orthogonal subspaces, namely the signal subspace and the noise subspace. The characteristic decomposition of Ry is to make the formula in the atlas hold true.

(4) U is a non-negative definite Hermitian matrix, so the eigenvalues ​​obtained by eigendecomposition are all non-negative real numbers, with D large eigenvalues ​​and MD small eigenvalues, composed of eigenvectors corresponding to the large eigenvalues The space Us is the signal subspace, and the space Un formed by the eigenvectors corresponding to the small eigenvalues ​​is the noise subspace.

(5) The noise eigenvector is used as a column vector to form a noise eigenmatrix, which is expanded into an MD-dimensional noise subspace Un, which is orthogonal to the signal subspace. And the column space vector of Us coincides with the signal subspace, so the column vector of Us and the noise subspace are also orthogonal. Therefore, the spatial spectrum function can be constructed.

(6) Obtain the maximum value of the spectral function in the spatial spectral domain, and the angle corresponding to the spectral peak is the estimated value of the direction angle of the incoming wave.

2 Theoretical development and application The
MUSIC (Multiple Signal Classification) algorithm was proposed by the American ROSchmidt in 1979, and it marked that the spatial spectrum estimation direction finding has entered a stage of prosperity. It introduces the concept of "vector space" into the field of spatial spectrum estimation. After thirty years of development, it can be said that its theory has been relatively mature.

Since the 1980s, people have conducted extensive and in-depth research on the super-resolution spatial spectrum estimation algorithm based on eigen-decomposition, and proposed a series of efficient processing methods, the most classic of which is the multi-signal classification (MUSIC) algorithm. The algorithm has to go through a one-dimensional search to find the source of the source, and the computational complexity of multi-dimensional search algorithms such as relative maximum likelihood (ML) and weighted subspace fitting (WSF) has been reduced a lot. The algorithm represented by MUSIC has a shortcoming, that is, it is not ideal for coherent signal processing. Among a series of processing schemes for coherent signal sources, the more classic ones are spatial smoothing techniques, such as spatial smoothing (SS) and modified spatial smoothing (MSS) algorithms. However, the spatial smoothing technique comes at the cost of losing the effective aperture of the array, and it is only suitable for uniformly spaced uniform linear arrays (ULA).

In fact, the spatial spectrum estimation algorithm is calculated under the known number of signal sources, which is impossible in practical applications. The number of sources can only be estimated based on the observation data. In his classic work, ROSchmidt proposed a method to estimate the signal source based on the distribution of the eigenvalues ​​of the array covariance matrix. This method is perfect in theory, at least correct for independent sources and some related sources, but in fact, due to the limited data length, to a large extent, it can only rely on subjective judgment to determine the number of sources.

Second, the source code

clc;
clear all;
close all;
set(0,'defaultaxesfontsize',9);            %设置字体大小
load s.mat;
wnd=256;
inc=128;

[Angle1]=Spectrum_Method('capon',s1,s2,wnd,inc,45);
subplot(311)
plot(Angle1,'*'),axis tight
title('Capon')
xlabel('帧数')
ylabel('角度/度')

[Angle2]=Spectrum_Method('music',s1,s2,wnd,inc,45);
subplot(312)
plot(Angle2,'*'),axis tight
title('Music')
xlabel('帧数')
ylabel('角度/度')
function frameout=enframe(x,win,inc)

nx=length(x(:));            % 取数据长度
nwin=length(win);           % 取窗长
if (nwin == 1)              % 判断窗长是否为1,若为1,即表示没有设窗函数
   len = win;               % 是,帧长=win
else
   len = nwin;              % 否,帧长=窗长
end
if (nargin < 3)             % 如果只有两个参数,设帧inc=帧长
   inc = len;
end
nf = fix((nx-len+inc)/inc); % 计算帧数
frameout=zeros(nf,len);            % 初始化
indf= inc*(0:(nf-1)).';     % 设置每帧在x中的位移量位置
inds = (1:len);             % 每帧数据对应1:len
frameout(:) = x(indf(:,ones(1,len))+inds(ones(nf,1),:));   % 对数据分帧

Three, running results

Insert picture description here

Four, remarks

Complete code or writing add QQ 1564658423 past review
>>>>>>
[Feature extraction] Audio watermark embedding and extraction based on matlab wavelet transform [Include Matlab source code 053]
[Speech processing] Voice signal processing based on matlab GUI [Include Matlab Source code issue 290]
[Voice acquisition] based on matlab GUI voice signal collection [including Matlab source code 291]
[Voice modulation] based on matlab GUI voice amplitude modulation [including Matlab source code 292]
[Speech synthesis] based on matlab GUI voice synthesis [including Matlab Source code issue 293]
[Voice encryption] Voice signal encryption and decryption based on matlab GUI [With Matlab source code 295]
[Speech enhancement] Matlab wavelet transform-based voice enhancement [Matlab source code 296]
[Voice recognition] Based on matlab GUI voice base frequency Recognition [Including Matlab source code 294]
[Speech enhancement] Matlab GUI Wiener filtering based voice enhancement [Including Matlab source code 298]
[Speech processing] Based on matlab GUI voice signal processing [Including Matlab source code 299]
[Signal processing] Based on Matlab speech signal spectrum analyzer [including Matlab source code 325]
[Modulation signal] Digital modulation signal simulation based on matlab GUI [including Matlab source code 336]
[Emotion recognition] Voice emotion recognition based on matlab BP neural network [including Matlab source code 349 Issue]
[Voice Steganography] Quantified Audio Digital Watermarking Based on Matlab Wavelet Transform [Include Matlab Source Code Issue 351]
[Feature extraction] based on matlab audio watermark embedding and extraction [including Matlab source code 350 period]
[speech denoising] based on matlab low pass and adaptive filter denoising [including Matlab source code 352 period]
[emotion recognition] based on matlab GUI voice emotion classification Recognition [Including Matlab source code 354 period]
[Basic processing] Matlab-based speech signal preprocessing [Including Matlab source code 364 period]
[Speech recognition] Matlab Fourier transform 0-9 digital speech recognition [Including Matlab source code 384 period]
[Speech Recognition] 0-9 digital speech recognition based on matlab GUI DTW [including Matlab source code 385]
[Voice playback] Matlab GUI MP3 design [including Matlab source code 425]
[Voice processing] Speech enhancement algorithm based on human ear masking effect Noise ratio calculation [Including Matlab source code 428]
[Speech denoising] Based on matlab spectral subtraction denoising [Including Matlab source code 429]
[Speech recognition] BP neural network speech recognition based on the momentum item of matlab [Including Matlab source code 430]
[Voice steganography] based on matlab LSB voice hiding [including Matlab source code 431]
[Voice recognition] based on matlab male and female voice recognition [including Matlab source code 452]
[Voice processing] based on matlab voice noise adding and noise reduction processing [including Matlab source code Issue 473]
[Speech denoising] based on matlab least squares (LMS) adaptive filter [including Matlab source code 481]
[Speech enhancement] based on matlab spectral subtraction, least mean square and Wiener filter speech enhancement [including Matlab source code 482 period】
[Communication] based on matlab GUI digital frequency band (ASK, PSK, QAM) modulation simulation [including Matlab source code 483]
[Signal processing] based on matlab ECG signal processing [including Matlab source code 484]
[Voice broadcast] based on matlab voice Broadcast [Including Matlab source code 507]
[Signal processing] Matlab wavelet transform based on EEG signal feature extraction [Including Matlab source code 511]
[Voice processing] Based on matlab GUI dual tone multi-frequency (DTMF) signal detection [Including Matlab source code 512 】
【Voice steganography】based on matlab LSB to realize the digital watermark of speech signal 【Include Matlab source code 513】
【Speech enhancement】Speech recognition based on matlab matched filter 【Include Matlab source code 514】
【Speech processing】Based on matlab GUI voice Frequency domain spectrogram analysis [including Matlab source code 527]
[Speech denoising] based on matlab LMS, RLS algorithm voice denoising [including Matlab source code 528]
[Voice denoising] based on matlab LMS spectral subtraction voice denoising [including Matlab Source code issue 529]
[Voice denoising] based on matlab soft threshold, hard threshold, compromise threshold voice denoising [including Matlab source code 530]
[Voice recognition] based on matlab specific person's voice recognition discrimination [including Matlab source code 534]
[ Speech denoising] based on matlab wavelet soft threshold speech noise reduction [including Matlab source code 531]
[speech denoising] based on matlab wavelet hard threshold speech noise reduction [including Matlab source code 532]
[speech recognition] based on matlab MFCC and SVM specific Human gender recognition [including Matlab source code 533]
[Voice recognition] GMM speech recognition based on MFCC [including Matlab source code 535 period]
[Voice recognition] Based on matlab VQ specific person isolated words voice recognition [including Matlab source code 536 period]
[Voice recognition] based on matlab GUI voiceprint recognition [including Matlab] Source code issue 537]
[Acquisition and reading] based on matlab voice collection and reading [including Matlab source code 538]
[Voice editing] based on matlab voice editing [including Matlab source code 539]
[Voice model] based on matlab voice signal mathematical model [including Matlab source code 540]
[Speech soundness] based on matlab voice intensity and loudness [including Matlab source code 541]
[Emotion recognition] based on matlab K nearest neighbor classification algorithm voice emotion recognition [including Matlab source code 542]
[Emotion recognition] based on matlab Support vector machine (SVM) speech emotion recognition [including Matlab source code 543]
[Emotion recognition] Neural network-based speech emotion recognition [including Matlab source code 544]

Guess you like

Origin blog.csdn.net/TIQCmatlab/article/details/114954882