| Electronics > Projects, Designs, and Technical Stuff |
| Low frequencies Vector Network Analyzer, arduino based. |
| << < (16/20) > >> |
| Kleinstein:
If windowing is used, it would not make a big difference, if at all. This is a step on the raw data, essentially before starting with FFT or Görtzel or DFT. I don't think one will need 64 bit math to use the Görtzel algorithm or DFT. 32 Bit math should be plenty for 2048 points, though the FFT might get away with 16 bit math (and may have to use it because of memory limitations). Besides speed the FFT has the disadvantage that it is essentially limited to certain window lengths (usually 1024, 2048, maybe 4096, maybe 768, 1536 in theory), and needs space so have all the data (may need even 2 sets) and the results in memory. Speed wise the critical limit is if real time calculation is possible - that is do the calculation at the speed the data come in. So how fast is the FFT solution ? Even if not optimum speed, the idea of using a µC and little extra HW for a low end slow VNA is nice. |
| ogden:
--- Quote from: Kleinstein on September 26, 2018, 07:16:04 pm ---I don't think one will need 64 bit math to use the Görtzel algorithm or DFT. --- End quote --- Obviously 32bit precision is enough to measure. SNR estimation test was distraction BS move anyway. Even OP test shows insignificant difference of magnitude (not SNR) between 32bit (float) precision Görtzel vs FFT: 2620.176270 vs 2620.160156 --- Quote ---Besides speed the FFT has the disadvantage that it is essentially limited to certain window lengths (usually 1024, 2048, maybe 4096, maybe 768, 1536 in theory), and needs space so have all the data (may need even 2 sets) and the results in memory. --- End quote --- In half of that memory I better hold precalculated sine lookup table for DFT |
| radioactive:
--- Quote from: MasterT on September 26, 2018, 06:12:20 pm --- --- Quote from: radioactive on September 26, 2018, 03:37:52 pm --- I didn't omit the windowing function, you did. --- End quote --- I'm referring to your first post, where you comparing fftw vs goertzel: https://www.eevblog.com/forum/projects/low-frequencies-vector-network-analyzer-arduino-based/msg1844921/#msg1844921 Why you didn't apply windowing, as you should? Than, would be a huge difference in the two charts, would not it? And you are ignoring the fact, that Goertzel is meaningless w/o 64-bits architecture. --- End quote --- I've re-run my original test (little larger sweep to make it visually symmetrical) with N=2048 and now we are back to using the libfftw library version of fft. compile with gcc goertzel_test.c -o goertzel_test -lm -lc -lfftw3 This is also 32-bit floats. I've added a blackman-harris window to compare against the rectangular window (no window). The trade-off for the various windows is usually between finer frequency resolution (rectangular) with less suppression of the side lobes or something like blackman-harris which does a pretty good job of suppressing the side lobes, but gives you less frequency resolution. There is also one called flat-top window that maintains better amplitude accuracy (less scalloping loss). So really depends on what you are measuring. |
| MasterT:
--- Quote from: Kleinstein on September 26, 2018, 07:16:04 pm ---If windowing is used, it would not make a big difference, if at all. This is a step on the raw data, essentially before starting with FFT or Görtzel or DFT. --- End quote --- It would not, I already tested this, both Goertzel & FFT react in similar manner for introducing windowing. The main question, is do I need a windowing? Thinking about it for awhile, I came to concept of "perspective", a view angle. If I put a phase error, as it is written in the first few lines of the original message, 0.01 degree as a starting point, than all other parameters lined up. 1. SNR: 0.01 degree imply -> ~80 dB 2. BW: Next, is the bandwidth. Since, this is a "measuring" device I'm trying to build, not a dummy dtmf detector, BW has to be defined differently compare to common definition Peak/ sqrt(2). BW in this perspective is the main peak width At -80 dB. 3. And this 80 dB SNR, consequently, says that windowing is a Must, and suppression of the side lobes > 80 . 4. "Measuring device" means that it has some dynamic range, so my phase error (0.01) stays below this line even magnitude at the ADC input drops significantly. I do not have PGA at this point, and probably don't want to have, as it would be another "stepped line" cause of errors. So defining dynamic range at least 40 dB, or better 60 , I have 80 + (40-60) = 120 - 140 dB. 5. Based on this value, now I'm sure Goertzel is must be 64-bits. In my SNR example, where sng_grt shows 67 dB, plus 40 -test was done at 40 dBc, Goertzel noise floor is 107 dB (if 32-bits math used ) and it's way too low for 120-140. 6. I'd test Goertzel-64 on arduino DUE see if it faster than fft-32, could be. Could be I'm underestimating it's performance. |
| ogden:
--- Quote from: MasterT on September 27, 2018, 12:54:55 pm ---If I put a phase error, as it is written in the first few lines of the original message, 0.01 degree as a starting point, than all other parameters lined up. --- End quote --- Right. Let's beat 200k$ worth N5247B which have miserable 0.02 degrees RMS specified. |
| Navigation |
| Message Index |
| Next page |
| Previous page |