0
0
Simulinkdata~5 mins

FFT analysis in Simulink

Choose your learning style9 modes available
Introduction

FFT analysis helps you see the different frequencies inside a signal. It turns a signal from time view into frequency view.

To find the main tones in a sound recording.
To check vibrations in a machine for maintenance.
To analyze electrical signals in circuits.
To study heartbeats or brain waves in health data.
Syntax
Simulink
1. Open Simulink and create a new model.
2. Add a Signal Generator block to create a test signal.
3. Add an FFT block from the DSP System Toolbox.
4. Connect the Signal Generator output to the FFT input.
5. Add a Spectrum Analyzer block to view the FFT result.
6. Run the simulation to see the frequency spectrum.

The FFT block computes the Fast Fourier Transform of the input signal.

The Spectrum Analyzer shows the frequency content graphically during simulation.

Examples
This setup shows the frequency of a simple sine wave.
Simulink
Signal Generator (sine wave) -> FFT block -> Spectrum Analyzer
This shows multiple frequencies in one signal.
Simulink
Signal Generator (sum of sine waves) -> FFT block -> Spectrum Analyzer
Sample Program

This example creates a simple sine wave and uses FFT to find its frequency. The Spectrum Analyzer shows a clear peak at 50 Hz, confirming the signal's frequency.

Simulink
1. Open Simulink and create a new model.
2. Add a Signal Generator block and set it to produce a sine wave at 50 Hz.
3. Add an FFT block from DSP System Toolbox.
4. Connect Signal Generator output to FFT input.
5. Add a Spectrum Analyzer block and connect FFT output to it.
6. Run the simulation for 1 second.

# After running, the Spectrum Analyzer will display a peak at 50 Hz, showing the frequency of the sine wave.
OutputSuccess
Important Notes

Make sure the simulation time is long enough to get a clear frequency result.

FFT works best with signals sampled at a constant rate.

You can adjust FFT block parameters like window size for better accuracy.

Summary

FFT analysis converts signals from time to frequency view.

Simulink uses blocks like Signal Generator, FFT, and Spectrum Analyzer for this.

It helps find frequencies inside signals easily during simulation.