Log10 Log10 Icon

Mathematical.Log10

Log10

A component that computes the base-10 logarithm of the input signal.

Description

The Log10 block computes the base-10 logarithm of input u using the built-in log10() function. The output is defined as: y = log10(u), often called the common logarithm. Note: The input u must be positive (u > 0) for a real-valued result.

Variables

  • u(t): Input signal (must be positive)
  • y(t): Output signal (base-10 logarithm of u)

Examples

  • u = 1 → y = 0.0 (log10(1) = 0)
  • u = 10 → y = 1.0 (log10(10) = 1)
  • u = 100 → y = 2.0 (log10(100) = 2)
  • u = 0.1 → y = -1.0 (log10(0.1) = -1)

This component extends from BlockComponents.SISO

Usage

PrimitiveComponents.Mathematical.Log10()

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) &= \log_{10}\left( u\left( t \right) \right) \end{align} \]

Source

"""
    Log10

A component that computes the base-10 logarithm of the input signal.

# Description
The Log10 block computes the base-10 logarithm of input `u` using the built-in `log10()` function.
The output is defined as: y = log10(u), often called the common logarithm.
Note: The input `u` must be positive (`u > 0`) for a real-valued result.

# Variables
- `u(t)`: Input signal (must be positive)
- `y(t)`: Output signal (base-10 logarithm of u)

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

A component that computes the base-10 logarithm of the input signal.

# Description
The Log10 block computes the base-10 logarithm of input `u` using the built-in `log10()` function.
The output is defined as: y = log10(u), often called the common logarithm.
Note: The input `u` must be positive (`u > 0`) for a real-valued result.

# Variables
- `u(t)`: Input signal (must be positive)
- `y(t)`: Output signal (base-10 logarithm of u)

# Examples
- u = 1     → y = 0.0        (log10(1) = 0)
- u = 10    → y = 1.0        (log10(10) = 1)
- u = 100   → y = 2.0        (log10(100) = 2)
- u = 0.1   → y = -1.0       (log10(0.1) = -1)
"""
component Log10
  "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 = log10(u)
metadata {
  "Dyad": {
    "labels": [
      {
        "label": "$(instance)",
        "x": 500,
        "y": 1100,
        "rot": 0,
        "layer": "icon",
        "attrs": {}
      }
    ],
    "experiments": {},
    "tests": {},
    "icons": {"default": "dyad://PrimitiveComponents/Log10.svg"},
    "path": {},
    "doc": {"behavior": true}
  }
}
end


Test Cases

No test cases defined.

  • Examples
  • Experiments
  • Analyses