OriginLab Corporation - Data Analysis and Graphing Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis     
Skip Navigation Links
All BooksExpand All Books
TutorialsExpand Tutorials
Data AnalysisExpand Data Analysis
Signal ProcessingExpand Signal Processing

4.3.4 STFT (Short-Time Fourier Transform)


Short-Time Fourier Transform (STFT) is a time-frequency analysis technique suited to non-stationary signals. Short-Time Fourier Transforms can provide information about changes in frequency over time.

What You Will Learn

In this tutorial, you will learn how to:

  1. Perform Short-Time Fourier Transform (STFT).
  2. Change dialog settings to improve the time and frequency resolution.
  3. Change window type to improve resolution.


  1. Start with a new workbook, and import the data <Origin Installation Directory>\Samples\Signal Processing\Chirp Signal.dat.
    SP Tutorial STFT 1.png
  2. Highlight column B, and select menu Analysis: Signal Processing: STFT... to open the STFT: stft dialog box.
  3. In the dialog box, check Auto Preview at the bottom of the dialog so that you can preview your results in the right panel. Uncheck the Auto check box next to Window length and Overlap, then change Window length to 8, and Overlap to 7. Set Window Type to Hanning and Option to Amplitude Result.
    SP Tutorial STFT 2.png
  4. Click OK to perform STFT with the chosen settings and obtain your results, including a matrix book with data and a color fill contour plot.
    SP Tutorial STFT 3.png
  5. We can see from the above image that the time resolution is good, but the frequency is not so apparent. Click on the lock on the graph, then choose Change Parameters...from the menu. This reopens the STFT dialog box. Change the Window Type to Rectangle and click OK.
    SP Tutorial STFT 4.png
  6. Now, we are better able to see resolution of both time and frequency. Please note that it is not possible to optimize for both time and frequency; the best we can do is to find the balance between them.
  7. To view the result in 3D, activate the resulting matrix, then select menu Plot: 3D Surface: Color Map Surface to create a 3D surface of the result.
  8. Double click on the 3D graph to open the Plot Details dialog, and go to the Colormap/Contours tab in the right panel. Click the Line... heading to open the Contour Lines dialog and Hide All lines.
    SP Tutorial STFT 5.png
  9. Go to the Mesh tab and clear the Enable check box.
    SP Tutorial STFT 6.png
  10. Click OK to finish the settings. To get a better view, rotate the graph.
    SP Tutorial STFT 7.png

© OriginLab Corporation. All rights reserved.