FFT analysis through powergui block is showing empty in signal options.

Hi all,
I have to obtain the fft bar plot of the 5 level stepped sinusoidal wave which is the output of the 5 level cascaded multilevel inverter. I have changed the scope settings also to loggin>struct with time. I have tried changing the powergui to discrete as well with different time steps. Still i am not able to view anything in the FFT bar plot. Can anyone suggest any remedy for it or is there any setting problem in my MATLAB. I'm using MATLAB 2019 version.

23 Comments

I am also facing the same issue with matlab 2019
I am using MATLAB 2019a and i also faced this problem. when FFT analysis is done from Powergui The signals are shown as EMPTY .
The reason for this is that, in the Model Configuration Parameters in "Data Import/Export" Section, the option "Single simulation output" has been selected.
untick the "Single simulation output"
It worked for me . It will work for you sure.
Sachu. Thx for ur comments. It worked for me
i am using matlab2019b and i am tired of changing discrete value of powergui but FFT analysis since showing empty results. I have also changed Configuration Parameters in "Data Import/Export" Section, the option "Single simulation output" to unselected but nothing showing. Your help will be appericiated.
sry where is the Data Import/Export interface on simulink
Thanks!
The Data Import/Export is located at Simulation -> Prepare -> configure logging. It's just a bit to the left of the run button hidden under a drop down
i faced this issue in Matlab 2023b. This solution worked for me. Goto>>Modeling>>Data Import/Export>> uncheck single simulation output

Sign in to comment.

Answers (4)

Go to model configuration parameters in "Data Import/Export" Section, you will find the option "Single simulation output" has been selected. remove the tick on single simulation output".

6 Comments

what about matlab 2022a?, i can't bring up the fundamentals on fft analysis

Sign in to comment.

In response to Mr. Salah's correct solution, I attach his solution steps with pictures. Thank you Mr. Sala
the Answer is in the comments of post 👆
in case you didn't see it
Hi,
Given that I have been unable to reproduce this issue, a possible workaround I have identified would be to connect the output of the “PS-Simulink Converter” to the “Scope”, check “Log Data to workspace” under the Logging tab and select “Save format” as an Array.
Run the model, and the logged data would appear as an array with 2 columns. Using the “fft” function and “bar” function, calculate the Fourier transform on the second column of the logged variable and obtain the bar plot. If the variable name is ScopedData, the second column can be accessed using ScopedData(:,2).
Use the “abs” function to obtain the magnitude of FFT. Note that "fft" returns a 2-sided spectrum.
The documentation for “fft” is here, for “abs” is here and for “bar” is here.
Hope this helps.

Asked:

on 19 Jul 2019

Commented:

on 3 Jul 2025

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!