blockSqrtNoEvent
If the input is positive, outputs its square root, if the input is negative, outputs zero
Extends from Modelica.Blocks.Interfaces.SISO (Single Input Single Output continuous control block).
Information
This block computes the output y as extended square root of the input u:
sqrt(u) if u > 0
y =
0 if u ≤ 0
The noEvent function prevents the negative input values from being evaluated by the sqrt function, thus avoiding an error.
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| RealInput | u (from SISO) | Connector of Real input signal | |
| RealOutput | y (from SISO) | Connector of Real output signal |