---
url: /dyad/dev/stdlib/BlockComponents/components/Logical.LessThreshold.md
description: >-
  Dyad Logical.LessThreshold docs.  Output y is true, if input u is less than
  threshold.
---

# `Logical.LessThreshold` {#Logical.LessThreshold}

Output y is true, if input u is less than threshold.

The output is **true** if the Real input is less than parameter **threshold**, otherwise the output is **false**.

This component extends from [`BlockComponents.Interfaces.PartialBooleanThresholdComparison`](../types/Interfaces.PartialBooleanThresholdComparison.md)

## Usage {#Usage}

`BlockComponents.Logical.LessThreshold(threshold=0)`

## Parameters: {#Parameters:}

|        Name |                          Description | Units | Default value |
| -----------:| ------------------------------------:| -----:| -------------:|
| `threshold` | Comparison with respect to threshold |     – |             0 |

## Connectors {#Connectors}

* `u` - This connector represents a real signal as an input to a component ([`RealInput`](/stdlib/Dyad/connectors/RealInput#RealInput))

* `y` - This connector represents a boolean signal as an output from a component ([`BooleanOutput`](/stdlib/Dyad/connectors/BooleanOutput#BooleanOutput))

## Behavior {#Behavior}

$$ \begin{align}
y\left( t \right) &= u\left( t \right) < \mathtt{threshold}
\end{align}
$$

## Source {#Source}

```dyad
"""
Output y is true, if input u is less than threshold.

The output is **true** if the Real input is less than parameter **threshold**, otherwise
the output is **false**.
"""
component LessThreshold
  extends BlockComponents.Interfaces.PartialBooleanThresholdComparison
relations
  y = u < threshold
metadata {
  "Dyad": {
    "labels": [
      {"label": "$(instance)", "x": 500, "y": 1100, "rot": 0},
      {
        "label": "<",
        "x": 500,
        "y": 500,
        "rot": 0,
        "attrs": {
          "font-size": "300",
          "font-weight": "bold",
          "font-family": "sans-serif",
          "fill": "#939598"
        }
      },
      {
        "label": "$(threshold)",
        "x": 500,
        "y": 820,
        "rot": 0,
        "attrs": {"font-size": "140", "fill": "#939598"}
      }
    ],
    "icons": {"default": "dyad://BlockComponents/BooleanComparison.svg"}
  }
}
end
```

```dyad
"""
Output y is true, if input u is less than threshold.

The output is **true** if the Real input is less than parameter **threshold**, otherwise
the output is **false**.
"""
component LessThreshold
  "Connector of Real input signal"
  u = RealInput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": -110, "y1": 450, "x2": -10, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Connector of Boolean output signal"
  y = BooleanOutput() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 1000, "y1": 450, "x2": 1100, "y2": 550, "rot": 0}
      },
      "tags": []
    }
  }
  "Comparison with respect to threshold"
  parameter threshold::Real = 0
relations
  y = u < threshold
metadata {
  "Dyad": {
    "labels": [
      {"label": "$(instance)", "x": 500, "y": 1100, "rot": 0},
      {
        "label": "<",
        "x": 500,
        "y": 500,
        "rot": 0,
        "attrs": {
          "font-size": "300",
          "font-weight": "bold",
          "font-family": "sans-serif",
          "fill": "#939598"
        }
      },
      {
        "label": "$(threshold)",
        "x": 500,
        "y": 820,
        "rot": 0,
        "attrs": {"font-size": "140", "fill": "#939598"}
      }
    ],
    "icons": {"default": "dyad://BlockComponents/BooleanComparison.svg"}
  }
}
end
```

## Test Cases {#Test-Cases}

No test cases defined.

## Related {#Related}

* Examples

* Experiments

* Analyses

* Tests
  * [`Logical`](Logical.LessThreshold.md)

  * [`LogicalValidation`](Logical.LessThreshold.md)

  * [`ZeroThresholds`](Logical.LessThreshold.md)
