modelTimeBasedInterpolation

Shows using the interpolators with derivatives

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

This example demonstrates the different interpolation methods that can be selected for a Noise block. All the blocks use samplePeriod = 0.1 s and generated uniform noise in the band y_min=-1 .. y_max=3. Furhtermore, all blocks use the same fixedLocalSeed, so all blocks generate exactly the same random numbers at the sample instants 0 s, 0.1 s, 0.2 s, ... However, these values are differently interpolated as shown in the next diagram:

Diagram InterpolationInterpolators.png

As can be seen, constant (constantNoise.y) and linear (linearNoise.y) interpolation respects the defined band -1 .. 3. Instead, smooth interpolation with the sinc function (smoothNoise.y) may violate the band slightly in order to be able to smoothly interpolate the random values at the sample instants. In practical applications, this is not an issue because the exact band of the noise is usually not exactly known.

Components

TypeNameDefaultDescription
Modelica.Blocks.Noise.GlobalSeedglobalSeed
Sources.TimeBasedNoiseconstantNoise
Sources.TimeBasedNoiselinearNoise
Sources.TimeBasedNoisesmoothNoise
Sources.TimeBasedNoisefilteredNoise
Modelica.Blocks.Continuous.DerderFiltered
Modelica.Blocks.Continuous.FirstOrderfilteredFiltered
Modelica.Blocks.Continuous.DerderFilteredFiltered
Modelica.Blocks.Continuous.DerderLinear
Modelica.Blocks.Continuous.FilterlinearFiltered
Modelica.Blocks.Continuous.DerderLinearFiltered
Modelica.Blocks.Continuous.DerderSmooth
Modelica.Blocks.Continuous.FiltersmoothFiltered
Modelica.Blocks.Continuous.DerderSmoothFiltered
Sources.TimeBasedNoisestepNoise
Modelica.Blocks.Continuous.FirstOrderstepFiltered
Modelica.Blocks.Continuous.DerderStepFiltered
Modelica.Blocks.Continuous.DerderStep

Revisions

DLR logo Copyright © DLR Institute of System Dynamics and Control
Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
DLR Institute of System Dynamics and Control