Linear phase 50Hz notch filter

Can anyone provide information on implementing a 50Hz notch filter for data acquisition that operates without phase distortion?

This could be a circuit or dedicated linear phase filter IC.

Harold Keller

Reply to
Harold keller
Loading thread data ...

What do you mean, "...without phase distortion"?

You will certainly have phase shift going thru the notch.

Go to the SED/Schematics page of my website and look at GyratorFilterNotch.pdf. ...Jim Thompson

--
| James E.Thompson, CTO                            |    mens     |
| Analog Innovations, Inc.                         |     et      |
| Analog/Mixed-Signal ASIC's and Discrete Systems  |    manus    |
| Phoenix, Arizona  85048    Skype: Contacts Only  |             |
| Voice:(480)460-2350  Fax: Available upon request |  Brass Rat  |
| E-mail Icon at http://www.analog-innovations.com |    1962     |
             
                    Help save the environment!
              Please dispose of socialism properly!
Reply to
Jim Thompson

How high is the highest frequency you need to have linear phase for?

"Linear phase" also means "constant time delay". As you go through the notch, the phase shift later very quickly. Above the notch, the phase must continue to go later. To do this you need to add "all pass" filter stages that shift the phase without changing the gain. If you want to go much above 100Hz, you are going to need a great many such stages.

Since this is for data acquisition, you are almost certainly better off taking the phase shift out of the data after the fact. You need to take a lot of data from both before and after the time you care about for this to work.

The simplest way to think about the software method is to imagine that you have taken the data and flipped it end of end. This inverts the sign of the phase shift in the data. If you make a software filter just like your hardware notch and feed the data through it, the total phase shift will now come out to zero.

In real life, you don't go to the work of flipping the data. You just code a filter with the needed phase shift and apply it to the data. One really nice side effect of doing this way is that you can end up with better dynamic range for burst like inputs. Spreading the pulse out in time as it is going through the ADC can hide some of the artifacts of the ADC.

Reply to
MooseFET

I'd use a cheap DSP, like a dsPIC.

Leon

Reply to
Leon

The only way you could do this would be by mixing in the right amount of phase locked 50Hz signal to null out the unwanted hum component. A sharp notch filter necessarily has to change phase across the null point.

You might be able to trade the depth of the notch for a smaller phase error if you don't need too much attenuation. Does it have to track mains frequency in real time? Or will it be wide enough to cover expected variations? What sort of high frequency has to be passed?

High precision DVMs use mains synchronous ADC conversion to eliminate hum components from the measured data. 100mS being the first common multiple that works for both UK & US mains frequencies.

Reminds me. Anyone have any thoughts on why the fifth harmonic on UK mains at 250Hz is so strong these days?

Regards, Martin Brown

Reply to
Martin Brown

On a sunny day (Sun, 13 Dec 2009 18:04:22 +0000) it happened Martin Brown wrote in :

Global warming?

Reply to
Jan Panteltje

I suspect switched mode PSU's but I can't see why the 5th harmonic is now so strong or for that matter where the roughly 623+/-3Hz component in my local electrical interference is coming from.

There is a heck of a lot of crossover distortion on our local mains - it doesn't look all that much like a sine wave!

I can see other higher frequencies from CFLs but the 5th harmonic of mains remains a bit odd. Some days it is the strongest harmonic component.

Regards, Martin Brown

Reply to
Martin Brown

On a sunny day (Sun, 13 Dec 2009 21:50:07 +0000) it happened Martin Brown wrote in :

In my place I think there are signals send superimposed to switch between day and night metering. At night the electricity is cheaper. But I do not know how many Hz that is, and it is likely not an harmonic, maybe 623?

Looks nice and clean here...

Reply to
Jan Panteltje

This any help? ...

formatting link

(From Ebay, I'd bought a defunct research institute's complete collection of that EE magazine. The above circuit was one of about 100 items that were begging to be scanned to a printable PDF, for light bedtime reading :)

Reply to
john jardine

of

That is just a notch filter implemented in a different manner. You get no phase shift at the center frequency, so the subtractor makes a notch. Really is it no better than building a notch filter in the first place.

What the original poster failed to mention is over what bandwidth does he need linear phase. Far away from the notch, the phase error is small.

Reply to
miso

Sure. Integrate the signal per 20ms, and 50Hz components will be cancelled out with all harmonics. This is perfecty linear phase process.

Vladimir Vassilevsky DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

You have to phase lock the PLL to the 50 Hz in the input signal and not to the power supply voltage, since the input signal hum can be from a different mains phase than the one powering the instrument.

How strong is the 150 Hz component compared to the 250 Hz component ?

In a three phase system with equal resistive loads, the neutral wire current will cancel. When single phase rectifier+capacitor input loads are operated with conduction angles less than 60 degrees on all phases, the return current peaks do not overlap in the neutral wire, thus no cancellation will occur in the neutral wire and the neutral current can be as high as the phase current. This has caused some cable failures in some underground cables, when the cross section area of the neutral conductor was less than the cross section of a phase conductor.

Anyway, the mainly 150 Hz current peaks in the neutral wire will also cause voltage drop in the neutral wire. When you measure the harmonic content between one phase and the neutral, quite strange values might be visible. However, I would expect the 150 Hz component to be much stronger than the 250 Hz.

Reply to
Paul Keinanen

Yes. I should have made that clear.

Third harmonic is barely measurable. The fifth harmonic most times is way stronger than the second harmonic and all other even harmonics are absent. After that in ordering of decreasing strength is 7, 11, 9, 15 ,13 sponsored by a convenience store maybe...

So would I - hence the comment about this anomolous 250Hz component.

Turns out it is due to a sensor in the process of going bad. I just tried a brand new one before posting this and it gives much cleaner more reasonable results. The harmonics now look like I would expect.

Regards, Martin Brown

Reply to
Martin Brown

Combining the outputs of high pass and low pass filters would leave 'passed' components pretty phase coherent to the input.

As the 50Hz notch is usually addressing hum, avoiding it in the first place is a better idea, where practical.

RL

Reply to
legg

r
t

You need quite a bit of memory and a lot of math to do it. Each RC looks like:

V[n] +=3D (V[m] - V[n]) * A

Where A is less than one.

You also need to gather all the data in a computer with significant storage. It make more sense to do the correction after the fact than on the fly because you have the entire record to work with.

Reply to
MooseFET

If you connect a 3 phase bridge to a constant load, the power drawn goes through 6 complete cycles in a cycle of the mains. This makes the 3rd harmonic in the mains zero. It doesn't do the same to higher harmonics.

Reply to
MooseFET

A high pass has no delay at high frequencies A low pass as delay near DC. Seriously, this idea won't work, and it's not really a notch unless you spread the HP and LP corners a bit.

There is no free lunch.

Reply to
miso

:

for

e
y
d
t

ust

se

Often people pre-filter for dynamic range issues. Since the original poster has left the scene, we don't know his objective.

Reply to
miso

r

on of

e

:)

Thanks Miso, I was confused by the bandpass then subtract circuit. As you say it's no better than a notch... and may be worse since now you have to 'balance' the signal going to the subtraction part. (oh the non-inverting input to the second opamp should be tied to ground and not left floating.)

George H.

Reply to
George Herold

Harold keller writes

It's hard, because if you're trying to filter out 50 / 60 Hz you are probably trying to measure down to DC. The first thought is to use a notch filter, but as others have noted that usually gives a phase shift across the notch. The next thought is to use a band-reject by using parallel lowpass and highpass filters, and summing their outputs; you set one's cutoff to 45Hz and the other to 55Hz and you'd expect these to cut out everything from 45 to 55Hz. In practice though they have finite sharpness (not as sharp as a notch filter), so you have to set the cutoffs at least 20% away from the centre frequency to give decent attenuation to the target frequency, so you're probably seriously affecting your measurement bands.

So next you think hmm Bessel filters? And a little looking around leads you to Maxim App note AN431, which details a low freq notch filter based on their own 8 pin low pass clocked chip MAX7410 (which is cheap) and specifically mentions the 180 degree phase shift as input sweeps across its notch freq. But there are versions, the MAX7409 and MAX7413, which are Bessel filters. I asked their tech support department about this recently and they said the 7409 would work albeit possibly with a slightly different ratio of clock-to-notch frequency, but I never got a chance to experiment with this idea so please let us know if it works

8) . Its sister part the 7410 is quoted as having an 85:1 clock:notch ratio in the app note, ie it needs a few kHz clock for a 50Hz notch.

Switching this filter into circuit will reduce circuit bandwidth to the (15kHz?) max of this IC. It will also eliminate any offset as there are DC blocking capacitors in this path ? this may not always be desirable.

--
Nemo
Reply to
Nemo

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.