amplitudeFrequencyCurveForIcon function
Requirements.ChecksInFixedWindow_withFFT.Internal.amplitudeFrequencyCurveForIcon
· source
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
| Date | Description |
|---|---|
| Nov. 29, 2015 | Initial 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
| Name | Type | Description |
|---|---|---|
A[…] input | Real | Amplitude to plot |
A_max input | Real | Maximum value to be shown |
Outputs
| Name | Type | Description |
|---|---|---|
line[…] output | Real | Line to be shown in icon |