blockPower
Outputs a power of the input
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
| Type | Name | Default | Description |
|---|---|---|---|
| Real | N | Exponent of the power function | |
| Boolean | NInteger | For u < 0 : if true, u ^ N is calculable, if false, u ^ N is not calculable, y = 0 instead |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| RealInput | u (from SISO) | Connector of Real input signal | |
| RealOutput | y (from SISO) | Connector of Real output signal |