Sqrt

Square root of a non-negative input.

  • signal
  • Modelica Standard Library
  • 2 ports
BlockSqrtKindsqrtLibraryMath

Description

Outputs the square root of its input.

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:PowerSine waveClockGainAbsSignSinCosUnary minus

Ports

Inputs 1

  • u

    Input signal, 0 or more.

Outputs 1

  • y

    Output signal, √u.

Equations

Modelica
y = √u

Implementation

Modelica Standard Library 4.1.0Modelica.Blocks.Math.Sqrt
MSL documentation

Assumptions and limitations

  • A negative input is a model error: the square root is not real, and the run fails or produces no number. Keep the input at 0 or above, for example with Abs or Max.

See also

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