Skip to main content

Subtractor

The subtracter computes two signals in a fixed subtraction order, for setpoint deviations, inlet-to-outlet pressure differences, or subsequent calculations.

Component Appearance and Location​

Expand Controller in the component library on the left and find "Subtractor".

Created with Fabric.js 5.3.0

Ports and Connections​

Port KeyTypeDirectionInterface NameDisplay Conditions
0CONTROLinputMinuend signal portalways show
1CONTROLinputMinus signal portalways show
2CONTROLoutputOutput signal portalways show

Port 0 minus port 1 is output at 2. Both inputs require valid drivers.

Parameter List​

Subtractor has no parameters to display.

Parameter Guidance​

Wiring determines subtraction. Inputs must share quantity, units, and reference. Select equipment measurements and units with a measurement instrument.

Modeling Steps​

  1. Define positive direction. Connect minuend to 0 and subtrahend to 1; use setpoint then measurement for setpoint error.
  2. Connect port 2 downstream or to an oscilloscope.
  3. Run transient simulation and compare simultaneous values. Oscilloscope

View Results​

Output is positive if port 0 exceeds 1, zero when equal. For reversed trends, check order, sources, locations, and units.

Professional Theory​

Signed Difference​

For inputs u0(t)u_0(t) and u1(t)u_1(t) at the same control instant,

y(t)=u0(t)−u1(t).y(t)=u_0(t)-u_1(t).

The sign is retained. Use Absolute Value for deviation magnitude.

A shared gauge reference cancels when subtracting inlet and outlet gauge pressures. Inlet minus outlet gives pressure difference in MPa. Reference Conditions

Signal Updates​

This stateless combinational component evaluates once both inputs are ready. Later input changes update the difference, which can pass downstream at the same control instant. Timing follows the Transient Control Network.

Applicability and Limits​

  • Error monitoring. Outputs an explicit deviation. In PID loops, supply PV and SP to the controller, which calculates its own error. PID Controller
  • Feedback. Avoid returning output through instantaneous operations into its own inputs, creating same-instant loops.
  • References. Use matching gauge references and consistent flow bases such as standard volume flow.

Common Inspections​

  • Unexpected sign. Check port order and measurements.
  • Unexpected magnitude. Check dimensions, units, gauge versus absolute pressure, and standard versus actual flow.
  • No output. Confirm transient simulation and both drivers. A Constant Input supplies a zero reference.
  • Multiple drivers or loops. Each node needs one output driver; trace feedback in signal direction.