Thursday, December 27, 2018

noise - Zero Crossing of a Noisy Sine Wave


I'm trying to find the zero crossings of a sine wave to transform the sine wave into a square wave. The only problem is that the sine wave is noisy, so I'm getting lots of jitter and false zero crossings.



Can anyone recommend any simple psuedocode or relevant materials? So far I have something like this:


if (sample[i]>0 && sample[i+1]<0) || (sample[i]<0 && sample[i+1]>0)


Can anyone recommend a more robust method?




No comments:

Post a Comment

digital communications - Understanding the Matched Filter

I have a question about matched filtering. Does the matched filter maximise the SNR at the moment of decision only? As far as I understand, ...