Hot answers tagged

7

Why is each window/frame overlapping? Windowing is a means to stationarize signals. Inside a small enough window, you can expect that the properties of the signal chunk do not vary too fast. And you now can use tools well-suited to stationary signals, like Fourier-based techniques. You can imagine non-overlapping rectangular windows, each defining a frame....


6

More overlap means you end up with more windows (of a given length) per second of audio. More windows (of a given length) requires more FFTs which requires more MACs or FLOPs which generally requires more processing power. In return, more window overlap provides greater time locality of information (e.g. on average, random transient events are likely ...


5

Is moving median always less sensitive to outliers? Sometimes. It will work if you have a very short spike (preferrably shorter than the median/average sample size). However, if you have a large spike, then taking the median won't help eliminate the spikes. Long spike I have illustrated this using a dataset (with sample size = 5, taking into account 2 left ...


5

I'd like to apply zero padding to it, for better frequency bin resolution. First of all, let's state it one more time that zero padding does not improve frequency resolution of DFT. It'll only interpolate the existing spectrum on a finer frequency grid, but will not add any new information to it, otherwise. In order to improve the true frequency resolution ...


4

Your choosen example frequency $\omega_0 = \frac{5 \pi} {32}$ touched a numerically sensitive case, in which the imaginary part of the theoretical DFT which should be zero is not observed so, on the numerical computation. Since the imaginary part is computed as non-zero, the phase which should be zero according to $\phi[k] = \tan^{-1}( \frac{\Im\{X_1[k]\}}{\...


3

You're right: the required filter order is approximately inversely proportional to the desired transition bandwidth $\Delta\omega$, regardless of the cut-off frequency. This is reflected in the empirical formulas for estimating the required filter orders for the Kaiser window design method as well as for the Parks McClellan equiripple design of low pass ...


3

See paragraph from wiki. There is an explanation of B metric: Each figure label includes the corresponding noise equivalent bandwidth metric (B),[note 1] in units of DFT bins. Note 1: Mathematically, the noise equivalent bandwidth of transfer function H is the bandwidth of an ideal rectangular filter with the same peak gain as H that would pass the ...


3

You are right that no real-world signal will have a "convenient closed form" transform. I also find the quoted sentence misleading, and in my opinion it does not motivate the use of windowing. From your question I believe that you do not actually ask about the pros and cons of different window functions, but if I understand you correctly you ask yourself why ...


3

The Kaiser window has a parameter, usually called $\beta$, which is determined by the specified peak error $\delta$. For your specification, you need to determine which of the two requirements (maximum pass band error or minimum stop band attenuation) is more stringent, and choose the allowable peak error $\delta$, and hence the parameter $\beta$, ...


3

This isn't really an answer, but I thought I'd report what I'm seeing and ask for more information. I've loaded your test.wav file and I can see the signal plotted below. So what you're getting in the plots you show is not so much the median value, but is more like an envelope of the signal. The second issue is that the signal actually seems to be part of ...


3

The form: $$w(x, y) = \sum_{j = -K}^{K}\sum_{k = -K}^{K} a_{|j|,|k|}\; \cos(\pi jx + \pi ky),$$ where: $$a_{j,k} = a_{k,j},\\ \sum_{j = -K}^{K}\sum_{k = -K}^{K} a_{|j|,|k|} = 1,\\ x \in -1..1,\\ y \in -1..1$$ yields window functions that are 2D similar. Window functions of that form are not generally separable, but some of them are, for example: $$w(x, ...


3

I understand the concept of the STFT. In order to avoid spectral leakage, you use a hann window that overlaps by 50%. I'm sorry but you have a misunderstanding of spectral leakage in addition to how a spectogram should be computed. To be exact you cannot avoid spectral leakage completely; all you can do is to make a compromise between the spectral ...


3

If you don’t care about computational costs, you can start a window at each sample (e.g. 100% - 1 sample overlap). It’s well into diminishing returns, but phase vocoder estimation methods work slightly better with greater overlap.


3

In addition to what others have already said, I'll try to answer it from a purely practical point of view (this is also a variant of the overlap-add technique). If your FFT length is 2048, then an overlap of 1024 (50%) means that you have twice as many analysis (FFT) frames (as compared to the number of frames without any overlapping). A 512 samples overlap ...


3

The manual entry does not say that $\alpha = 1/\sigma$. It says $\alpha$ is proportional to the inverse of $\sigma$. If you look at the example on that page you'll see stdev = (N-1)/(2*alpha); which, for your values says stdev = (100-1)/(2*16.6667) = 825 you should be scaling the relationship by $N-1$.


3

Max is right that the difference between Hamming and Hann windows are small. (BTW, I am a proponent of the movement to totally do away with them term "Hanning". There is no Dr. Hanning nor Mr./Ms. Hanning that the window is named after.) The Hamming window is 92% Hann window and 8% rectangular window. Hamming found out that he was able to reduce the ...


3

Assuming: That you limit yourself to LTI filters. That you can characterize both the noise and the signal of interest. Then: (a) If you want to detect a signal of interest (e.g. detect footsteps), use a matched filter. (b) If you want to estimate the value of such signal, use a Wiener filter. These are "the best" you can do (under a bunch of assumptions)....


2

A taper function is applied for spectral estimation if the artifacts from a non-tapered rectangular window provide less useful results that the artifacts due to the tapered window. Not tapering a finite length sub-sample vector is equivalent to rectangular windowing, which convolves Sinc shaped artifacts onto the spectrum.


2

You can figure the change in energy applied to your signal by analyzing the energy in your window. The Hamming window's energy (or scaling) is well known and Google will tell you what it is. You are doing something different. Can you post your code for further help? From your code, ans your image, it really appears that you applied the window to your ...


2

The DFT has a built-in implicit rectangular window. You're taking a chunk of a stream of input data and transforming it. But by just slicing it out of the input, you leave very sharp edges on it. This gives the overall transform a rectangular shape, which after transforming gives you a sinc envelope in the frequency domain (DFT(rect) = sinc). Sincs have ...


2

Yes, it is necessary to add an additional pre/suffix to the OFDM symbol that corresponds to the window length when windowing is applied. As the length of the already existing cyclic prefix is usually chosen as the maximum delay spread of the channel no further Inter-symbol interference (ISI) must be introduced or otherwise orthogonality is lost. The ...


2

You say: I have a 128 point one dimensional k-space samples... The hanning window is the same size as the k-space vector (256)... Make sure that you have the appropriate sizes in your algorithm. Next, I convolved the k-space signal with the hanning window... Windowing is applied in $k$-space by multiplication - you simply have to multiply your window and ...


2

There is a missing $2\times$ factor inside the second cosine, and you get a centered $201$ point windows with the change of variable $x-100$. See at Wolfram: $$ 0.42 - 0.5*\cos\left(2\pi\frac{x-100}{200}\right) + 0.08 \cos\left(4\pi\frac{x-100}{200}\right)\,.$$


2

A square window seems to be another name for a rectangular window. A rectangular window is the default window used to apply an FFT to a subset of a longer stream of data and without any additional scaling or weighting of any of the subset's samples.


2

Don't overlap. Don't use a Von Hann window. Zero-pad by at least the length of the impulse response of your desired equalization filter. Then use an overlap add or overlap save fast convolution method or algorithm to combine your zero-padded and filtered FFT/IFFT blocks. Otherwise circular convolution artifacts will corrupt (severely distort) your ...


2

[EDIT: added a loss on the statistical side] With a traditional windowed version of the STFT, the version $v_N$ with a hop of $N$ samples is essentially the subsampled version, with factor $N$, of the version $v_1$, described by @hotpawn2, the one with $L-1$-sample overlap. So in a way, a low hop rate essentially contains more or the same kind information, ...


2

You don't seem to exactly perform smoothing, but instead averaging by non-overlapping blocks of 3 and downsampling. A sound answer cannot be given without the knowledge of what you want to do from this data simplification. However, using the zeros possesses the highest risk for me, as this biases the result with values that actually are unknown. Using ...


2

Maybe including some code containing an minimum working example would help. I didn't see any problem. I tried this because I am interested in related questions and recently learned about the Hilbert transform. I also added some noise because noise is always there, but often neglected in answers to questions like this (a pet peeve of mine), even though it ...


2

Your description of windowing a 2D image filter kernel, fits into a discrete-time FIR filter design method. Hence I will assume you are mixing windowing as a filter design method vs windowing applied to signals for Short-Time Fourier analysis or windowing applied for block-based processing of long signals. So please make it clear which action you are ...


Only top voted, non community-wiki answers of a minimum length are eligible