MATLAB: FIR filters and the delay associated with them

delay compensationfir filters

The delay associated with a fir filter is a downside to it, is the only way to compensate for a delay introduced by a filter by removing some samples from the filtered output such that the delay is negated. such as shown in matlab if "y" is the output signal from the filter the delay compensated output looks like y[1:delay]=[]; where the variable "delay" is calculated from the filter order. The method mentioned above surely compensates the delay at a cost of loss of information, so i wanted to know If there is a way to compensate for delay other than the one given above which leads to less or no loss of data.

Best Answer

See if using the filtfilt (link) function or the zerophase (link) function will do what you want.