Smoothing out a fluctuating DC signal (Not ripple)

Thread Starter

StuBrisbane

Joined Mar 23, 2022
6
I have a 0-10V DC signal representing a scalar value measuring some machine noise. This fluctuates wildly (+\- 2V) however if the values were recorded and a moving average was applied (plot point X is the sum average of the preceding N samples) then what is produced is a smoothly increasing or decreasing trend line. Hopefully this describes the signal and the required treatment. What I need is a simple capacitor (?) or RC network circuit to apply this “slow” response. This “Slow Time Weighting” is in fact a well established process which, in the old days of moving needle sound meters, applied a 1 second averaging window so that a rapildly fluctuating noise didn’t simply produce a blurry fluttering all over the scale. I need a simplified version of this. Any ideas ?
 

crutschow

Joined Mar 14, 2008
38,323
How fast do you need the signal to respond to changes, how much do you need to reduce the 2Vpp variation, and what is the frequency of the variation?
These requirements are all needed before a proper filter can be designed, and determine whether a simple RC network will work.
 

SamR

Joined Mar 19, 2019
5,470
To be honest, I don't know the precise methodology. I've used an OpAmp buffer/unity gain amp several times to remove noise from a scope input. I would assume it had to do with the duration of the noise being less than the slew rate of the OpAmp? No, the frequency filtering was done by scope filters. I was not trying to remove noise from the circuit itself but to merely attenuate/remove it from a scope input.
 

Thread Starter

StuBrisbane

Joined Mar 23, 2022
6
Hi, I may have been misleading in my opening comments; this isn't a noise issue per se, infact the DC values are 100% real, but my problem is I need intermediary circuitry to apply some dampening to the response. What I ideally need to do is research how a Sound Level Meter (IEC 61672) applies Fast Slow and Impulse time weights. This occurs after the RMS / Peak detector so the signal has already been rectified and the DC signal is a proportional representation of the amplitude of the AC signal (sound)

1648169976695.png

What is suggested so far looks like noise filtering which is not the case. The blue dotted line shows the results of one second (slow) weighting and the red line, Fast time weighting (125mS). The DC signal I am currently getting from the device I am trying to apply would simply produce high for 200ms and low for the remaining 2.8 seconds.

1648170220936.png
Image from Ref. OnoSokki Japan

I am also asking the OEM if they plan to build any sort of weighting into their design.
 

crutschow

Joined Mar 14, 2008
38,323
I am trying to apply would simply produce high for 200ms and low for the remaining 2.8 seconds.
So do you want to average the high value for 200ms and ignore the remaining 2.8 seconds?
That could be done with a box-car averager (integrator).

It's not completely clear what you expect from the measurement.
 

Thread Starter

StuBrisbane

Joined Mar 23, 2022
6
Thanks and I do appreciate the idea; I'll look into what a box-car averager does. Also appreciate that it's a bit of a long shot looking for such a specialised point of reference (time weighting on a sound level meter). This is one of my disciplines as a practitioner in the field of occupational and environmental noise. Anyway, will keep chipping away on this one.
Cheers :D
 

Thread Starter

StuBrisbane

Joined Mar 23, 2022
6
Definitely hardware. For software we could simply ask the end user to use some rolling averaging in their DCS Historian however this is not ideal as it detracts from the value proposition we are trying to build into our solution.
 

ericgibbs

Joined Jan 29, 2010
21,393
Hi Stu,
Do you have a audio 'wav' file of the typical signal you could upload.?
Change the 'wav' extension to'txt' and it will upload OK.
E

@StuBrisbane
Update:
The reason for asking ref wav audio file, is that the circuit simulators we use to check our designs will accept a wav audio file as an electrical input signal, allows testing with an actual signal, in real time.
 
Last edited:

MisterBill2

Joined Jan 23, 2018
27,186
How does a unity gain op amp buffer remove noise?
I assume there must be a low-pass filter as well.
If the "unity gain buffer has very poor frequency response then it could, possibly, reduce the high frequency noise SOME. But it wil not be adequate.

The unanswered questions are "how accurate does it need to be?", and "what is the source impedance?" and, of course, "How fast must the response be?" AND, of course, "what is the impedance of the indication circuit?"

Component values based on "fairly accurate", "ow impedance", " fairly fast", and "A high impedance Digital voltmeter" wil be the series R= 100K ohms and the shunt C= 1 Mfd. (Low leakage capacitor)
 

Thread Starter

StuBrisbane

Joined Mar 23, 2022
6
Based on the graph you included, it seems like you’re looking for either a peak hold circuit or maybe a sample and hold circuit. https://www.homemade-circuits.com/simple-peak-detector-circuit/ https://en.m.wikipedia.org/wiki/Sample_and_hold
That would be good if I didn't need to trend the varying average over time, as it goes up and also down.

Here's an analogy, imagine you are measuring the heat from a bunch of people who are mingling around each other but also moving as crowd towards you and away from you over a few hours. And imagine some people are really hot and some are really cold. To plot a smoothed line that shows on average what the crowd generates in heat over time and at varying distances (without post processing or any form of digital calculation), you would need to have the temperature sensor respond 'slowly' to increases and decreases in heat to avoid high and low spikes all the time so that as the mass moves closer to you and away from you, that plotted trend line looks straight and not like a sloping sawtooth wave. Analogies don't always work, but hopefully this makes what I am doing a little clearer.
 

Thread Starter

StuBrisbane

Joined Mar 23, 2022
6
Hi Stu,
Do you have a audio 'wav' file of the typical signal you could upload.?
Change the 'wav' extension to'txt' and it will upload OK.
E

@StuBrisbane
Update:
The reason for asking ref wav audio file, is that the circuit simulators we use to check our designs will accept a wav audio file as an electrical input signal, allows testing with an actual signal, in real time.
Hi,

So the 90 minutes of audio shows peak-peak amplitude noise increasing and then dropping off over time90minutes-shows-amplitude-increasing.png
The recording is of a ball mill. My testing aparatus is:
- Noise plays into a shaker (like a speaker) and becomes vibration
- AC Vibration is measured with an accelerometer by a 'black box' which applies some proprietary filtering
- The 'black box' outputs a proportional signal which basically converts sampled peak-peak amplitude into a DC value . For arguments sake in the image above; left end would be 2 volts, 4 volts around the middle and 3 volts at the end.
- This DC voltage is logged by another system, and alerts and alarms are set around set-points such as 2.5 volts
- Problem statement is that the output voltage responds too quickly so need to be artifically dampened so as to follow the trending changes and not second to second changes within the signal.


Attached is a 30 second snippet, taken from around the middle. Rename file by removing the .txt
 

Attachments

crutschow

Joined Mar 14, 2008
38,323
It would be better if you could generate a sound snippet where it is changing significantly in amplitude so we can see if the filter will slow the output change to the rate you want.

So how fast would you want the output to change for an abrupt change in the noise level?
 
Top