[Sound source location] Based on the microphone receiving signal under different SNR of matlab [including Matlab source code 546]

1. Introduction

Microphone receiving signal under different signal-to-noise ratio based on matlab

Second, the source code

clear all;
close all;
clc
%****************************************************%
[s,fs]=wavread('C9_1_y.wav');   
s=s/max(abs(s));
sound_length = 6400;
%装载房间冲激响应
load h.mat;            
%麦克风1的信号
s1=conv(s,h1);
s1=s1(1:sound_length);
%麦克风2的信号
s2=conv(s,h2);
s2=s2(1:sound_length);
%****************************************************%
%添加白噪声
%SNR=20dB
s1_20db = awgn(s1,20,'measured','db');
s2_20db = awgn(s2,20,'measured','db');
%SNR=10dB
s1_10db = awgn(s1,10,'measured','db');
s2_10db = awgn(s2,10,'measured','db');
%SNR=0dB
s1_0db = awgn(s1,0,'measured','db');
s2_0db = awgn(s2,0,'measured','db');
%SNR=-5dB
s1_m5db = awgn(s1,-5,'measured','db');
s2_m5db = awgn(s2,-5,'measured','db');
figure(1);
%显示原始输入语音信号波形
subplot(5,2,1),plot(s1,'k'),title('麦克风1(原始)'),xlabel('采样点'),ylabel('幅度');
subplot(5,2,2),plot(s2,'k'),title('麦克风2 (原始)'),xlabel('采样点'),ylabel('幅度');
subplot(5,2,3),plot(s1_20db,'k'),title('麦克风1(SNR=20dB)'),xlabel('采样点'),ylabel('幅度');
subplot(5,2,4),plot(s2_20db,'k'),title('麦克风2(SNR=20dB)'),xlabel('采样点'),ylabel('幅度');
subplot(5,2,5),plot(s1_10db,'k'),title('麦克风1(SNR=10dB)'),xlabel('采样点'),ylabel('幅度');
subplot(5,2,6),plot(s2_10db,'k'),title('麦克风2(SNR=10dB)'),xlabel('采样点'),ylabel('幅度');
subplot(5,2,7),plot(s1_0db,'k'),title('麦克风1(SNR=0dB)'),xlabel('采样点'),ylabel('幅度');
function [h]=rir(fs, mic, n, r, rm, src);
%     房间脉冲响应
%     fs    采样频率
%     mic 麦克风坐标(行向量)  
%     n     虚拟声源个数 (2*n+1)^3 
%     r 	墙壁反射系数(-1<R<1%     rm   房间尺寸(行向量)
%     src   声源坐标(行向量)
%
%     h     房间脉冲响应

nn=[-n:1:n];                                          
rms=nn+0.5-0.5*(-1).^nn;                    
srcs=(-1).^(nn);                                    
xi=[srcs*src(1)+rms*rm(1)-mic(1)];      % 式(9-2)
yj=[srcs*src(2)+rms*rm(2)-mic(2)];      % 式(9-3)
zk=[srcs*src(3)+rms*rm(3)-mic(3)];      %式(9-4

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]
[Voice recognition] based on matlab VQ specific person isolated words voice recognition [including Matlab source code 536]
[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]
[Sound source localization] Sound source localization based on matlab different spatial spectrum estimation Algorithm comparison [including Matlab source code 545 period]

Guess you like

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