Exp2 Exp2 Icon

Mathematical.Exp2

Exp2

A component that computes 2 raised to the power of the input signal.

Description

The Exp2 block computes 2 raised to the power of input u. The output y is defined as: y = 2 ^ u.

Variables

  • u(t): Input signal (exponent)
  • y(t): Output signal (2 raised to the power of u)

Examples

  • u = 0 → y = 1.0 (2^0 = 1)
  • u = 1 → y = 2.0 (2^1 = 2)
  • u = 3 → y = 8.0 (2^3 = 8)
  • u = -2 → y = 0.25 (2^-2 = 1/4)

This component extends from BlockComponents.SISO

Usage

PrimitiveComponents.Mathematical.Exp2()

Connectors

  • u - This connector represents a real signal as an input to a component (RealInput)
  • y - This connector represents a real signal as an output from a component (RealOutput)

Behavior

\[ \begin{align} y\left( t \right) &= 2^{u\left( t \right)} \end{align} \]

Source

"""
    Exp2

A component that computes 2 raised to the power of the input signal.

# Description
The Exp2 block computes 2 raised to the power of input `u`.
The output `y` is defined as: y = 2 ^ u.

# Variables
- `u(t)`: Input signal (exponent)
- `y(t)`: Output signal (2 raised to the power of u)

# Examples
- u = 0   → y = 1.0     (2^0 = 1)
- u = 1   → y = 2.0     (2^1 = 2)
- u = 3   → y = 8.0     (2^3 = 8)
- u = -2  → y = 0.25    (2^-2 = 1/4)
"""
component Exp2
  extends BlockComponents.SISO
relations
  y = 2 ^ u
metadata {
  "Dyad": {
    "experiments": {},
    "tests": {},
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 1100,
        "rot": 0,
        "layer": "icon",
        "attrs": {}
      }
    ],
    "icons": {"default": "dyad://PrimitiveComponents/Exp2.svg"},
    "path": {},
    "doc": {"behavior": true}
  }
}
end
Flattened Source
"""
    Exp2

A component that computes 2 raised to the power of the input signal.

# Description
The Exp2 block computes 2 raised to the power of input `u`.
The output `y` is defined as: y = 2 ^ u.

# Variables
- `u(t)`: Input signal (exponent)
- `y(t)`: Output signal (2 raised to the power of u)

# Examples
- u = 0   → y = 1.0     (2^0 = 1)
- u = 1   → y = 2.0     (2^1 = 2)
- u = 3   → y = 8.0     (2^3 = 8)
- u = -2  → y = 0.25    (2^-2 = 1/4)
"""
component Exp2
  "Input signal port"
  u = RealInput() {
    "Dyad": {
      "placement": {
        "icon": {"iconName": "input", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0},
        "diagram": {"iconName": "input", "x1": -100, "y1": 450, "x2": 0, "y2": 550, "rot": 0}
      }
    }
  }
  "Output signal port"
  y = RealOutput() {
    "Dyad": {
      "placement": {
        "icon": {"iconName": "output", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0},
        "diagram": {"iconName": "output", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
      }
    }
  }
relations
  y = 2 ^ u
metadata {
  "Dyad": {
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 1100,
        "rot": 0,
        "layer": "icon",
        "attrs": {}
      }
    ],
    "experiments": {},
    "tests": {},
    "icons": {"default": "dyad://PrimitiveComponents/Exp2.svg"},
    "path": {},
    "doc": {"behavior": true}
  }
}
end


Test Cases

No test cases defined.

  • Examples
  • Experiments
  • Analyses