TransWikia.com

What is the value range of log magnitude spectrograms?

Signal Processing Asked by tmueller on January 10, 2021

I’m quite new to this field and have a probably rather basic question:
Is there an upper bound for the values in a log-magnitude spectrogram generated like this:

log1p(abs(stft(signal) ** 2)

Obviously, the lower bound is 0 but is there also an upper bound (based on window size/hop length of the STFT)?

2 Answers

Let us consider a standard discrete "spectrogram" or short-term Fourier transform with a window $w$ and frames of length $N$. Let $|x|_r = (sum_{n=0}^{N-1}|x_n|^r)^{1/r}$ denote the $r$-norm of $x$ ($rge1)$. Then for each frame of $x$, the first windowed Fourier transform is:

$$F(omega)=sum_{n=0}^{N-1}x_n w_n e^{-jomega n},.$$

Hence, by the Rogers-Hölder's inequalities, for all $omega$, and any couple $(p,q)$ such that $frac{1}{p}+frac{1}{q}=1$:

$$|F(omega) |le |w|_p|x|_q,.$$

In particular, for classical positive unit windows, $sum_{n=0}^{N-1} w_n =1 = |w|_1$. Choose $p=1$ and $q=infty$, and you get (over all frames):

$$|F(omega) | le max_n | x_n|,.$$

Not the tighest upper bound, but simple enough. And honestly, using Rogers-Hölder was seen a bit of an overkill here, since simply:

$$left|sum_{n=0}^{N-1}x_n w_n e^{-jomega n} right| le sum_{n=0}^{N-1}left |x_n w_n e^{-jomega n} right| le max_n | x_n|sum_{n=0}^{N-1}left | w_n right|,, $$

but for "unit-energy" windows, you will get other estimates with $p=q=2$. You can now plug it inside your "log of one plus" formula.

Similarly, you could find a tighter lower bound.

Answered by Laurent Duval on January 10, 2021

Depends, is your signal bounded? If not then no, since scaling your signal by an arbitrary scalar factor alpha leads to a scaling of the spectrogram by abs(alpha)^2. Unless there are some limits to the values found in your signal, you need to be prepared for (more or less) arbitrarily large numbers that will also make your spectrogram arbitrarily large.

If you do have a bound on your signal (i.e., some norm of it being $leq$ some constant) you could work out an upper bound for your spectrogram.

Answered by Florian on January 10, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP