2
$\begingroup$

I know that the Complementary Filter has the functions of both LPF and HPF. But I think my understanding on the principal behind it is still unclear.

I am quite new on digital signal processing, and maybe some very fundamental explanations will help a lot.

Say I have a Complementary Filter as follows:

$$y =a\times y+(1-a)\times x$$

Then my parameter $a$ may be calculated by $$a=\frac{time\ constant}{time\ constant+sample\ period}$$ where the $sample\ period$ is simply the reciprocal of the $sampling\ frequency$.

The $time\ constant$ seems to be at my own choice.

My Questions:

  1. What is the theory behind this calculation?
  2. How do we choose the $time\ constant$ properly?
$\endgroup$
  • $\begingroup$ What do you mean by 'complementary filter'? Normally you will have two filters $H(z)$ and $G(z)$ that are complementary in some sense. For instance, complementary in this sense $|H(j\omega)| + |G(j\omega)| = 1$ (I think this is called magnitude complementary but I'm not sure) or in this sense $|H(j\omega) + G(j\omega)| = 1$. So what do you mean by 'complementary filter'? Where from do you have the expression for your $a$ coefficient? do you have a link? $\endgroup$ – niaren Aug 7 '13 at 12:36
  • $\begingroup$ @niaren filedump.net/dumped/filter1285099462.pdf I am really really new to DSP. Please help check this. I got all these from that PDF. Do please correct me if I am wrong. :) $\endgroup$ – Sibbs Gambling Aug 11 '13 at 16:10
1
$\begingroup$

This is the difference equation for a low pass filter. Five time constants (5 * 1 time constant) is the time it will take to for the output, to reach 99.33% of the value of the input, from when the input changes from 0 to its final value, and stays there (a step response). This comes from 1-e^(-5). As you are specifying time constants, it implies you want a time domain definition for use as a moving average filter, so specify the period of averaging you would like, assume that as 5 time constants and divide by 5 five to get one time constant for use in the equation you have quoted above.

$\endgroup$

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.