{
  "node": {
    "id": "block:battery-cycle-program",
    "type": "Block",
    "label": "Battery cycle program",
    "properties": {
      "id": "battery-cycle-program",
      "name": "Battery cycle program",
      "kind": "studio",
      "summary": "Native rest/CC/CV phase sequencer with repeats, voltage interlocks and taper dwell. Commands use discharge-positive current.",
      "behavior": "Runs repeated rest, constant-current and constant-voltage phases. Phase duration, voltage conditions and taper dwell control advancement. A voltage interlock stops the program. Charging commands are negative.",
      "ports": [
        {
          "name": "voltage",
          "direction": "input",
          "unit": "V",
          "description": "Measured terminal voltage; scalar.",
          "shape": [],
          "elementType": "real",
          "quantity": "voltage"
        },
        {
          "name": "current",
          "direction": "input",
          "unit": "A",
          "description": "Measured signed current; scalar.",
          "shape": [],
          "elementType": "real",
          "quantity": "current"
        },
        {
          "name": "trigger",
          "direction": "input",
          "unit": "true / false",
          "description": "Start trigger; scalar.",
          "shape": [],
          "elementType": "bool",
          "quantity": "dimensionless"
        },
        {
          "name": "enable",
          "direction": "input",
          "unit": "true / false",
          "description": "Enable; scalar.",
          "shape": [],
          "elementType": "bool",
          "quantity": "dimensionless"
        },
        {
          "name": "request",
          "direction": "output",
          "unit": "A",
          "description": "Signed current request; scalar.",
          "shape": [],
          "elementType": "real",
          "quantity": "current"
        },
        {
          "name": "done",
          "direction": "output",
          "unit": "true / false",
          "description": "Program complete; scalar.",
          "shape": [],
          "elementType": "bool",
          "quantity": "dimensionless"
        },
        {
          "name": "phase",
          "direction": "output",
          "unit": "1",
          "description": "Zero-based active phase; scalar.",
          "shape": [],
          "elementType": "real",
          "quantity": "dimensionless"
        },
        {
          "name": "elapsed",
          "direction": "output",
          "unit": "s",
          "description": "Phase elapsed time (s); scalar.",
          "shape": [],
          "elementType": "real",
          "quantity": "dimensionless"
        },
        {
          "name": "cycles",
          "direction": "output",
          "unit": "1",
          "description": "Finished cycles; scalar.",
          "shape": [],
          "elementType": "real",
          "quantity": "dimensionless"
        },
        {
          "name": "fault",
          "direction": "output",
          "unit": "true / false",
          "description": "Voltage interlock fault; scalar.",
          "shape": [],
          "elementType": "bool",
          "quantity": "dimensionless"
        }
      ],
      "parameters": [
        {
          "key": "sampleTimeS",
          "label": "Sample interval (s)",
          "unit": "s",
          "default": 0.1,
          "description": "Positive sample interval. Initialization has zero elapsed time; subsequent accepted samples update memory."
        },
        {
          "key": "repeats",
          "label": "Cycle repetitions",
          "unit": "1",
          "default": 1,
          "description": "Cycle repetitions. This is an editable model input; the default belongs to the synthetic worked example."
        },
        {
          "key": "minimumV",
          "label": "Low-voltage interlock (V)",
          "unit": "V",
          "default": 2.5,
          "description": "Low-voltage interlock (V). This is an editable model input; the default belongs to the synthetic worked example."
        },
        {
          "key": "maximumV",
          "label": "High-voltage interlock (V)",
          "unit": "V",
          "default": 4.3,
          "description": "High-voltage interlock (V). This is an editable model input; the default belongs to the synthetic worked example."
        },
        {
          "key": "steps",
          "label": "Phases [mode, A, V, duration s, cutoff A, dwell s, gain]",
          "unit": "See field order",
          "default": [
            [
              0,
              0,
              0,
              1,
              0,
              0,
              0
            ],
            [
              1,
              1,
              3,
              2,
              0,
              0,
              0
            ],
            [
              0,
              0,
              0,
              1,
              0,
              0,
              0
            ]
          ],
          "description": "Each row: mode (0 rest, 1 CC, 2 CV), current (A), voltage (V), duration (s), cutoff magnitude (A), taper dwell (s), CV gain. Signed currents use discharge-positive convention."
        }
      ],
      "equations": [
        "mode 0 = rest; mode 1 = constant current; mode 2 = constant voltage",
        "phase row = [mode, current A, voltage V, duration s, cutoff A, dwell s, gain]"
      ],
      "example": {
        "title": "Battery cycle program worked example",
        "text": "Use the defaults below with Measured terminal voltage = 3.8 V, Measured signed current = 1 A, Start trigger = 1 true / false, Enable = 1 true / false. At 0 s, Signed current request is 0 A. Additional checks are listed below.",
        "url": "https://design.lemonergy.com/cosim.html?example=block-battery-cycle-program",
        "label": "Open Studio example",
        "checks": [
          {
            "port": "request",
            "atS": 0,
            "value": 0,
            "tolerance": 1e-08,
            "label": "Signed current request",
            "unit": "A"
          },
          {
            "port": "done",
            "atS": 0,
            "value": 0,
            "tolerance": 1e-08,
            "label": "Program complete",
            "unit": "true / false"
          },
          {
            "port": "phase",
            "atS": 0,
            "value": 0,
            "tolerance": 1e-08,
            "label": "Zero-based active phase",
            "unit": "1"
          },
          {
            "port": "cycles",
            "atS": 0,
            "value": 0,
            "tolerance": 1e-08,
            "label": "Finished cycles",
            "unit": "1"
          },
          {
            "port": "phase",
            "atS": 1,
            "value": 1,
            "tolerance": 0,
            "label": "Zero-based active phase",
            "unit": "1"
          },
          {
            "port": "done",
            "atS": 4,
            "value": 1,
            "tolerance": 0,
            "label": "Program complete",
            "unit": "true / false"
          }
        ],
        "inputs": [
          {
            "port": "voltage",
            "label": "Measured terminal voltage",
            "value": 3.8,
            "unit": "V"
          },
          {
            "port": "current",
            "label": "Measured signed current",
            "value": 1,
            "unit": "A"
          },
          {
            "port": "trigger",
            "label": "Start trigger",
            "value": 1,
            "unit": "true / false"
          },
          {
            "port": "enable",
            "label": "Enable",
            "value": 1,
            "unit": "true / false"
          }
        ]
      },
      "limits": [
        "The phase program is a signal controller; actuation and measured response come from the connected plant. Synthetic phase settings do not establish a test standard.",
        "The example verifies numerical behavior for synthetic parameters. Cell characterization and validation for an intended use are separate tasks."
      ],
      "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."
      },
      "references": [
        "inl-ev-tests"
      ],
      "evidence": [
        "docs/glossary/native-block-verification.json"
      ],
      "sourceRepository": "Lemonergy Studio public contract",
      "sourceRevision": "verification-2026-10-27",
      "caseIds": [
        "native-battery-cycle-program"
      ],
      "exampleTraces": [
        {
          "id": "battery-cycle-program",
          "url": "https://lemonergy.com/learn/glossary/api/traces/battery-cycle-program.json?v=0664c4d77f5d",
          "title": "Battery cycle program recorded example",
          "exampleId": "block-battery-cycle-program",
          "source": "Executed synthetic Lemonergy Studio example",
          "recordedOn": "2026-10-28",
          "points": 51,
          "channels": 6,
          "omittedChannels": 0,
          "interpolation": "step",
          "solver": {
            "method": "dormand-prince-45",
            "reason": "no-continuous-states"
          }
        }
      ],
      "type": "battery-cycle-program",
      "implementationId": "battery-cycle-program",
      "url": "https://lemonergy.com/learn/glossary/blocks/battery-cycle-program/",
      "documentationUrl": "https://lemonergy.com/learn/glossary/blocks/battery-cycle-program/",
      "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-battery-cycle-program"
        ]
      }
    }
  },
  "incoming": [
    {
      "id": "edge:usesBlock/native-battery-cycle-program/0",
      "type": "usesBlock",
      "source": "workflow:native-battery-cycle-program",
      "target": "block:battery-cycle-program",
      "properties": {
        "sourceFile": "wiki-blocks.json",
        "position": 0,
        "name": "Battery cycle program",
        "type": "battery-cycle-program",
        "role": "Runs repeated rest, constant-current and constant-voltage phases. Phase duration, voltage conditions and taper dwell control advancement. A voltage interlock stops the program. Charging commands are negative.",
        "settings": [
          "Use the parameter values in the block reference.",
          "Bundled example verified on the production release of 28 October 2026."
        ]
      }
    }
  ],
  "outgoing": [
    {
      "id": "edge:cites/block:battery-cycle-program/reference:inl-ev-tests",
      "type": "cites",
      "source": "block:battery-cycle-program",
      "target": "reference:inl-ev-tests",
      "properties": {
        "sourceFile": "block-library.json",
        "scope": "Scientific or mathematical background; implementation scope is stated by the block contract"
      }
    }
  ],
  "neighbors": [
    {
      "id": "workflow:native-battery-cycle-program",
      "type": "Workflow",
      "label": "Battery cycle program worked example",
      "properties": {
        "id": "native-battery-cycle-program",
        "title": "Battery cycle program worked example",
        "kind": "studio",
        "summary": "Native rest/CC/CV phase sequencer with repeats, voltage interlocks and taper dwell. Commands use discharge-positive current.",
        "steps": [
          "Review the block inputs, units and model limits.",
          "Open the Studio example and run its bundled model.",
          "Compare the output channels with the numerical checks; change one input and run again."
        ],
        "example": "Use the defaults below with Measured terminal voltage = 3.8 V, Measured signed current = 1 A, Start trigger = 1 true / false, Enable = 1 true / false. At 0 s, Signed current request is 0 A. Additional checks are listed below.",
        "observe": "Inspect the outputs and numerical checks on the block reference page.",
        "limits": "The phase program is a signal controller; actuation and measured response come from the connected plant. Synthetic phase settings do not establish a test standard. The example verifies numerical behavior for synthetic parameters. Cell characterization and validation for an intended use are separate tasks.",
        "url": "https://design.lemonergy.com/cosim.html?example=block-battery-cycle-program",
        "label": "Open Studio example",
        "evidence": [
          "docs/glossary/native-block-verification.json"
        ]
      }
    },
    {
      "id": "reference:inl-ev-tests",
      "type": "Reference",
      "label": "Battery Test Manual For Electric Vehicles, Revision 3",
      "properties": {
        "title": "Battery Test Manual For Electric Vehicles, Revision 3",
        "publisher": "Idaho National Laboratory",
        "url": "https://inldigitallibrary.inl.gov/sites/sti/sti/6492291.pdf",
        "type": "Test manual",
        "scope": "Performance characterization, pulse resistance/power, life testing and reference performance tests; historical 2015 edition.",
        "year": 2015,
        "authors": [
          "Jon P. Christopherson"
        ],
        "accessed": "2026-10-27"
      }
    }
  ]
}
