How to detect wave crest accurately?

A normal waveform is converted to digital signal by A/D converter. And we use a microprocessor to detect the ware crest. We have considered the method that comparing one value and next one. However, there will be ripple or noise around the peak. It will make a mistake if we compare the two values simply. So, how to detect wave crest accurately in real time?

Reply to
X.Y.
Loading thread data ...

"X.Y."

** That is simply an impossible task.

One cannot detect maxima in a unpredictably varying value UNTIL after it has passed.

Any uncertainly ( ie noise) in the readings ( samples) will only add to the delay in identifying the actual instant the rate of change reversed sign and determining exact peak value achieved.

Identifying the exact moment of a maxima only comes after all the relevant samples have been smoothed and re examined.

...... Phil

Reply to
Phil Allison

Maintain a running maximum in software, that you reset each cycle.

Good Luck! Rich

Reply to
Rich Grise

You can't really do that, a crest on a waveform is only relevant over a given time period. Why do you want to do it? What sort of input waveform are you measuring? Is it known and predicable, or unknown?

For say a smoothly varying waveform like a sine wave you could use a (small) running average and then detect the change in direction of the average (and reset your average), but that only gives you an indication several samples after the actual maximum.

What are you really trying to do?

Dave.

Reply to
David L. Jones

figure out exactly what you mean by a wave crest as it is represented by the samples you are taking, and then write software that detects that.

Bye. Jasen

Reply to
Jasen Betts

Polynomial curve fit, maybe.

John

Reply to
John Larkin

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.