{
  "node": {
    "id": "block:mpc",
    "type": "Block",
    "label": "Model predictive controller",
    "properties": {
      "id": "mpc",
      "kind": "studio",
      "name": "Model predictive controller",
      "summary": "Bounded linear, successive-linearisation landing or nonlinear shooting control with explicit solver status outputs.",
      "behavior": "Bounded linear, successive-linearisation landing or nonlinear shooting control with explicit solver status outputs.",
      "documentationSlug": "signal-block-mpc",
      "referenceOnly": true,
      "ports": [
        {
          "name": "x0",
          "direction": "input",
          "unit": "—",
          "description": "Number; Scalar; real. Received from a connected producer."
        },
        {
          "name": "r0",
          "direction": "input",
          "unit": "—",
          "description": "Number; Scalar; real. Received from a connected producer."
        },
        {
          "name": "u0",
          "direction": "output",
          "unit": "—",
          "description": "Number; Scalar; real. Produced for connected consumers."
        },
        {
          "name": "status",
          "direction": "output",
          "unit": "—",
          "description": "Number; Scalar; real. Produced for connected consumers."
        },
        {
          "name": "iterations",
          "direction": "output",
          "unit": "—",
          "description": "Number; Scalar; real. Produced for connected consumers."
        },
        {
          "name": "cost",
          "direction": "output",
          "unit": "—",
          "description": "Number; Scalar; real. Produced for connected consumers."
        },
        {
          "name": "residual",
          "direction": "output",
          "unit": "—",
          "description": "Number; Scalar; real. Produced for connected consumers."
        }
      ],
      "parameters": [
        {
          "key": "controller",
          "label": "Controller document",
          "unit": "",
          "default": "{\"model\":\"linear\",\"sampleTimeS\":0.02,\"nx\":1,\"nu\":1,\"ny\":1,\"Np\":10,\"Nc\":3,\"A\":[1],\"B\":[0.02],\"C\":[1],\"Q\":[1],\"R\":[0.01],\"S\":[0.1],\"umin\":[-10],\"umax\":[10],\"dumin\":[-2],\"dumax\":[2],\"ymin\":[-1e+30],\"ymax\":[1e+30],\"rho\":10,\"iterationCap\":400,\"tolerance\":0.000001,\"warmStart\":true,\"initialU\":[0],\"adaptations\":[],\"stateQuantities\":[\"dimensionless\"],\"outputQuantities\":[\"dimensionless\"],\"controlQuantities\":[\"dimensionless\"]}",
          "description": "Declared authoring field: Controller document."
        }
      ],
      "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": "mpc",
      "implementationId": "mpc",
      "url": "https://lemonergy.com/learn/glossary/blocks/signal-block-mpc/",
      "documentationUrl": "https://lemonergy.com/learn/glossary/blocks/signal-block-mpc/",
      "sourceFile": "studio-help-catalog.json",
      "studioHelp": {
        "type": "mpc",
        "namespace": "signal",
        "slug": "signal-block-mpc",
        "canonicalSlug": "signal-block-mpc",
        "existing": false,
        "dynamic": false,
        "scene": {
          "title": "Model predictive controller",
          "label": "Model predictive controller",
          "summary": "Bounded linear, successive-linearisation landing or nonlinear shooting control with explicit solver status outputs.",
          "details": [
            "Block type: mpc.",
            "2 declared inputs and 5 declared outputs in this model.",
            "Arrows show the direction of signal data. They are not conserving electrical, thermal or mechanical connections."
          ],
          "operation": {
            "kind": "control",
            "symbol": "predict → constrain → act",
            "label": "Predictive control",
            "caption": "Bounded linear, successive-linearisation landing or nonlinear shooting control with explicit solver status outputs."
          },
          "inputs": [
            {
              "id": "x0",
              "quantity": "dimensionless",
              "label": "x0",
              "unit": "—",
              "unitDeclared": true,
              "fields": [],
              "quantityLabel": "Number",
              "shapeLabel": "Scalar",
              "elementLabel": "real"
            },
            {
              "id": "r0",
              "quantity": "dimensionless",
              "label": "r0",
              "unit": "—",
              "unitDeclared": true,
              "fields": [],
              "quantityLabel": "Number",
              "shapeLabel": "Scalar",
              "elementLabel": "real"
            }
          ],
          "outputs": [
            {
              "id": "u0",
              "quantity": "dimensionless",
              "label": "u0",
              "unit": "—",
              "unitDeclared": true,
              "fields": [],
              "quantityLabel": "Number",
              "shapeLabel": "Scalar",
              "elementLabel": "real"
            },
            {
              "id": "status",
              "quantity": "dimensionless",
              "label": "status",
              "unit": "—",
              "unitDeclared": true,
              "fields": [],
              "quantityLabel": "Number",
              "shapeLabel": "Scalar",
              "elementLabel": "real"
            },
            {
              "id": "iterations",
              "quantity": "dimensionless",
              "label": "iterations",
              "unit": "—",
              "unitDeclared": true,
              "fields": [],
              "quantityLabel": "Number",
              "shapeLabel": "Scalar",
              "elementLabel": "real"
            },
            {
              "id": "cost",
              "quantity": "dimensionless",
              "label": "cost",
              "unit": "—",
              "unitDeclared": true,
              "fields": [],
              "quantityLabel": "Number",
              "shapeLabel": "Scalar",
              "elementLabel": "real"
            },
            {
              "id": "residual",
              "quantity": "dimensionless",
              "label": "residual",
              "unit": "—",
              "unitDeclared": true,
              "fields": [],
              "quantityLabel": "Number",
              "shapeLabel": "Scalar",
              "elementLabel": "real"
            }
          ],
          "parameters": [
            {
              "id": "controller",
              "label": "Controller document",
              "unit": "",
              "value": "{\"model\":\"linear\",\"sampleTimeS\":0.02,\"nx\":1,\"nu\":1,\"ny\":1,\"Np\":10,\"Nc\":3,\"A\":[1],\"B\":[0.02],\"C\":[1],\"Q\":[1],\"R\":[0.01],\"S\":[0.1],\"umin\":[-10],\"umax\":[10],\"dumin\":[-2],\"dumax\":[2],\"ymin\":[-1e+30],\"ymax\":[1e+30],\"rho\":10,\"iterationCap\":400,\"tolerance\":0.000001,\"warmStart\":true,\"initialU\":[0],\"adaptations\":[],\"stateQuantities\":[\"dimensionless\"],\"outputQuantities\":[\"dimensionless\"],\"controlQuantities\":[\"dimensionless\"]}"
            }
          ],
          "url": "https://lemonergy.com/learn/glossary/blocks/signal-block-mpc/",
          "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/"
            },
            {
              "label": "Pi controller",
              "url": "https://lemonergy.com/learn/glossary/blocks/signal-block-pi-controller/"
            }
          ],
          "selected": null,
          "connections": []
        }
      }
    }
  },
  "incoming": [
    {
      "id": "edge:usesBlock/term:feedback-feedforward-control/block:mpc",
      "type": "usesBlock",
      "source": "term:feedback-feedforward-control",
      "target": "block:mpc",
      "properties": {
        "sourceFile": "studio-help-catalog.json",
        "scope": "Declared interface quantity or semantic operation; not a numerical validation claim"
      }
    },
    {
      "id": "edge:usesBlock/term:model-predictive-control/block:mpc",
      "type": "usesBlock",
      "source": "term:model-predictive-control",
      "target": "block:mpc",
      "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": []
      }
    },
    {
      "id": "term:model-predictive-control",
      "type": "Term",
      "label": "Model predictive control",
      "properties": {
        "id": "model-predictive-control",
        "name": "Model predictive control",
        "abbr": "MPC",
        "section": "topic-data",
        "definition": "Control that uses a model to predict the system’s behaviour over a short horizon, chooses the input sequence that best meets a goal within constraints, applies the first step and repeats. In batteries it suits fast charging — the most current possible without breaching voltage or temperature limits or risking lithium plating — at a higher computing cost than PID.",
        "related": [
          "plant-model",
          "pid-controller",
          "fast-charging",
          "lithium-plating",
          "thermal-management",
          "equivalent-circuit-model"
        ],
        "url": "https://lemonergy.com/learn/glossary/model-predictive-control/",
        "mentions": []
      }
    }
  ]
}
