# detecting position of lost samples

I have a pulse signal from which I sample N times of level changes (e.g. high->low).

At undefined times the pulses in the original signal are completely missing. This leads to wrong number of measured original samples (N+m, m: count of lost samples).

I have implemented a naive detection algorithm:

prev_time = x[n-1] - x[n-2]
act_time = x[n] - x[n-1]

if (act_time / prev_time > 1.7)
missing_sample_detected()


My questions are:

• Is this the way to go?
• What alternative algorithms exists for detecting the position of missing samples?
• Can you suggest some literature on this topic? Atm i'm looking at "nonuniform sampling" but not sure if it's the right place to look for this problem
• A graphical description of your pulse signals and more precise definition of the problem could really help... – Fat32 Feb 16 '15 at 20:18
• Do you mean that, in addition to the samples, you have the sampling times? In that case, looking at the time difference between consecutive samples should be enough. – MBaz Feb 16 '15 at 23:44
• What do you mean by "I sample N times of level changes (e.g. high->low)". As Bulent says, an image of your pulse signal and better details of the problem would help us understand it more quickly. – ruoho ruotsi Feb 18 '15 at 21:30