Note: This page has been translated by MathWorks. Click here to see

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Fourier analysis of simulation data signals

`power_fftscope`

FFTDATA = power_fftscope(ScopeData)

FFTDATA = power_fftscope(FFTDATA)

power_fftscope(ScopeData)

power_fftscope(FFTDATA)

`power_fftscope`

opens the FFT Analysis Tool
dialog box to perform Fourier analysis of simulation data signals.
The dialog box provides access to all the simulation data signals
that are defined in your workspace. This tool can also be activated
from the powergui block dialog box by selecting **FFT Analysis**.

`FFTDATA = power_fftscope(ScopeData)`

returns
the FFT results for the signal saved in the `ScopeData`

structure. `fftdata`

is
a structure with the fields in this table.

Field | Description |
---|---|

`time` | The time vector of the simulation data signal saved in the `ScopeData` variable. |

`signals` | The signals saved in the ScopeData variable. |

`blockName` | The name of the Scope block associated to the `ScopeData` variable. |

`input` | The input signal of the selected simulation data variable. |

`signal` | The index of the selected input signal specified by the input field. |

`startTime` | The start time of the FFT window. |

`cycles` | The number of cycles of the FFT window. |

`fundamental` | The fundamental frequency of analyzed signal. |

`maxFrequency` | The maximum frequency evaluated by the FFT analysis. |

`THDmaxFrequency` | The maximum frequency for the THD calculation. Set the value
to `inf` to calculate the THD at the Nyquist frequency. |

`FFTdata` | The analyzed signal (FFT window data). |

`THDbase` | The base used to compute the THD. Set to `fund` to
normalize the THD with respect to fundamental value. Set the THDbase
to `DC` to normalize the THD with respect to the
DC component value. |

`freqAxis` | The type of frequency axis, in hertz or harmonic orders, of the FFT analysis plot. |

`mag` | The computed magnitude of FFT. |

`phase` | The computed phase of FFT. |

`freq` | The frequency vector. |

`THD` | The computed total harmonic distortion for the analyzed signal. The THD calculation includes all the inter-harmonics of the selected input signal. |

`samplingTime` | Return the sampling time of the selected input signal. |

`samplePerCycle` | Return the number of samples per cycle of the selected input signal. |

`DCcomponent` | Return the DC component value of the selected input signal. |

`magFundamental` | Return the fundamental component value of the selected input signal. |

`FFTDATA = power_fftscope(FFTDATA)`

uses
the FFTDATA structure as a template variable to modify analysis settings
and signal selection, and to perform FFT analysis. The power_fftscope
function ignores any user-defined FFTDATA structure that is not listed
in the above table.

`power_fftscope(ScopeData)`

plots the FFT
analysis results for the last simulation cycle of the signal saved
in the `ScopeData`

variable.

`power_fftscope(FFTDATA)`

plots the FFT analysis
results for the signal options specified in the FFTDATA structure.

**Refresh**Refreshes the list of simulation data variables in the

**Available signals**list. Refreshing allows you to import additional simulations signals without the need to close and reopen the tool.**Name**Lists the simulation data variables that are present in your workspace. These structures are generated by the Scope or To Workspace blocks in your model. You can refresh the list of available signals by clicking the

**Refresh**button. Use the drop-down list to select the variable that you want to analyze.**Input**Selects the input signal of the selected simulation data variables specified in the

**Structure**field. Variables that have multiple inputs can be generated by a Scope block that has multiple input ports.**Signal number**Indicates the index of the selected input signal specified by the

**Input**parameter. For example, the**Signal number**parameter allows you to select the phase A signal of a three-phase signal connected to input 2 of a Scope block.**Display Signal**Displays in the upper plot the signal selected by the

**Name**,**Input**, and**Signal number**parameters.**Display FFT window**Displays in the upper plot the portion of the selected signal where the FFT analysis is performed.

**Start time(s)**Specifies the start times for the FFT analysis. The FFT analysis is performed on the portion of the signal starting at the specified time and for the specified number of cycles.

**Number of cycles**Specifies the number of cycles of the selected signal to analyze for the FFT analysis.

**Fundamental frequency (Hz)**Specifies the fundamental frequency, in Hz, as a reference frequency for the FFT analysis.

**Max frequency (Hz)**Specifies the maximum frequency, in Hz, for the FFT analysis.

**Max frequency for THD computation**Select the

`Nyquist frequency`

to compute the THD to the maximum frequency equal to the Nyquist frequency. The Nyquist frequency is half the sampling frequency of the selected signal.Select the

`Same`

to compute the THD to the maximum frequency equal to the frequency specified in the**Max frequency**parameter.The THD calculation includes all the interharmonics of the selected input signal.

**Display style**Select

`Bar(relative to fundamental)`

to display the spectrum as a bar graph relative to the fundamental frequency. Select`Bar(relative to specified base)`

to display the spectrum as a bar graph relative to the base defined by the**Base value**parameter. Select`Bar(relative to DC component)`

to display the spectrum as a bar graph relative to the DC component of the signal.Select

`List(relative to fundamental)`

to display the spectrum as a list in % relative to the fundamental or DC component. Select`List(relative to specified base)`

to display the spectrum as a list in % relative to the base value defined by the**Base value**parameter. Select`List(relative to DC component)`

to display the spectrum as a list relative to the DC component of the signal.**Base value**Enter a base value for the display of harmonics.

**Frequency axis**Select

`Hertz`

to display the spectrum frequency axis in hertz. Select`Harmonic order`

to display the spectrum frequency axis in harmonic order relative to the fundamental frequency.**Display**Displays in the lower plot the FFT analysis results for the selected simulation data signal.

**Export**Click to export the FFT analysis result in a separate plot window.

**Close**Closes the FFT Analysis Tool window.