Identifying common periodic waveforms (square, sine, sawtooth, …)

前端 未结 7 2227
盖世英雄少女心
盖世英雄少女心 2021-02-09 10:31

Without any user interaction, how would a program identify what type of waveform is present in a recording from an ADC?

For the sake of this question: triangle, square

7条回答
  •  时光说笑
    2021-02-09 11:19

    This answer presumes no noise and that this is a simple academic exercise.

    In the time domain, take the sample by sample difference of the waveform. Histogram the results. If the distribution has a sharply defined peak (mode) at zero, it is a square wave. If the distribution has a sharply defined peak at a positive value, it is a sawtooth. If the distribution has two sharply defined peaks, one negative and one positive,it is a triangle. If the distribution is broad and is peaked at either side, it is a sine wave.

提交回复
热议问题