modelIntegerExtractor

Validation model for the integer extractor block

Information

Validation test for the block Buildings.Controls.OBC.CDL.Routing.IntegerExtractor.

The instances extIndInt, extIndInt1, extIndInt2, extIndInt3, and extIndInt4 have the same input vector with dimension of 4. However, they have different extract index and thus different output.

  • The instance extIndInt has the extract index of 2. The output is u[2].
  • The instance extIndInt1 has the extract index of 6. Thus it is out of upper range [1, 4] and it outputs u[4]. It also issues a warning to indicate that the extract index is out of range.
  • The instance extIndInt2 has the extract index of 0. Thus it is out of lower range [1, 4] and it outputs u[1]. It also issues a warning to indicate that the extract index is out of range.
  • The instance extIndInt3 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 extIndInt4 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
Buildings.Controls.OBC.CDL.Routing.IntegerExtractorextIndIntExtracts signal from an input signal vector
Buildings.Controls.OBC.CDL.Routing.IntegerExtractorextIndInt1Extracts signal from an input signal vector when the extract index is out of the upper range
Buildings.Controls.OBC.CDL.Routing.IntegerExtractorextIndInt2Extracts signal from an input signal vector when the extract index is out of the lower range
Buildings.Controls.OBC.CDL.Routing.IntegerExtractorextIndInt3Extracts signal from an input signal vector when the extract index changes from within range to out of range
Buildings.Controls.OBC.CDL.Routing.IntegerExtractorextIndInt4Extracts signal from an input signal vector when the extract index changes from out of range to within range
Buildings.Controls.OBC.CDL.Integers.Sources.ConstantconInt2Block that outputs integer constant
Buildings.Controls.OBC.CDL.Integers.Sources.ConstantconInt3Block that outputs integer constant
Buildings.Controls.OBC.CDL.Integers.Sources.PulseintPulGenerate pulse signal of type Integer
Buildings.Controls.OBC.CDL.Integers.Sources.PulseintPul1Generate pulse signal of type Integer
Buildings.Controls.OBC.CDL.Integers.Sources.ConstantconIntIndex to extract input signal
Buildings.Controls.OBC.CDL.Integers.Sources.ConstantconInt1Index to extract input signal
Buildings.Controls.OBC.CDL.Integers.Sources.ConstantconInt4Index to extract input signal
Buildings.Controls.OBC.CDL.Integers.Sources.PulseintPul2Generate pulse signal of type Integer
Buildings.Controls.OBC.CDL.Integers.Sources.PulseintPul3Generate pulse signal of type Integer

Revisions

  • October 5, 2022, by Jianjun Hu:
    First implementation.