This package contains basic mathematical operations, such as summation and multiplication, and basic mathematical functions, such as sqrt and sin, as input/output blocks. All blocks of this library can be either connected with continuous blocks or with sampled-data blocks.
Extends from Modelica.Icons.Package (Icon for standard packages).| Name | Description |
|---|---|
| Output the product of a gain value with the input signal | |
| Output the sum of the elements of the input vector | |
| Output difference between commanded and feedback input | |
| Output the sum of the two inputs | |
| Output the sum of the three inputs | |
| Output product of the two inputs | |
| Output first input divided by second input | |
| Output the square root of the input (input >= 0 required) | |
| Output the sine of the input | |
| Output the cosine of the input | |
| Output the tangent of the input | |
| Output the arc sine of the input | |
| Output the arc cosine of the input | |
| Output the arc tangent of the input | |
| Output the hyperbolic sine of the input | |
| Output the hyperbolic cosine of the input | |
| Output the hyperbolic tangent of the input | |
| Output the exponential (base e) of the input | |
| Output the natural (base e) logarithm of the input (input > 0 required) | |
| Converts Cartesian representation to complex | |
| Converts polar representation to complex | |
| Converts complex to Cartesian representation | |
| Converts complex to polar representation |
Modelica.ComplexBlocks.ComplexMath.GainThis block computes output y as product of gain k with the input u:
y = k * u;
| Name | Description |
|---|---|
| k | Gain value multiplied with input signal |
| Name | Description |
|---|---|
| u | Input signal connector |
| y | Output signal connector |
Modelica.ComplexBlocks.ComplexMath.SumThis blocks computes output y as sum of the elements of the input signal vector u:
y = u[1] + u[2] + ...;
Example:
parameter: nin = 3;
results in the following equations:
y = u[1] + u[2] + u[3];
Extends from Interfaces.ComplexMISO (Multiple Input Single Output continuous control block).
| Name | Description |
|---|---|
| nin | Number of inputs |
| k[nin] | Optional: sum coefficients |
| Name | Description |
|---|---|
| u[nin] | Connector of Complex input signals |
| y | Connector of Complex output signal |
Modelica.ComplexBlocks.ComplexMath.FeedbackThis 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
| Name | Description |
|---|---|
| u1 | |
| u2 | |
| y |
Modelica.ComplexBlocks.ComplexMath.AddThis 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.ComplexSI2SO (2 Single Input / 1 Single Output continuous control block).
| Name | Description |
|---|---|
| k1 | Gain of upper input |
| k2 | Gain of lower input |
| Name | Description |
|---|---|
| u1 | Connector of Complex input signal 1 |
| u2 | Connector of Complex input signal 2 |
| y | Connector of Complex output signal |
Modelica.ComplexBlocks.ComplexMath.Add3This blocks computes output y as sum of the three input signals u1, u2 and u3:
y = k1*u1 + k2*u2 + k3*u3;
Example:
parameter: k1= +2, k2= -3, k3=1;
results in the following equations:
y = 2 * u1 - 3 * u2 + u3;
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
| Name | Description |
|---|---|
| k1 | Gain of upper input |
| k2 | Gain of middle input |
| k3 | Gain of lower input |
| Name | Description |
|---|---|
| u1 | Connector 1 of Complex input signals |
| u2 | Connector 2 of Complex input signals |
| u3 | Connector 3 of Complex input signals |
| y | Connector of Complex output signals |
Modelica.ComplexBlocks.ComplexMath.ProductThis blocks computes the output y (element-wise) as product of the corresponding elements of the two inputs u1 and u2:
y = u1 * u2;
Extends from Interfaces.ComplexSI2SO (2 Single Input / 1 Single Output continuous control block).
| Name | Description |
|---|---|
| u1 | Connector of Complex input signal 1 |
| u2 | Connector of Complex input signal 2 |
| y | Connector of Complex output signal |
Modelica.ComplexBlocks.ComplexMath.DivisionThis 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.ComplexSI2SO (2 Single Input / 1 Single Output continuous control block).
| Name | Description |
|---|---|
| u1 | Connector of Complex input signal 1 |
| u2 | Connector of Complex input signal 2 |
| y | Connector of Complex output signal |
Modelica.ComplexBlocks.ComplexMath.SqrtThis blocks computes the output y as square root of the input u:
y = sqrt( u );
All elements of the input vector shall be zero or positive. Otherwise an error occurs.
Extends from Interfaces.ComplexSISO (Single Input Single Output continuous control block).
| Name | Description |
|---|---|
| u | Connector of Complex input signal |
| y | Connector of Complex output signal |
Modelica.ComplexBlocks.ComplexMath.SinThis blocks computes the output y as sine of the input u:
y = sin( u );
| Name | Description |
|---|---|
| u | Connector of Complex input signal |
| y | Connector of Complex output signal |
Modelica.ComplexBlocks.ComplexMath.CosThis blocks computes the output y as cos of the input u:
y = cos( u );
| Name | Description |
|---|---|
| u | Connector of Complex input signal |
| y | Connector of Complex output signal |
Modelica.ComplexBlocks.ComplexMath.TanThis blocks computes the output y as tan of the input u:
y = tan( u );
| Name | Description |
|---|---|
| u | Connector of Complex input signal |
| y | Connector of Complex output signal |
Modelica.ComplexBlocks.ComplexMath.AsinThis blocks computes the output y as the sine-inverse of the input u:
y = asin( u );
The absolute values of the elements of the input u need to be less or equal to one (abs( u ) <= 1). Otherwise an error occurs.
| Name | Description |
|---|---|
| u | Connector of Complex input signal |
| y | Connector of Complex output signal |
Modelica.ComplexBlocks.ComplexMath.AcosThis blocks computes the output y as the cosine-inverse of the input u:
y = acos( u );
The absolute values of the elements of the input u need to be less or equal to one (abs( u ) <= 1). Otherwise an error occurs.
| Name | Description |
|---|---|
| u | Connector of Complex input signal |
| y | Connector of Complex output signal |
Modelica.ComplexBlocks.ComplexMath.AtanThis blocks computes the output y as the tangent-inverse of the input u:
y= atan( u );
| Name | Description |
|---|---|
| u | Connector of Complex input signal |
| y | Connector of Complex output signal |
Modelica.ComplexBlocks.ComplexMath.SinhThis blocks computes the output y as the hyperbolic sine of the input u:
y = sinh( u );
| Name | Description |
|---|---|
| u | Connector of Complex input signal |
| y | Connector of Complex output signal |
Modelica.ComplexBlocks.ComplexMath.CoshThis blocks computes the output y as the hyperbolic cosine of the input u:
y = cosh( u );
| Name | Description |
|---|---|
| u | Connector of Complex input signal |
| y | Connector of Complex output signal |
Modelica.ComplexBlocks.ComplexMath.TanhThis blocks computes the output y as the hyperbolic tangent of the input u:
y = tanh( u );
| Name | Description |
|---|---|
| u | Connector of Complex input signal |
| y | Connector of Complex output signal |
Modelica.ComplexBlocks.ComplexMath.ExpThis blocks computes the output y as the exponential (of base e) of the input u:
y = exp( u );
| Name | Description |
|---|---|
| u | Connector of Complex input signal |
| y | Connector of Complex output signal |
Modelica.ComplexBlocks.ComplexMath.LogThis blocks computes the output y as the natural (base e) logarithm of the input u:
y = log( u );
An error occurs if the elements of the input u are zero or negative.
| Name | Description |
|---|---|
| u | Connector of Complex input signal |
| y | Connector of Complex output signal |
Modelica.ComplexBlocks.ComplexMath.RealToComplexConverts the Real inputs re (real part) and im (imaginary part) to the Complex output y.
Extends from Modelica.ComplexBlocks.Interfaces.ComplexSO (Single Output continuous control block).
| Name | Description |
|---|---|
| y | Connector of Complex output signal |
| re | |
| im |
Modelica.ComplexBlocks.ComplexMath.PolarToComplexConverts the Real inputs len (length, absolute) and phi (angle, argument) to the Complex output y.
Extends from Modelica.ComplexBlocks.Interfaces.ComplexSO (Single Output continuous control block).
| Name | Description |
|---|---|
| y | Connector of Complex output signal |
| len | |
| phi |
Modelica.ComplexBlocks.ComplexMath.ComplexToRealConverts the Complex input u to the Real outputs re (real part) and im (imaginary part).
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
| Name | Description |
|---|---|
| re | |
| im | |
| u |
Modelica.ComplexBlocks.ComplexMath.ComplexToPolarConverts the Complex input u to the Real outputs len (length, absolute) and phi (angle, argument).
Extends from Modelica.Blocks.Icons.Block (Basic graphical layout of input/output block).
| Name | Description |
|---|---|
| len | |
| phi | |
| u |