modelRealExtractor

Validation model for the extractor block

Information

Validation test for the block AixLib.Controls.OBC.CDL.Routing.RealExtractor.

The instances extIndSig, extIndSig1, extIndSig2, extIndSig3, and extIndSig4 have the same input vector with dimension of 5. However, they have different extract index and thus different output.

  • The instance extIndSig has the extract index of 2. The output is u[2].
  • The instance extIndSig1 has the extract index of 6. Thus it is out of upper range [1, 5] and it outputs u[5]. It also issues a warning to indicate that the extract index is out of range.
  • The instance extIndSig2 has the extract index of 0. Thus it is out of lower range [1, 5] and it outputs u[1]. It also issues a warning to indicate that the extract index is out of range.
  • The instance extIndSig3 has the extract index changing from 2 to -1. Thus it first outputs u[2], and then changes to u[1]. At the moment when the extract index becomes out of range, it issues a warning.
  • The instance extIndSig4 has the extract index changing from 0 to 3. Thus it first outputs u[1], and then changes to u[3]. It issues a warning at the start of the simulation.

Components

TypeNameDefaultDescription
AixLib.Controls.OBC.CDL.Routing.RealExtractorextIndSigExtracts signal from an input signal vector
AixLib.Controls.OBC.CDL.Routing.RealExtractorextIndSig1Extracts signal from an input signal vector when the extract index is out of the upper range
AixLib.Controls.OBC.CDL.Routing.RealExtractorextIndSig2Extracts signal from an input signal vector when the extract index is out of the lower range
AixLib.Controls.OBC.CDL.Routing.RealExtractorextIndSig3Extracts signal from an input signal vector when the extract index changes from within range to out of range
AixLib.Controls.OBC.CDL.Routing.RealExtractorextIndSig4Extracts signal from an input signal vector when the extract index changes from out of range to within range
AixLib.Controls.OBC.CDL.Reals.Sources.RampramBlock that outputs ramp signal
AixLib.Controls.OBC.CDL.Reals.Sources.Rampram1Block that outputs ramp signal
AixLib.Controls.OBC.CDL.Reals.Sources.Rampram2Block that outputs ramp signal
AixLib.Controls.OBC.CDL.Reals.Sources.PulsepulGenerate pulse signal of type Real
AixLib.Controls.OBC.CDL.Reals.Sources.Pulsepul1Generate pulse signal of type Real
AixLib.Controls.OBC.CDL.Integers.Sources.ConstantconIntIndex to extract input signal
AixLib.Controls.OBC.CDL.Integers.Sources.ConstantconInt1Index to extract input signal
AixLib.Controls.OBC.CDL.Integers.Sources.ConstantconInt2Index to extract input signal
AixLib.Controls.OBC.CDL.Integers.Sources.PulseintPulGenerate pulse signal of type Integer
AixLib.Controls.OBC.CDL.Integers.Sources.PulseintPul1Generate pulse signal of type Integer

Revisions

  • October 14, 2022, by Jianjun Hu:
    Added more validations.
  • July 19, 2018, by Jianjun Hu:
    First implementation.