Hello,

I posted a message just a while back regarding the identification of fundamental
frequency of a variable signal. I appreciate the information that was sent back
to me. However, since I do not need the entire spectrum; I would like to know
if anyone has ever seen an algorithm dealing only with finding how long it takes
a cycle to repeat. If I know my sampling frequency and I can identify n-cycles
that it took for (let's say the two highest values), then theoretically I should
be able to determine the overall frequency of the waveform. If anyone has ever
implemented anything like this on a 563xx system I would really appreciate any
help.

Thank you,

Sean Foley

# fundamental frequency identification

Started by ●July 4, 2007

Reply by ●July 5, 20072007-07-05

s...@iupui.edu wrote:

> Hello,

>

> I posted a message just a while back regarding the identification of

> fundamental frequency of a variable signal. I appreciate the information

> that was sent back to me. However, since I do not need the entire

> spectrum; I would like to know if anyone has ever seen an algorithm

> dealing only with finding how long it takes a cycle to repeat. If I know

> my sampling frequency and I can identify n-cycles that it took for

> (let's say the two highest values), then theoretically I should be able

> to determine the overall frequency of the waveform.

If the input waveform has a dominant frequency and the other spectral

components are reasonably smaller you might implement a zero crossing

algorithm: find the places at which the signal goes from positive to

negative and viceversa, measure their frequency and divide by two. Of

course a minimum of lowpass filtering/holdoff is needed to avoid

multiple detections around each zero crossing.

Ciao,

Carlo.

--

Carlo Concari

Ricercatore - Assistant professor

Dipartimento di Ingegneria dell'Informazione

Universitdegli Studi di Parma

c...@unipr.it

http://www.unipr.it/~cacof697

> Hello,

>

> I posted a message just a while back regarding the identification of

> fundamental frequency of a variable signal. I appreciate the information

> that was sent back to me. However, since I do not need the entire

> spectrum; I would like to know if anyone has ever seen an algorithm

> dealing only with finding how long it takes a cycle to repeat. If I know

> my sampling frequency and I can identify n-cycles that it took for

> (let's say the two highest values), then theoretically I should be able

> to determine the overall frequency of the waveform.

If the input waveform has a dominant frequency and the other spectral

components are reasonably smaller you might implement a zero crossing

algorithm: find the places at which the signal goes from positive to

negative and viceversa, measure their frequency and divide by two. Of

course a minimum of lowpass filtering/holdoff is needed to avoid

multiple detections around each zero crossing.

Ciao,

Carlo.

--

Carlo Concari

Ricercatore - Assistant professor

Dipartimento di Ingegneria dell'Informazione

Universitdegli Studi di Parma

c...@unipr.it

http://www.unipr.it/~cacof697

Reply by ●July 5, 20072007-07-05

Dear Sean,

the maximum and minimum values of the signal can be determined by deriving the signal. Here the zeroes of the derivative give these values.

A more simple alternative would be to determine the zero crossings of the signal itself. You may rectify the signal by getting the absolute value - if this is beyond a certain threshold (to be determined) you can consider the signal to be zero.

I can remember a limiter algorithm based on this idea as well - this was published in the AES (Audio Engineering Society) Journal:

Dan Mapes-Riordan and W. Marshall Leach jr.: The Design of a Digital Signal Peak Limiter for Audio Signal Processing, JAES Vol. 36, No. 7/8 1988 July/August, pp. 652-574.

Counting samples between thos zeroes could be used to determine the fundamental frequency. The drawback of this algorithm is that the defined fundamental is not defined as precisely as by an FFT algorithm - it minds me to an anlog octave divider used for electric bass guitars in the late sevenies - sometimes it added the octave sometimes it was irritated by the signal...

Anoher drawback of this idea is that the minimum signal latency is defined by the lowest fundamental frequency you want to determine - for instance to determine 20Hz you have to wait for 50ms. Can this latency be tolerated for a life musical instrument application? I am not that sure.

Regards

Christian

> Hello,

>

> I posted a message just a while back regarding the identification of

> fundamental frequency of a variable signal. I appreciate the information that

> was sent back to me. However, since I do not need the entire spectrum; I

> would like to know if anyone has ever seen an algorithm dealing only with

> finding how long it takes a cycle to repeat. If I know my sampling frequency

> and I can identify n-cycles that it took for (let's say the two highest

> values), then theoretically I should be able to determine the overall

> frequency of the waveform. If anyone has ever implemented anything like this on a

> 563xx system I would really appreciate any help.

>

> Thank you,

>

> Sean Foley

the maximum and minimum values of the signal can be determined by deriving the signal. Here the zeroes of the derivative give these values.

A more simple alternative would be to determine the zero crossings of the signal itself. You may rectify the signal by getting the absolute value - if this is beyond a certain threshold (to be determined) you can consider the signal to be zero.

I can remember a limiter algorithm based on this idea as well - this was published in the AES (Audio Engineering Society) Journal:

Dan Mapes-Riordan and W. Marshall Leach jr.: The Design of a Digital Signal Peak Limiter for Audio Signal Processing, JAES Vol. 36, No. 7/8 1988 July/August, pp. 652-574.

Counting samples between thos zeroes could be used to determine the fundamental frequency. The drawback of this algorithm is that the defined fundamental is not defined as precisely as by an FFT algorithm - it minds me to an anlog octave divider used for electric bass guitars in the late sevenies - sometimes it added the octave sometimes it was irritated by the signal...

Anoher drawback of this idea is that the minimum signal latency is defined by the lowest fundamental frequency you want to determine - for instance to determine 20Hz you have to wait for 50ms. Can this latency be tolerated for a life musical instrument application? I am not that sure.

Regards

Christian

> Hello,

>

> I posted a message just a while back regarding the identification of

> fundamental frequency of a variable signal. I appreciate the information that

> was sent back to me. However, since I do not need the entire spectrum; I

> would like to know if anyone has ever seen an algorithm dealing only with

> finding how long it takes a cycle to repeat. If I know my sampling frequency

> and I can identify n-cycles that it took for (let's say the two highest

> values), then theoretically I should be able to determine the overall

> frequency of the waveform. If anyone has ever implemented anything like this on a

> 563xx system I would really appreciate any help.

>

> Thank you,

>

> Sean Foley