Practical limits of extracting a known signal level from noise

Hi, What are the practical limits (in terms of signal to noise ratio) of filtering a known (say 1kHz) signal from noise and other signals using digital signal processing when you want to measure the amplitude of that signal accurately? I'm working on a system that has to measure very small resistances (of the order of 1mOhm, for measuring battery resistance) to a good accuracy (better than 1%). The system injects a sine wave current using a FET and then measures the resulting sinewave voltage across the resistance using an instrumentation amplifier and an ADC (12 bit, may need to go to 16-bit). It then uses synchronous averaging to average out one cycle of the sine wave (averages 1000 cycles), calculates the RMS of that cycle and uses that to calculate the resistance (based on the known level of the injected current sinewave). The filtering needs to be very good because in our application the resistance we are measuring may have a large ripple current flowing through it (UPS's often use the batteries as capacitors, so they put quite large currents through the battery). This works pretty well and the synchronous averaging does a very good job of filtering the signal (is an exceptional bandpass filter), but I am struggling to get the accuracy I need. The current needs to be fairly low to stop the FET overheating, so I'm using around 1 to 4 amps (peak), meaning that I am trying to extract a 1 to

4 mV (p-p) sinewave from within a 45mV p-p signal (with a predominant frequency of 300Hz, with some components of 50Hz , 100Hz and 600Hz). For a 10mOhm resistance the measurement signal is 10mV and the noise/ripple signal is around 140mV. The accuracy is typically not better than 2%. This doesn't seem too hard for DSP if you just wanted to detect the signal (e.g. for digital communication), but I need to accuractely detect levels, so I'm looking for a reality check to make sure that I haven't already reached the limits of what's possible. TIA Charles
Reply to
Charles Oram
Loading thread data ...

I saw a collegue doing this in the 70's, checking the 48V batteries for a strowger system. I think the drain was about 100A or so. He use a 50 watt audio power amp with a series R to measure the Z fom 10Hz to 1K. Quite predictable.

These days I'd suggest using an ordinary soundcard on a laptop, with a suitable interface and poweramp, they are almost all 24bit resolution these days, and record it as a WAV file, then do some post processing ( I'm an audio guy). If it's real time, dont ask me.

But the S/N is bandwidth related, the wider the window, the more shit gets in, so you have to define that.Say 1Hz bandwidth, I guess 120dB or so resolution would'nt be too dificult

martin

Reply to
martin griffith

Do you mean you're synchronously averaging over one cycle, or that you're averaging over one cycle with 1000 samples?

Are you getting systemic problems due to nonlinearities in your measurement system, or are you getting noise due to, well, noise? 1% of

4mV is 40uV, which means you're getting down to the lower limit of your ADC -- are you sure you're within it's limitations? Certainly the quantization noise shouldn't be an issue if you're not synchronous with your 45mV noise.

If it's just noise then just averaging for more cycles indicated. If it's systemic then you can do all the extra filtering in the world and you'll never get there from here.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Posting from Google?  See http://cfaj.freeshell.org/google/

"Applied Control Theory for Embedded Systems" came out in April.
See details at http://www.wescottdesign.com/actfes/actfes.html
Reply to
Tim Wescott

I'm synchronously averaging for 1s at 36ksps, synchronised with the 1kHz signal. For a 1kHz signal I am sampling at 36ksps, so I have 36 accumulators that I cycle through each 1ms, adding the ADC counts to the accumulators and then (at the end) dividing by the number of 1kHz cycles in 1s (1000).

I forgot to mention an important detail - the instrumentation amplifier has a gain of 8 and the ADC has an adjustable gain that is set to 4, so after those gains we have a 1.44V signal with 128mV superimposed on it. The ADC has a Vref of 2.4V, so 1% of 128mV is only 2 AD counts, not much...

I have found that I can achieve the required accuracy with 50Hz or 150Hz sinewave ripple, but if I got to 300Hz sinewave, or to the complex waveform described I can't achieve it. So it may just be that the sycnchronous averaging needs a lot more samples to completely reject those higher frequencies. I'll give that a try, thanks Tim.

- Charles

Reply to
Charles Oram

Using a larger current makes everything much easier, unfortunately it is not an option for my application as the FET would be too expensive and the heat dissipation becomes a major problem.

This is for a product, not a one-off set of measurements, so unfortunately that's not an option.

That's what I'm hoping.

- Charles

Reply to
Charles Oram

You sample at a frequency for an interval (of many samples).

Make sure that your sampling frequency divides evenly into the ripple and fundamental frequencies of the power system and of the kHz probe frequency.

Sample for an interval that has an integral number of all relevant cycles.

Invert the kHz probe frequency signal (i.e. phase shift it by 180 degrees) and sample for a second interval. Then subtract the two results.

This cancels everything out but the probe signal response. (Which may still be complicated if there is inductance or non-linearity.)

--
David M. Palmer  dmpalmer@email.com (formerly @clark.net, @ematic.com)
Reply to
David M. Palmer

Gain doesn't help with the signal to noise. Having a small bandwidth does. As to your problem, synchroneous rectification does the job, and with a sensible selection of parameters, you can recover signals that are 100dB below the noise. Look up the term "lock-in amplifier"

Rene

--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com
& commercial newsgroups - http://www.talkto.net
Reply to
Rene Tschaggelar

Have you considered a higher frequency, so that you could use passive low pass filters to attenuate the 50/100/300/600 Hz noise and thus cause less problems to the amplifier and ADC linearity requirements ?

Are you using FETs to directly drive the load or are you using some kind of step down transformer to generate the required current ?

Since the measurement _power_ required is only less than 100 mW, small FETs and a step down transformer should be able to deliver the 1-4 A current. With a larger amplifier, a much larger secondary current could be delivered, 100 A into 1 mOhm is still only 10 W.

The amplifier must also be able to combat the ripple voltage transformed up by the step down transformer.

It might be a good idea to put a shunt resistor or a current transformer into the secondary and connect the derived voltage into the amplifier feedback loop to get away with the transformer nonlinearity.

Paul

Reply to
Paul Keinanen

Having you mention that makes me more confident that we are on the right track! We actually started off implementing a lock-in amplifier in hardware and at the same time started looking for ways to do the same thing in software. Unfortunately the hardware implementation doesn't work as well as we would expect and we haven't worked out why yet.

- Charles

Reply to
Charles Oram

Yes, going to a higher frequency does give better performance, but it also means that you start measuring more of the reactive components of the battery and we are more interested in the resistance.

The FET is directly drawing current from the battery being measured and there is a 0.1 Ohm shunt resistor in series with the FET with an op-amp to give a current control feedback loop.

The majority of the power is not dissipated in the battery, but is dissipated in the FET and the shunt resistor. With a 12V battery and 100A that's I x V = 1200W = smoke and fetch your soldering iron to replace the FET :)

One option we are going to try is putting in a bigger shunt resistor so that we can use larger currents and dissipate more of the power in the shunt resistor.

We don't have a transformer, but do have the feedback as you suggest. Thanks.

- Charles

Reply to
Charles Oram

Have you thought about measuring in the frequency domain? This means doing an FFT after the averaging and then integrate over the frequency bins close to the frequency of the measuring signal. Then you get rid of all problems with ripple and you don't need to filter at all.

Measuring the RMS noise on the other bins (except those where the known ripple are) gives you a picture of the accuracy.

bye Andreas

-- Andreas Hünnebeck | email: snipped-for-privacy@gmx.de

----- privat ---- | www :

formatting link
Fax/Anrufbeantworter: 0721/151-284301 GPG-Key:
formatting link
PGP-Key:
formatting link

Reply to
Andreas Huennebeck

With the unwanted ripple current at least one order of magnitude larger than your measurement current, these might affect your signal current generator and might contribute more to the total error than the sense amplifier and ADC.

In audio amplifier design some test indicated that in some amplifier stages with a large nonlinearity (before feedback was applied), the loudspeaker back EMF through the feedback loop to the amplifier input could cause significant distortion.

I would suggest to check for the current feedback stage common mode voltages. Also check the AC voltage across the shunt resistor for any signs of distortion, since if part of the power is in the harmonics, it might reduce the amplitude of the 1 kHz fundamental, which you are trying to measure.

Paul

Reply to
Paul Keinanen

Charles Oram skrev:

...

There is a limit to what can be done in noisy systems. The variance of the estimate for the parameter usually depends on the SNR and the amount of data available.

The key word to look for is the "Cramer Rao Lower Bound" of variance, CRLB. If this sounds unfamiliar to you, you might want to have a statistics guy have a look at your system, and maybe come up with an estimate for the CRLB.

You have reached the limit of what can be done once the variance of your estimates equal the CRLB.

Rune

Reply to
Rune Allnor

Maybe I am misinterpreting what has been said. but it sounds like what you are saying is that the vast majority of what you are calling noise is stable sinusoids at known frequencies (you mentioned 50, 150, 300Hz). These could be filtered out. After that what is left would be mostly the frequency you are trying to measure. `

If I understand what you are now using is essentially a comb filter. It should have a gain of 1 at 0, 1KHz, 2KHz, 3KHz, etc. and a gain of zero at .5Khz, 1.5Khz, 2.5KHz etc. with a not very steep transition between. I'm not sure why you are having better luck when the noise is 50Hz than

300Hz unless maybe at some point you are also subtracting out the mean. That would be another filter that has a gain of zero at DC and also would attenuate lower frequencies a little more. Point is, you should be able to do a lot better than you are now at filtering out what you don't want without affecting the 1kHz signal you are interested in. Ideally if you filter before the ADC you will be able to receive a signal that is more than just a couple of LSB in magnitude. But even if you are stuck with the signal you have now coming out of the ADC, you should easily be able to improve on the filtering you are presently doing.

-jim

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----

formatting link
The #1 Newsgroup Service in the World! 120,000+ Newsgroups

----= East and West-Coast Server Farms - Total Privacy via Encryption =----

Reply to
jim

[snip]

The analog solution may be cheaper. The datasheet of the AD630 has an application quite like yours. It appears to be rather straight forward.

Rene

--
Ing.Buero R.Tschaggelar - http://www.ibrtses.com
& commercial newsgroups - http://www.talkto.net
Reply to
Rene Tschaggelar

Yes, we thought about doing an FFT, but we don't have enough memory to buffer enough data to do that. As an alternative I did try Goertzel's algorithm, but that didn't give any better results than I could get with a simple recursive filter.

- Charles

Reply to
Charles Oram

Thanks, I'll look that up.

- Charles

Reply to
Charles Oram

That's right, but the noise (or more correctly ripple) isn't at exactly known frequencies, it varies with different UPSes. But we can roughly categorise it, so you are right that we should be able to filter it out.

That's about right, but the synchronous averaging gives a pretty steep transition between.

That's an interesting point. I am subtracting out the mean to remove the DC offset before I calculate the RMS, but that's the last step before calculating the RMS, so it is after the synchronous averaging. I have been assuming that if I don't do this I will get errors because I will be trying to calculate the RMS value of a signal with a DC offset.

That's the general impression I'm getting from the responses to my question. Thanks.

- Charles

Reply to
Charles Oram

We are thinking about building a prototype with that chip to get a benchmark on what we should be able to achieve, but it looks a bit pricey to fit into our final solution. Thanks.

- Charles

Reply to
Charles Oram

At the moment I am doing my testing with injecting the ripple voltage into the front end of the instrumentation amplifier so I don't need to worry about what you have mentioned, but that sounds like something we will have to look out for when it is connected to a real system. Thanks.

- Charles

Reply to
Charles Oram

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.