Group delay noise in minimum phase impulse response

4 Ansichten (letzte 30 Tage)
Torben
Torben am 27 Okt. 2011
I have recorded an impulse response of a speaker driver unit. I load this impulse response into Matlab. I then recreate the minimum phase using Hilbert transformation, however i get some group delay, say about 100 samples at some frequencies, which is more than i would expect from a speaker driver unit.
I then use some smoothing, in order to reduce the group delay, but i can't seem to get much below 10 samples group delay, without smoothing the hell out of the measured data.
Can i somehow avoid this group-delay which to me looks like somekind of noise. I don't see how a speaker driver unit can have 100 samples group delay between say 1000Hz and 1001Hz. Maybe im wrong.
I have attached a zip file (see link below) with the matlab .m file and the txt file containing the impulse response. Please study the group-delay in fvtool. http://dl.dropbox.com/u/2119565/Matlab_kode.zip
%Fase test
clear all; close all; clc;
Fs = 48000;
%%load measured data
imp1 = load('4inch_mid_imp.txt');
impRe = imp1(:,2); %impulse response, real.
impIm = imp1(:,3); %impulse response, imaginary.
imp = impRe() + impIm()*i; %Complex impulse response, rectangular form
gate = 50; % gate time in [ms]
x = impRe(1:(Fs/1000)*gate); % Load real part of impulsresponse
fvtool(x)
X = abs(fft(x));
X = X(1:(length(X)/2)+1);
% Smooth
X = smooth(X,20,'sgolay');
X = [X; flipud(X(1:end-1))];
x = ifft(X);
[xf, x] = rceps(real(x)); % Hilberttransformation to calculate minimum phase
fvtool(x);
%manual group delay calculation to check that fvtool is not bugging
phase = angle(fft(x));
phase = phase(1: (length(phase)/2) + 1);
for i = 1:length(phase)-1;
GD(i) = -(phase(i+1)-phase(i))/((Fs/2)/length(phase));
end
GD = (GD / (2*pi)) * Fs; %omregn delay fra rad til samples
semilogx(GD);
  3 Kommentare
Daniel Shub
Daniel Shub am 27 Okt. 2011
How is this question different then your previous question?
Torben
Torben am 27 Okt. 2011
@ Wayne King: The impulse response is measured with a Clio system, the data is exported from the Clio software. The complex value might be Clio phase calculations.
@Daniel: This question is in no way different then my previous question :), however I didn't id had been double posted, until I noticed your reply. Yesterday when i was trying to post, i got some error from the server.

Melden Sie sich an, um zu kommentieren.

Antworten (2)

Daniel Shub
Daniel Shub am 27 Okt. 2011
What is your SNR for the impulse response. How far was the speaker from the microphone? What do the first ~200 samples look like in the time domain. I think a little noise at the onset in the time domain could really screw up the minimum phase representation. Have you tried zeroing out the initial segment?
  4 Kommentare
Torben
Torben am 27 Okt. 2011
impRe is the impulse response in time. impIm is for some other use, you can look away from this. I can see that the naming of the arrays can be quite misleading.
Right now I am changing the gating method to use a blackman window, since the current gating might cause some problems.
Torben
Torben am 27 Okt. 2011
I made a mistake where i reconstruct the symmetric fft:
it should have been:
X = [X ; flipud(X(2:end))];
But apparently that wasnt the only problem.
The hilbert seems to change the frequency response.
When i use the code below, the two fvtool(x) show different results in frequency and impulse response is different (besides from the initial delay that is removed)
% Fase test
clear all; close all; clc;
Fs = 48000;
%% Indlæs "signal" LP
imp1 = load('4inch_mid_imp.txt');
impRe = imp1(:,2); %impulsrespons af rum, real.
impIm = imp1(:,3); %impulsrespons af rum, imaginary.
imp = impRe() + impIm()*i; %Kompleks impulseresponse på reaktangulær form
gate = 6; % gatening af målt impulsrespons i [ms]
w1l = 100;
w1 = hann(w1l);
w1 = w1(round(w1l/2):end);
gate = [1; ones(round((Fs/1000)*gate)-length(w1),1); w1];
x = impRe(1:length(gate)); % Load realdel af impulsresponse
x = x.*gate;
fvtool(x)
[xf, x] = rceps(real(x)); % Hilberttransformation af xnk, ym.
fvtool(x);

Melden Sie sich an, um zu kommentieren.


Torben
Torben am 27 Okt. 2011
Ok i think maybe it has to do with the complex part of the imprted impulse response. I am thinking maybe the data exported from clio, is the result of a complex cepstral analysis or something, I will look into it.

Kategorien

Mehr zu Antennas, Microphones, and Sonar Transducers finden Sie in Help Center und File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by