BlockWerk Documentation
|·|

Absolute Value

Math

The Absolute Value block computes the magnitude (absolute value) of the input signal. The output is always non-negative regardless of input sign. This is used for magnitude calculations, error metrics, and signal rectification in control systems and signal processing applications.

Simulate in BlockWerk

Interactive sandbox directly in your browser — zero installation, WASM-powered.

Simulate in BlockWerk →

Mathematical Model

y(t)=∣u(t)∣={u(t),if u(t)≥0−u(t),if u(t)<0y(t) = |u(t)| = \begin{cases} u(t), & \text{if } u(t) \ge 0 \\ -u(t), & \text{if } u(t) < 0 \end{cases}

Inputs & Outputs

Direction ID Label Type Status
→ In in Input number Required
← Out out Output number Output

Usage Examples

Sine wave input produces rectified output with doubled frequency component.

Remarks & Best Practices

  • Output always ≥ 0 regardless of input sign
  • Non-differentiable at u = 0 (infinite slope)
  • Zero computational overhead
  • Often cascaded with filters for magnitude tracking
  • Commonly combined with Product or SquareRoot for norm calculations

Related Components

  • Product: Multiplication (useful for magnitude-squared)
  • SquareRoot: n-th root (for RMS from magnitude-squared)
  • Saturation: Output limiting