Averaging of a DC pulsed signal - Page 1
Forum section: electronics / beginners

author: stcoso
author_rank: Regular Contributor
timestamp: December 19, 2019, 12:14:08 pm
content: Hi folks! I have a question that goes on my mind but i'm not 100% sure of the answer i found.Let's say that i have a DC pulsed signal that goes from 0V to 2.5V and that repeats itself every 1us. This signal is not square/sine/triangle/etc... so i can't use Vp value to calculate a mean value (not RMS).So, i thought that an RC filter with big enough RC constant (>>pulse lenght) could do the trick but i'm not fully convinced.If this is correct, which is the proper way to choose the R and C values ?Big thanks in advance.

author: EEEnthusiast
author_rank: Frequent Contributor
timestamp: December 19, 2019, 01:18:49 pm
content: Choosing an arbitrarily large RC will increase the settling time of the filter. Choosing a low value will increase the output ripple.If you select RC = 10xT where T is the pulse rate , then the 3dB BW of the filter would be f = 1/(2 PI RC) = 1/(2 * 3.14 * 10T)For T = 1uS, this would be 1bout 16KHz, which should be small enough to smooth out a 1uS pulse and settle at its average value.Settling time would be about 0.35/16KHz . About 22uS.For better accuracy, use a higher RC and the settling time would increase proportionately.

author: David Hess
author_rank: Super Contributor
timestamp: December 19, 2019, 05:06:47 pm
content: An RC circuit is the standard way. An much more complex alternative is to integrate the pulsed DC signal with a reset on every cycle or every several cycles.

author: macboy
author_rank: Super Contributor
timestamp: December 20, 2019, 06:09:39 pm
content: An RC will work. Beware of accuracy issues though, especially if the high and low drive strength of the source (source impedance) are not equal, such as the case with an open-collector output. The R in the RC should be much, much higher than the source impedance.Also note that an RC will always give a triangle wave as the output to a square/rectangular wave input. The peak-to-peak voltage of the triangle can be made small by making the RC long, but it will still be a triangle. If you want something smoother, look at a 2nd order (or higher) filter with a Q factor higher than what an RC can give you (i.e. > 0.5).

author: T3sl4co1l
author_rank: Super Contributor
timestamp: December 20, 2019, 06:42:53 pm
content: In what way is this "pulsed DC"? You say it is varying from 0 to 2.5V and is oscillating at, I guess, something like 500kHz or 1MHz (That's "RF" by some standards!). Can you draw the waveform?Tim

author: stcoso
author_rank: Regular Contributor
timestamp: December 20, 2019, 11:05:04 pm
content: Quote from: David Hess on December 19, 2019, 05:06:47 pmI wish I had the expertise to design or the money to buy a gated integrator

author: stcoso
author_rank: Regular Contributor
timestamp: December 20, 2019, 11:11:39 pm
content: Quote from: macboy on December 20, 2019, 06:09:39 pmThe source impedance is 50Ohm so it shouldn't be a problem...It's interesting the idea of using higher order filtering...I'll make some measurements.

author: stcoso
author_rank: Regular Contributor
timestamp: December 20, 2019, 11:26:45 pm
content: Quote from: T3sl4co1l on December 20, 2019, 06:42:53 pmI've got a 40ns pulse (sawtootish)... 10ns RT, 25ns FT (from 90% to 10%). After this 40ns the signal "slowly" (100ns) decays to 0v and stays 0V for other 800ish ns

author: T3sl4co1l
author_rank: Super Contributor
timestamp: December 21, 2019, 01:13:07 am
content: Ah so ca. 1MHz pulse train, of something a bit "lumpy" with several time constants, or something.Another question -- how often does it change, do you need to know the "average" fairly frequently, or no? And how much ripple can you tolerate? These will determine what order of filter, and what cutoff frequency, you need.If it's 50 ohms, that's very handy for designing a filter around. The LC values needed will be relatively large, enough that you might use actually an active op-amp filter instead (which is, in turn, practical on account of 10MHz+ op-amps being cheap and common).Tim

author: stcoso
author_rank: Regular Contributor
timestamp: December 21, 2019, 06:44:50 am
content: This signal is not changing and goes on for minutes. One average sample every 30s would be enough. I can tolerate 1%

author: T3sl4co1l
author_rank: Super Contributor
timestamp: December 21, 2019, 09:33:33 am
content: Ah, then a single stage RC, time constant anywhere from about 1ms, to almost 10s, should do. (Maybe do two RCs, just to make sure high frequency junk doesn't get through?) Take your pick.Tim