Author Topic: Averaging of a DC pulsed signal  (Read 1098 times)

0 Members and 1 Guest are viewing this topic.

Offline stcosoTopic starter

  • Regular Contributor
  • *
  • Posts: 107
  • Country: it
Averaging of a DC pulsed signal
« on: December 19, 2019, 12:14:08 pm »
Hi folks! I have a question that goes on my mind but i'm not 100% sure of the answer i found  ;D.

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 ;D.

If this is correct, which is the proper way to choose the R and C values ?


Big thanks in advance.
 

Offline EEEnthusiast

  • Frequent Contributor
  • **
  • Posts: 375
  • Country: in
  • RF boards, Precision Analog, Carpentry
    • https://www.zscircuits.in/
Re: Averaging of a DC pulsed signal
« Reply #1 on: December 19, 2019, 01:18:49 pm »
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.
Making products for IOT
https://www.zscircuits.in/
 
The following users thanked this post: stcoso

Offline David Hess

  • Super Contributor
  • ***
  • Posts: 16620
  • Country: us
  • DavidH
Re: Averaging of a DC pulsed signal
« Reply #2 on: December 19, 2019, 05:06:47 pm »
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.
 
The following users thanked this post: stcoso

Offline macboy

  • Super Contributor
  • ***
  • Posts: 2256
  • Country: ca
Re: Averaging of a DC pulsed signal
« Reply #3 on: December 20, 2019, 06:09:39 pm »
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).
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21688
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Averaging of a DC pulsed signal
« Reply #4 on: December 20, 2019, 06:42:53 pm »
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
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 

Offline stcosoTopic starter

  • Regular Contributor
  • *
  • Posts: 107
  • Country: it
Re: Averaging of a DC pulsed signal
« Reply #5 on: December 20, 2019, 11:05:04 pm »
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.


I wish I had the expertise to design or the money to buy a gated integrator :-DD
 

Offline stcosoTopic starter

  • Regular Contributor
  • *
  • Posts: 107
  • Country: it
Re: Averaging of a DC pulsed signal
« Reply #6 on: December 20, 2019, 11:11:39 pm »
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).

The 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.
 

Offline stcosoTopic starter

  • Regular Contributor
  • *
  • Posts: 107
  • Country: it
Re: Averaging of a DC pulsed signal
« Reply #7 on: December 20, 2019, 11:26:45 pm »
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



I'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
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21688
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Averaging of a DC pulsed signal
« Reply #8 on: December 21, 2019, 01:13:07 am »
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
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: stcoso

Offline stcosoTopic starter

  • Regular Contributor
  • *
  • Posts: 107
  • Country: it
Re: Averaging of a DC pulsed signal
« Reply #9 on: December 21, 2019, 06:44:50 am »
This signal is not changing and goes on for minutes. One average sample every 30s would be enough. I can tolerate 1%  :)
 

Offline T3sl4co1l

  • Super Contributor
  • ***
  • Posts: 21688
  • Country: us
  • Expert, Analog Electronics, PCB Layout, EMC
    • Seven Transistor Labs
Re: Averaging of a DC pulsed signal
« Reply #10 on: December 21, 2019, 09:33:33 am »
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. ;D

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!
 
The following users thanked this post: stcoso


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf