{
  "node": {
    "id": "block:native-discrete-integrator",
    "type": "Block",
    "label": "Discrete integrator",
    "properties": {
      "id": "native-discrete-integrator",
      "name": "Discrete integrator",
      "kind": "studio",
      "summary": "Accumulates a signal over elapsed sample intervals with optional output bounds.",
      "behavior": "x[k] = clamp(x[k−1] + gain × elapsed_time × u[k], lower, upper). The worked example connects this operation to signals in Lemonergy Studio.",
      "ports": [
        {
          "name": "in0",
          "direction": "input",
          "unit": "1",
          "description": "Value; real scalar.",
          "shape": [],
          "elementType": "real"
        },
        {
          "name": "out0",
          "direction": "output",
          "unit": "1",
          "description": "Integral; real scalar.",
          "shape": [],
          "elementType": "real"
        }
      ],
      "parameters": [
        {
          "key": "sampleTimeS",
          "label": "Sample period",
          "unit": "s",
          "default": 0.1,
          "description": "Exact sample grid period. Elapsed-time integration begins after initialization.",
          "min": 1e-06
        },
        {
          "key": "params[0]",
          "label": "Gain",
          "unit": "1",
          "default": 1,
          "description": "Configured finite numerical parameter."
        },
        {
          "key": "params[1]",
          "label": "Lower limit",
          "unit": "1",
          "default": -1000000000,
          "description": "Configured finite numerical parameter."
        },
        {
          "key": "params[2]",
          "label": "Upper limit",
          "unit": "1",
          "default": 1000000000,
          "description": "Configured finite numerical parameter."
        },
        {
          "key": "tables[0]",
          "label": "Initial values",
          "unit": "1",
          "default": [
            0
          ],
          "description": "Configured coefficients or initial values in column-major order."
        }
      ],
      "equations": [
        "x[k] = clamp(x[k−1] + gain × elapsed_time × u[k], lower, upper)"
      ],
      "example": {
        "title": "Discrete integrator — worked example",
        "text": "Value = 2. Integral at 1 s = 2.",
        "url": "https://design.lemonergy.com/cosim.html?example=block-native-discrete-integrator",
        "label": "Open Studio example",
        "inputs": [
          {
            "port": "in0",
            "label": "Value",
            "value": 2,
            "unit": "1"
          }
        ],
        "checks": [
          {
            "port": "out0",
            "label": "Integral",
            "atS": 1,
            "value": 2,
            "unit": "1",
            "tolerance": 1e-08
          }
        ]
      },
      "limits": [
        "Elapsed-time rectangular integration with configured gain, initial value and bounds; zero elapsed duration at initialization.",
        "Shapes and element types are explicit. Values must be finite; automatic reshaping and unit conversion are not performed."
      ],
      "references": [
        "astrom-murray-feedback"
      ],
      "caseIds": [
        "native-native-discrete-integrator"
      ],
      "availability": {
        "status": "released",
        "label": "Available in Lemonergy Studio",
        "detail": "The bundled example is available in the production release verified on 28 October 2026. The parameters and examples here are synthetic teaching fixtures, not a characterized cell or a validated operating limit."
      },
      "evidence": [
        "docs/glossary/native-block-verification.json"
      ],
      "sourceRepository": "Lemonergy Studio public contract",
      "sourceRevision": "verification-2026-10-27",
      "exampleTraces": [
        {
          "id": "native-discrete-integrator",
          "url": "https://lemonergy.com/learn/glossary/api/traces/native-discrete-integrator.json?v=c376b401e894",
          "title": "Discrete integrator recorded example",
          "exampleId": "block-native-discrete-integrator",
          "source": "Executed synthetic Lemonergy Studio example",
          "recordedOn": "2026-10-28",
          "points": 11,
          "channels": 1,
          "omittedChannels": 0,
          "interpolation": "step",
          "solver": {
            "method": "dormand-prince-45",
            "reason": "no-continuous-states"
          }
        }
      ],
      "type": "native-discrete-integrator",
      "implementationId": "native-discrete-integrator",
      "url": "https://lemonergy.com/learn/glossary/blocks/native-discrete-integrator/",
      "documentationUrl": "https://lemonergy.com/learn/glossary/blocks/native-discrete-integrator/",
      "sourceFile": "block-library.json",
      "reviewed": "2026-10-27",
      "releaseEvidence": {
        "environment": "production",
        "status": "verified",
        "revision": "e76cadfc203e15eb41f3478d8b1044a5b851953d",
        "verifiedOn": "2026-10-28",
        "exampleUrls": [
          "https://design.lemonergy.com/cosim.html?example=block-native-discrete-integrator"
        ]
      }
    }
  },
  "incoming": [
    {
      "id": "edge:usesBlock/native-native-discrete-integrator/0",
      "type": "usesBlock",
      "source": "workflow:native-native-discrete-integrator",
      "target": "block:native-discrete-integrator",
      "properties": {
        "sourceFile": "wiki-blocks.json",
        "position": 0,
        "name": "Discrete integrator",
        "type": "native-discrete-integrator",
        "role": "x[k] = clamp(x[k−1] + gain × elapsed_time × u[k], lower, upper). The worked example connects this operation to signals in Lemonergy Studio.",
        "settings": [
          "Use the block reference for settings and connections.",
          "Bundled example verified on the production release of 28 October 2026."
        ]
      }
    }
  ],
  "outgoing": [
    {
      "id": "edge:cites/block:native-discrete-integrator/reference:astrom-murray-feedback",
      "type": "cites",
      "source": "block:native-discrete-integrator",
      "target": "reference:astrom-murray-feedback",
      "properties": {
        "sourceFile": "block-library.json",
        "scope": "Scientific or mathematical background; implementation scope is stated by the block contract"
      }
    }
  ],
  "neighbors": [
    {
      "id": "workflow:native-native-discrete-integrator",
      "type": "Workflow",
      "label": "Discrete integrator — worked example",
      "properties": {
        "id": "native-native-discrete-integrator",
        "title": "Discrete integrator — worked example",
        "kind": "studio",
        "summary": "Accumulates a signal over elapsed sample intervals with optional output bounds.",
        "steps": [
          "Review the interface, units and model limits.",
          "Open the Studio example and run its bundled model.",
          "Compare outputs with the numerical checks; change one input and run again."
        ],
        "example": "Value = 2. Integral at 1 s = 2.",
        "observe": "Inspect the output channels and checks on the block reference page.",
        "limits": "Elapsed-time rectangular integration with configured gain, initial value and bounds; zero elapsed duration at initialization. Shapes and element types are explicit. Values must be finite; automatic reshaping and unit conversion are not performed.",
        "url": "https://design.lemonergy.com/cosim.html?example=block-native-discrete-integrator",
        "label": "Open Studio example",
        "evidence": [
          "docs/glossary/native-block-verification.json"
        ]
      }
    },
    {
      "id": "reference:astrom-murray-feedback",
      "type": "Reference",
      "label": "Feedback Systems: An Introduction for Scientists and Engineers, second edition",
      "properties": {
        "title": "Feedback Systems: An Introduction for Scientists and Engineers, second edition",
        "publisher": "Princeton University Press; author-maintained FBSwiki",
        "url": "https://fbswiki.org/wiki/index.php/Feedback_Systems%3A_An_Introduction_for_Scientists_and_Engineers",
        "type": "Textbook",
        "scope": "State-space modeling, feedback and PID control. These mathematical foundations do not establish a particular software implementation.",
        "year": 2021,
        "authors": [
          "Karl J. Åström",
          "Richard M. Murray"
        ],
        "accessed": "2026-10-27"
      }
    }
  ]
}
