1
$\begingroup$

Could anyone explain to me how can I know the filter order based on algorithm?

For example:

  • $y[n] = \frac12 x[n] – x[n–1] + \frac12 x[n–2]$ has order filter 2.

  • $y[n] =2 x[n] – x[n–1] + y[n–1]$ has order filter 1.

  • $y[n] =2 x[n] – x[n–1] + x[n–2]+ y[n–1] + y[n–2]$ has order filter 2.

Why?

$\endgroup$
2
$\begingroup$

If the discrete-time filter is described by the linear difference equation

$$y[n]=\sum_{k=1}^{K}a_ky[n-k]+\sum_{m=0}^{M}b_mx[n-m]$$

(with $a_K\neq 0$ and $b_M\neq 0$), the filter order is given by $\max\{K,M\}$, i.e., by the maximum delay necessary to implement the filter.

$\endgroup$
1
0
$\begingroup$

As a general rule, the order of a filter is its length minus one. The length can be found by checking how many input samples the filter extends over.

In your first example, the filter extends over 3 input samples ($x[n],x[n-1],x[n-2]$), so its length is 3. Thus, the filter order is 2. In the second one, the length is 2, so the order is 1. The last example has the same length (and, therefore, the same order) as the first one.

EDIT: As Matt stated in his answer, the length can be determined not only by how many input samples the filter extends over, but also by how many output samples are used (whichever is the greatest).

$\endgroup$
6
  • 3
    $\begingroup$ Only the first example is a FIR filter, the others are IIR. Anyway, the order is always equal to the maximum delay, no matter if applied to the input or output signal. $\endgroup$
    – Matt L.
    Jan 15 '17 at 16:39
  • $\begingroup$ @MattL. So if the filter equation was $y[n] =2 x[n] – x[n–1] + y[n–1] + y[n–2] + y[n-3]$, would the order be 3? $\endgroup$
    – Tendero
    Jan 15 '17 at 17:09
  • $\begingroup$ Yes, that's right. $\endgroup$
    – Matt L.
    Jan 15 '17 at 17:20
  • $\begingroup$ @MattL. I didn't know that, thanks :) $\endgroup$
    – Tendero
    Jan 15 '17 at 17:29
  • $\begingroup$ Welcome :) ${}$ $\endgroup$
    – Matt L.
    Jan 15 '17 at 17:31

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.