modelTable

Model for a set point that is interpolated based on a user-specified table

Extends from Modelica.Blocks.Interfaces.SISO (Single Input Single Output continuous control block).

Information

This block can be used to schedule a set-point by using piecewise linear functions. For example, the instances

Buildings.Controls.SetPoints.Table tabLinExt(constantExtrapolation=false,
                                             table=[20, 0.0;
                                                    22, 0.5;
                                                    25, 0.5;
                                                    26, 1.0]);
Buildings.Controls.SetPoints.Table tabConExt(constantExtrapolation=true,
                                             table=[20, 0.0;
                                                    22, 0.5;
                                                    25, 0.5;
                                                    26, 1.0]);

will cause the following output:

Table output.

For the default setting constantExtrapolation=true, the block outputs y=y1+offset for u ≤ u1, and y=yMax+offset for u ≥ uMax. Otherwise, the table is linearly extrapolated with a constant derivative.

Note that the first column must be strictly increasing.

Parameters

TypeNameDefaultDescription
Real[:,2]tablefill(0.0, 1, 2)Table matrix ( e.g., table=[u1, y1; u2, y2; u3, y3])
Realoffset0Offset of output signal
BooleanconstantExtrapolationtrueIf true, then y=y1 for u<u1, and y=yMax for u>uMax

Connectors

TypeNameDefaultDescription
RealInputu (from SISO)Connector of Real input signal
RealOutputy (from SISO)Connector of Real output signal

Revisions

  • April 29, 2026, by Michael Wetter:
    Changed configuration of table to cause the parameters to be evaluated, as this leads to more efficient code.
    This is for IBPSA, #2111.
  • August 30, 2016, by Michael Wetter:
    Changed protected final parameter nCol to nRow.
    This is for issue 555.
  • April 5, 2011, by Michael Wetter:
    Fixed wrong table declaration.
  • July 13, 2010, by Michael Wetter:
    First implementation.