Buildings.Utilities.Math

Library with functions such as for smoothing

Package Content

NameDescription
Buildings.Utilities.Math.Functions Functions Package with mathematical functions
Buildings.Utilities.Math.Average Average Average of a vector
Buildings.Utilities.Math.Max Max Maximum element of a vector
Buildings.Utilities.Math.Min Min Minimum element of a vector
Buildings.Utilities.Math.SmoothMax SmoothMax Once continuously differentiable approximation to the maximum function
Buildings.Utilities.Math.SmoothMin SmoothMin Once continuously differentiable approximation to the minimum function
Buildings.Utilities.Math.Examples Examples Collection of models that illustrate model use and test models


Buildings.Utilities.Math.Average Buildings.Utilities.Math.Average

Average of a vector

Buildings.Utilities.Math.Average

Information


Outputs the average of the vector.

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

Parameters

TypeNameDefaultDescription
Integernin1Number of inputs

Connectors

TypeNameDescription
input RealInputu[nin]Connector of Real input signals
output RealOutputyConnector of Real output signal

Modelica definition

block Average "Average of a vector"
  extends Modelica.Blocks.Interfaces.MISO;
equation 
 y = sum(u)/nin;
end Average;

Buildings.Utilities.Math.Max Buildings.Utilities.Math.Max

Maximum element of a vector

Buildings.Utilities.Math.Max

Information


Outputs the minimum of the vector.

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

Parameters

TypeNameDefaultDescription
Integernin1Number of inputs

Connectors

TypeNameDescription
input RealInputu[nin]Connector of Real input signals
output RealOutputyConnector of Real output signal

Modelica definition

block Max "Maximum element of a vector"
  extends Modelica.Blocks.Interfaces.MISO;
equation 
 y = max(u);
end Max;

Buildings.Utilities.Math.Min Buildings.Utilities.Math.Min

Minimum element of a vector

Buildings.Utilities.Math.Min

Information


Outputs the minimum of the vector.

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

Parameters

TypeNameDefaultDescription
Integernin1Number of inputs

Connectors

TypeNameDescription
input RealInputu[nin]Connector of Real input signals
output RealOutputyConnector of Real output signal

Modelica definition

block Min "Minimum element of a vector"
  extends Modelica.Blocks.Interfaces.MISO;
equation 
 y = min(u);
end Min;

Buildings.Utilities.Math.SmoothMax Buildings.Utilities.Math.SmoothMax

Once continuously differentiable approximation to the maximum function

Buildings.Utilities.Math.SmoothMax

Information


Once continuously differentiable approximation to the max(.,.) function.

Extends from Modelica.Blocks.Interfaces.SI2SO (2 Single Input / 1 Single Output continuous control block).

Parameters

TypeNameDefaultDescription
RealdeltaX Width of transition interval

Connectors

TypeNameDescription
input RealInputu1Connector of Real input signal 1
input RealInputu2Connector of Real input signal 2
output RealOutputyConnector of Real output signal

Modelica definition

block SmoothMax 
  "Once continuously differentiable approximation to the maximum function"
  extends Modelica.Blocks.Interfaces.SI2SO;
  Modelica.Blocks.Interfaces.RealOutput y "Connector of Real output signal";
 parameter Real deltaX "Width of transition interval";
equation 
  y =  Buildings.Utilities.Math.Functions.smoothMax(x1=u1, x2=u2, deltaX=deltaX);
end SmoothMax;

Buildings.Utilities.Math.SmoothMin Buildings.Utilities.Math.SmoothMin

Once continuously differentiable approximation to the minimum function

Buildings.Utilities.Math.SmoothMin

Information


Once continuously differentiable approximation to the max(.,.) function.

Extends from Modelica.Blocks.Interfaces.SI2SO (2 Single Input / 1 Single Output continuous control block).

Parameters

TypeNameDefaultDescription
RealdeltaX Width of transition interval

Connectors

TypeNameDescription
input RealInputu1Connector of Real input signal 1
input RealInputu2Connector of Real input signal 2
output RealOutputyConnector of Real output signal

Modelica definition

block SmoothMin 
  "Once continuously differentiable approximation to the minimum function"
  extends Modelica.Blocks.Interfaces.SI2SO;
  Modelica.Blocks.Interfaces.RealOutput y "Connector of Real output signal";
 parameter Real deltaX "Width of transition interval";
equation 
  y = Buildings.Utilities.Math.Functions.smoothMin(x1=u1, x2=u2, deltaX=deltaX);
end SmoothMin;

HTML-documentation generated by Dymola Sat Feb 6 17:41:20 2010.