# Finding Repetetion rate of ns pulsed waveforms

my application : sensing a photo diode output and processing it further, the per-processed output would be a digitally converted pulse waveform with pulse width ranging from 1ns-150ns and pulse repetition frequency 1Hz to 50KHz,now i should find the repetition rate of the 1ns-150ns pulse

as sensing this kind of narrow pulse signals is difficult, my per-processing stage would expand input signal by a factor of 100 thus my signal would become a signal with pulse width 100ns-15000ns

to find pulse repetition frequency for which i thought FFT would do the job

problem statement: my sampling rate would be 2MSPS - to acquire a 100ns pulse i require that much

so if i perform a 1024 FFT over 1024 samples i acquired i will not find the pulse repetition rate at all, in order to find the repetition rate i have to grab at least 1sec samples and do a very large FFT over it. which is practically foolish

so i am a bit confused in this situation how can i find the pulse repetition frequency of a 100ns pulse,through huge samples acquired, mean while i am of the idea to just using a pulse counter of micro controller.

problem statement: my sampling rate would be 2MSPS - to acquire a 100ns pulse i require that much

Nope. 100ns is 5 times as short as the interval between two sampling instances in your sampling device. If it does indeed measure the voltage accumulated over a capacitance, this might work – if that capacitance is as small as possible, which it often is, you might just miss pulses.

However, you're right, the signal you're interested in actually doesn't have a bandwidth of 10 MHz – the maximum frequency of interest is 50 kHz, so observing a system that indicates the presence of a pulse (not the pulse itself) with a 100 kS/s sampling rate should suffice.

If you know you just got presence information (i.e "there was an impulse during the last sample time, or not"), an FFT is a bit over the top. Simply count the samples between an observation.

The hard part actually would be the electronics to your photo diode – 1ns impulses imply that your system needs to have a bandwidth of 1 GHz – so you'd be deep in the world of RF/microwave circuitry. What you'll probably end up doing is amplifying the current coming from your diode, with something avalanche-based, or a sensitive microwave transistor. Don't forget to lay out your board following the needs of a microwave signal! You can't afford spurious interference here.

You'd essentially amplify the energy of the pulse. The voltage over a simple RC lowpass fed with that energy with a 90% discharge time of let's say 1/(100 kHz) would serve as a feasible indicator of activity; observe that, if you want with 2MS/s, and you'd have captured a signal from which you can directly see the impulses.

Notice that photodiodes with a > 1GHz bandwidths will be noisy, so you'll probably have some false impulses. Here, your FFT approach might actually tell the periodicities from the white noise.

You could acquire your signal and check its autocorrelation. This gives you insight into how much the signal must be shifted in order to match again with itself at a later time. This lag is your repetition time $T$, from which you can calculate the repetition frequency simply by $1/T$. Of course you have to acquire enough data points so that you capture each pulse accurately. But this you have to do with every other analysis technique as well ;)

• Glad for your suggestion,but Complexity wise and computationally it doesn't seem much preferable.I feel for autocorrelation even I have to again do an fft. Isn't it? Mar 8 '16 at 14:36
• No, you do not need an FFT for that necessarily. Look up the autocorrelation formula, e.g. in Wikipedia (autocorrelation -> signal processing). What you need is a signal and a copy of the signal. You multiply both signals and sum them up. The resulting value is the first value of your autocorrelation function. Then you shift the copy by 1 array element, multiply them again, and sum the result up. This is the second value. You continue the shifting and summing and you end up with the autocorrelation function of your signal. It is just shifting and summing.
– M529
Mar 8 '16 at 14:49
• usually auto-correlation is a cross-correlation of signal by itself, for cross correlation we perform convolution of signal with its time-shifted version, which is essentially a multiplication in frequency domain, so that is why i said we again need a fft to be performed Mar 9 '16 at 3:20
• I know what you've said - and you are right! This is what an autocorrelation is and how it can be computed. I was just giving another way to do it, that does not involve the application of an FFT.
– M529
Mar 9 '16 at 11:11