Modelica.Blocks.Math.Add Modelica.Blocks.Math.Add

Output the sum of the two inputs

Modelica.Blocks.Math.Add

Information

This blocks computes output y as sum of the two input signals u1 and u2:

    y = k1*u1 + k2*u2;

Example:

     parameter:   k1= +2, k2= -3

  results in the following equations:

     y = 2 * u1 - 3 * u2

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

Parameters

TypeNameDefaultDescription
Realk1+1Gain of upper input
Realk2+1Gain of lower input

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 Add "Output the sum of the two inputs" extends Interfaces.SI2SO; parameter Real k1=+1 "Gain of upper input"; parameter Real k2=+1 "Gain of lower input"; equation y = k1*u1 + k2*u2; end Add;

Modelica.Blocks.Math.Cos Modelica.Blocks.Math.Cos

Output the cosine of the input

Modelica.Blocks.Math.Cos

Information

This blocks computes the output y as cos of the input u:

    y = cos( u );

cos.png

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

Connectors

TypeNameDescription
input RealInputuConnector of Real input signal
output RealOutputyConnector of Real output signal

Modelica definition

block Cos "Output the cosine of the input" extends Interfaces.SISO; equation y = Modelica.Math.cos(u); end Cos;

Modelica.Blocks.Math.Gain Modelica.Blocks.Math.Gain

Output the product of a gain value with the input signal

Modelica.Blocks.Math.Gain

Information

This block computes output y as product of gain k with the input u:

    y = k * u;

Parameters

TypeNameDefaultDescription
Realk Gain value multiplied with input signal [1]

Connectors

TypeNameDescription
input RealInputuInput signal connector
output RealOutputyOutput signal connector

Modelica definition

block Gain "Output the product of a gain value with the input signal" parameter Real k(start=1, unit="1") "Gain value multiplied with input signal"; public Interfaces.RealInput u "Input signal connector"; Interfaces.RealOutput y "Output signal connector"; equation y = k*u; end Gain;

Modelica.Blocks.Math.Sin Modelica.Blocks.Math.Sin

Output the sine of the input

Modelica.Blocks.Math.Sin

Information

This blocks computes the output y as sine of the input u:

    y = sin( u );

sin.png

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

Connectors

TypeNameDescription
input RealInputuConnector of Real input signal
output RealOutputyConnector of Real output signal

Modelica definition

block Sin "Output the sine of the input" extends Interfaces.SISO; equation y = Modelica.Math.sin(u); end Sin;

Modelica.Blocks.Math.Feedback Modelica.Blocks.Math.Feedback

Output difference between commanded and feedback input

Modelica.Blocks.Math.Feedback

Information

This blocks computes output y as difference of the commanded input u1 and the feedback input u2:

    y = u1 - u2;

Example:

     parameter:   n = 2

  results in the following equations:

     y = u1 - u2

Connectors

TypeNameDescription
input RealInputu1 
input RealInputu2 
output RealOutputy 

Modelica definition

block Feedback "Output difference between commanded and feedback input" Interfaces.RealInput u1; Interfaces.RealInput u2; Interfaces.RealOutput y; equation y = u1 - u2; end Feedback;

Modelica.Blocks.Math.Division Modelica.Blocks.Math.Division

Output first input divided by second input

Modelica.Blocks.Math.Division

Information

This block computes the output y (element-wise) by dividing the corresponding elements of the two inputs u1 and u2:

    y = u1 / u2;

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

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 Division "Output first input divided by second input" extends Interfaces.SI2SO; equation y = u1/u2; end Division;

Automatically generated Sun Apr 02 18:12:02 2017.