Short-Time Fourier Transform
来源:互联网 发布:centos查看php版本 编辑:程序博客网 时间:2024/06/06 04:19
Short-Time Fourier Transform
The short-time Fourier transform (STFT), or alternatively short-term Fourier transform, is a Fourier-related transform used to determine the sinusoidal frequency and phase content of local sections of a signal as it changes over time.In practice, the procedure for computing STFTs is to divide a longer time signal into shorter segments of equal length and then compute the Fourier transform separately on each shorter segment. This reveals the Fourier spectrum on each shorter segment. One then usually plots the changing spectra as a function of time.
Continuous-time STFT
Simply, in the continuous-time case, the function to be transformed is multiplied by a window function which is nonzero for only a short period of time. The Fourier transform (a one-dimensional function) of the resulting signal is taken as the window is slid along the time axis, resulting in a two-dimensional representation of the signal. Mathematically, this is written as:
where
Discrete-time STFT
In the discrete time case, the data to be transformed could be broken up into chunks or frames (which usually overlap each other, to reduce artifacts at the boundary). Each chunk is Fourier transformed, and the complex result is added to a matrix, which records magnitude and phase for each point in time and frequency. This can be expressed as:
ikewise, with signal x[n] and window w[n]. In this case, m is discrete and ω is continuous, but in most typical applications the STFT is performed on a computer using the Fast Fourier Transform, so both variables are discrete and quantized.
The magnitude squared of the STFT yields the spectrogram of the function:
Inverse STFT
The STFT is invertible, that is, the original signal can be recovered from the transform by the Inverse STFT. The most widely accepted way of inverting the STFT is by using the overlap-add (OLA) method, which also allows for modifications to the STFT complex spectrum. This makes for a versatile signal processing method.
Continuous-time STFT
Given the width and definition of the window function w(t), we initially require the area of the window function to be scaled
PRACTIACL COMPUTATION OF THE STFT
While the definition of the STFT is useful for theoretical work, it is not really a specification of a practical STFT. In practice, the STFT is computed as a succession of FFTs of windowed data frames, where the window slides'' or
hops” forward through time. We now derive such an implementation of the STFT from its mathematical definition.
If the window
so,
In this form, the data centered about time
Since indexing in the DFT is modulo
STFT IN MATLAB
The following matlab segment illustrates the above processing steps:
Xtwz = zeros(N,nframes); % pre-allocate STFT output array M = length(w); % M = window length, N = FFT length zp = zeros(N-M,1); % zero padding (to be inserted) xoff = 0; % current offset in input signal x Mo2 = (M-1)/2; % Assume M odd for simplicity here for m=1:nframes xt = x(xoff+1:xoff+M); % extract frame of input data xtw = w .* xt; % apply window to current frame xtwz = [xtw(Mo2+1:M); zp; xtw(1:Mo2)]; % windowed, zero padded Xtwz(:,m) = fft(xtwz); % STFT for frame m xoff = xoff + R; % advance in-pointer by hop-size R end
This article comes from https://en.wikipedia.org/wiki/Short-time_Fourier_transform and https://www.dsprelated.com/freebooks/sasp/Short_Time_Fourier_Transform.html
- Short-Time Fourier Transform
- Fourier Transform
- Fourier Transform
- Fourier Transform
- Fourier Transform
- A Comparison Between Haar Wavelet Transform and Fast Fourier Transform in Analyzing Financial Time S
- Discrete Fourier Transform
- 【翻译】Fast Fourier Transform
- Fast Fourier Transform
- Discrete Fourier Transform
- Fast Fourier Transform
- XTOJ1250Super Fast Fourier Transform
- 傅立葉轉換(Fourier Transform)
- [cv]Fourier-transform
- Fast Fourier Transform
- Fast Fourier Transform
- Discrete Fourier Transform
- (二)连续傅里叶变换与离散傅里叶变换:傅里叶变换(Continuous Time Fourier Transform)
- servlet中三大容器详解
- leetcode [Balanced Binary Tree]//待整理多种解法
- POJ1611 The Suspects 并查集
- 模拟实现atoi函数
- JAVA输入输出流(IO)
- Short-Time Fourier Transform
- SXOI2016 部分解题报告
- Java与C++的差异(1)
- 异常处理——异常函数之SetUnhandledExceptionFilter(子进程处理)(3)
- 4. Median of Two Sorted Arrays
- 5-13 是否完全二叉搜索树 (30分)
- coder初入职场必备:Eclipse+Tomcat8+MAVEN+SVN 工作环境搭建
- Android Device Monitor 文件管理的常见问题
- Canvas学习