May 08, 2016 · fft_test.mdl I am would like to obtain the Fast Fourier Transform analysis plot of a square wave in Simulink. However,the vector output plot only shows information if I used a incredibly long simulation period (minimum 765 seconds simulation time for a 2.5Hz waveform with frame size of 4096) Is there something I am not doing correcting?

Jul 07, 2019 · Also, you need to normalise the fft result by dividing it by the length of your data vector: X = abs (fft (x))/N; and then multiply it by 2 to get the approximately correct amplitude in the plot. Those changes result in a correct fft plot. Under waveform select square. Set the amplitude to 1 and frequency to FREQ. Make sure that the frequency is in rad/sec; Pass the square wave output through the filter. Attach a Fourier transform block at both the input and the output of the filter. Set the first three parameters in the block to FFT_NUM_PTS and set the Sample time to T_SAMPLE.