0
$\begingroup$

I am working on signal analyser and have problem with understanding relationship between display resolution and frequency resolution (range). My frequency range is $ 1-20000\quad [ H z ] $ so to project each frequencies magnitude on display (horizontally in linear scale) I need display horizontal resolution at least 20000. But of course I don't have :)

So let's say I have 1000 pixels horizontal resolution. So to project whole frequency range I need to express $ \frac { 20000} { 1000} = 20 $ frequency bin magnitudes by one pixel.

And my question is what is the most relevant manner to do that?

Should I just sum all 20 magnitudes? Or better make some avarage value like $ \frac { 1} { 20} \sum _ { i = 1} ^ { 20} mag_{fbin} $

I am pretty sure it's concern a lot of other subjects like: is magnitude print in decibels (log) scale or as range from 0 to 1? Also important thing is perception of human ear (if it's audio). And other things. But I don't know how to deal with that. Could you give any advice? To make the answer easier, let's say I want to create audio signal analyser.

Please help. Thanks in advance.

$\endgroup$
  • $\begingroup$ Do you need the 20,000 bins for anything else? If not, the easiest solution is to calculate only 1000 bins. $\endgroup$ – MBaz Apr 27 '18 at 17:00
  • $\begingroup$ I am not sure what do you mean. I have signal with freq range from 1 to 20000, so I need to calculate all freq bins, and need to show them on the graph in some way, but I have onle 1000 pixels to use. What do you mean to calculate only 1000 bins, but what about the rest? :) I can’t see the idea. $\endgroup$ – pajczur Apr 27 '18 at 17:15
  • $\begingroup$ Ok now I think I know what you mean. Do you think to make fft with fft buffer size of 1000? That’s OK. But I want to have possibility to change that buffer from 20 to sample rate of input signal. $\endgroup$ – pajczur Apr 27 '18 at 17:18
  • $\begingroup$ Using the DFT, you can choose how many ffrequency bins to calculate, without changing your frequency range. Basically if you use $N$ samples to find the DFT, it gives you $N$ frequency bins. $\endgroup$ – MBaz Apr 27 '18 at 17:19
  • $\begingroup$ The sampling rate gives you the frequency range. You can still take a slice of $N$ samples to get $N$ bins. $\endgroup$ – MBaz Apr 27 '18 at 17:19
0
$\begingroup$

Having an interface that limits what can be presented is a common problem. The solution depends a lot on the application and if you want a zoom function.

You can average, take a max, take a median, interpolate, decimate, or whatever seems to work.

Its a cognition problem.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.