---
url: /dyad/stable/stdlib/BlockComponents/tests/Continuous.Tests.LimPIDPOnly.md
description: >-
  Dyad Continuous.Tests.LimPIDPOnly docs.  Test bench for a limited PID
  controller with both the integral and derivative parts structurally removed
  (with_I = false, with_D = false), a...
---

# `Continuous.Tests.LimPIDPOnly` {#Continuous.Tests.LimPIDPOnly}

Test bench for a limited PID controller with both the integral and derivative parts structurally removed (`with_I = false, with_D = false`), acting as a proportional controller.

## Usage {#Usage}

`BlockComponents.Continuous.Tests.LimPIDPOnly()`

## Behavior {#Behavior}

## Source {#Source}

```dyad
"""
Test bench for a limited PID controller with both the integral and derivative
parts structurally removed (`with_I = false, with_D = false`), acting as a
proportional controller.
"""
test component LimPIDPOnly
  "Limited P controller (integral and derivative parts structurally removed)"
  pid = BlockComponents.Continuous.LimPID(with_I = false, with_D = false, y_max = 1, y_min = -1, wp = 1, k_ff = 1) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 340, "y1": 60, "x2": 440, "y2": 160, "rot": 0}
      }
    }
  }
  "Plant model to be controlled"
  plant = BlockComponents.Continuous.Plant() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 50, "y1": 170, "x2": 150, "y2": 270, "rot": 0}
      }
    }
  }
  "Step input signal used as setpoint for the controller"
  signal = BlockComponents.Sources.Step(height = 1) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 40, "y1": 10, "x2": 140, "y2": 110, "rot": 0}
      }
    }
  }
  "Constant signal for feedforward control"
  signal_ff = BlockComponents.Sources.Constant(k = 1) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 40, "y1": -140, "x2": 140, "y2": -40, "rot": 0}
      }
    }
  }
relations
  "Initial condition for the first state of the plant"
  initial plant.x1 = 0
  "Initial condition for the plant output"
  initial plant.y = 0
  connect(signal.y, pid.u_s) {"Dyad": {"edges": [{"S": 1, "E": 2}]}}
  connect(plant.y, pid.u_m) {"Dyad": {"edges": [{"S": 1, "E": 2}]}}
  connect(pid.y, plant.u) {"Dyad": {"edges": [{"S": 1, "E": 2}]}}
  connect(pid.u_ff, signal_ff.y) {"Dyad": {"edges": [{"S": 1, "E": 2}]}}
metadata {
  "Dyad": {
    "icons": {"default": "dyad://BlockComponents/Example.svg"},
    "tests": {
      "case1": {
        "stop": 10,
        "atol": {"plant.y": 0.0001, "pid.y": 0.0001},
        "expect": {"signals": ["plant.y", "pid.y"]}
      }
    }
  }
}
end
```

```dyad
"""
Test bench for a limited PID controller with both the integral and derivative
parts structurally removed (`with_I = false, with_D = false`), acting as a
proportional controller.
"""
test component LimPIDPOnly
  "Limited P controller (integral and derivative parts structurally removed)"
  pid = BlockComponents.Continuous.LimPID(with_I = false, with_D = false, y_max = 1, y_min = -1, wp = 1, k_ff = 1) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 340, "y1": 60, "x2": 440, "y2": 160, "rot": 0}
      }
    }
  }
  "Plant model to be controlled"
  plant = BlockComponents.Continuous.Plant() {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 50, "y1": 170, "x2": 150, "y2": 270, "rot": 0}
      }
    }
  }
  "Step input signal used as setpoint for the controller"
  signal = BlockComponents.Sources.Step(height = 1) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 40, "y1": 10, "x2": 140, "y2": 110, "rot": 0}
      }
    }
  }
  "Constant signal for feedforward control"
  signal_ff = BlockComponents.Sources.Constant(k = 1) {
    "Dyad": {
      "placement": {
        "diagram": {"iconName": "default", "x1": 40, "y1": -140, "x2": 140, "y2": -40, "rot": 0}
      }
    }
  }
relations
  "Initial condition for the first state of the plant"
  initial plant.x1 = 0
  "Initial condition for the plant output"
  initial plant.y = 0
  connect(signal.y, pid.u_s) {"Dyad": {"edges": [{"S": 1, "E": 2}]}}
  connect(plant.y, pid.u_m) {"Dyad": {"edges": [{"S": 1, "E": 2}]}}
  connect(pid.y, plant.u) {"Dyad": {"edges": [{"S": 1, "E": 2}]}}
  connect(pid.u_ff, signal_ff.y) {"Dyad": {"edges": [{"S": 1, "E": 2}]}}
metadata {
  "Dyad": {
    "icons": {"default": "dyad://BlockComponents/Example.svg"},
    "tests": {
      "case1": {
        "stop": 10,
        "atol": {"plant.y": 0.0001, "pid.y": 0.0001},
        "expect": {"signals": ["plant.y", "pid.y"]}
      }
    }
  }
}
end
```

## Test Cases {#Test-Cases}

### Test Case `case1` {#Test-Case-case1}

```julia
plt
```

![](frghofy.svg)

```julia
plt
```

![](jgjeiqt.svg)

## Related {#Related}

* Examples

* Experiments

* Analyses

* Tests
  * [`Constant`](Continuous.Tests.LimPIDPOnly.md)

  * [`LimPID`](Continuous.Tests.LimPIDPOnly.md)

  * [`Plant`](Continuous.Tests.LimPIDPOnly.md)

  * [`Step`](Continuous.Tests.LimPIDPOnly.md)
