• 0
Hiroki Tamakoshi

Higher frequency and temporal resolution for the spectrum analyzer of Waveforms with Analog Discovery 2

Question

I'm using Analog Discovery 2 and Waveforms 3.7.5 on macOS 11.13.

The spectrum analyzer works well. I want to view the narrow range of 1 to 100Hz.

When I set the parameters Start to 0Hz and Stop to 100Hz, the update frequency becomes very slow. So I changed the BINs to 17, then it updates the data about for five times per a second. But the frequency resolution is poor.

How can I increase the both of frequency resolution(about 0.1Hz) and temporal resolution(for example, 30 times per a second)?

Share this post


Link to post
Share on other sites

7 answers to this question

Recommended Posts

  • 0

Hi @Hiroki Tamakoshi

The Spectrum Analyze for 4k bins with 100Hz top frequency, needs FFT with 8k samples at 200Hz which takes 40 seconds.
You could use the frequency range option to have a constant sample rate, regardless of start/stop settings, like 1k to... :

image.thumb.png.9e110d8ddb535664d26ae5ab29605c20.png

Share this post


Link to post
Share on other sites
  • 0
11 hours ago, attila said:

Hi @Hiroki Tamakoshi

The Spectrum Analyze for 4k bins with 100Hz top frequency, needs FFT with 8k samples at 200Hz which takes 40 seconds.
You could use the frequency range option to have a constant sample rate, regardless of start/stop settings, like 1k to... :

image.thumb.png.9e110d8ddb535664d26ae5ab29605c20.png

 

Thank you for the helpful reply. This option makes update frequency faster, but not enough for me.

I think I should make a program to extract the low-frequency range by myself using the SDK.

Thanks!

Share this post


Link to post
Share on other sites
  • 0

@Hiroki Tamakoshi,

They say you should never do math in public.  Let me try my hand: 0.1Hz resolution with 100Hz bandwidth means 1000 bins total, or 2k real input points.  At a 200Hz Nyquist frequency (you can't go lower and still get 100Hz of bandwidth), it will take you 10 seconds to collect all of those inputs before any FFT processing.  With proper Nyquist sampling in the time-frequency domain, that should give you an update every 5 seconds.  (You are doing a 50% FFT overlap, right?  @attila?) 

Can you do better?

  • You could increase your FFT overlap rate, perhaps as high as 87% or so.  This will give you more updates.
  • You could also switch from an FFT algorithm to a series of block average algorithms.  This has a lot of promise, but I think I've only ever found one application (GPS) where the approach was better than an FFT.
  • Depending upon the signal you are looking for, there are signal selective algorithms that can sometimes work better.  For example, if you assume you have a single sine wave in your input, you can often get very good resolution of that sine wave's frequency without needing to do a very fine resolution FFT--sometimes without even needing to do all of the FFT.
  • Sometimes a PLL can be used to get frequency resolution of a single tone.
  • If you just want frequency resolution of a single tone, my favorite method is to interpolate the FFT outputs--but that's probably a longer discussion.  On the other hand, if you could accept 2 Hz resolution instead of 0.1 Hz resolution, and interpolate the points in the middle--the result would work nicely if there was only ever one tone in every 4-5 bins or so.

So, there are other techniques.  The reality is .... in the generic case they really don't give you any better time resolution.  A good interpolator applied to the FFT outputs will give you most of what you are missing between FFT's--assuming a minimum of 50% overlap in time initially.  If it's a real quality high-resolution time-frequency representation you are interested in, you should know that there is an uncertainty principle stating that your time resolution times your frequency resolution will always be greater than a fixed number.  (I think it's 1/2)  The Hanning window gets close to this number, although it's rather sloppy in frequency.  Other filters exist, although less common and not nearly so well known, that can do better in frequency at the expense of time resolution.

Perhaps you would like to share your application to see if there's an application specific approach that might meet your needs?

Dan

Share this post


Link to post
Share on other sites
  • 0

Hi @Hiroki Tamakoshi

At such low frequency analysis the data capture takes time...
Reducing the number BINs (samples) or increasing the top frequency (sampling rate) makes the acquisitions faster, but all on the expense of the analysis resolution.

For faster, dynamic update you could use scan Shift acquisition in Scope. Also set the Samples to power of 2 value, like 8192, otherwise not FFT but CZT algorithm will be used which could create artifacts in the frequency domain result.

Yes @D@n In the Spectrum Analyzer the sampling rate is set to double of the top (freq. range or stop) frequency.

image.thumb.png.4c77a50fd9ff30fd305e66c5c93f14a5.png

 

 

Share this post


Link to post
Share on other sites
  • 0

@attila,

Thank you, but that wasn't quite my question.  ;) My question was whether or not the FFT's were overlapped by 50% from one FFT to the next.

Dan

Share this post


Link to post
Share on other sites
  • 0

Hi attila and D@n,

Thank you for the detailed explanation. I understood that it takes time to make a high-resolution analysis on FFT.

I want to know the meaning of the parameters of 'Channels options'. Are there any references?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now