blockPower

Outputs a power of the input
Diagram of Power

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

Information

If NInteger = true, this block computes the output y as N power of the input u:

  y = u ^ N

If NInteger = false, this block computes the output y as follows:

       u ^ N  if u > 0
  y =
         0    if u ≤ 0

The noEvent function prevents the negative input values from being evaluated by the power function with a non-integer exponent, thus avoiding an error.

Parameters

TypeNameDefaultDescription
RealNExponent of the power function
BooleanNIntegerFor u < 0 : if true, u ^ N is calculable, if false, u ^ N is not calculable, y = 0 instead

Connectors

TypeNameDefaultDescription
RealInputu (from SISO)Connector of Real input signal
RealOutputy (from SISO)Connector of Real output signal