{
  "node": {
    "id": "block:pi-controller",
    "type": "Block",
    "label": "PI controller",
    "properties": {
      "id": "pi-controller",
      "kind": "studio",
      "name": "PI controller",
      "summary": "Discrete PI on setpoint minus measurement with output bounds; the integral freezes while the output sits at a bound (anti-windup).",
      "behavior": "Discrete PI on setpoint minus measurement with output bounds; the integral freezes while the output sits at a bound (anti-windup).",
      "documentationSlug": "signal-block-pi-controller",
      "referenceOnly": true,
      "ports": [
        {
          "name": "Setpoint",
          "direction": "input",
          "unit": "—",
          "description": "Number; Scalar; real. Received from a connected producer."
        },
        {
          "name": "Measurement",
          "direction": "input",
          "unit": "—",
          "description": "Number; Scalar; real. Received from a connected producer."
        },
        {
          "name": "Output",
          "direction": "output",
          "unit": "—",
          "description": "Number; Scalar; real. Produced for connected consumers."
        }
      ],
      "parameters": [
        {
          "key": "sampleTimeS",
          "label": "Sample time",
          "unit": "s",
          "default": "0.01",
          "description": "Declared authoring field: Sample time."
        },
        {
          "key": "inputQuantity",
          "label": "Setpoint and measurement quantity",
          "unit": "",
          "default": "dimensionless",
          "description": "Declared authoring field: Setpoint and measurement quantity."
        },
        {
          "key": "kp",
          "label": "Proportional gain",
          "unit": "",
          "default": "1",
          "description": "Declared authoring field: Proportional gain."
        },
        {
          "key": "ki",
          "label": "Integral gain",
          "unit": "1/s",
          "default": "0",
          "description": "Declared authoring field: Integral gain."
        },
        {
          "key": "min",
          "label": "Output minimum",
          "unit": "",
          "default": "-1",
          "description": "Declared authoring field: Output minimum."
        },
        {
          "key": "max",
          "label": "Output maximum",
          "unit": "",
          "default": "1",
          "description": "Declared authoring field: Output maximum."
        },
        {
          "key": "initialIntegral",
          "label": "Initial integral",
          "unit": "",
          "default": "0",
          "description": "Declared authoring field: Initial integral."
        }
      ],
      "equations": [],
      "example": {
        "title": "Use this authoring component",
        "text": "Choose this component in the Studio library and configure its declared interface. This reference describes the authoring contract; it does not claim a standalone numerical validation or a measured result.",
        "url": "https://design.lemonergy.com/cosim",
        "label": "Open Studio"
      },
      "limits": [
        "The symbolic diagram describes the component and its declared interface. It is not a solved circuit or simulated output.",
        "Configured parameters and model connections determine the result. Check the complete model before interpreting its outputs."
      ],
      "evidence": [
        "docs/glossary/studio-help-catalog.json"
      ],
      "caseIds": [],
      "sourceRepository": "battery-design",
      "sourceRevision": "e248d21a9902225f1075624f23e7628b54cdb7cc",
      "reviewed": "2026-10-30",
      "type": "pi-controller",
      "implementationId": "pi-controller",
      "url": "https://lemonergy.com/learn/glossary/blocks/signal-block-pi-controller/",
      "documentationUrl": "https://lemonergy.com/learn/glossary/blocks/signal-block-pi-controller/",
      "sourceFile": "studio-help-catalog.json",
      "studioHelp": {
        "type": "pi-controller",
        "namespace": "signal",
        "slug": "signal-block-pi-controller",
        "canonicalSlug": "signal-block-pi-controller",
        "existing": false,
        "dynamic": false,
        "scene": {
          "title": "PI controller",
          "label": "PI controller",
          "summary": "Discrete PI on setpoint minus measurement with output bounds; the integral freezes while the output sits at a bound (anti-windup).",
          "details": [
            "Block type: pi-controller.",
            "2 declared inputs and 1 declared output in this model.",
            "Arrows show the direction of signal data. They are not conserving electrical, thermal or mechanical connections."
          ],
          "operation": {
            "kind": "control",
            "symbol": "P + ∫ I",
            "label": "Sampled feedback control",
            "caption": "Discrete PI on setpoint minus measurement with output bounds; the integral freezes while the output sits at a bound (anti-windup)."
          },
          "inputs": [
            {
              "id": "in0",
              "label": "Setpoint",
              "quantity": "dimensionless",
              "unit": "—",
              "unitDeclared": true,
              "fields": [],
              "quantityLabel": "Number",
              "shapeLabel": "Scalar",
              "elementLabel": "real"
            },
            {
              "id": "in1",
              "label": "Measurement",
              "quantity": "dimensionless",
              "unit": "—",
              "unitDeclared": true,
              "fields": [],
              "quantityLabel": "Number",
              "shapeLabel": "Scalar",
              "elementLabel": "real"
            }
          ],
          "outputs": [
            {
              "id": "out0",
              "label": "Output",
              "quantity": "dimensionless",
              "unit": "—",
              "unitDeclared": true,
              "fields": [],
              "quantityLabel": "Number",
              "shapeLabel": "Scalar",
              "elementLabel": "real"
            }
          ],
          "parameters": [
            {
              "id": "sampleTimeS",
              "label": "Sample time",
              "unit": "s",
              "value": "0.01"
            },
            {
              "id": "inputQuantity",
              "label": "Setpoint and measurement quantity",
              "unit": "",
              "value": "dimensionless"
            },
            {
              "id": "kp",
              "label": "Proportional gain",
              "unit": "",
              "value": "1"
            },
            {
              "id": "ki",
              "label": "Integral gain",
              "unit": "1/s",
              "value": "0"
            },
            {
              "id": "min",
              "label": "Output minimum",
              "unit": "",
              "value": "-1"
            },
            {
              "id": "max",
              "label": "Output maximum",
              "unit": "",
              "value": "1"
            },
            {
              "id": "initialIntegral",
              "label": "Initial integral",
              "unit": "",
              "value": "0"
            }
          ],
          "url": "https://lemonergy.com/learn/glossary/blocks/signal-block-pi-controller/",
          "related": [
            {
              "label": "Compare",
              "url": "https://lemonergy.com/learn/glossary/blocks/signal-block-compare/"
            },
            {
              "label": "Boolean latch",
              "url": "https://lemonergy.com/learn/glossary/blocks/signal-block-boolean-latch/"
            }
          ],
          "selected": null,
          "connections": []
        }
      }
    }
  },
  "incoming": [
    {
      "id": "edge:usesBlock/term:feedback-feedforward-control/block:pi-controller",
      "type": "usesBlock",
      "source": "term:feedback-feedforward-control",
      "target": "block:pi-controller",
      "properties": {
        "sourceFile": "studio-help-catalog.json",
        "scope": "Declared interface quantity or semantic operation; not a numerical validation claim"
      }
    }
  ],
  "outgoing": [],
  "neighbors": [
    {
      "id": "term:feedback-feedforward-control",
      "type": "Term",
      "label": "Feedback and feedforward control",
      "properties": {
        "id": "feedback-feedforward-control",
        "name": "Feedback and feedforward control",
        "aka": [
          "closed-loop control",
          "open-loop control",
          "feedback control",
          "feedforward control"
        ],
        "section": "topic-data",
        "definition": "Two ways of deciding a control input. Feedback measures the result and corrects an error after it appears; feedforward acts in advance on a known disturbance or setpoint, using a model. A battery cooling loop may feed forward the heat expected from the requested current and use feedback on cell temperature to trim the remaining error.",
        "related": [
          "pid-controller",
          "plant-model",
          "model-predictive-control",
          "thermal-management",
          "heat-generation"
        ],
        "url": "https://lemonergy.com/learn/glossary/feedback-feedforward-control/",
        "mentions": []
      }
    }
  ]
}
