Sqrt

Square root of a non-negative input.

  • signal
  • Gradara equations
  • 2 ports
BlockSqrtKindsqrtLibraryMath

Description

Outputs the square root of its input. A negative input is treated as 0.

Example

Math functions Gain, absolute value, square root, sign, negation, and power of a sine; sine and cosine of time.

u = 2 sin(πt/2)Gain 0.5|u|√|u|sign(u)−uu²Timesin(t)cos(t)
In Gradara, select a Sqrt block and press F1, then choose Open example. It opens as a new model in My models, ready to run.

Also in this example:GainSine waveClockAbsSignSinCosUnary minusPower

Ports

Inputs 1

  • u

    Input signal.

Outputs 1

  • y

    Output signal, √u for u ≥ 0 and 0 for u < 0.

Equations

Modelica
y = √max(0, u)

Implementation

The block’s Modelica model
y = sqrt(max(0, u));

Assumptions and limitations

  • Negative inputs are clipped to 0 silently, with no warning.

See also

Select a block in Gradara and press F1 to open its page offline.