MATLAB: Do I receive an error when I try to use FFT Analysis from the Powergui in SimPowerSystems 3.1 (R14)

analysisfftfixed stepspowerguisimpowersystemsSimscape Electricaltool

I have a SimPowerSystems model. When I tried to perform FFT Analysis from the Powergui after finishing running the model, the FFT Analysis window did not open and I received the following errors at the MATLAB command window:
Attempted to access TimeVector(-4.60025e+007); index must be a positive integer or logical.

Best Answer

This documentation issue has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, read below for any possible workarounds:
SimPowerSystems 3.1 (R14) documentation of the FFT Analysis function in Powergui is missing some information.
The signal that is going to be analyzed by the FFT tool of Powergui needs to be sampled at fixed step. Since a variable step solver is used in this simulation, it generates a signal with non-equally distanced samples. As a result, a FFT window does not open at all because the signal under analysis is incorrect as viewed by FFT Analysis tool.