IndustrialControlSystems.MathOperations.RealType

Real mathematical operations

Information

  

Description

This sub-packege contains the math operations for real numbers, including their fixed point representation.

Extends from Modelica.Icons.Package (Icon for standard packages).

Package Content

NameDescription
IndustrialControlSystems.MathOperations.RealType.Add Add Sum of two real numbers
IndustrialControlSystems.MathOperations.RealType.Sub Sub Difference of two real numbers
IndustrialControlSystems.MathOperations.RealType.Div Div Division of two real numbers
IndustrialControlSystems.MathOperations.RealType.Pow Pow Power of two real numbers
IndustrialControlSystems.MathOperations.RealType.Mult Mult Product of two real numbers
IndustrialControlSystems.MathOperations.RealType.Expression Expression User defined real function
IndustrialControlSystems.MathOperations.RealType.Signals Signals Real signals for modelling disturbances or smooth set point references
IndustrialControlSystems.MathOperations.RealType.Functions Functions Functions
IndustrialControlSystems.MathOperations.RealType.Interfaces Interfaces Interfaces

IndustrialControlSystems.MathOperations.RealType.Add IndustrialControlSystems.MathOperations.RealType.Add

Sum of two real numbers

Information

  

Description

Sum of two real numbers. The output ( y ) is the sum of the inputs ( u1, u2 ) signals.

    y = u1 + u2
  

Fixed Point numbers

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/scaleFactor
  
When 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*scaleFactor
  
then 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.

Saturation

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).

Parameters

NameDescription
Tssampling 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

Connectors

NameDescription
u1input
u2input
youtput

IndustrialControlSystems.MathOperations.RealType.Sub IndustrialControlSystems.MathOperations.RealType.Sub

Difference of two real numbers

Information

  

Description

Difference of two real numbers. The output ( y ) is the difference of the inputs ( u1, u2 ) signals.

    y = u1 - u2
  

Fixed Point numbers

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/scaleFactor
  
When 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*scaleFactor
  
then 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.

Saturation

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).

Parameters

NameDescription
Tssampling 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

Connectors

NameDescription
u1input
u2input
youtput

IndustrialControlSystems.MathOperations.RealType.Div IndustrialControlSystems.MathOperations.RealType.Div

Division of two real numbers

Information

  

Description

Diivision of two real numbers. The output ( y ) is the division of the inputs ( u1, u2 ) signals.

    y = u1 / u2
  

If the input u2 is equal to 0, an error is reported.

Fixed Point numbers

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/scaleFactor
  
When 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*scaleFactor
  
then 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.

Saturation

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).

Parameters

NameDescription
Tssampling 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

Connectors

NameDescription
u1input
u2input
youtput

IndustrialControlSystems.MathOperations.RealType.Pow IndustrialControlSystems.MathOperations.RealType.Pow

Power of two real numbers

Information

  

Description

Power of two real numbers. The output ( y ) is the inputs ( u1 ) to the power of the input( u2 ) signal.

    y = u1 ^ u2
  

The input u1 cannot be equal to zero if the second one, u2, is less than zero.

Fixed Point numbers

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/scaleFactor
  
When 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*scaleFactor
  
then 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.

Saturation

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).

Parameters

NameDescription
Tssampling 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

Connectors

NameDescription
u1input
u2input
youtput

IndustrialControlSystems.MathOperations.RealType.Mult IndustrialControlSystems.MathOperations.RealType.Mult

Product of two real numbers

Information

  

Description

product of two real numbers. The output ( y ) is the product of the inputs ( u1, u2 ) signals.

    y = u1 * u2
  

Fixed Point numbers

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/scaleFactor
  
When 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*scaleFactor
  
then 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.

Saturation

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).

Parameters

NameDescription
Tssampling 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

Connectors

NameDescription
u1input
u2input
youtput

IndustrialControlSystems.MathOperations.RealType.Expression IndustrialControlSystems.MathOperations.RealType.Expression

User defined real function

Information

  

Description

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[:])
  

Fixed Point numbers

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/scaleFactor
  
When 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*scaleFactor
  
then 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.

Saturation

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).

Parameters

NameDescription
Tssampling time
nInputnumber of inputs
useInputs=true, if inputs are enabled
fnameString 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

Connectors

NameDescription
u[nInput]input vector
youtput

Automatically generated Mon May 21 13:34:14 2012.