How can I modify options of the command power_fftscope?

12 次查看(过去 30 天)
Hi everyone! I have a signal named V1 in my Simulink project, and I want to use the command fftV1=power_fttscope(V1) in the workspace to obtain the structure with all the information about the fft of the signal. As result, the simulation gives the fundamental frequency of the signal, but the command power_fttscope sets it in a different value. If I use the block powergui to perform fft analisy I can set parameters manually. But how can I use the command to obatin in the workspace all the info about fft?

回答(1 个)

Nick Choi
Nick Choi 2017-8-16
Once you have the desired signal in the base workspace, you can run the FFT analysis once using:
>> FFTDATA = power_fftscope(V1)
The output FFTDATA is a structure which contains the fft information for the V1 signal. It contains numerous values such as fundamental frequency, maximum frequency etc. as described in the following doc link: https://www.mathworks.com/help/physmod/sps/powersys/ref/power_fftscope.html
To change the parameters, you can execute commands similar to these:
>> FFTDATA.frequency = 50; % Set frequency to 50 Hz
>> FFTDATA.maxFrequency = 5000; % Set the max frequency to 5000 Hz
>> FFTDATA = power_fftscope(FFTDATA); % Run the analysis with the new settings.
  2 个评论
muddamalla hareesh
muddamalla hareesh 2022-8-27
Unrecognized field name "input".
Error in power_fftscope_pr
Error in power_fftscope (line 28)
[varargout{1:nargout}] = power_fftscope_pr(varargin{:});
Dionisio
Dionisio 2022-9-16
This is wrong:
FFTDATA.frequency = 50; % Set frequency to 50 Hz
Change it to:
FFTDATA.fundamental = 50; % Set fundamental frequency to 50 Hz

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Fourier Analysis and Filtering 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by