Subtract

Subtract the second signal from the first: y = a − b.

  • signal
  • Modelica Standard Library
  • 3 ports
BlockSubtractKindsubtractLibraryMath

Description

Subtracts the second input from the first (the Modelica library feedback block). Use it to form a control error: setpoint on +, measurement on −.

Example

Arithmetic Sum, difference, product, quotient, minimum, and maximum of a ramp and a constant.

a = tb = 2a + ba − ba · ba / bmin(a, b)max(a, b)
In Gradara, select a Subtract block and press F1, then choose Open example. It opens as a new model in My models, ready to run.

Also in this example:ConstantRampSumProductDivideMinMax

Ports

Inputs 2

  • +a

    Input added (+).

  • −b

    Input subtracted (−).

Outputs 1

  • y

    Output signal, a − b.

Equations

Modelica
y = a − b

Implementation

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

Used in

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

  • Data center cooling control

See also

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