FPGA Central - World's 1st FPGA / CPLD Portal

FPGA Central

World's 1st FPGA Portal

 

Go Back   FPGA Groups > NewsGroup > DSP

DSP comp.dsp newsgroup, mailing list

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-15-2007, 08:53 PM
mermeladeK
Guest
 
Posts: n/a
Default Optimum length for a mean filter

Hi all,

This is a quite basic question:

I am doing some nuclear spectroscopy where I use a shaping filter tha
basically transforms a step input into a triangular pulse.

Mainly, what the shaping filter is doing is reducing the noise an
outputting a pulse whose amplitude is still proportional to the step inpu
amplitude. The impulse response of this triangular shaping is a positiv
"square" followed by a negative "square".

In practical terms this filter just acts as a mean filter with a certai
length. In theory if it has a larger length the noise reduction is highe
(AWGN). However there is a point where a larger mean time doesn't reduc
the noise anymore.
Why? What is the optimum length then?

Thank you very much.


Reply With Quote
  #2 (permalink)  
Old 11-15-2007, 10:58 PM
Jerry Avins
Guest
 
Posts: n/a
Default Re: Optimum length for a mean filter

mermeladeK wrote:
> Hi all,
>
> This is a quite basic question:
>
> I am doing some nuclear spectroscopy where I use a shaping filter that
> basically transforms a step input into a triangular pulse.
>
> Mainly, what the shaping filter is doing is reducing the noise and
> outputting a pulse whose amplitude is still proportional to the step input
> amplitude. The impulse response of this triangular shaping is a positive
> "square" followed by a negative "square".
>
> In practical terms this filter just acts as a mean filter with a certain
> length. In theory if it has a larger length the noise reduction is higher
> (AWGN). However there is a point where a larger mean time doesn't reduce
> the noise anymore.
> Why? What is the optimum length then?


I can't construct a consistent model for your process. Maybe we mean
different things by the same terms. This is what your terms mean to me:

Step input, ignoring noise; the signal is zero until a particular time
and is some finite value thereafter. An example is the unit step. it is
zero for all negative time and 1 for all positive time.

Triangular pulse, again ignoring noise; the signal rises from zero to a
maximum in finite time, then returns to zero in in finite time.

###

An impulse response which is a positive "square" followed by a negative
one of equal size produces an output which has no DC component. A
triangular pulse has such a component. That impulse response has
characteristics of a differentiator. Differentiators emphasize noise.

Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply With Quote
  #3 (permalink)  
Old 11-15-2007, 11:20 PM
mermeladeK
Guest
 
Posts: n/a
Default Re: Optimum length for a mean filter

Hi Jerry,

Yes the input signal is a step, as you defined it, plus AWGN. The impuls
response is AC as you said as well. The differentiator is as you say no
good for the signal since it decreases the signal more than the noise
However is before the negative "square" of the impulse response start
working that it is important me. That is just to make the filter AC.

So before the negative square there is the positive one, that works as a
integrator, so it improves the SNR. The maximum of the output signal, th
triangle, is proportional to the amplitude of the input step.

What I was asking is that in theory, in order to have the best relatio
signal to noise, the longer the impulse response the better. But i
practice, it's not true. When I use too long impulse responses the nois
stops deacreasing. What is more it even increases.

So my question, is there some more theory that explains why there is
point where longer lengths for the impulse response don't increase th
SNR? And what is the optimum length?
I think I heard something about too much lenght would distort the signal
hence stop improving the SNR...

>mermeladeK wrote:
>> Hi all,
>>
>> This is a quite basic question:
>>
>> I am doing some nuclear spectroscopy where I use a shaping filter that
>> basically transforms a step input into a triangular pulse.
>>
>> Mainly, what the shaping filter is doing is reducing the noise and
>> outputting a pulse whose amplitude is still proportional to the ste

input
>> amplitude. The impulse response of this triangular shaping is

positive
>> "square" followed by a negative "square".
>>
>> In practical terms this filter just acts as a mean filter with

certain
>> length. In theory if it has a larger length the noise reduction i

higher
>> (AWGN). However there is a point where a larger mean time doesn'

reduce
>> the noise anymore.
>> Why? What is the optimum length then?

>
>I can't construct a consistent model for your process. Maybe we mean
>different things by the same terms. This is what your terms mean to me:
>
>Step input, ignoring noise; the signal is zero until a particular time
>and is some finite value thereafter. An example is the unit step. it is
>zero for all negative time and 1 for all positive time.
>
>Triangular pulse, again ignoring noise; the signal rises from zero to a
>maximum in finite time, then returns to zero in in finite time.
>
>###
>
>An impulse response which is a positive "square" followed by a negative
>one of equal size produces an output which has no DC component. A
>triangular pulse has such a component. That impulse response has
>characteristics of a differentiator. Differentiators emphasize noise.
>
>Jerry
>--
>Engineering is the art of making what you want from things you can get.
>ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï ¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿ ½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï¿½ï ¿½ï¿½ï¿½ï¿½ï¿½
>

Reply With Quote
  #4 (permalink)  
Old 11-15-2007, 11:52 PM
Jerry Avins
Guest
 
Posts: n/a
Default Re: Optimum length for a mean filter

mermeladeK wrote:
> Hi Jerry,
>
> Yes the input signal is a step, as you defined it, plus AWGN. The impulse
> response is AC as you said as well. The differentiator is as you say not
> good for the signal since it decreases the signal more than the noise.
> However is before the negative "square" of the impulse response starts
> working that it is important me. That is just to make the filter AC.
>
> So before the negative square there is the positive one, that works as an
> integrator, so it improves the SNR. The maximum of the output signal, the
> triangle, is proportional to the amplitude of the input step.
>
> What I was asking is that in theory, in order to have the best relation
> signal to noise, the longer the impulse response the better. But in
> practice, it's not true. When I use too long impulse responses the noise
> stops deacreasing. What is more it even increases.
>
> So my question, is there some more theory that explains why there is a
> point where longer lengths for the impulse response don't increase the
> SNR? And what is the optimum length?
> I think I heard something about too much lenght would distort the signal,
> hence stop improving the SNR...


When you say that the noise increases, do you mean in absolute value, or
relative to the signal? The signal, after all, is a linear ramp whose
slope is determined by the height of your square, and whose duration is
equal to the square's. Increasing the duration increases the height in
proportion. Do you observe that the signal-to-noise /ratio/ actually
decreases?

The second half of your filter's impulse response is not material to the
question at hand. (It may have an important purpose; I'd like to know
what.) The first half is a poor low-pass filter; you might do better
with a different one. If that seems to be a possibly reasonable
direction for you, I and others here will be happy to discuss an
implementation.

Jerry
--
Engineering is the art of making what you want from things you can get.
Reply With Quote
  #5 (permalink)  
Old 11-16-2007, 01:19 AM
mermeladeK
Guest
 
Posts: n/a
Default Re: Optimum length for a mean filter

Hi Jerry,

When I say that the noise increases or decreases I am refering to th
relative value to the signal. Exactly the filter is just a low pass filte
if you ommit the second half which is not really relevant.

I don't want another type of filter since this is the most narro
frequency filter I can have, that is to say, the one that deletes mor
noise. The main question is, when I increase the length of the mean filte
(the low pass filter), there is a point where the SNR stops increasing. D
you know why?

>mermeladeK wrote:
>> Hi Jerry,
>>
>> Yes the input signal is a step, as you defined it, plus AWGN. Th

impulse
>> response is AC as you said as well. The differentiator is as you sa

not
>> good for the signal since it decreases the signal more than the noise.
>> However is before the negative "square" of the impulse response starts
>> working that it is important me. That is just to make the filter AC.
>>
>> So before the negative square there is the positive one, that works a

an
>> integrator, so it improves the SNR. The maximum of the output signal

the
>> triangle, is proportional to the amplitude of the input step.
>>
>> What I was asking is that in theory, in order to have the bes

relation
>> signal to noise, the longer the impulse response the better. But in
>> practice, it's not true. When I use too long impulse responses th

noise
>> stops deacreasing. What is more it even increases.
>>
>> So my question, is there some more theory that explains why there is a
>> point where longer lengths for the impulse response don't increase the
>> SNR? And what is the optimum length?
>> I think I heard something about too much lenght would distort th

signal,
>> hence stop improving the SNR...

>
>When you say that the noise increases, do you mean in absolute value, o


>relative to the signal? The signal, after all, is a linear ramp whose
>slope is determined by the height of your square, and whose duration is
>equal to the square's. Increasing the duration increases the height in
>proportion. Do you observe that the signal-to-noise /ratio/ actually
>decreases?
>
>The second half of your filter's impulse response is not material to th


>question at hand. (It may have an important purpose; I'd like to know
>what.) The first half is a poor low-pass filter; you might do better
>with a different one. If that seems to be a possibly reasonable
>direction for you, I and others here will be happy to discuss an
>implementation.
>
>Jerry
>--
>Engineering is the art of making what you want from things you can get.
>

Reply With Quote
  #6 (permalink)  
Old 11-16-2007, 02:48 AM
dbd
Guest
 
Posts: n/a
Default Re: Optimum length for a mean filter

On Nov 15, 4:19 pm, "mermeladeK" <nil.gar...@gmail.com> wrote:
> Hi Jerry,
>
> When I say that the noise increases or decreases I am refering to the
> relative value to the signal. Exactly the filter is just a low pass filter
> if you ommit the second half which is not really relevant.
>
> I don't want another type of filter since this is the most narrow
> frequency filter I can have, that is to say, the one that deletes more
> noise. The main question is, when I increase the length of the mean filter
> (the low pass filter), there is a point where the SNR stops increasing. Do
> you know why?
>
>
>
> >mermeladeK wrote:
> >> Hi Jerry,

>
> >> Yes the input signal is a step, as you defined it, plus AWGN. The

> impulse
> >> response is AC as you said as well. The differentiator is as you say

> not
> >> good for the signal since it decreases the signal more than the noise.
> >> However is before the negative "square" of the impulse response starts
> >> working that it is important me. That is just to make the filter AC.

>
> >> So before the negative square there is the positive one, that works as

> an
> >> integrator, so it improves the SNR. The maximum of the output signal,

> the
> >> triangle, is proportional to the amplitude of the input step.

>
> >> What I was asking is that in theory, in order to have the best

> relation
> >> signal to noise, the longer the impulse response the better. But in
> >> practice, it's not true. When I use too long impulse responses the

> noise
> >> stops deacreasing. What is more it even increases.

>
> >> So my question, is there some more theory that explains why there is a
> >> point where longer lengths for the impulse response don't increase the
> >> SNR? And what is the optimum length?
> >> I think I heard something about too much lenght would distort the

> signal,
> >> hence stop improving the SNR...

>
> >When you say that the noise increases, do you mean in absolute value, or
> >relative to the signal? The signal, after all, is a linear ramp whose
> >slope is determined by the height of your square, and whose duration is
> >equal to the square's. Increasing the duration increases the height in
> >proportion. Do you observe that the signal-to-noise /ratio/ actually
> >decreases?

>
> >The second half of your filter's impulse response is not material to the
> >question at hand. (It may have an important purpose; I'd like to know
> >what.) The first half is a poor low-pass filter; you might do better
> >with a different one. If that seems to be a possibly reasonable
> >direction for you, I and others here will be happy to discuss an
> >implementation.

>
> >Jerry
> >--
> >Engineering is the art of making what you want from things you can get.


This is how it looks to me:

Input-no signal: zero mean AWGN
Signal: Step function, I'll assume a sign (positive) to make it easier
to talk about
Detection filter impulse response: single cycle square wave, first
positive then negative

Output of noise w/o signal: zero mean AWGN proportional to the square
root of the impulse response duration

Output of signal w/o AWGN: triangle wave, peak proportional to the
impulse response duration, impulse response duration equal to that of
the square wave.

The operations are linear so the output will be the sum of the two
previous items.

Now, what is the optimum length of the impulse response? Well, optimum
for what?

To merely detect the signal, a threshold crossing can be used. For a
fixed false alarm rate, the level will have to be increased as the
square root of the impulse response length of the square wave. As the
impulse response length is increased at constant false alarm rate, the
system will be capable of detecting signals of amplitude inversely
proportional to impulse duration, but the delay between the signal
onset and the detection will increase. Is this what was meant by
distortion?

To detect and measure the amplitude of an input signal, the value of
peaks in the output can be used. If the peak exceeds a threshold, a
detection is called. The amplitude of the peak is proportional to the
height of the input step function and the time of signal onset
precedes the detected peak by half the impulse response length of the
square wave. The threshold can be varied at a fixed impulse length to
tradeoff between false alarm rate and sensitivity. If the sensitivity
is increased by increasing the impulse response length, you have to be
able to wait longer to get your amplitude measurement.

A more complicated detection structure could verify that the threshold
exceedances were due to triangle waves and would add more delay to the
process.

SNR at the peak of the triangle output should continue to increase as
the impulse response length increases. But it will be worse at a given
delay from the onset of the step function until the signal response
has had time to exceed the noise output from longer impulse response
length.

Limits on the real usefulness of increasing the impulse response
length can come from nonstationarity of the additive noise, limits
(such as AC coupling) on how long the input signal really represents a
step function and the tolerable delay in response time.

The square wave is a differentiator. Fortunately it is a poor and
narrow bandwidth differentiator. The usefulness of the negative
portion of the impulse response may come from the multiplierless
ability to set a constant baseline for the detection process just as
the positive portion provides a poor but multiplierless matched filter
for the input signal.

Dale B. Dalrymple
http://dbdimages.com
http://stores.lulu.com/dbd

Reply With Quote
  #7 (permalink)  
Old 11-16-2007, 03:17 AM
Jerry Avins
Guest
 
Posts: n/a
Default Re: Optimum length for a mean filter

mermeladeK wrote:
> Hi Jerry,
>
> When I say that the noise increases or decreases I am refering to the
> relative value to the signal. Exactly the filter is just a low pass filter
> if you ommit the second half which is not really relevant.
>
> I don't want another type of filter since this is the most narrow
> frequency filter I can have, that is to say, the one that deletes more
> noise. The main question is, when I increase the length of the mean filter
> (the low pass filter), there is a point where the SNR stops increasing. Do
> you know why?


I don't know why. I'd like to see it. Since it runs counter to what we
both believe should happen, I suspect that the effect is only apparent.
My doubt remains tentative because such a strong statement requires
strong support, and I can't supply it.

An integrator, seen as a low-pass filter, rolls off at 20 dB/decade.
Good digital filters can drop 60 dB in a third of an octave or less. By
what criterion is an integrator the best low-pass filter you can have?

Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply With Quote
  #8 (permalink)  
Old 11-16-2007, 04:14 AM
Jerry Avins
Guest
 
Posts: n/a
Default Re: Optimum length for a mean filter

Jerry Avins wrote:
> mermeladeK wrote:
>> Hi Jerry,
>>
>> When I say that the noise increases or decreases I am refering to the
>> relative value to the signal. Exactly the filter is just a low pass
>> filter
>> if you ommit the second half which is not really relevant.
>>
>> I don't want another type of filter since this is the most narrow
>> frequency filter I can have, that is to say, the one that deletes more
>> noise. The main question is, when I increase the length of the mean
>> filter
>> (the low pass filter), there is a point where the SNR stops
>> increasing. Do
>> you know why?

>
> I don't know why. I'd like to see it. Since it runs counter to what we
> both believe should happen, I suspect that the effect is only apparent.
> My doubt remains tentative because such a strong statement requires
> strong support, and I can't supply it.
>
> An integrator, seen as a low-pass filter, rolls off at 20 dB/decade.
> Good digital filters can drop 60 dB in a third of an octave or less. By
> what criterion is an integrator the best low-pass filter you can have?


I think I understand your filter. A signal is continuously applied to
its input, and the noise in the signal is averaged continuously.
(Assuming constant noise, it increases in the first half of the filter
with the the square root of its duration. The second half of the filter
subtracts the noise back out so the integrator doesn't overflow. The
ramp is superimposed on the accumulated noise when the step begins. The
highest part of the ramp will have the best signal-to-noise ratio
*provided that the step duration exceeds the positive part of the
impulse response* and the the step's noise-free amplitude is constant.
If the SNR deteriorates with increasing IR duration, it is possible that
the step is actually a pulse that isn't long enough. If my view of the
filter -- that its input is fed continuously -- is correct, you can get
much better performance with a modification. Whether in the end you
choose stay with an integrator or use a better filter, blocking the
filter's input until a step is detected will keep out much of the noise.

Jerry
--
Engineering is the art of making what you want from things you can get.
Reply With Quote
  #9 (permalink)  
Old 11-16-2007, 06:51 AM
mnentwig
Guest
 
Posts: n/a
Default Re: Optimum length for a mean filter

Hi,

you might have a look at the "matched filter" concept from
communications textbook.

If I limit the bandwidth towards DC (highpass characteristics with a ver
low cutoff frequency), then the impulse response of pulse and ideal filte
both decay with time.
A matched filter also rejects out-of-band noise.

-mn
Reply With Quote
  #10 (permalink)  
Old 11-16-2007, 10:28 AM
dbd
Guest
 
Posts: n/a
Default Re: Optimum length for a mean filter

On Nov 15, 7:14 pm, Jerry Avins <j...@ieee.org> wrote:
..> Jerry Avins wrote:
....
..> Whether in the end you
..> choose stay with an integrator or use a better filter, blocking the
..> filter's input until a step is detected will keep out much of the
noise.
..>
..> Jerry

While this statement is certainly true it is not of much use to the
step detector itself. You have obviously provided another example of
the classic detector optimized to minimize false alarm rate by being
turned off. This is probably no longer patentable as it was widely
known before the end of the last century. But with the patent system
you never know...

Dale B. Dalrymple
Reply With Quote
  #11 (permalink)  
Old 11-16-2007, 12:14 PM
mermeladeK
Guest
 
Posts: n/a
Default Re: Optimum length for a mean filter

Hi Jerry, mn and Dale,

Maybe I wasn't clear explaining my problem, but you have made the way t
it. Hehehe. Yes, all your guesses about what was my problem are right.

Dale: yes, there is the threshold issue but it is not important for m
now. You are also right in saying that you lose time resolution if yo
increase the shaping time of the filter. What is very interesting fro
what you said is that nonstationary of the noise can limit the shapin
time. Could you expand the idea? Is there are any paper explaining this?

Jerry: that's right, the SNR is maximum just on the pic. You can block th
noise but that actually requires to know when it starts and that's also th
purpose of the filter... hehe. The SNR increasing with a longer length o
the filter might come as you say from the idea that the step is no
actually a step, for instance an exponential. But in this case it is
step, I actually implement a pole-zero compensator that converts th
exponentail into a step.

Nm: right! I am implementing also a matched filter which would provide th
best SNR. But this is still independent from the idea that by increasin
the length of the filter the SNR should decrease.


>On Nov 15, 7:14 pm, Jerry Avins <j...@ieee.org> wrote:
>.> Jerry Avins wrote:
>...
>.> Whether in the end you
>.> choose stay with an integrator or use a better filter, blocking the
>.> filter's input until a step is detected will keep out much of the
>noise.
>.>
>.> Jerry
>
>While this statement is certainly true it is not of much use to the
>step detector itself. You have obviously provided another example of
>the classic detector optimized to minimize false alarm rate by being
>turned off. This is probably no longer patentable as it was widely
>known before the end of the last century. But with the patent system
>you never know...
>
>Dale B. Dalrymple
>

Reply With Quote
  #12 (permalink)  
Old 11-16-2007, 01:04 PM
Richard Owlett
Guest
 
Posts: n/a
Default Re: Optimum length for a mean filter

mermeladeK wrote:
> Hi all,
>
> This is a quite basic question:
>
> I am doing some nuclear spectroscopy

^^^??????????????^^^
> where I use a shaping filter that
> basically transforms a step input into a triangular pulse.
>
> Mainly, what the shaping filter is doing is reducing the noise and
> outputting a pulse whose amplitude is still proportional to the step input
> amplitude. The impulse response of this triangular shaping is a positive
> "square" followed by a negative "square".
>
> In practical terms this filter just acts as a mean filter with a certain
> length. In theory if it has a larger length the noise reduction is higher
> (AWGN). However there is a point where a larger mean time doesn't reduce
> the noise anymore.
> Why? What is the optimum length then?
>
> Thank you very much.
>
>


When using the term "nuclear spectroscopy", what do you mean?
I Googled for it and came up with
http://www.espionageinfo.com/Nt-Pa/N...ctroscopy.html which used
it to refer to anything from "Neutron activation analysis" to NMR

What specifically are you doing? There may be another approach to the
problem. Or are you restricted to a specific instrument and have access
only to a specific port on it?


Reply With Quote
  #13 (permalink)  
Old 11-16-2007, 02:43 PM
mermeladeK
Guest
 
Posts: n/a
Default Re: Optimum length for a mean filter

Hi!

Well, in my case I am referring specifically to X/gamma rays spectroscopy
But do not think about it, the problem is more about a signal processin
matter.

>mermeladeK wrote:
>> Hi all,
>>
>> This is a quite basic question:
>>
>> I am doing some nuclear spectroscopy

> ^^^??????????????^^^
>> where I use a shaping filter that
>> basically transforms a step input into a triangular pulse.
>>
>> Mainly, what the shaping filter is doing is reducing the noise and
>> outputting a pulse whose amplitude is still proportional to the ste

input
>> amplitude. The impulse response of this triangular shaping is

positive
>> "square" followed by a negative "square".
>>
>> In practical terms this filter just acts as a mean filter with

certain
>> length. In theory if it has a larger length the noise reduction i

higher
>> (AWGN). However there is a point where a larger mean time doesn'

reduce
>> the noise anymore.
>> Why? What is the optimum length then?
>>
>> Thank you very much.
>>
>>

>
>When using the term "nuclear spectroscopy", what do you mean?
>I Googled for it and came up with
>http://www.espionageinfo.com/Nt-Pa/N...ctroscopy.html which used
>it to refer to anything from "Neutron activation analysis" to NMR
>
>What specifically are you doing? There may be another approach to the
>problem. Or are you restricted to a specific instrument and have access
>only to a specific port on it?
>
>
>

Reply With Quote
  #14 (permalink)  
Old 11-16-2007, 04:29 PM
Ulrich Bangert
Guest
 
Posts: n/a
Default Re: Optimum length for a mean filter

Hi mermeladeK,

> Well, in my case I am referring specifically to X/gamma rays spectroscopy.
> But do not think about it, the problem is more about a signal processing
> matter.


I guess that a lot of confusion concerning your question arises from the
fact that most if not all of the posters are completely unfamiliar with the
waveforms observed in nuclear spectroscopy starting with detector signals,
pre-amplifier-signals and main-amplifier outputs. I am a little bit because
I constructed a 12 bit DIY pulse height analyzer based on a 6809
microcontroller some 25 years ago during my work at unisversity. A link to
some scope screenshots showing real-world signals would have helped a lot to
understand your question. If you talk about a "step" I am clear aware that
you are referring to a sudden change of voltage sitting on top of the
exponential decay of another event but a "step" is understood in quite a
different manner for DSP people!

Regarding your original question: The laws of physics have not changed with
the introduction of dsp and what pulse shaping amplifiers have to do and not
to do can be studied completely in the analogue domain. After the analogue
domain behaviour is understood well enough one may try to perform the
translation into the time discrete sampling domain.

For information on nuclear pulse shape amplifiers the big name to google for
is Edward Fairstein. Learn from him the basics and then go out and make it
the dsp way.

Best regards
Ulrich Bangert


"mermeladeK" <[email protected]> schrieb im Newsbeitrag
news:[email protected] ...
> Hi!
>
> Well, in my case I am referring specifically to X/gamma rays spectroscopy.
> But do not think about it, the problem is more about a signal processing
> matter.
>
> >mermeladeK wrote:
> >> Hi all,
> >>
> >> This is a quite basic question:
> >>
> >> I am doing some nuclear spectroscopy

> > ^^^??????????????^^^
> >> where I use a shaping filter that
> >> basically transforms a step input into a triangular pulse.
> >>
> >> Mainly, what the shaping filter is doing is reducing the noise and
> >> outputting a pulse whose amplitude is still proportional to the step

> input
> >> amplitude. The impulse response of this triangular shaping is a

> positive
> >> "square" followed by a negative "square".
> >>
> >> In practical terms this filter just acts as a mean filter with a

> certain
> >> length. In theory if it has a larger length the noise reduction is

> higher
> >> (AWGN). However there is a point where a larger mean time doesn't

> reduce
> >> the noise anymore.
> >> Why? What is the optimum length then?
> >>
> >> Thank you very much.
> >>
> >>

> >
> >When using the term "nuclear spectroscopy", what do you mean?
> >I Googled for it and came up with
> >http://www.espionageinfo.com/Nt-Pa/N...ctroscopy.html which used
> >it to refer to anything from "Neutron activation analysis" to NMR
> >
> >What specifically are you doing? There may be another approach to the
> >problem. Or are you restricted to a specific instrument and have access
> >only to a specific port on it?
> >
> >
> >



Reply With Quote
  #15 (permalink)  
Old 11-16-2007, 05:43 PM
mermeladeK
Guest
 
Posts: n/a
Default Re: Optimum length for a mean filter

Hi Ulrich,

I'll take your suggestion of reading all I can, however I think m
question is not specific of any type of system.

Actually posting here is part of my research & study task abou
spectroscopy signal processing.

Thanks anyway.

>Hi mermeladeK,
>
>> Well, in my case I am referring specifically to X/gamma ray

spectroscopy.
>> But do not think about it, the problem is more about a signa

processing
>> matter.

>
>I guess that a lot of confusion concerning your question arises from the
>fact that most if not all of the posters are completely unfamiliar wit

the
>waveforms observed in nuclear spectroscopy starting with detecto

signals,
>pre-amplifier-signals and main-amplifier outputs. I am a little bi

because
>I constructed a 12 bit DIY pulse height analyzer based on a 6809
>microcontroller some 25 years ago during my work at unisversity. A lin

to
>some scope screenshots showing real-world signals would have helped a lo

to
>understand your question. If you talk about a "step" I am clear awar

that
>you are referring to a sudden change of voltage sitting on top of the
>exponential decay of another event but a "step" is understood in quite a
>different manner for DSP people!
>
>Regarding your original question: The laws of physics have not change

with
>the introduction of dsp and what pulse shaping amplifiers have to do an

not
>to do can be studied completely in the analogue domain. After th

analogue
>domain behaviour is understood well enough one may try to perform the
>translation into the time discrete sampling domain.
>
>For information on nuclear pulse shape amplifiers the big name to googl

for
>is Edward Fairstein. Learn from him the basics and then go out and mak

it
>the dsp way.
>
>Best regards
>Ulrich Bangert
>
>
>"mermeladeK" <[email protected]> schrieb im Newsbeitrag
>news:[email protected] m...
>> Hi!
>>
>> Well, in my case I am referring specifically to X/gamma ray

spectroscopy.
>> But do not think about it, the problem is more about a signa

processing
>> matter.
>>
>> >mermeladeK wrote:
>> >> Hi all,
>> >>
>> >> This is a quite basic question:
>> >>
>> >> I am doing some nuclear spectroscopy
>> > ^^^??????????????^^^
>> >> where I use a shaping filter that
>> >> basically transforms a step input into a triangular pulse.
>> >>
>> >> Mainly, what the shaping filter is doing is reducing the noise and
>> >> outputting a pulse whose amplitude is still proportional to th

step
>> input
>> >> amplitude. The impulse response of this triangular shaping is a

>> positive
>> >> "square" followed by a negative "square".
>> >>
>> >> In practical terms this filter just acts as a mean filter with a

>> certain
>> >> length. In theory if it has a larger length the noise reduction is

>> higher
>> >> (AWGN). However there is a point where a larger mean time doesn't

>> reduce
>> >> the noise anymore.
>> >> Why? What is the optimum length then?
>> >>
>> >> Thank you very much.
>> >>
>> >>
>> >
>> >When using the term "nuclear spectroscopy", what do you mean?
>> >I Googled for it and came up with
>> >http://www.espionageinfo.com/Nt-Pa/N...ctroscopy.html whic

used
>> >it to refer to anything from "Neutron activation analysis" to NMR
>> >
>> >What specifically are you doing? There may be another approach to the
>> >problem. Or are you restricted to a specific instrument and hav

access
>> >only to a specific port on it?
>> >
>> >
>> >

>
>
>

Reply With Quote
  #16 (permalink)  
Old 11-16-2007, 05:45 PM
mermeladeK
Guest
 
Posts: n/a
Default Re: Optimum length for a mean filter

About the step:

Yes, originally the step comes from the exponential pulse. But it doesn'
matter if the step is an approximation or not. In practice, the unit ste
function is what I am talking about because it is much longer than th
impulse response.

>On Nov 15, 7:14 pm, Jerry Avins <j...@ieee.org> wrote:
>.> Jerry Avins wrote:
>...
>.> Whether in the end you
>.> choose stay with an integrator or use a better filter, blocking the
>.> filter's input until a step is detected will keep out much of the
>noise.
>.>
>.> Jerry
>
>While this statement is certainly true it is not of much use to the
>step detector itself. You have obviously provided another example of
>the classic detector optimized to minimize false alarm rate by being
>turned off. This is probably no longer patentable as it was widely
>known before the end of the last century. But with the patent system
>you never know...
>
>Dale B. Dalrymple
>

Reply With Quote
  #17 (permalink)  
Old 11-16-2007, 10:03 PM
Jerry Avins
Guest
 
Posts: n/a
Default Re: Optimum length for a mean filter

dbd wrote:
> On Nov 15, 7:14 pm, Jerry Avins <j...@ieee.org> wrote:
> .> Jerry Avins wrote:
> ...
> .> Whether in the end you
> .> choose stay with an integrator or use a better filter, blocking the
> .> filter's input until a step is detected will keep out much of the
> noise.
> .>
> .> Jerry
>
> While this statement is certainly true it is not of much use to the
> step detector itself. You have obviously provided another example of
> the classic detector optimized to minimize false alarm rate by being
> turned off. This is probably no longer patentable as it was widely
> known before the end of the last century. But with the patent system
> you never know...


The OP wants to solve two problems. Detecting the presence of a step
came automatically with hid method of measuring the amplitude.
Separating the functions of detection and measurement can provide a
better solution.

Jerry
--
Engineering is the art of making what you want from things you can get.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Reply With Quote
  #18 (permalink)  
Old 11-19-2007, 10:58 AM
Ulrich Bangert
Guest
 
Posts: n/a
Default Re: Optimum length for a mean filter

Hi mermeladeK,

> ....however I think my
> question is not specific of any type of system.


I agree to you, that once that the waveforms you are referring to are common
business to all people that you ask for their advice, then the physical
background that leads to exactly these waveforms is of no concern anymore
and the waveforms itself may be discussed in terms of dsp only.

However, the instrumentation as well as the waveforms observed with this
instrumentation are VERY specific for nuclear spectroscopy (you know that
yourself, don't you?). Therefore my advice was not to expect that people
with a different scientific background than nuclear physics might be
familiar with them so you have to explain the waveforms you are referring to
very precise and don't use terms like "step" too easily which might be
interpreted by dsp stuff different from what you originally wanted to
express with the term.

You will find a very good introduction into dsp for nuclear physics as well
as a in depth discussion of pulse shaping and pulse shaping time constants
in

http://www.infn.it/thesis/PDF/519-Ba...-dottorato.pdf

And keep in mind that sometimes the right questions have to be asked. As a
rule of thumb the increase of s/n related to a "mean filter" over n samples
is sqrt(n). So asking for the optimum length of a mean filter may easily end
into: Make it as long as possible. However, this simple answer is clearly
wrong in this case because of the side effects of the mean filter which are

a) reducing the pulse height

and

b) time stretching the pulse

You don't like a) because you want your dsp system to work with the full bit
resolution available (may be less important with floating point dsps). You
do't like b) because it makes your systems suspect to pile-up effects. The
question to ask for should have been for a waveform that represents the best
COMPROMISE between

a) increase in s/n

b) high time resolution

c) suitability for further processing

Once that such a waveform is found then it may be the challenge for dsp how
to generate this waveform from your detector signals. As far as my
understanding is, the research for the best waveform in terms of the
described properties (and perhaps some more) has been one of the main
topics for the people that research in dsp for nuclear physics.

>In theory if it has a larger length the noise reduction is higher
>(AWGN). However there is a point where a larger mean time doesn't
>reduce the noise anymore.Why? What is the optimum length then?


The mean filter clearly improves the sígnal's s/n the longer it is. If you
do not observe an OVERALL increase in s/n then this is probably due the fact
that your system is not able to make USE of the increased s/n. For fixed
point dsps: For any signal amplitude there is a specific s/n due to the
discrete amplitude levels possible with a sampled system that you cannot go
below. If your signal's s/n falls below this s/n you will see no further
improvement because the overall s/n is dominated by the system's noise. This
is just one possible reason but there may also be other computations in the
further processing that cannot benefit from an increase in s/n at the front
end but may react with an increase of "computational noise" to the reduced
amplitude and slope.

Best regards
Ulrich Bangert



"mermeladeK" <[email protected]> schrieb im Newsbeitrag
news:[email protected] ...
> Hi Ulrich,
>
> I'll take your suggestion of reading all I can, however I think my
> question is not specific of any type of system.
>
> Actually posting here is part of my research & study task about
> spectroscopy signal processing.
>
> Thanks anyway.
>
> >Hi mermeladeK,
> >
> >> Well, in my case I am referring specifically to X/gamma rays

> spectroscopy.
> >> But do not think about it, the problem is more about a signal

> processing
> >> matter.

> >
> >I guess that a lot of confusion concerning your question arises from the
> >fact that most if not all of the posters are completely unfamiliar with

> the
> >waveforms observed in nuclear spectroscopy starting with detector

> signals,
> >pre-amplifier-signals and main-amplifier outputs. I am a little bit

> because
> >I constructed a 12 bit DIY pulse height analyzer based on a 6809
> >microcontroller some 25 years ago during my work at unisversity. A link

> to
> >some scope screenshots showing real-world signals would have helped a lot

> to
> >understand your question. If you talk about a "step" I am clear aware

> that
> >you are referring to a sudden change of voltage sitting on top of the
> >exponential decay of another event but a "step" is understood in quite a
> >different manner for DSP people!
> >
> >Regarding your original question: The laws of physics have not changed

> with
> >the introduction of dsp and what pulse shaping amplifiers have to do and

> not
> >to do can be studied completely in the analogue domain. After the

> analogue
> >domain behaviour is understood well enough one may try to perform the
> >translation into the time discrete sampling domain.
> >
> >For information on nuclear pulse shape amplifiers the big name to google

> for
> >is Edward Fairstein. Learn from him the basics and then go out and make

> it
> >the dsp way.
> >
> >Best regards
> >Ulrich Bangert
> >
> >
> >"mermeladeK" <[email protected]> schrieb im Newsbeitrag
> >news:[email protected] m...
> >> Hi!
> >>
> >> Well, in my case I am referring specifically to X/gamma rays

> spectroscopy.
> >> But do not think about it, the problem is more about a signal

> processing
> >> matter.
> >>
> >> >mermeladeK wrote:
> >> >> Hi all,
> >> >>
> >> >> This is a quite basic question:
> >> >>
> >> >> I am doing some nuclear spectroscopy
> >> > ^^^??????????????^^^
> >> >> where I use a shaping filter that
> >> >> basically transforms a step input into a triangular pulse.
> >> >>
> >> >> Mainly, what the shaping filter is doing is reducing the noise and
> >> >> outputting a pulse whose amplitude is still proportional to the

> step
> >> input
> >> >> amplitude. The impulse response of this triangular shaping is a
> >> positive
> >> >> "square" followed by a negative "square".
> >> >>
> >> >> In practical terms this filter just acts as a mean filter with a
> >> certain
> >> >> length. In theory if it has a larger length the noise reduction is
> >> higher
> >> >> (AWGN). However there is a point where a larger mean time doesn't
> >> reduce
> >> >> the noise anymore.
> >> >> Why? What is the optimum length then?
> >> >>
> >> >> Thank you very much.
> >> >>
> >> >>
> >> >
> >> >When using the term "nuclear spectroscopy", what do you mean?
> >> >I Googled for it and came up with
> >> >http://www.espionageinfo.com/Nt-Pa/N...ctroscopy.html which

> used
> >> >it to refer to anything from "Neutron activation analysis" to NMR
> >> >
> >> >What specifically are you doing? There may be another approach to the
> >> >problem. Or are you restricted to a specific instrument and have

> access
> >> >only to a specific port on it?
> >> >
> >> >
> >> >

> >
> >
> >



Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I optimize filter coefficient bit length and signal bit length? From Sweden FPGA 1 05-20-2008 09:55 PM
FIR filter length dependencies [email protected] DSP 6 08-29-2007 01:12 PM
Optimum Window Duration Huzefa DSP 0 03-05-2006 11:07 AM
How to decide the filter length in ADNC using LMS Algo ? Sandeep Chikkerur DSP 4 03-02-2005 04:21 PM
Half-Band Filter Length Randy Yates DSP 20 11-20-2004 08:03 PM


All times are GMT +1. The time now is 01:48 AM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
Copyright 2008 @ FPGA Central. All rights reserved