Electronics > Projects, Designs, and Technical Stuff
Signal processing - getting exact frequency from short ADC sample
<< < (8/18) > >>
ogden:

--- Quote from: Marco on December 15, 2019, 10:17:55 pm ---
--- Quote from: ogden on December 15, 2019, 09:44:52 pm --- :palm:

--- End quote ---
What? Do you want to calculate it from variance? AFAICS that will have more noise than an ideal estimate from a discrete Fourier transform at the exact frequency ... and there's not a lot of room for less than ideal estimates.

--- End quote ---
I just wanted to point out that you are wrong with your blanket statement. To measure signal amplitude you do not need to "accurately know signal frequency" as you say. You can measure amplitude w/o even knowing frequency. Think white noise for instance. All you want to know is "frequency band", ensure that period of lowest frequency component (of interest) is shorter than time window of measurement of amplitude.

BTW method I did propose is widely used and comes from power industry where mains frequency drift shall be detected as soon as possible and accumulating enough periods for other methods (correlation/fft/zerocrossings/e.t.c.) is not an option.

[edit] BTW upsampling, then reciprocal frequency calculation for full sine periods (zero crossings) is derivative. Put a little thought into it and you will see.
Etesla:

--- Quote from: hamster_nz on December 14, 2019, 09:49:33 pm ---Maybe something more practical.

Apply a bandpass DSP filter (to get rid of as much out of band noise as you can).

Interpolate zero crossing between samples.

Period is 2*(LastZeroCrossTime-FirstZeroCrossTime) /(NumberOfZeroCrossings-1)

Frequency is 1/period.

--- End quote ---

That was my first thought as well assuming the signal your measuring is guaranteed to cross zero x times per cycle
coppice:

--- Quote from: ogden on December 15, 2019, 11:50:37 pm ---
--- Quote from: Marco on December 15, 2019, 10:17:55 pm ---
--- Quote from: ogden on December 15, 2019, 09:44:52 pm --- :palm:

--- End quote ---
What? Do you want to calculate it from variance? AFAICS that will have more noise than an ideal estimate from a discrete Fourier transform at the exact frequency ... and there's not a lot of room for less than ideal estimates.

--- End quote ---
I just wanted to point out that you are wrong with your blanket statement. To measure signal amplitude you do not need to "accurately know signal frequency" as you say. You can measure amplitude w/o even knowing frequency. Think white noise for instance. All you want to know is "frequency band", ensure that period of lowest frequency component (of interest) is shorter than time window of measurement of amplitude.

BTW method I did propose is widely used and comes from power industry where mains frequency drift shall be detected as soon as possible and accumulating enough periods for other methods (correlation/fft/zerocrossings/e.t.c.) is not an option.

--- End quote ---
I suspect he meant that you need the frequency of the signal of interest before you can calculate its amplitude, rather than the total signal amplitude with noise, harmonics, etc. However, he's wrong on that too.

Calculating mains power frequency is easy. With glitch suppression you can use zero crossings of the voltage waveform. The current waveform can be so distorted that you get extra zero crossings, but if the voltage waveform is that distorted something is badly wrong.
ogden:

--- Quote from: coppice on December 15, 2019, 11:59:10 pm ---Calculating mains power frequency is easy.

--- End quote ---
Actually math is same for all sine waveforms no matter they are mains power or other kind of "signals".
coppice:

--- Quote from: ogden on December 16, 2019, 12:05:22 am ---
--- Quote from: coppice on December 15, 2019, 11:59:10 pm ---Calculating mains power frequency is easy.

--- End quote ---
Actually math is same for all sine waveforms no matter they are mains power or other kind of "signals".

--- End quote ---
Perhaps you should have read what I wrote.
Navigation
Message Index
Next page
Previous page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod