Unary minus

Negate a signal.

  • signal
  • Modelica Standard Library
  • 2 ports
BlockUnary minusKindunaryMinusLibraryMath

Description

Negates 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 Unary minus 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 waveClockGainAbsSignSqrtSinCos

Ports

Inputs 1

  • u

    Input signal.

Outputs 1

  • y

    Output signal, −u.

Equations

Modelica
y = −u

Implementation

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

Used in

These larger examples use it too. Open them from Examples in the app.

  • PMSM · Field-oriented control

See also

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