# 4.3.4 STFT (Short-Time Fourier Transform)

## Summary

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.

## Steps

1. Start with a new workbook, and import the data <Origin Installation Directory>\Samples\Signal Processing\Chirp Signal.dat.
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.
4. Click OK to perform STFT with the chosen settings and obtain your results, including a matrixbook with data and a color fill contour plot.
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.
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:3D 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.
9. Go to the Mesh tab and clear the Enable check box.
10. Click OK to finish the settings. To get a better view, rotate the graph.