I'm trying to design a lowpass IIR filter with 5Hz cutoff frequency (sample frequency is 200Hz). i know how to create it with fdatool, or with functions such as 'butter' or 'ellip'. However, i think that all the filters created are causal. Is it possible to create also noncausal filters? Thanks in advance

  • $\begingroup$ What is your purpose? Any causal filter can be made non-causal by composing it with a negative delay, or by reversing the impulse response in time. But do you mean something less trivial? For instance, do you want to minimize delay spread? Zero phase? Etc. $\endgroup$ Dec 17 '14 at 13:23
  • 1
    $\begingroup$ when using MATLAB to design a linear-phase FIR filter, i always offset the impulse response (using fftshift()) to be symmetrical about 0 so that it's a zero-phase FIR. not sure how a non-causal IIR filter would work. i don't think it would be stable as $t \rightarrow \infty$. $\endgroup$ Dec 17 '14 at 16:37
  • $\begingroup$ Of course, all physically realizable filters are necessarily causal. I hope that the OP will clarify what his true intentions are. $\endgroup$ Dec 17 '14 at 18:04
  • $\begingroup$ I just wanted to know if it was possible to design such filters in Matlab (for general purposes). What i have to implement is an online filter ( so, i know, in principle it has to be a causal filter). However, i can store some samples before computing the output value referred to a previous time (i can look "a bit in the future"). However as Michael said (if i have correctly understood you) i can shift backward in time later the computed output (and it seems quite simple). Thanks Taking the oppurtunity..do you know how to design filters with minimum group delay? $\endgroup$ Dec 17 '14 at 20:08

The short answer is: yes, of course it's possible to design non-causal filters. Consider a simple first order IIR filter:


If implemented in the way as indicated in Eq. (1), this filter is causal. It is also stable if $|a|<1$. Now rewrite (1) as


Implemented in this way, you compute $y[n-1]$ from the future samples $y[n]$ and $x[n]$, so the system is anti-causal. Note that it is stable if $|a|>1$. Similar considerations apply to higher-order filters.

One way of realizing non-causal IIR filters is implemented in Matlab's filtfilt function. How this works is described in this answer.

Non-causal FIR filters can always be implemented by appropriate buffering of the input signal and delaying the output signal.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.