This sub-packege contains the math operations for real numbers, including their fixed point representation.
Extends from Modelica.Icons.Package (Icon for standard packages).
Name | Description |
---|---|
![]() | Sum of two real numbers |
![]() | Difference of two real numbers |
![]() | Division of two real numbers |
![]() | Power of two real numbers |
![]() | Product of two real numbers |
![]() | User defined real function |
![]() | Real signals for modelling disturbances or smooth set point references |
![]() | Functions |
![]() | Interfaces |
Sum of two real numbers. The output ( y ) is the sum of the inputs ( u1, u2 ) signals.
y = u1 + u2
When using fixed point real numbers, Nbit is the number of bits that can be represented. The range is
Xfp in [-2Nbit - 1 + 1 ,..., 2Nbit - 1]Then it is possible to define a scaleFactor
X = Xfp/scaleFactorWhen the Fixed Point representation is selected (through the selection of the boolean flag FixedPoint), each input number u is converted into an integer Ufp
Ufp = u*scaleFactorthen the result of the math operation Yfp is computed and converted into the output value y. The output conversion depends on the math operation performed.
To note that the Fixed Point numbers have a maximum and minimum value. In order to avoid saturation when
performing the computations, the number of bit as well the scale factor have to be choosen carefully.
Extends from IndustrialControlSystems.MathOperations.RealType.Interfaces.RealSimpleOperation (Real operation interface).
Name | Description |
---|---|
Ts | sampling time |
Nbit | Number of bit for representing the real numbers |
Fixed Point | |
FixedPoint | Use fixed point real numbers |
scaleFactor | Scale factor for Fixed Point numbers |
MAX | maximum number that can be represented with Fixed Point notation |
MIN | mainimum number that can be represented with Fixed Point notation |
Name | Description |
---|---|
u1 | input |
u2 | input |
y | output |
Difference of two real numbers. The output ( y ) is the difference of the inputs ( u1, u2 ) signals.
y = u1 - u2
When using fixed point real numbers, Nbit is the number of bits that can be represented. The range is
Xfp in [-2Nbit - 1 + 1 ,..., 2Nbit - 1]Then it is possible to define a scaleFactor
X = Xfp/scaleFactorWhen the Fixed Point representation is selected (through the selection of the boolean flag FixedPoint), each input number u is converted into an integer Ufp
Ufp = u*scaleFactorthen the result of the math operation Yfp is computed and converted into the output value y. The output conversion depends on the math operation performed.
To note that the Fixed Point numbers have a maximum and minimum value. In order to avoid saturation when
performing the computations, the number of bit as well the scale factor have to be choosen carefully.
Extends from IndustrialControlSystems.MathOperations.RealType.Interfaces.RealSimpleOperation (Real operation interface).
Name | Description |
---|---|
Ts | sampling time |
Nbit | Number of bit for representing the real numbers |
Fixed Point | |
FixedPoint | Use fixed point real numbers |
scaleFactor | Scale factor for Fixed Point numbers |
MAX | maximum number that can be represented with Fixed Point notation |
MIN | mainimum number that can be represented with Fixed Point notation |
Name | Description |
---|---|
u1 | input |
u2 | input |
y | output |
Diivision of two real numbers. The output ( y ) is the division of the inputs ( u1, u2 ) signals.
y = u1 / u2
When using fixed point real numbers, Nbit is the number of bits that can be represented. The range is
Xfp in [-2Nbit - 1 + 1 ,..., 2Nbit - 1]Then it is possible to define a scaleFactor
X = Xfp/scaleFactorWhen the Fixed Point representation is selected (through the selection of the boolean flag FixedPoint), each input number u is converted into an integer Ufp
Ufp = u*scaleFactorthen the result of the math operation Yfp is computed and converted into the output value y. The output conversion depends on the math operation performed.
To note that the Fixed Point numbers have a maximum and minimum value. In order to avoid saturation when
performing the computations, the number of bit as well the scale factor have to be choosen carefully.
Extends from IndustrialControlSystems.MathOperations.RealType.Interfaces.RealSimpleOperation (Real operation interface).
Name | Description |
---|---|
Ts | sampling time |
Nbit | Number of bit for representing the real numbers |
Fixed Point | |
FixedPoint | Use fixed point real numbers |
scaleFactor | Scale factor for Fixed Point numbers |
MAX | maximum number that can be represented with Fixed Point notation |
MIN | mainimum number that can be represented with Fixed Point notation |
Name | Description |
---|---|
u1 | input |
u2 | input |
y | output |
Power of two real numbers. The output ( y ) is the inputs ( u1 ) to the power of the input( u2 ) signal.
y = u1 ^ u2
When using fixed point real numbers, Nbit is the number of bits that can be represented. The range is
Xfp in [-2Nbit - 1 + 1 ,..., 2Nbit - 1]Then it is possible to define a scaleFactor
X = Xfp/scaleFactorWhen the Fixed Point representation is selected (through the selection of the boolean flag FixedPoint), each input number u is converted into an integer Ufp
Ufp = u*scaleFactorthen the result of the math operation Yfp is computed and converted into the output value y. The output conversion depends on the math operation performed.
To note that the Fixed Point numbers have a maximum and minimum value. In order to avoid saturation when performing the computations, the number of bit as well the scale factor have to be choosen carefully.
Extends from IndustrialControlSystems.MathOperations.RealType.Interfaces.RealSimpleOperation (Real operation interface).
Name | Description |
---|---|
Ts | sampling time |
Nbit | Number of bit for representing the real numbers |
Fixed Point | |
FixedPoint | Use fixed point real numbers |
scaleFactor | Scale factor for Fixed Point numbers |
MAX | maximum number that can be represented with Fixed Point notation |
MIN | mainimum number that can be represented with Fixed Point notation |
Name | Description |
---|---|
u1 | input |
u2 | input |
y | output |
product of two real numbers. The output ( y ) is the product of the inputs ( u1, u2 ) signals.
y = u1 * u2
When using fixed point real numbers, Nbit is the number of bits that can be represented. The range is
Xfp in [-2Nbit - 1 + 1 ,..., 2Nbit - 1]Then it is possible to define a scaleFactor
X = Xfp/scaleFactorWhen the Fixed Point representation is selected (through the selection of the boolean flag FixedPoint), each input number u is converted into an integer Ufp
Ufp = u*scaleFactorthen the result of the math operation Yfp is computed and converted into the output value y. The output conversion depends on the math operation performed.
To note that the Fixed Point numbers have a maximum and minimum value. In order to avoid saturation when
performing the computations, the number of bit as well the scale factor have to be choosen carefully.
Extends from IndustrialControlSystems.MathOperations.RealType.Interfaces.RealSimpleOperation (Real operation interface).
Name | Description |
---|---|
Ts | sampling time |
Nbit | Number of bit for representing the real numbers |
Fixed Point | |
FixedPoint | Use fixed point real numbers |
scaleFactor | Scale factor for Fixed Point numbers |
MAX | maximum number that can be represented with Fixed Point notation |
MIN | mainimum number that can be represented with Fixed Point notation |
Name | Description |
---|---|
u1 | input |
u2 | input |
y | output |
Model of a generic function of n real numbers.
The output ( y ) is the result of the generic function f(.) of the
inputs ( u(:) ) signals.
y = f(u[:])
When using fixed point real numbers, Nbit is the number of bits that can be represented. The range is
Xfp in [-2Nbit - 1 + 1 ,..., 2Nbit - 1]Then it is possible to define a scaleFactor
X = Xfp/scaleFactorWhen the Fixed Point representation is selected (through the selection of the boolean flag FixedPoint), each input number u is converted into an integer Ufp
Ufp = u*scaleFactorthen the result of the math operation Yfp is computed and converted into the output value y. The output conversion depends on the math operation performed.
To note that the Fixed Point numbers have a maximum and minimum value. In order to avoid saturation when performing the computations, the number of bit as well the scale factor have to be choosen carefully.
Extends from IndustrialControlSystems.MathOperations.RealType.Interfaces.RealNinOperation (Real comparison interface).
Name | Description |
---|---|
Ts | sampling time |
nInput | number of inputs |
useInputs | =true, if inputs are enabled |
fname | String that represent the name of the implemented function |
Fixed Point | |
FixedPoint | Use fixed point real numbers |
Nbit | Number of bit for representing the real numbers |
scaleFactor | Scale factor for Fixed Point numbers |
MAX | maximum number that can be represented with Fixed Point notation |
MIN | mainimum number that can be represented with Fixed Point notation |
Name | Description |
---|---|
u[nInput] | input vector |
y | output |