# How to determine the parameter of a Complementary Filter?

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?
• 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? – niaren Aug 7 '13 at 12:36
• @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. :) – Sibbs Gambling Aug 11 '13 at 16:10