[EE] averaging multiple samples to reject AC interference

classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[EE] averaging multiple samples to reject AC interference

Bob Blick-5
I have sensors that feed an instrumentation amplifier running a voltage gain of 10 before going into the A/D converter of a microcontroller.

There is AC line interference. It is small, but if I can reduce the effect, that would be good. I'm in the 60 Hertz part of the world, but ultimately this will be used in both 50Hz and 60Hz locations. Battery operated, this is not conducted interference or power supply ripple. Shielding is not possible. I only need to process the signal about 4 or 5 times per second. The signal is changing, so long-term averaging is bad. Actually any averaging will result in a tradeoff between response time and accuracy that I will need to evaluate.

These sensors are multiplexed with others and I can't sample continuously.

If I average multiple samples taken at 1/300 second intervals over a 1/10 second period, that should give some improvement at 50Hz and 60Hz without getting too involved, correct? This would fit into my existing multiplexing constraints.

I seem to recall being in this situation before but forget what I did at the time.

Thanks for any suggestions.
Bob
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [EE] averaging multiple samples to reject AC interference

Manu Abraham-2
Hi Bob,

I've had a similar situation, So, I did oversampling and decimation;
This not only reduced the swings, but indeed improve the ADC resolution.

The serious downside to this, is the response time;
But that was the whole logic to it. But the lower response time was
not an issue at my end.

In one situation, I was doing 1024x oversampling and a 10x decimation.
Was able to get about probably 100 samples per second, IIRC.

Regards,
Manu

On Tue, Aug 11, 2020 at 1:16 AM Bob Blick <[hidden email]> wrote:

>
> I have sensors that feed an instrumentation amplifier running a voltage gain of 10 before going into the A/D converter of a microcontroller.
>
> There is AC line interference. It is small, but if I can reduce the effect, that would be good. I'm in the 60 Hertz part of the world, but ultimately this will be used in both 50Hz and 60Hz locations. Battery operated, this is not conducted interference or power supply ripple. Shielding is not possible. I only need to process the signal about 4 or 5 times per second. The signal is changing, so long-term averaging is bad. Actually any averaging will result in a tradeoff between response time and accuracy that I will need to evaluate.
>
> These sensors are multiplexed with others and I can't sample continuously.
>
> If I average multiple samples taken at 1/300 second intervals over a 1/10 second period, that should give some improvement at 50Hz and 60Hz without getting too involved, correct? This would fit into my existing multiplexing constraints.
>
> I seem to recall being in this situation before but forget what I did at the time.
>
> Thanks for any suggestions.
> Bob
> --
> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist

--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [EE] averaging multiple samples to reject AC interference

Dwayne Reid
In reply to this post by Bob Blick-5
Hi there, Bob.

Old-time Dual-Slope digital meter systems did exactly what you
describe, with great effectiveness.

dwayne


At 01:44 PM 8/10/2020, Bob Blick wrote:

>I have sensors that feed an instrumentation amplifier running a
>voltage gain of 10 before going into the A/D converter of a microcontroller.
>
>There is AC line interference. It is small, but if I can reduce the
>effect, that would be good. I'm in the 60 Hertz part of the world,
>but ultimately this will be used in both 50Hz and 60Hz locations.
>Battery operated, this is not conducted interference or power supply
>ripple. Shielding is not possible. I only need to process the signal
>about 4 or 5 times per second. The signal is changing, so long-term
>averaging is bad. Actually any averaging will result in a tradeoff
>between response time and accuracy that I will need to evaluate.
>
>These sensors are multiplexed with others and I can't sample continuously.
>
>If I average multiple samples taken at 1/300 second intervals over a
>1/10 second period, that should give some improvement at 50Hz and
>60Hz without getting too involved, correct? This would fit into my
>existing multiplexing constraints.
>
>I seem to recall being in this situation before but forget what I
>did at the time.
>
>Thanks for any suggestions.
>Bob


--
Dwayne Reid   <[hidden email]>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
780-489-3199 voice   780-487-6397 fax   888-489-3199 Toll Free
www.trinity-electronics.com
Custom Electronics Design and Manufacturing

--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Jim
Reply | Threaded
Open this post in threaded view
|

RE: [EE] averaging multiple samples to reject AC interference

Jim
In reply to this post by Bob Blick-5


A .1 second worth of samples is 30 samples at a 1/300 sampling period.

If my calculations are correct, 30 samples, at a 1/300 second sampling
period, that would reduce interference below about 5 Hz, if I am
thinking correctly about the Nyquist theory.
If the interference is low frequency, this method should provide some
degree of reduction.  If the interference is higher frequency than that,
there may be little to no reduction.
The best way to find the answer is probably to just write the code to
implement the algorithm, and test it under actual conditions.

Regards,

Jim

> -------- Original Message --------
> Subject: [EE] averaging multiple samples to reject AC interference
> From: Bob Blick <[hidden email]>
> Date: Mon, August 10, 2020 2:44 pm
> To: "[hidden email]" <[hidden email]>
>
>
> I have sensors that feed an instrumentation amplifier running a voltage gain of 10 before going into the A/D converter of a microcontroller.
>
> There is AC line interference. It is small, but if I can reduce the effect, that would be good. I'm in the 60 Hertz part of the world, but ultimately this will be used in both 50Hz and 60Hz locations. Battery operated, this is not conducted interference or power supply ripple. Shielding is not possible. I only need to process the signal about 4 or 5 times per second. The signal is changing, so long-term averaging is bad. Actually any averaging will result in a tradeoff between response time and accuracy that I will need to evaluate.
>
> These sensors are multiplexed with others and I can't sample continuously.
>
> If I average multiple samples taken at 1/300 second intervals over a 1/10 second period, that should give some improvement at 50Hz and 60Hz without getting too involved, correct? This would fit into my existing multiplexing constraints.
>
> I seem to recall being in this situation before but forget what I did at the time.
>
> Thanks for any suggestions.
> Bob
> --
> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist

--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [EE] averaging multiple samples to reject AC interference

Richard Prosser
I did something similar a longish time ago - synchronised my sampling with
the mains frequency & averaged over a full  cycle. I can't remember the
details but It worked well. I think I was using a Keithly meter as the adc
and it handled the AC triggering side of things.

RP

On Tue, 11 Aug 2020 at 08:17, Jim <[hidden email]> wrote:

>
>
> A .1 second worth of samples is 30 samples at a 1/300 sampling period.
>
> If my calculations are correct, 30 samples, at a 1/300 second sampling
> period, that would reduce interference below about 5 Hz, if I am
> thinking correctly about the Nyquist theory.
> If the interference is low frequency, this method should provide some
> degree of reduction.  If the interference is higher frequency than that,
> there may be little to no reduction.
> The best way to find the answer is probably to just write the code to
> implement the algorithm, and test it under actual conditions.
>
> Regards,
>
> Jim
>
> > -------- Original Message --------
> > Subject: [EE] averaging multiple samples to reject AC interference
> > From: Bob Blick <[hidden email]>
> > Date: Mon, August 10, 2020 2:44 pm
> > To: "[hidden email]" <[hidden email]>
> >
> >
> > I have sensors that feed an instrumentation amplifier running a voltage
> gain of 10 before going into the A/D converter of a microcontroller.
> >
> > There is AC line interference. It is small, but if I can reduce the
> effect, that would be good. I'm in the 60 Hertz part of the world, but
> ultimately this will be used in both 50Hz and 60Hz locations. Battery
> operated, this is not conducted interference or power supply ripple.
> Shielding is not possible. I only need to process the signal about 4 or 5
> times per second. The signal is changing, so long-term averaging is bad.
> Actually any averaging will result in a tradeoff between response time and
> accuracy that I will need to evaluate.
> >
> > These sensors are multiplexed with others and I can't sample
> continuously.
> >
> > If I average multiple samples taken at 1/300 second intervals over a
> 1/10 second period, that should give some improvement at 50Hz and 60Hz
> without getting too involved, correct? This would fit into my existing
> multiplexing constraints.
> >
> > I seem to recall being in this situation before but forget what I did at
> the time.
> >
> > Thanks for any suggestions.
> > Bob
> > --
> > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
> > View/change your membership options at
> > http://mailman.mit.edu/mailman/listinfo/piclist
>
> --
> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist
>
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [EE] averaging multiple samples to reject AC interference

Bob Blick-5
In reply to this post by Dwayne Reid
Hi Dwayne,
That's exactly what I wanted to hear. Thanks!
Bob

________________________________________
From: [hidden email] <[hidden email]> on behalf of Dwayne Reid
Sent: Monday, August 10, 2020 1:14 PM
To: Microcontroller discussion list - Public.
Subject: Re: [EE] averaging multiple samples to reject AC interference

Hi there, Bob.

Old-time Dual-Slope digital meter systems did exactly what you
describe, with great effectiveness.

dwayne


At 01:44 PM 8/10/2020, Bob Blick wrote:

>I have sensors that feed an instrumentation amplifier running a
>voltage gain of 10 before going into the A/D converter of a microcontroller.
>
>There is AC line interference. It is small, but if I can reduce the
>effect, that would be good. I'm in the 60 Hertz part of the world,
>but ultimately this will be used in both 50Hz and 60Hz locations.
>Battery operated, this is not conducted interference or power supply
>ripple. Shielding is not possible. I only need to process the signal
>about 4 or 5 times per second. The signal is changing, so long-term
>averaging is bad. Actually any averaging will result in a tradeoff
>between response time and accuracy that I will need to evaluate.
>
>These sensors are multiplexed with others and I can't sample continuously.
>
>If I average multiple samples taken at 1/300 second intervals over a
>1/10 second period, that should give some improvement at 50Hz and
>60Hz without getting too involved, correct? This would fit into my
>existing multiplexing constraints.
>
>I seem to recall being in this situation before but forget what I
>did at the time.
>
>Thanks for any suggestions.
>Bob

--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [EE] averaging multiple samples to reject AC interference

Sean Breheny
In reply to this post by Dwayne Reid
Most multimeters still use dual-slope ADCs. One major advantage of this
technique (averaging over a multiple of the line frequency) is that it
actually places a notch (zero) of the transfer function at the line
frequency. It is MUCH better than simply a low-pass filter since it will
pass some frequencies above the line frequency and can pass frequencies up
to more than half the line frequency will very minimal attenuation.

On Mon, Aug 10, 2020 at 4:15 PM Dwayne Reid <[hidden email]> wrote:

> Hi there, Bob.
>
> Old-time Dual-Slope digital meter systems did exactly what you
> describe, with great effectiveness.
>
> dwayne
>
>
> At 01:44 PM 8/10/2020, Bob Blick wrote:
> >I have sensors that feed an instrumentation amplifier running a
> >voltage gain of 10 before going into the A/D converter of a
> microcontroller.
> >
> >There is AC line interference. It is small, but if I can reduce the
> >effect, that would be good. I'm in the 60 Hertz part of the world,
> >but ultimately this will be used in both 50Hz and 60Hz locations.
> >Battery operated, this is not conducted interference or power supply
> >ripple. Shielding is not possible. I only need to process the signal
> >about 4 or 5 times per second. The signal is changing, so long-term
> >averaging is bad. Actually any averaging will result in a tradeoff
> >between response time and accuracy that I will need to evaluate.
> >
> >These sensors are multiplexed with others and I can't sample continuously.
> >
> >If I average multiple samples taken at 1/300 second intervals over a
> >1/10 second period, that should give some improvement at 50Hz and
> >60Hz without getting too involved, correct? This would fit into my
> >existing multiplexing constraints.
> >
> >I seem to recall being in this situation before but forget what I
> >did at the time.
> >
> >Thanks for any suggestions.
> >Bob
>
>
> --
> Dwayne Reid   <[hidden email]>
> Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
> 780-489-3199 voice   780-487-6397 fax   888-489-3199 Toll Free
> www.trinity-electronics.com
> Custom Electronics Design and Manufacturing
>
> --
> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist
>
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [EE] averaging multiple samples to reject AC interference

David C Brown
Does that mean that multimeters from America are disadvantaged in Europe?
And vv?
__________________________________________
David C Brown
43 Bings Road
Whaley Bridge
High Peak                           Phone: 01663 733236
Derbyshire                eMail: [hidden email]
SK23 7ND          web: www.bings-knowle.co.uk/dcb
<http://www.jb.man.ac.uk/~dcb>



*Sent from my etch-a-sketch*


On Mon, 10 Aug 2020 at 23:12, Sean Breheny <[hidden email]> wrote:

> Most multimeters still use dual-slope ADCs. One major advantage of this
> technique (averaging over a multiple of the line frequency) is that it
> actually places a notch (zero) of the transfer function at the line
> frequency. It is MUCH better than simply a low-pass filter since it will
> pass some frequencies above the line frequency and can pass frequencies up
> to more than half the line frequency will very minimal attenuation.
>
> On Mon, Aug 10, 2020 at 4:15 PM Dwayne Reid <[hidden email]>
> wrote:
>
> > Hi there, Bob.
> >
> > Old-time Dual-Slope digital meter systems did exactly what you
> > describe, with great effectiveness.
> >
> > dwayne
> >
> >
> > At 01:44 PM 8/10/2020, Bob Blick wrote:
> > >I have sensors that feed an instrumentation amplifier running a
> > >voltage gain of 10 before going into the A/D converter of a
> > microcontroller.
> > >
> > >There is AC line interference. It is small, but if I can reduce the
> > >effect, that would be good. I'm in the 60 Hertz part of the world,
> > >but ultimately this will be used in both 50Hz and 60Hz locations.
> > >Battery operated, this is not conducted interference or power supply
> > >ripple. Shielding is not possible. I only need to process the signal
> > >about 4 or 5 times per second. The signal is changing, so long-term
> > >averaging is bad. Actually any averaging will result in a tradeoff
> > >between response time and accuracy that I will need to evaluate.
> > >
> > >These sensors are multiplexed with others and I can't sample
> continuously.
> > >
> > >If I average multiple samples taken at 1/300 second intervals over a
> > >1/10 second period, that should give some improvement at 50Hz and
> > >60Hz without getting too involved, correct? This would fit into my
> > >existing multiplexing constraints.
> > >
> > >I seem to recall being in this situation before but forget what I
> > >did at the time.
> > >
> > >Thanks for any suggestions.
> > >Bob
> >
> >
> > --
> > Dwayne Reid   <[hidden email]>
> > Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
> > 780-489-3199 voice   780-487-6397 fax   888-489-3199 Toll Free
> > www.trinity-electronics.com
> > Custom Electronics Design and Manufacturing
> >
> > --
> > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
> > View/change your membership options at
> > http://mailman.mit.edu/mailman/listinfo/piclist
> >
> --
> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist
>
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [EE] averaging multiple samples to reject AC interference

Dave Tweed
David C Brown wrote:
> Does that mean that multimeters from America are disadvantaged in Europe?
> And vv?

Not at all. Averaging for 1/10 second, which is 5 whole cycles of 50 Hz or
6 whole cycles of 60 Hz, works equally well in both systems.

-- Dave Tweed
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [EE] averaging multiple samples to reject AC interference

David Van Horn
In reply to this post by Richard Prosser
I did a filter some years back where I averaged up enough samples to get a complete cycle of the AC line, inverted it, and added it back to the data, which worked pretty well at getting rid of line based interference.

________________________________
From: [hidden email] <[hidden email]> on behalf of Richard Prosser <[hidden email]>
Sent: Monday, August 10, 2020 2:34 PM
To: Microcontroller discussion list - Public. <[hidden email]>
Subject: Re: [EE] averaging multiple samples to reject AC interference

I did something similar a longish time ago - synchronised my sampling with
the mains frequency & averaged over a full  cycle. I can't remember the
details but It worked well. I think I was using a Keithly meter as the adc
and it handled the AC triggering side of things.

RP

On Tue, 11 Aug 2020 at 08:17, Jim <[hidden email]> wrote:

>
>
> A .1 second worth of samples is 30 samples at a 1/300 sampling period.
>
> If my calculations are correct, 30 samples, at a 1/300 second sampling
> period, that would reduce interference below about 5 Hz, if I am
> thinking correctly about the Nyquist theory.
> If the interference is low frequency, this method should provide some
> degree of reduction.  If the interference is higher frequency than that,
> there may be little to no reduction.
> The best way to find the answer is probably to just write the code to
> implement the algorithm, and test it under actual conditions.
>
> Regards,
>
> Jim
>
> > -------- Original Message --------
> > Subject: [EE] averaging multiple samples to reject AC interference
> > From: Bob Blick <[hidden email]>
> > Date: Mon, August 10, 2020 2:44 pm
> > To: "[hidden email]" <[hidden email]>
> >
> >
> > I have sensors that feed an instrumentation amplifier running a voltage
> gain of 10 before going into the A/D converter of a microcontroller.
> >
> > There is AC line interference. It is small, but if I can reduce the
> effect, that would be good. I'm in the 60 Hertz part of the world, but
> ultimately this will be used in both 50Hz and 60Hz locations. Battery
> operated, this is not conducted interference or power supply ripple.
> Shielding is not possible. I only need to process the signal about 4 or 5
> times per second. The signal is changing, so long-term averaging is bad.
> Actually any averaging will result in a tradeoff between response time and
> accuracy that I will need to evaluate.
> >
> > These sensors are multiplexed with others and I can't sample
> continuously.
> >
> > If I average multiple samples taken at 1/300 second intervals over a
> 1/10 second period, that should give some improvement at 50Hz and 60Hz
> without getting too involved, correct? This would fit into my existing
> multiplexing constraints.
> >
> > I seem to recall being in this situation before but forget what I did at
> the time.
> >
> > Thanks for any suggestions.
> > Bob
> > --
> > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
> > View/change your membership options at
> > http://mailman.mit.edu/mailman/listinfo/piclist
>
> --
> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist
>
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [EE] averaging multiple samples to reject AC interference

David C Brown
In reply to this post by Dave Tweed
Thanks
Not that I have any intention of going to America in the near future
__________________________________________
David C Brown
43 Bings Road
Whaley Bridge
High Peak                           Phone: 01663 733236
Derbyshire                eMail: [hidden email]
SK23 7ND          web: www.bings-knowle.co.uk/dcb
<http://www.jb.man.ac.uk/~dcb>



*Sent from my etch-a-sketch*


On Tue, 11 Aug 2020 at 12:59, Dave Tweed <[hidden email]> wrote:

> David C Brown wrote:
> > Does that mean that multimeters from America are disadvantaged in Europe?
> > And vv?
>
> Not at all. Averaging for 1/10 second, which is 5 whole cycles of 50 Hz or
> 6 whole cycles of 60 Hz, works equally well in both systems.
>
> -- Dave Tweed
> --
> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist
>
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [EE] averaging multiple samples to reject AC interference

Art-35
In reply to this post by David Van Horn
That's a great idea David, but with averaging, much performance is lost.
And, even without averaging, there is a finite propagation delay (phase
error) through the electronics-whether digital or analog.

It occurred to me that I might use a second A/D converter to quantify
the 60Hz powerline frequency and apply that correction digitally. There
will still be propagation delay and the amplitude of the 2 data streams
will never match precisly, but the sampling of the realtime data can be
delayed and sync'd by some amount by delaying the digital clock time
sampling of one of the waveforms. 

Such a practice probably improves the line frequency interference
problem, but might require lots of time to figure our whether it is usable.

I know that a similar technique is used in analog receiver inputs in
order to reduce line noise arcing, and it does work. MFJ makes the
hardware, but it takes a very long time to find the correct amount of
delay/phase/amplitude as the tuned circuit has nearly infinate
combinations of possible settings. Once the sweet spot is found, it
works well until the ambient temperature in the shack changes and
everything needs retweaking::>

The same concept cannot be applied to very low 50 or 60 Hz interference,
there is no way to make variable inductors and capacitors to make the
concept work.
-
Aloha,

W1ABA


On 8/11/20 11:59 AM, David Van Horn wrote:
> I did a filter some years back where I averaged up enough samples to get a complete cycle of the AC line, inverted it, and added it back to the data, which worked pretty well at getting rid of line based interference.
>



--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [EE] averaging multiple samples to reject AC interference

David VanHorn-2
When I implemented the averaging filter it was on a Z8 running at 1 mips.
Didn't notice any performance issues in our application. (MICR reader)

On Tue, Aug 11, 2020 at 7:19 PM Art <[hidden email]> wrote:

> That's a great idea David, but with averaging, much performance is lost.
> And, even without averaging, there is a finite propagation delay (phase
> error) through the electronics-whether digital or analog.
>
> It occurred to me that I might use a second A/D converter to quantify
> the 60Hz powerline frequency and apply that correction digitally. There
> will still be propagation delay and the amplitude of the 2 data streams
> will never match precisly, but the sampling of the realtime data can be
> delayed and sync'd by some amount by delaying the digital clock time
> sampling of one of the waveforms.
>
> Such a practice probably improves the line frequency interference
> problem, but might require lots of time to figure our whether it is usable.
>
> I know that a similar technique is used in analog receiver inputs in
> order to reduce line noise arcing, and it does work. MFJ makes the
> hardware, but it takes a very long time to find the correct amount of
> delay/phase/amplitude as the tuned circuit has nearly infinate
> combinations of possible settings. Once the sweet spot is found, it
> works well until the ambient temperature in the shack changes and
> everything needs retweaking::>
>
> The same concept cannot be applied to very low 50 or 60 Hz interference,
> there is no way to make variable inductors and capacitors to make the
> concept work.
> -
> Aloha,
>
> W1ABA
>
>
> On 8/11/20 11:59 AM, David Van Horn wrote:
> > I did a filter some years back where I averaged up enough samples to get
> a complete cycle of the AC line, inverted it, and added it back to the
> data, which worked pretty well at getting rid of line based interference.
> >
>
>
>
> --
> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist
>
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [EE] averaging multiple samples to reject AC interference

sergio
In reply to this post by Art-35


On Tue, 11 Aug 2020, Art wrote:

> That's a great idea David, but with averaging, much performance is lost.
> And, even without averaging, there is a finite propagation delay (phase
> error) through the electronics-whether digital or analog.
>
> It occurred to me that I might use a second A/D converter to quantify
> the 60Hz powerline frequency and apply that correction digitally. There
> will still be propagation delay and the amplitude of the 2 data streams
> will never match precisly, but the sampling of the realtime data can be
> delayed and sync'd by some amount by delaying the digital clock time
> sampling of one of the waveforms.?

assuming the time it takes to aquire a sample is constant, how about
taking 3 readings A, B, C such that A and C are from the signal to be
measured and B is from the mains reference then the adjusted signal
becomes:

S = (A+C)/2 - B

Since (A+B)/2 should correspond to the time when B was aquired

Regards
Sergio Masci
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [EE] averaging multiple samples to reject AC interference

David VanHorn-2
" assuming the time it takes to aquire a sample is constant, how about
taking 3 readings A, B, C such that A and C are from the signal to be
measured and B is from the mains reference then the adjusted signal
becomes:"

is the shape of the AC line frequency what you're actually trying to remove?
Or is it a line frequency interference signal which is locked to the line
but not the same shape as the line waveform?


On Wed, Aug 12, 2020 at 3:25 PM sergio <[hidden email]> wrote:

>
>
> On Tue, 11 Aug 2020, Art wrote:
>
> > That's a great idea David, but with averaging, much performance is lost.
> > And, even without averaging, there is a finite propagation delay (phase
> > error) through the electronics-whether digital or analog.
> >
> > It occurred to me that I might use a second A/D converter to quantify
> > the 60Hz powerline frequency and apply that correction digitally. There
> > will still be propagation delay and the amplitude of the 2 data streams
> > will never match precisly, but the sampling of the realtime data can be
> > delayed and sync'd by some amount by delaying the digital clock time
> > sampling of one of the waveforms.?
>
> assuming the time it takes to aquire a sample is constant, how about
> taking 3 readings A, B, C such that A and C are from the signal to be
> measured and B is from the mains reference then the adjusted signal
> becomes:
>
> S = (A+C)/2 - B
>
> Since (A+B)/2 should correspond to the time when B was aquired
>
> Regards
> Sergio Masci
> --
> http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
> View/change your membership options at
> http://mailman.mit.edu/mailman/listinfo/piclist
>
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [EE] averaging multiple samples to reject AC interference

sergio


On Wed, 12 Aug 2020, David VanHorn wrote:

> " assuming the time it takes to aquire a sample is constant, how about
> taking 3 readings A, B, C such that A and C are from the signal to be
> measured and B is from the mains reference then the adjusted signal
> becomes:"
>
> is the shape of the AC line frequency what you're actually trying to remove?
> Or is it a line frequency interference signal which is locked to the line
> but not the same shape as the line waveform?

I assumed that whatever was causing the hum on the signal line would be
present on the reference line but without the signal
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [EE] averaging multiple samples to reject AC interference

RussellMc
In reply to this post by David VanHorn-2
>
> If averaging a not overly large number of samples then retaining a record
> of all samples and adding a new one to the total and dropping the oldest
> off gives a much more responsive result than eg

Latest/N + Sum x N-1/N


Russell


>
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [EE] averaging multiple samples to reject AC interference

sergio


On Thu, 13 Aug 2020, RussellMc wrote:

>>
>> If averaging a not overly large number of samples then retaining a record
>> of all samples and adding a new one to the total and dropping the oldest
>> off gives a much more responsive result than eg
>
> Latest/N + Sum x N-1/N
>

do you mean:

Latest/N + Sum x (N-1)/N

???
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [EE] averaging multiple samples to reject AC interference

RussellMc
On Thu, 13 Aug 2020 at 21:53, sergio <[hidden email]> wrote:


> do you mean:
>
> Latest/N + Sum x (N-1)/N
>

You'd hope so :-)

          R
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
Reply | Threaded
Open this post in threaded view
|

Re: [EE] averaging multiple samples to reject AC interference

Isaac Marino Bavaresco-2


Em 14 de agosto de 2020 22:04:36 BRT, RussellMc <[hidden email]> escreveu:

>On Thu, 13 Aug 2020 at 21:53, sergio <[hidden email]> wrote:
>
>
>> do you mean:
>>
>> Latest/N + Sum x (N-1)/N
>>
>
>You'd hope so :-)
>
>          R
>--
>http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
>View/change your membership options at
>http://mailman.mit.edu/mailman/listinfo/piclist

Does N grow indefinitely?
If yes, the new values will have less and less influence as time goes by.
If not, there will be a steady increase in the final result.
--
http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive
View/change your membership options at
http://mailman.mit.edu/mailman/listinfo/piclist
12