# Low-pass filter

1. Apr 4, 2012

### Niles

Hi

I am reading about lock-in amplifiers, and I read that the low-pass filter in a lock-in amplifier acts as an "integrator", since much of the noise that ends up in the DC output of the multiplier will integrate to zero. How is it that the low-pass filter can do that?

I would appreicate any help, since I can't find any other source where this is stated.

Best,
Niles.

2. Apr 4, 2012

### skeptic2

Yes, even though a filter can do things an integrator can't do and an integrator can do things a filter can't do, there is some overlap. You might think of a simple low pass filter as a lossy integrator.

3. Apr 4, 2012

### Niles

But how does it integrate the signal? I thought it only removed high-frequency components.

Last edited: Apr 4, 2012
4. Apr 4, 2012

### DragonPetter

Would you consider a low pass filter as a moving averager of the input signal?

Say you apply a sine wave input of any frequency with a DC offset, and then at your output, if the frequency is greater than the cutoff frequency, you should end up with something close to the DC offset, which is the average of the sine wave.

Similarly, consider an integration

$\frac{1}{T} \int_{0}^{T} f(t)dt$

This is the average of the signal over the period of integration.

I think a good way to accept that its integrating is understanding that the capacitor is acting as a storage of past inputs. As the signal changes over time, it take or adds charge from the capacitor, much as an integrator adds and subtracts infitesmal changes in values of the function over time (or whatever you're integrating with respect to).

5. Apr 4, 2012

### Niles

That I accept, but say that the DC-term is given by $A\cos(\phi)$, where A is the DC-constant and $\phi$ is some time-varying phase due to, e.g., some noise in the system. Then your explanation doesn't work.

6. Apr 4, 2012

### marcusl

The response function of a low-pass filter has poles, and it multiplies the signal spectrum (multiplication in the frequency domain is of course the same as convolution in the time domain of the signal with the filter impulse response). A look at your Laplace transforms will verify that poles like 1/s correspond to integration.

More intuitively, an RC network is the simplest lowpass (it's a one pole filter). The output is the voltage across the capacitor which is proportional to its charge, which equals the integral of the input signal current. The RC integrates.

7. Apr 4, 2012

### DragonPetter

$A\cos(\phi)$ is not a DC term like you say. A is not a DC constant either, its the amplitude of your AC term.

$A\cos(\phi) + B$, where B represents the DC term, and A represents the amplitude of your time varying system noise, would be the right way to describe that.

Last edited: Apr 4, 2012
8. Apr 4, 2012

### Niles

Best regards,
Niles.

9. Apr 4, 2012

### DragonPetter

need to edit: had an error

10. Apr 4, 2012

### psparky

If you are trying to remove low frequencies.....you will need a differenator.

If you are trying to remove high frequencies....you will need a integrator.

Like has been said....a simple RC circuit will work. A resistor in series with a capacitor.

If you want a low pass filter...take the output across the capacitor.
If you want a high pass filter....take the output across the resistor.

In regards to how this happens....you simply take a voltage divider of each one and find it's TRANSFER FUNCTION.

I assume you know the reactance of a capacitor is 1/JwC.

Using simple voltage dividers for each......

Low pass filter transfer function: 1/(1+JwRC)

W= the frequency...or more specifically.....2*pi*f.

So as you can see....if you plug in "0" for w......you get "1" for your transfer function. In other words....it will let DC values through 100%

If you plug in infinity for w looking at the other end of the spectrum....you will get zero output or gain.. So it attentuates all high frequencies and "passes" all low frequencies.

The differentiator is just the opposite. Take the voltage across the resistor...voltage divider....

Transfer function is JwRC/(JwRC+1)

Again.....when w = 0......or DC.......this case we get a output of zero........
When w = infinitey......we get an output or gain of one. It passes all high frequencies....hence high pass filter.

So if you are trying to eliminate DC noise.....a differentiator is what you want.

Also.....you can select your break frequency. The frequency of interest you want the filter to operate.

Break frequency = 1/(2*pi*RC)

Selector a break frequency you want......select a resistor size you want.......and solve for C....or the capacitor size.

This leads us into bode plots, zeros and poles, s domain, differential equations....etc.

Pretty cool stuff actually?

Any questions?

11. Apr 4, 2012

### Niles

Thanks for that detailed explanation. I have to admit that I didn't understand 100% of it, but that is mainly due to my lack of knowledge of EE. I will have to brush up some of the terms you mention, but I will certainly do it in the near future.

Thanks for taking the time to describe it in such detail.

Best regards,
Niles.

12. Apr 4, 2012

### psparky

No problem.

The trick to filters is what my old hardcore electronics teacher used to ask.

WHAT'S THE TRANSFER FUNCTION?

You plug in the particular frequency you want......and find your gain. Simple as that.
Although I understand you will have to struggle a bit do to your experience. But plugging in values for when "w" equals zero (DC)....and when "w" equals infinity is a great way to get a feeling for a filter.

And incidentally....when your "w" = 1/RC.........this when you "break frequency" will happen. Plug in the 1/RC for "w" in any of the above formulas I wrote and you will get 1/1+J for the low pass filter for example. If you do the math....you will see that the gain is .7 at phase angle 45 degrees. This is why the break frequency drops approximately 3 db at the break.

To calculate gain........20 log (.7)= -3 db! The 45 degrees will coincide exactly with your bodi plot.

Also, in a low pass filter....after the break frequency, the gain will drop 20 db for every decade you go up in frequency. In other words........if your break is at 100.....the next 20 db drop is 1,000......then 10,000, then 100,000. It's all in the math....try it out.

Last edited: Apr 4, 2012
13. Apr 4, 2012

### DragonPetter

Ok, I corrected what I was going to say.

I hope this doesn't confuse you, but if you choose the proper integration constants, which are what the time constant in an RC filter corresponds to, you can see how your above example (after corrected) integrated will have the same effect as a low pass filter.

First, your cosine AC term phase variable$A\cos(\phi)$ needs to be modified to show the frequency (your example gives a frequency of 1) and time dependence. So lets say $A\cos(w*t)$ instead, where w is the frequency of the noise signal and t is the time. RC is the time constant of the filter, and so it represents how long you are integrating for . . for example a small RC will fill up fast and so it is a smaller time that you integrate for.

Now we can show how integration can filter out higher frequency signals:

$\frac{1}{RC} \int_{0}^{RC}(A\cos(w*t) + B) dt$

if we integrate this we get

$\frac{1}{RC} A (\frac{sin(w*RC)}{w}) + \frac{1}{RC}*RC*B$

=

$A*(\frac{sin(w*RC)}{w*RC}) + B$

for $w*RC >> 1$, $A*(\frac{sin(w*RC)}{w*RC}) + B \approx B$

So, looking at that equation, we see no matter what RC is, the DC component B will be preserved completely. But, the noise term is a function of RC and its frequency w. The sine will always be between 0 and 1, and if we let RC be really big, which corresponds to a really low cut off frequency, or if we if we say the frequency of the noise is very high relative to RC, the denominator gets very big and the noise sine term approximates to 0, leaving only the DC component.

So if you followed that, you can see how an averaging integration operation can act like a low pass filter (and vice versa, a low pass filter acts like an averaging integration operation).

Last edited: Apr 4, 2012
14. Apr 4, 2012

### psparky

Wow.....that's totally cool....all your formulas and so forth. I'm pretty sure we are doing and talking about the exact same thing....but clearly we had different teachers. Two different ways to get the same result. Amazing.

15. Apr 4, 2012

### DragonPetter

I hope its correct, I'm having trouble trying to figure out an equivalent example for high pass and derivative that includes the RC constant.