
Contents |
STFT
Perform Short Time Fourier Transform
This feature is for OriginPro only.
1. stft ix:=col(2);
2. stft ix:=col(2) interval:=4;
3. stft ix:=col(2) option:=complex;
4. stft ix:=col(2) winlen:=32 fftlen:=64 overlap:=16;
5. stft ix:=col(2) win:=tri;
6. stft ix:=col(2) win:=gauss alpha:=3;
7. stft ix:=col(2) win:=kaiser beta:=2;
8. stft ix:=col(2) plot:=0;
| Display Name | Variable Name | I/O and Type | Default Value | Description |
|---|---|---|---|---|
| Input | ix |
Input vector<complex> | |
Specifies the input signal |
| Sampling Interval | interval |
Input double | |
Specifies the sampling frequency. The default is <auto>, which corresponds to an automatically-calculated interval. |
| FFT Length | fftlen |
Input int | |
Specifies the size of FFT section |
| Window length | winlen |
Input int | |
Specifies the window size, which must not be greater than the size of an FFT section |
| Overlap | overlap |
Input int | |
Specifies the number of data points by which the window sections overlap. It should be less than the window size |
| Window Type | win |
Input int | |
Specifies the window type used by FFT Option list
|
| Alpha | alpha |
Input double | |
This variable is only available when Window Type is Gaussian. It specifies the Alpha parameter for Gaussian window. |
| Beta | beta |
Input double | |
This variable is only available when Window Type is Kaiser. It specifies the Beta parameter for Kaiser window. |
| Option | option |
Input int | |
Specifies the computation option. The default is 2, which correspond to the computing of the amplitude in dB. Option list
|
| Swap Time and Frequency | swapxy |
Input int | |
Specifies whether to swap the time axis and the frequency axis in the image plot. |
| Output Matrix | om |
Output MatrixObject | |
Specifies the output matrix See the syntax here. |
| Plot | plot |
Input int | |
Specifies whether an image plot of the result will be generated |
1. To perform stft to Column B using the default setting, use the Command Window:
stft ix:=col(b)
2. To perform stft with Hanning window, use the Command Window:
stft -d
to open the dialog. Then select Hanning window for Window Type.
3. To perform stft using a pre-saved analysis theme called MyTheme, use the Command Window:
stft -t "MyTheme"
stft Computation
stft is computed in the following procedure:
1. N points are taken from the input signal, where N is equal to the window size.
2. A window of the chosen type is used to multiply the extracted data, point-by-point.
3. Zeros will be padded on both sides of the window, if the window size is less than the size of the FFT section.
4. FFT is computed on the FFT section.
5. Move the window according to the user-specified overlap size, and repeat steps 1 through 4 until the end of the input signal is reached.
The Window Functions
The sliding windows are defined as follows:
Rectangular Window:
Welch Window:
Triangular Window:
Bartlett Window:
Hanning Window:
Hamming Window:
Blackman Window:
Gaussian Window:
for Kaiser Window:
for where I(ix) denotes Bessel Function
Computation of the Sampling Interval
For details of the auto computation of the sampling interval, please see the X-Function document for fft1.
For more information, please refer to our User Guide.