Lemonergy · Studio block

Model predictive controller

Bounded linear, successive-linearisation landing or nonlinear shooting control with explicit solver status outputs.

Implementation ID
mpc
Reviewed
2026-10-30

Behavior

Bounded linear, successive-linearisation landing or nonlinear shooting control with explicit solver status outputs.

Interface

Select a terminal or signal to inspect its meaning. This is a conceptual interface, not simulation output.
Ports and observed outputs
NameDirectionUnitMeaning
x0input—Number; Scalar; real. Received from a connected producer.
r0input—Number; Scalar; real. Received from a connected producer.
u0output—Number; Scalar; real. Produced for connected consumers.
statusoutput—Number; Scalar; real. Produced for connected consumers.
iterationsoutput—Number; Scalar; real. Produced for connected consumers.
costoutput—Number; Scalar; real. Produced for connected consumers.
residualoutput—Number; Scalar; real. Produced for connected consumers.

Signal inputs

These directed signals carry information. Conserving terminals exchange the quantities of their physical domain.

Signal outputs

Outputs can supply compatible inputs. Connections and values are inspected in the model that owns them.

Current authoring interface
PinDirectionUnit or domainMeaning
x0input—Number; Scalar; real. Received from a connected producer.
r0input—Number; Scalar; real. Received from a connected producer.
u0output—Number; Scalar; real. Produced for connected consumers.
statusoutput—Number; Scalar; real. Produced for connected consumers.
iterationsoutput—Number; Scalar; real. Produced for connected consumers.
costoutput—Number; Scalar; real. Produced for connected consumers.
residualoutput—Number; Scalar; real. Produced for connected consumers.

Parameters

Defaults are initial model values. Select values for your own model and operating conditions.

Configuration fields
ParameterUnitDefaultMeaning and limits
Controller document
controller
{"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"]}Declared authoring field: Controller document.

Equations and rules

The behavior and configured interface above define this authoring component. This reference does not add numerical equations beyond its source contract.

Use in Studio

Use this authoring component

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.

Open Studio →

Use in a workflow

Connected concepts

Limits and interpretation

  • 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.

Implementation sources

This reference follows Lemonergy implementation sources. Scientific articles support the linked concepts separately.

Repository: battery-design · Revision: e248d21a9902225f1075624f23e7628b54cdb7cc

  • docs/glossary/studio-help-catalog.json

This implementation and its workflow uses (JSON) · Knowledge graph (JSON-LD)

Current authoring interface provenance

The interactive graphic is exported from the same Studio help descriptor. Source base: e248d21a9902225f1075624f23e7628b54cdb7cc. File content hashes in the public descriptor catalog identify the exact source snapshot. Existing numerical checks above retain their own verification scope.