
The case the OP uses of a comb filter is one of the most challenging as it depends on signal energy at each frequency for a solution (this is specifically why linear equalizers, which this function is doing if you swap rx and tx, do not perform well in frequency selective channels and result in noise enhancement at the null locations). % NTAPS = Number of taps for channel coefficients % RX = Received (ch output) waveform, row vector, length must be > ntaps % TX = Transmitted (channel input) waveform, row vector, length must be > ntaps % Determines channel coefficients using the Wiener-Hopf equations (LMS Solution) For more details on how this works, see this post: Compensating Loudspeaker frequency response in an audio signal: function coeff = channel(tx,rx,ntaps)
MATLAB SYMBOL FOR DOES NOT EQUAL CODE
The Least Mean Square solution to find the "channel" or response of the filter is provided by the following MATLAB/Octave Code using the input to the filter as tx and the output of the filter as rx. My overall question is how can I practically measure the effective signal envelop delay due to filtering? I would like to match this measured delay with the theoretically calculated delay. Title('x vs filtered x, zoomed to see spikes')

But I have looked at the plots with the filtered and original signal on the same axis but could not get 20 samples at several frequencies. I used a linear phase FIR filter (a comb filter) which should have a delay of 20 samples according to MATLAB across all frequencies. In those filters should I take the average across all frequencies to determine the effective group delay?

I have tried adding a spike (Ok which is zero frequency) just so that I can compare the position of the spike in the original and the filtered signal, but the spike does not move in the filtered signal.Īdditionally, some filters have both negative and positive theoretical group delay.

I have tried to align filtered and unfiltered signal to see an actual shift but I do not seem to see any delay. How can I use this theoretical result to determine what delay will actually occur to my whole signal envelope? I ask because the theory does not seem to apply in practice in the way I have understood it. I know that theoretically to get the group delay you should differentiate the phase response with respect to frequency. I have tried all kinds of methods but still can't get the right result. I am trying to practically determine filter group delay so that I can try to reduce or adjust for it.
