Spectrum Recorder PCI-E Card?

This area is for discussions involving any fusion related radiation metrology issues. Neutrons are the key signature of fusion, but other radiations are of interest to the amateur fusioneer as well.
Harald_Consul
Posts: 94
Joined: Sat Oct 20, 2018 6:01 am
Real name: Harald Consul

Re: Spectrum Recorder PCI-E Card?

Post by Harald_Consul »

Thank you guys. All those pitfalls in the electronic pathway of the analog signal beginning with the PMT and ending with analog preprocessor part before the A/D converter have been very insightful.

I have figured out, that 50 samples/ observations may be a good start for applying mixed distribution models, as 30 observations is the bottom to test a normal distribution. As the amplitude is about 20 nano-seconds long, that would make 2.5G Sample/s.

However, at the moment 2.5 MSample/s is the maximum of data acquisition cards (DAQ cards) at Ebay. Thus, I am postponing the acquisition of the DAQ card to wait for higher sampling rates in 1 or 2 years. For bridging I have to use my 200MHZ digi osci, meanwhile, which however is pretty limited in the total number of samples. But I am not willing to pay 5000 USD for a 2.5 GS/s card.
User avatar
Rich Feldman
Posts: 1470
Joined: Mon Dec 21, 2009 6:59 pm
Real name: Rich Feldman
Location: Santa Clara County, CA, USA

Re: Spectrum Recorder PCI-E Card?

Post by Rich Feldman »

Sorry, can't stay away.
Harald, I think you are missing the main point. Let's try again using one specific example.

Suppose your 20 ns pulses (with arbitrary alignment to sampling clock, and arbitrarily overlapping neighbors) are smooth and have minimum risetimes on the order of 2 ns, hypothetically. So that after a linear, continuous-time lowpass filter that stops everything above 250 MHz, very little was lost. Example continues with the assumption that in continuous-time filtered waveform, you could accurately get the location and size of each pulse, even when they partly overlap.

Now you want to do the processing using discrete-time methods (and discrete voltage resolution, but that's an independent detail).
You want 50 points per 20 ns pulse, which is 2.5 Gs/s (0.4 ns sample spacing). OK so far.
I claim that capturing 10 points per pulse ( 0.5 Gs/s, 2.0 ns spacing) in the filtered signal is enough.
Because you can compute the missing 40 points, without error, by proper multi-point interpolation from the sparser samples.
You could interpolate to a time resolution of 500 points per pulse if you wanted -- practically continuous-time. It works because of the properties of bandlimited signals. Wish there were time to make an illustrated demonstration, to overcome intuitive resistance to the concept.
All models are wrong; some models are useful. -- George Box
Harald_Consul
Posts: 94
Joined: Sat Oct 20, 2018 6:01 am
Real name: Harald Consul

Re: Spectrum Recorder PCI-E Card?

Post by Harald_Consul »

Thanks Rich!

First of all it is absolutely common when two or more scientists from different disciplines talk together in some kind of interdisciplinary communication, that they do not understand each other fully, simply due to different education and different wording. This sometimes requires a lot of patience on both sides. ;-)

When a mixed distribution model is applied to distinct between a multiple particle amplitude and single particle amplitude this is only based on the shape respectively the curvature of the signal amplitude.

Any interpolation between two samples will not exactly meet the true curvature of the amplitude. On the contrary the interpolation always pushes the curvature towards the one, that has been assumed for the interpolation. As any interpolation must be based on some curvature assumption, the interpolation can produce further data points, but no additional information about the true distribution/ true curvature of the signal.

Thus, the only possibility to decompose a piled up multi particle signal into singular particle events would be a better mathematical approach than the one I mentioned, that would require less than 50 samples/ data points per amplitude.
User avatar
Rich Feldman
Posts: 1470
Joined: Mon Dec 21, 2009 6:59 pm
Real name: Rich Feldman
Location: Santa Clara County, CA, USA

Re: Spectrum Recorder PCI-E Card?

Post by Rich Feldman »

Harald,
Would you mind sending, as lists of numbers, one or more realistic-looking PMT pulses with 0.4 ns between samples? You can draw them yourself, and they could even be piecewise linear if that simplifies your task.

I want to whip up, or at least threaten to whip up, a numerical demonstration.
We will resample at 1/5 of the rate, then see how sin(x)/x interpolation perfectly reconstructs all points along curves between the "sparse" samples.

Of course we will put an anti-aliasing filter before the sparse sampling. All interpolated points will exactly match the full-rate signal after the filter.
You need to be content with the fidelity of the full-rate filtered pulses
, which is like having front end electronics with a useful but not excessive analog bandwidth. Let's see how that looks when the original pulses are designed by you. Piecewise-linear shapes would get their sharp corners rounded by the filter, and excessively fast risetimes would be knocked down a bit.

The demo will have knobs to choose the time shift between two superimposed PMT pulses, and the phase of the sparse sampling.
Addition of the two time-shifted pulses can happen before or after the filtering, before or after the sparse sampling, and before or after the interpolation. We will see that they all give the same answer.

Respectfully,
Rich
All models are wrong; some models are useful. -- George Box
Harald_Consul
Posts: 94
Joined: Sat Oct 20, 2018 6:01 am
Real name: Harald Consul

Re: Spectrum Recorder PCI-E Card?

Post by Harald_Consul »

Rich, currently I do not have any real scintillation data, as I am still working on figuring out the electrical pin allocation of my "brand new" second hand scintillator tube.

Compare
viewtopic.php?f=20&t=12635&p=82261#p82261
viewtopic.php?f=13&t=12581&start=10
John Myers
Posts: 68
Joined: Tue Mar 07, 2017 7:13 pm
Real name:
Location: SoCal

Re: Spectrum Recorder PCI-E Card?

Post by John Myers »

One way to separate peaks is with deconvolution.

Harald, do you just want to precisely measure the number of particles or do you also want to measure the energy of the particle?
If you only want to count the particles it seems to me that you wouldn't need such a high sample rate. You would only need enough to distinguish between different types.
Harald_Consul
Posts: 94
Joined: Sat Oct 20, 2018 6:01 am
Real name: Harald Consul

Re: Spectrum Recorder PCI-E Card?

Post by Harald_Consul »

I want to count them seperately by energy.

E.g.:
#127 x 2.3 keV
#245 x 3.5 keV
# 87 x 7.1 keV

Deconvolution looks good. There are three R-Packages for deconvolution:
- dtangle
- deconvolveR
- decon

I do not have any experience in deconvultion, yet. How many samples (measurements) would deconvolution require per amplitude?
John Myers
Posts: 68
Joined: Tue Mar 07, 2017 7:13 pm
Real name:
Location: SoCal

Re: Spectrum Recorder PCI-E Card?

Post by John Myers »

When the time-domain function of each type of pulse, F(x), is known you then use FFT math to convert it to its frequency-domain representation, G(x).
Then when you measure a signal with multiple peaks squashed together you can use deconvolution on the G(x)'s to separate the peaks.

The number of samples needed will depend on how similar each pulse type is. You need a greater sample rate to distinguish between 2.3 keV and 3.5 keV then you would need between 2.3 keV and 7.1 keV. We need to know what each pulse looks like first to give a definitive answer.
Chris Mullins
Posts: 67
Joined: Sun Feb 19, 2017 11:32 am
Real name: Chris Mullins
Location: Shenandoah Valley, VA
Contact:

Re: Spectrum Recorder PCI-E Card?

Post by Chris Mullins »

Harald,

I'm not sure those deconvolution functions in R are what you are looking for. If the pulse shape is dominated more by the impulse response of the amplifier, then if you know the amplifier transfer function you can undo the time-domain effect of the amp by a deconvolution, which can be done in the time or frequency domain. This would restore the original, much narrower pulses that excited the amp, and presumably would undo the overlap if there are multiple closely spaced pulses. This is a time series analysis approach to undo a (presumably) linear transformation that smeared the original narrow pulse into a much wider one, not a statistical approach.

Like Rich said, if the amplifier naturally bandlimits the original pulse to say, 250 MHz (which it does if it's linear, and is limiting the rise time to ~2ns), then there is no loss of information in sampling at ~500Ms/s. If you sample faster, you're not gaining any information in a signal processing sense, because that information has already been removed by the bandlimiting amplifier. The deconvolution technique would work just as well at 500Ms/s as it would at 5Gs/s or even 50Gs/s

I think there's some confusion here because some of these terms used in discrete time series signal processing seem to be used in statistical analysis, but with different meanings. E.g. convolution, sampling, etc. Those R deconvolution functions don't seem to be related at all to the time-series deconvolution John was talking about (e.g. as demonstrated here with MATLAB: https://terpconnect.umd.edu/~toh/spectr ... ution.html)

An electrical engineering/signal processing approach would be to simulate this in something like MATLAB (or a free analog, Octave), which is geared more towards time-series analysis, and develop your basic algorithm there. Then, you could use a function generator with dual outputs to generate narrow pulses (that sometimes are closely spaced enough that the amp output would overlap), combine them, run them through a typical PMT amp filter (or equivalent), sample with a digital scope, and try your algorithm on it. That would give you some repeatable data to work with before you have your real scintillator working with real sources.
John Futter
Posts: 1848
Joined: Wed Apr 21, 2004 10:29 pm
Real name: John Futter
Contact:

Re: Spectrum Recorder PCI-E Card?

Post by John Futter »

Again
What Harald wants to do is exactly what an MCA does-- pulse height into bins
and no a computer or microcontroler is not the way to go if you want to count fast
I have already given the answer
Harald_Consul
Posts: 94
Joined: Sat Oct 20, 2018 6:01 am
Real name: Harald Consul

Re: Spectrum Recorder PCI-E Card?

Post by Harald_Consul »

You're absolutely right John, if I wanted to count in real time.

But that's not the case! Instead I want to record a longer period to a fast PC hard disk (a SSD) and to analyze the recorded data much more sophisticated by a statistical software for hours, days and weeks to solve the piled up amplitudes problem fully (thus to count 100% correctly).

John, why should I invest 800 USD for a multichannel analyzer or even much more USD for a more universal spectrum analyzer now, that count piled up amplitudes wrong,

when the HackRF software defined radio costs about 200 USD and most possibly its next generation will be 1GSample/s and I can record terrabytes of amplitude data with it and I could do nearly any known analysis with it using a statistics software like R?
Chris Mullins
Posts: 67
Joined: Sun Feb 19, 2017 11:32 am
Real name: Chris Mullins
Location: Shenandoah Valley, VA
Contact:

Re: Spectrum Recorder PCI-E Card?

Post by Chris Mullins »

Harald,

Focusing on just a couple small issues in this response - I think there are still some large terminology gaps causing some misunderstanding. In the US, a "spectrum analyzer" is a specific tool used mostly for RF work in the frequency domain. None of the hits in your ebay search for "spectrum analyzer" would be well suited for what you're trying to accomplish, or will be counting any pulses at all. Rich hit on this in his first reply in this thread - your use of the word "spectrum" here is a bit confusing, and when he asked about "radiation energy spectrum", that use of the word "spectrum" is completely different than how it's used in the phrase "spectrum analyzer" in the US.

Rich also tried to guide you to realize why that HackRF software-defined radio isn't going to be useful for your use. SDRs use special sampling techniques optimized for their purpose - take Rich's advice to learn about undersampling, and RF down-conversion to understand why that makes them unsuitable for baseband pulse sampling.

If you're trying to develop novel pulse analysis algorithms on a small budget, your best approach with real hardware is to get a cheap scope with a PC interface, and dump triggered waveforms to get some raw data. Looks like you can get a 500MHz, 1-2Gs/s scope used on ebay starting around $500 (in the US). If you don't already have a scope with those specs, you're going to need one anyway to get your hardware working. If you dump captured waveforms to a PC at the maximum rate of the scope, those won't be a continuous 2Gs/s trace, but still gives you data to work with. Statistically, does it matter if you only have a small percentage of the entire dataset, if the waveforms you do have are captured in an unbiased manner?

There is a lot of good advice from everyone in this thread that I don't think you're fully digesting.
Harald_Consul
Posts: 94
Joined: Sat Oct 20, 2018 6:01 am
Real name: Harald Consul

Re: Spectrum Recorder PCI-E Card?

Post by Harald_Consul »

Just for info: I've got a 250 MHZ 1GSample/s digital oscilloscope with data export functionality. However the maximum #samples is very limited. 48k samples or so.

Ok, lets do some digestion of your advices now:
  1. You say, to sense a periodic signal (e.g. sinus signal) a sample rate of 2,5 times the frequency would be fine (2 times rate = nyquist rate = absolute minimum)
  2. However, scintillation tube amplitudes are not periodic. If the signal risetime were on the order of 2 ns, you consider the signal a 200 MHz signal and suggest "high fidelity sampling" at 500 Msps for it.
  3. The optimal sample rate might be even a little higher considering the antialising problem. "In practice, designers need some room for the anti-alising filter to roll off between 100% passing with constant delay (in frequency range of interest) to 100% stopping (at and above half the sampling rate)." Here I do not understand how much more sampling rate is effectively required for antialising.
  4. You do not refer to mathematical decomposition method of piled up amplitude. I say, a mathematical decomposition method for of piled up amplitude should be the basis to determine the necessary sampling rate.
  5. You say, piled up amplitudes do not occur this often, that this would justify analyzing them sophistacally. I say, I buy a measurement instrument, that I will most possibly used for many purposes in the future. Therefore it is better to have the option to decompose piled up amplitudes than not to have. Further, a lot of physics discoveries have been caused by new more sophisticated detectors. Maybe I've got the chance to make such discovery with a sophisticated measurement instrument.
  6. You say, the waveform/ curvature of an scintillation amplitude is highly system specific (starting with PMT and ending with last analog signal processing in front of the A/D converter) and will tremendously depend on the rise- and fall times of the whole analog electronic pathway. Thus, trying to decompose a highly individual signal is not possible, as some kind of signal map/ signal directory cannot exist. I say, the deformation of the signal does not matter for decomposing it statistically, as far the signal deformation from the system electronic is always the same (especially in the means of skewness and kurtosis).
  7. You say, a shaping amplifier to slow down the pulse is another valid alternative. You say yourself, that this is only possible when the scintillation analysis is in "single particle detection" condition. Otherwise two following amplitudes will pile up. As I do not know about my future measurement conditions, I am not too interested in this approach this time (which might change in future).

I will address your advices to the HackRf software defined radio in another digestion like this one.
Last edited by Harald_Consul on Tue Feb 05, 2019 6:32 am, edited 1 time in total.
John Myers
Posts: 68
Joined: Tue Mar 07, 2017 7:13 pm
Real name:
Location: SoCal

Re: Spectrum Recorder PCI-E Card?

Post by John Myers »

  1. To avoid aliasing sampling needs to be greater then 2 times the signal frequency.
  2. ...
  3. Sampling too fast can also cause aliasing issues, so faster isn't necessarily better. The roll off rate of a filter isn't about the sample rate it has to do with how fast a frequency can be cutoff completely.
  4. Deconvolution is a mathematical method for separation(decomposition) of piled-up signals
  5. ...
  6. But it is possible to separate the pulses, it's just system specific because you need to know what each separate pulse looks like first before you try to 'decompose' a piled-up signal.
The HackRf is way too slow for the performance level you are looking for.
Harald_Consul
Posts: 94
Joined: Sat Oct 20, 2018 6:01 am
Real name: Harald Consul

Re: Spectrum Recorder PCI-E Card?

Post by Harald_Consul »

  1. The following picture from wikipedia aliasing article shows a sine funtion, that is undersampled:
    AliasingSines.svg.png
    So, if I sampled a periodic sine function with 2 or 2.5 times its frequency (to avoid aliazing), would that also invoke, that there are enough samples (data points) to reconstruct any sine function by e.g. fourier transformation, as far the assumption of periodicity is met?
  2. If no. 1 is true, how is this reconstruction possibility then extended to non-periodic signals like scintillation amplitudes? By section-wise approximation by a sine function? If so, what mathematical method is used to this approximation? Afaik fourier transformation can only handle strictly periodic signals.
As I want to analyse the raw data in software, I have to explicitly rebuild the approximation/ interpolation logic, that may be applied by a digital scope implicitly on automatic.
Chris Mullins
Posts: 67
Joined: Sun Feb 19, 2017 11:32 am
Real name: Chris Mullins
Location: Shenandoah Valley, VA
Contact:

Re: Spectrum Recorder PCI-E Card?

Post by Chris Mullins »

Harald,

The sampled signal doesn't have to be periodic, just bandlimited. E.g. see here: https://www.maximintegrated.com/en/app- ... vp/id/3628. The reconstruction is the same, using the sinc function like Rich already mentioned. Try searching on "reconstruction filter" to learn more about that. In practice though, reconstruction isn't usually done if there is further signal processing or detection to be done. Since it doesn't add any signal information (in an information theory sense), it's often the case that an algorithm optimal in some sense gives the same result either way.

Deconvolution is one technique to undo the low pass filtering/pulse stretching of the PMT amp. In communications theory terms, the frequency response of the pre-amp/amp is the "channel", the original narrow pulse (that you can't measure directly) is the signal. You create an "inverse filter" to undo the frequency response of the "channel", thus restoring the original narrow pulse. This would turn the stacked pulse into non-overlapping very narrow pulses. There's a whole body of signal processing around this technique, including tracking a time-varying channel. Try searching on "inverse filter" or "channel estimation" to learn more.

There are also techniques for when you don't know the channel - try searching on "blind deconvolution" or "deblurring" (although these are often 2D algorithms, they can also be done with 1D signals). In your case, the "channel" doesn't change with time (it's "stationary"), and should be easy to characterize, since it's mostly the effects of the amp itself. In fact, if the original pulse is narrow enough, the PMT amp output is the "impulse response" of the channel, and the opposite of that is the inverse filter.

If your scope can sample at 1Gs/s with a 48K depth, that could be enough to get started. If it can capture and transfer say 200 of those per second to the PC, that's about 1% of realtime. Since the pulses are mostly independent, just wait longer to capture more data, and splice the captures together.
Harald_Consul
Posts: 94
Joined: Sat Oct 20, 2018 6:01 am
Real name: Harald Consul

Re: Spectrum Recorder PCI-E Card?

Post by Harald_Consul »

Thanks for your insights into physics topics. I do not doubt, I am maybe sometimes like a little child in these physics things, as I am a statistician (not a physcists).

However, on the other side it may also be interesting for you physicists how a statistician is planning to deal with the piled up amplitude problem by software programming in R. As most of you do not understand R code, I will write pseudocode, instead.

Code: Select all

# Assuming the voltage data from a data acqusistion card would a csv data file, which has a voltage figure on every line.
import.csv("mdata_00.csv" as mdata_00)
columns(mdata_00)= c("ln", "volt")

# (Non-noise) signal is greater than 0.1 V
mdata_01= data.frame(mdata_00, signal= (mdata_00$volt>= 0.1))
mdata_01= data.frame(mdata_01, voltmax= roll.max(madata_01$volt, 30))
mdata_01= data.frame(mdata_01, ampbegin= rep(NA, nrow(mdata_01), ampend= rep(NA, nrow(mdata_01))
mdata_01$ampbegin= (madata_01$signal== TRUE & mdata_01$signal.predecessor== FALSE)
mdata_01$ampend= (madata_01$signal== TRUE & mdata_01$signal.succesor== FALSE)

mdata02= select(mdata_01 where mdata_0$sinal==TRUE)
mdata02$ampno=rep(NA, nrow(mdata_02)) 
j= 1
for i in (nrow(mdata02) {
	mdata02$ampno(i)= j 	 
	If mdata_01$ampbegin(i)== T {
		j += 1
		}
	}	
	

# Transposing the amplitudes into rows
ampdata_01= transpose(mdata02, by= ampno)
ampdata_01$rowlength = ...

# Assuming a gaussian bell curve for singular amplitudes and testing it for gaussian distribution
ntest_results= apply(test.gaussian(ampdata_01, distrution="normal", alpha= 0.05), by=row)
ntest_results$ampno= ...

# "SQL"-Joining the results back
ampdata_02= merge(ampdata_01, ntest_results, by.x= "ampno", by.y= "ampno")

# Calculating the numerical volt integral of the amplitudes
...

# Creating classes of volt integral
ampdata_02$voltintclass= class(ampdata_02$voltint, step= 0.1)

# Aggregating the sum of volt integral by ntestresult
intvoltdata_01= aggregate(ampdata_02$voltint, by= c("ntestresult", voltintclass")

# Assuming that piled amplitudes contain singular amplitudes in the same proportion as singular amplitudes occur 
# Multiplying the singular amplitudes counts so that the integral voltage of multiple amplitudes gets compensated 
...

As you (hopefully) can imagine now, counting piled up amplitudes correctly by using the statistics software R neither requires a genius nor requires self developing a new mathematical method. Instead simply one of the thousands of R packages is used to apply a widely universal statistical method on the data.

And I thought, as most small particles in physics are best described by a distribution, physics would also always do the same numerical programming (or similar in Matlab, SAS, Pyhton, ...).

But, concluding from your answers, this does not seem to be the case.

[/Your insight to statistical working]
Chris Mullins
Posts: 67
Joined: Sun Feb 19, 2017 11:32 am
Real name: Chris Mullins
Location: Shenandoah Valley, VA
Contact:

Re: Spectrum Recorder PCI-E Card?

Post by Chris Mullins »

Harald,

To be clear, my suggestions (and background) are centered around the digital signal processing and sampling ideas, not the underlying radiation/detector physics, or real-world PMT counter applications - I don't have much experience in that. Others have given good advice there.
Harald_Consul
Posts: 94
Joined: Sat Oct 20, 2018 6:01 am
Real name: Harald Consul

Re: Spectrum Recorder PCI-E Card?

Post by Harald_Consul »

After in depth study of Chris answers there is only one thing left:

Saying thank you to Chris for his imho high quality answer and to all the others, who mentioned a lot of major ideas before.
Harald_Consul
Posts: 94
Joined: Sat Oct 20, 2018 6:01 am
Real name: Harald Consul

Re: Spectrum Recorder PCI-E Card?

Post by Harald_Consul »

Just one final remark from my side. I've figured out, that my Hantek digi-scope effectively is a Linux computer. Thus, may be it is - on a maker basis - possible to construct an inexpensive "very high frequency recorder" by porting the Hantek Linux scope solution to a more potent mainboard with a PCIe or M2 slot, so that the data record stream will be stored directly on a NVMe SSD (with currently about 8 GByte/s transfer performance). By that, the original e.g. 48K sample storage depth of a digi scope would be extended to the gigasample range.

However, the necessary amount of work is pretty much out of my scope.
Post Reply

Return to “Neutrons, Radiation, and Detection (& FAQs)”