amplitudeFrequencyCurveForIcon function

Requirements.ChecksInFixedWindow_withFFT.Internal.amplitudeFrequencyCurveForIcon  · source

Icon of amplitudeFrequencyCurveForIcon

Return amplitude = f(frequency) for icon animation

Extends Modelica.Icons.Function

Converts the amplitude spectrum A of an FFT into a polyline in the coordinates of the icon of the FFT blocks (x from -260 to 260, y from -260 to 160). Every amplitude A[i] becomes a vertical line from the frequency axis up to the scaled amplitude, drawn as the three points [t,y_min; t,y; t,y_min], so the result has 3*size(A,1) rows. The frequency points are spread evenly over the x-range; amplitudes are scaled by A_max and clipped at A_max. The result is shown with DynamicSelect in the icons of WithinAbsoluteDomain, WithinRelativeDomain and MaxTotalHarmonicDistortion.

Revisions

DateDescription
Nov. 29, 2015Initial version implemented by Martin R. Kuhn and Martin Otter (DLR Institute of System Dynamics and Control)
The research leading to these results has received funding from the European Union’s Seventh Framework Programme (FP7/2007-2016) for the Clean Sky Joint Technology Initiative under grant agreement no. CSJU-GAM-SGO-2008-001.

Inputs

NameTypeDescription
A[…] inputRealAmplitude to plot
A_max inputRealMaximum value to be shown

Outputs

NameTypeDescription
line[…] outputRealLine to be shown in icon