Why does a sine bandwidth decrease with 1/dur, dur beeing the signal duration

2 views (last 30 days)
Jonas on 16 Dec 2021
Edited: David Goodmanson on 19 Dec 2021
Dear community, recently i was interested in the bandwidth of spectra. That's why i did some plots for signals with a single frequency at once but for different amplitude, duration and frequency. I saw, that the amplitude and frequency and amplitude does not influence the bandwidth in this case but signal duration does. can someone tell me why and why it is like a constant divided by the duration (~1/x). The constant changes a bit if a analyze the power spectrum instead of PSD, but the behavior stays the same. the behavior also stays the same if take the way over fft function and a linspaced frequency vector here a sample script; for anyone who is confused about the many loops can just set the ampNr and f0 value to one number only.
close all;
for ampNr=amp
for f0=100:100:1000
for durNr=1:numel(dur)
plot(dur,myBW,'Color',cl(ampNr,:)); hold on;
xlabel('sine duration (s)');
ylabel('bandwidth (Hz)');
title(['sine amplitude ' num2str(ampNr)])
best regards

Accepted Answer

David Goodmanson
David Goodmanson on 18 Dec 2021
Edited: David Goodmanson on 18 Dec 2021
Hi Jonas,
I believe what you are seeing is just the natural reciprocal relation between width in the time domain and width in the frequency domain of the transformed signal. In physics this is nothing more than the Heisenberg uncertainly principle.
Suppose you have a signal f(t), with a characteristic width (let's say it is determined by the standard deviation) of width t0. Now suppose the same signal is stretched in time by a factor of b. Without getting into details of normalization and so forth, it looks like f(t/b) and its width is b*t0. The transform of the original function is
Int f(t) exp(iwt) dt = g(w)
Suppose it has a width w0. The transform of the stretched function is
Int f(t/b) exp(iwt) dt = Int f(t/b) exp(i(bw)(t/b)) (dt/b) b
and denoting t/b by s,
= Int f(s) exp(i(bw)s) ds b
= g(bw) b
The hanging b is due to not paying attention to normalization and would go away with proper normalization of all this. That doesn't change the fact that the frequency domain function, g(bw) has width w0/b and so is shrunk by the same factor that f(t/b) was expanded by. So the product of widths, width(f)*width(g), is a constant. It's also dimensionless.
As you have alluded to, ploting dur.*myBW gives a nice nearly flat line.
David Goodmanson
David Goodmanson on 19 Dec 2021
Hi Paul,
You may well be correct. It could boil down to a difference of point of view, though. I took a physics point of view, where scaling arguments apply quite pervasively. In this particular problem, there is an initial idea that the bandwidth is zero. However, some at-the-moment unspecified process has come up with a nonzero bandwidth. With scaling as a general principle and some admitted handwaving, one can argue that no matter what (linear) process was involved, frequency resolution or anything else, the end result will still have to come out width(f)*width(g) = constant. So I think a frequency resolution argument could be tracked back to the scaling law. However, looking at the details of a specific process as you are doing will provide better understanding of what is going on.

Sign in to comment.

More Answers (1)

Jon on 16 Dec 2021
Edited: Jon on 16 Dec 2021
I don't have enough time at the moment to look at your code in depth, but I'm suspecting that you are experiencing "leakage" effects by not having an integral number of periods of the signal. So the truncation of your signal causes some extra energy outside of the pure sine frequency.
I suggest that you try changing your duration, but always keep the total duration an integral multiple of the sine wave's period and see if the behavior changes.
Jonas on 18 Dec 2021
the use of the function spectrogram may be confusing here, but in this case i choose the length of the analysis window as the length of the whole signal, this way i have one 1 time bin and dont have to bother with creation of the fft frequency vector, normalization or fftshifting

Sign in to comment.




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by