LookupFunctions

Showcase of lookup-functions

Diagram

Information

This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.

This example demonstrates the use of parametric lookup and table functions in models and may serve as a showcase. While table functions are still frequently used, the advantage of parametric functions is their smoothness—at least in the relevant range—and the better calibration/identification options.

See also

Converters.Lookup

Parameters (12)

slope1To50

Value: 2

Type: Real

Description: Slope parameter (general)

slope

Value: slope1To50

Type: Real

Description: Determines the gradient of the curve (Janoschek and S-Shaped)

slopeUpTo1

Value: 0.5

Type: Real

Description: Slope parameter (0< slope <= 1) (concaveLookupPosisitve)

interceptUpward

Value: 0.

Type: Real

Description: Value of y when input is zero or less (y0) for upward sloping functions

interceptDownward

Value: 2.

Type: Real

Description: Value of y when input is zero or less (y0) for downward sloping functions

upperBound

Value: 2

Type: Real

Description: Upper asymptote for u <= 0 (upperBound > lowerBound) (Janoschek and S-Shaped)

lowerBound

Value: 0

Type: Real

Description: Lower asymptote for u -> infinity (Janoschek)

x_ref

Value: 1

Type: Real

Description: x-value for point of inflection(>0) (Janoschek)

y_ref

Value: 1

Type: Real

Description: y-value for point of inflection(lowerBound < y_ref < upperBound) (Janoschek)

table

Value: {{0, 0}, {2, 4}, {4, 6}, {6, 8}}

Type: Real[:,:]

Description: Table matrix (grid = first column; e.g., table=[0,2]) (combiTable1D.table) (tableFunction.table)

smoothness

Value: Modelica.Blocks.Types.Smoothness.LinearSegments

Type: Smoothness

Description: Smoothness of table interpolation (tableFunction.smoothness)

extrapolation

Value: Modelica.Blocks.Types.Extrapolation.HoldLastPoint

Type: Extrapolation

Description: Extrapolation of data outside the definition range (combiTable.extrapolation) (tableFunction.extrapolation)

Connectors (1)

modelOutput

Type: ModelOutput

Description: The main model output

Components (12)

modelSettings

Type: ModelSettings

Description: Setting important global variables within a model

'0..10'

Type: RampInput

Description: Ramp from 0 to 10 in 10 units of time

'-5..5'

Type: RampInput

Description: Ramp from -5 to 5 in 10 units of time

concaveLookupNegative

Type: ConcaveLookupNegative

Description: Concave Lookup with negative slope; fixpoints are (0,y0) and (1,0)

concaveLookupPositive

Type: ConcaveLookupPositive

Description: Concave Lookup with positive slope; fixpoints are (0,y0) and (1,1)

convexLookupNegative

Type: ConvexLookupNegative

Description: Convex Lookup with negative slope usually defined for the range [0,∞) passing through the fixpoint (1,1)

convexLookupPositive

Type: ConvexLookupPositive

Description: Convex Lookup with positive slope; usually with fixpoint (0,y0) and fixpoint (1,1)

janoschek_negative_x_y

Type: JanoschekNegative

Description: Janoschek's (S-shaped) growth curve with negative slope

janoschek_positive_x_y

Type: JanoschekPositive

Description: Janoschek's (S-shaped) growth curve with positive slope

sShapedNegative_origin

Type: SShapedNegative

Description: Symmettric S-shaped curve with negative slope around origin (0,0)

sShapedPositive_origin

Type: SShapedPositive

Description: Symmettric S-shaped curve with positive slope around origin (0,0)

tableFunction

Type: TableFunction

Description: Table function defined by external data on file using Modelica's CombiTable format

Revisions

  • Modified simulation plots in v2.0.0.