{
  "node": {
    "id": "block:regulated-charger",
    "type": "Block",
    "label": "Regulated CC/CV charger",
    "properties": {
      "id": "regulated-charger",
      "name": "Regulated CC/CV charger",
      "kind": "studio",
      "summary": "Original sampled CC/CV controller coupled to an ideal electrical converter.",
      "behavior": "A trigger rising edge starts or rearms charging. The controller can enter precharge, constant current, constant voltage, completion, inhibition, or lead-acid float. Completion requires current below the cutoff while at the voltage ceiling for the cutoff dwell. A held trigger does not restart a completed charge.",
      "ports": [
        {
          "name": "p",
          "direction": "conserving",
          "unit": "V, A",
          "description": "Electrical terminal: potential and charge-conserving current."
        },
        {
          "name": "n",
          "direction": "conserving",
          "unit": "V, A",
          "description": "Electrical terminal: potential and charge-conserving current."
        },
        {
          "name": "trigger",
          "direction": "input",
          "unit": "dimensionless",
          "description": "Typed signal input; its quantity must match the connected output."
        },
        {
          "name": "enable",
          "direction": "input",
          "unit": "dimensionless",
          "description": "Typed signal input; its quantity must match the connected output."
        },
        {
          "name": "currentLimit",
          "direction": "input",
          "unit": "A",
          "description": "Typed signal input; its quantity must match the connected output."
        },
        {
          "name": "powerLimit",
          "direction": "input",
          "unit": "W",
          "description": "Typed signal input; its quantity must match the connected output."
        },
        {
          "name": "bmsPermit",
          "direction": "input",
          "unit": "dimensionless",
          "description": "Typed signal input; its quantity must match the connected output."
        },
        {
          "name": "temperature",
          "direction": "input",
          "unit": "K",
          "description": "Typed signal input; its quantity must match the connected output."
        },
        {
          "name": "price",
          "direction": "input",
          "unit": "currency/kWh",
          "description": "Typed signal input; its quantity must match the connected output."
        },
        {
          "name": "soc",
          "direction": "input",
          "unit": "fraction",
          "description": "Typed signal input; its quantity must match the connected output."
        },
        {
          "name": "connected",
          "direction": "input",
          "unit": "dimensionless",
          "description": "Typed signal input; its quantity must match the connected output."
        },
        {
          "name": "state",
          "direction": "output",
          "unit": "code",
          "description": "Observed result from the solved component or sampled controller."
        },
        {
          "name": "reason",
          "direction": "output",
          "unit": "code",
          "description": "Observed result from the solved component or sampled controller."
        },
        {
          "name": "complete",
          "direction": "output",
          "unit": "0 or 1",
          "description": "Observed result from the solved component or sampled controller."
        },
        {
          "name": "chargeCurrent",
          "direction": "output",
          "unit": "A",
          "description": "Observed result from the solved component or sampled controller."
        },
        {
          "name": "gridPower",
          "direction": "output",
          "unit": "W",
          "description": "Observed result from the solved component or sampled controller."
        },
        {
          "name": "loss",
          "direction": "output",
          "unit": "W",
          "description": "Observed result from the solved component or sampled controller."
        },
        {
          "name": "voltage",
          "direction": "output",
          "unit": "V",
          "description": "Observed result from the solved component or sampled controller."
        },
        {
          "name": "current",
          "direction": "output",
          "unit": "A",
          "description": "Observed result from the solved component or sampled controller."
        },
        {
          "name": "power",
          "direction": "output",
          "unit": "W",
          "description": "Observed result from the solved component or sampled controller."
        }
      ],
      "parameters": [
        {
          "key": "sampleTimeS",
          "label": "Sample Time S",
          "unit": "s",
          "default": 1,
          "min": 0.001,
          "max": 3600,
          "description": "Configured model parameter; the default is an initial editor value, not an operating recommendation."
        },
        {
          "key": "currentA",
          "label": "Current A",
          "unit": "A",
          "default": 32,
          "min": 0.001,
          "max": 1000000,
          "description": "Configured model parameter; the default is an initial editor value, not an operating recommendation."
        },
        {
          "key": "voltageV",
          "label": "Voltage V",
          "unit": "V",
          "default": 420,
          "min": 0.01,
          "max": 1000000,
          "description": "Configured model parameter; the default is an initial editor value, not an operating recommendation."
        },
        {
          "key": "cutoffCurrentA",
          "label": "Cutoff Current A",
          "unit": "A",
          "default": 2,
          "min": 0,
          "max": 1000000,
          "description": "Configured model parameter; the default is an initial editor value, not an operating recommendation."
        },
        {
          "key": "cutoffHoldS",
          "label": "Cutoff Hold S",
          "unit": "s",
          "default": 30,
          "min": 0,
          "max": 86400,
          "description": "Configured model parameter; the default is an initial editor value, not an operating recommendation."
        },
        {
          "key": "prechargeVoltageV",
          "label": "Precharge Voltage V",
          "unit": "V",
          "default": 300,
          "min": 0,
          "max": 1000000,
          "description": "Configured model parameter; the default is an initial editor value, not an operating recommendation."
        },
        {
          "key": "prechargeCurrentA",
          "label": "Precharge Current A",
          "unit": "A",
          "default": 3,
          "min": 0.001,
          "max": 1000000,
          "description": "Configured model parameter; the default is an initial editor value, not an operating recommendation."
        },
        {
          "key": "minimumVoltageV",
          "label": "Minimum Voltage V",
          "unit": "V",
          "default": 250,
          "min": 0,
          "max": 1000000,
          "description": "Configured model parameter; the default is an initial editor value, not an operating recommendation."
        },
        {
          "key": "floatVoltageV",
          "label": "Float Voltage V",
          "unit": "V",
          "default": 405,
          "min": 0.01,
          "max": 1000000,
          "description": "Configured model parameter; the default is an initial editor value, not an operating recommendation."
        },
        {
          "key": "efficiency",
          "label": "Efficiency",
          "unit": "fraction",
          "default": 0.95,
          "min": 0.01,
          "max": 1,
          "description": "Configured model parameter; the default is an initial editor value, not an operating recommendation."
        },
        {
          "key": "chemistry",
          "label": "Chemistry",
          "unit": "0 Li-ion, 1 lead-acid",
          "default": 0,
          "min": 0,
          "max": 1,
          "description": "Configured model parameter; the default is an initial editor value, not an operating recommendation."
        },
        {
          "key": "minTemperatureK",
          "label": "Min Temperature K",
          "unit": "K",
          "default": 273.15,
          "min": 1,
          "max": 1000,
          "description": "Configured model parameter; the default is an initial editor value, not an operating recommendation."
        },
        {
          "key": "maxTemperatureK",
          "label": "Max Temperature K",
          "unit": "K",
          "default": 318.15,
          "min": 1,
          "max": 1000,
          "description": "Configured model parameter; the default is an initial editor value, not an operating recommendation."
        },
        {
          "key": "capacityAh",
          "label": "Capacity Ah",
          "unit": "Ah for SOC barrier",
          "default": 100,
          "min": 1e-06,
          "max": 1000000000,
          "description": "Configured model parameter; the default is an initial editor value, not an operating recommendation."
        },
        {
          "key": "boundaryTimeS",
          "label": "Boundary Time S",
          "unit": "s for SOC boundary barrier",
          "default": 1,
          "min": 0.001,
          "max": 3600,
          "description": "Configured model parameter; the default is an initial editor value, not an operating recommendation."
        }
      ],
      "equations": [
        "P_grid = P_delivered / eta",
        "P_loss = P_grid - P_delivered",
        "I_SOC_cap = max(0, 1 - SOC) * 3600 * Q_Ah / boundaryTimeS"
      ],
      "example": {
        "title": "Build CC–CV charging",
        "text": "An illustrative 100 Ah battery with a 420 V ceiling can use a 32 A cap. At the ceiling, current falls as OCV rises.",
        "url": "https://design.lemonergy.com/cosim.html?example=charging-home",
        "label": "Open the Studio example"
      },
      "limits": [
        "The battery uses linear OCV and fixed resistance. It does not automatically add aging, thermal dynamics or balancing.",
        "Internal model SOC is not an estimate of an unknown physical battery. OCV is linear and resistance fixed.",
        "A loss signal is not a predicted temperature. This network takes external temperature.",
        "This is deterministic policy comparison, not a forecast or economic optimum.",
        "Downstream unused capacity is not silently redistributed.",
        "All battery and converter limits still apply. A schedule is not an electrochemical law.",
        "These effective parameters are not a recipe. Lithium-ion does not use indefinite trickle or lead-acid float."
      ],
      "evidence": [
        "js/charging-control.js",
        "js/charging-scenarios.js",
        "docs/CHARGING_BLOCKS_SPEC.md",
        "js/physical-network.js",
        "rust-core/src/charging_control.rs"
      ],
      "caseIds": [
        "cccv",
        "ocv-charge-balance",
        "loss-accounting",
        "home-schedule",
        "depot-allocation",
        "opportunity-window",
        "low-current-maintenance"
      ],
      "type": "regulated-charger",
      "implementationId": "regulated-charger",
      "url": "https://lemonergy.com/learn/glossary/blocks/regulated-charger/",
      "documentationUrl": "https://lemonergy.com/learn/glossary/blocks/regulated-charger/",
      "sourceFile": "block-library.json",
      "sourceRepository": "battery-design",
      "sourceRevision": "ef9802329b75bc15bb96885f8ed5d49425106696",
      "reviewed": "2026-10-27"
    }
  },
  "incoming": [
    {
      "id": "edge:usesBlock/cccv/1",
      "type": "usesBlock",
      "source": "workflow:cccv",
      "target": "block:regulated-charger",
      "properties": {
        "sourceFile": "wiki-blocks.json",
        "position": 1,
        "name": "Regulated CC/CV charger",
        "type": "regulated-charger",
        "role": "Regulates current and voltage",
        "settings": [
          "currentA",
          "voltageV",
          "cutoffCurrentA / cutoffHoldS",
          "Electrical ports p and n"
        ]
      }
    },
    {
      "id": "edge:usesBlock/depot-allocation/2",
      "type": "usesBlock",
      "source": "workflow:depot-allocation",
      "target": "block:regulated-charger",
      "properties": {
        "sourceFile": "wiki-blocks.json",
        "position": 2,
        "name": "Regulated CC/CV charger",
        "type": "regulated-charger",
        "role": "Regulates current and voltage",
        "settings": [
          "currentA",
          "voltageV",
          "cutoffCurrentA / cutoffHoldS",
          "Electrical ports p and n"
        ]
      }
    },
    {
      "id": "edge:usesBlock/home-schedule/2",
      "type": "usesBlock",
      "source": "workflow:home-schedule",
      "target": "block:regulated-charger",
      "properties": {
        "sourceFile": "wiki-blocks.json",
        "position": 2,
        "name": "Regulated CC/CV charger",
        "type": "regulated-charger",
        "role": "Regulates current and voltage",
        "settings": [
          "currentA",
          "voltageV",
          "cutoffCurrentA / cutoffHoldS",
          "Electrical ports p and n"
        ]
      }
    },
    {
      "id": "edge:usesBlock/loss-accounting/0",
      "type": "usesBlock",
      "source": "workflow:loss-accounting",
      "target": "block:regulated-charger",
      "properties": {
        "sourceFile": "wiki-blocks.json",
        "position": 0,
        "name": "Regulated CC/CV charger",
        "type": "regulated-charger",
        "role": "Regulates current and voltage",
        "settings": [
          "currentA",
          "voltageV",
          "cutoffCurrentA / cutoffHoldS",
          "Electrical ports p and n"
        ]
      }
    },
    {
      "id": "edge:usesBlock/low-current-maintenance/0",
      "type": "usesBlock",
      "source": "workflow:low-current-maintenance",
      "target": "block:regulated-charger",
      "properties": {
        "sourceFile": "wiki-blocks.json",
        "position": 0,
        "name": "Regulated CC/CV charger",
        "type": "regulated-charger",
        "role": "Regulates current and voltage",
        "settings": [
          "currentA",
          "voltageV",
          "cutoffCurrentA / cutoffHoldS",
          "Electrical ports p and n"
        ]
      }
    },
    {
      "id": "edge:usesBlock/ocv-charge-balance/1",
      "type": "usesBlock",
      "source": "workflow:ocv-charge-balance",
      "target": "block:regulated-charger",
      "properties": {
        "sourceFile": "wiki-blocks.json",
        "position": 1,
        "name": "Regulated CC/CV charger",
        "type": "regulated-charger",
        "role": "Regulates current and voltage",
        "settings": [
          "currentA",
          "voltageV",
          "cutoffCurrentA / cutoffHoldS",
          "Electrical ports p and n"
        ]
      }
    },
    {
      "id": "edge:usesBlock/opportunity-window/2",
      "type": "usesBlock",
      "source": "workflow:opportunity-window",
      "target": "block:regulated-charger",
      "properties": {
        "sourceFile": "wiki-blocks.json",
        "position": 2,
        "name": "Regulated CC/CV charger",
        "type": "regulated-charger",
        "role": "Regulates current and voltage",
        "settings": [
          "currentA",
          "voltageV",
          "cutoffCurrentA / cutoffHoldS",
          "Electrical ports p and n"
        ]
      }
    }
  ],
  "neighbors": [
    {
      "id": "workflow:cccv",
      "type": "Workflow",
      "label": "Build CC–CV charging",
      "properties": {
        "id": "cccv",
        "title": "Build CC–CV charging",
        "kind": "studio",
        "summary": "Native current and voltage regulation act against an explicit battery.",
        "steps": [
          "Open home charging and inspect settings.",
          "Choose immediate charging; inspect mode and completion."
        ],
        "example": "An illustrative 100 Ah battery with a 420 V ceiling can use a 32 A cap. At the ceiling, current falls as OCV rises.",
        "observe": "Completion needs current below cutoff at the CV ceiling for the configured dwell. Site-limited low current is different.",
        "limits": "The battery uses linear OCV and fixed resistance. It does not automatically add aging, thermal dynamics or balancing.",
        "url": "https://design.lemonergy.com/cosim.html?example=charging-home",
        "label": "Open the Studio example",
        "evidence": [
          "js/charging-control.js",
          "js/charging-scenarios.js",
          "docs/CHARGING_BLOCKS_SPEC.md"
        ]
      }
    },
    {
      "id": "workflow:depot-allocation",
      "type": "Workflow",
      "label": "Share a site supply",
      "properties": {
        "id": "depot-allocation",
        "title": "Share a site supply",
        "kind": "studio",
        "summary": "Multiple branches share one power cap.",
        "steps": [
          "Compare proportional and input-priority allocation.",
          "Lower the cap at fixed departure times."
        ],
        "example": "Three vehicles requesting 11 kW each under a 22 kW cap initially receive 7.33 kW each with proportional allocation.",
        "observe": "The site cap can hold while a vehicle misses its target.",
        "limits": "Downstream unused capacity is not silently redistributed.",
        "url": "https://design.lemonergy.com/cosim.html?example=charging-depot",
        "label": "Open the Studio example",
        "evidence": [
          "js/charging-control.js",
          "js/charging-scenarios.js",
          "docs/CHARGING_BLOCKS_SPEC.md"
        ]
      }
    },
    {
      "id": "workflow:home-schedule",
      "type": "Workflow",
      "label": "Compare charging policies",
      "properties": {
        "id": "home-schedule",
        "title": "Compare charging policies",
        "kind": "studio",
        "summary": "Compare authored schedules on the same hardware.",
        "steps": [
          "Set connection, tariff, window and target.",
          "Compare policies on this network."
        ],
        "example": "Connect a vehicle for eight hours with a cheaper window from hour 1 to hour 7.",
        "observe": "Compare cost, peak power and departure shortfall.",
        "limits": "This is deterministic policy comparison, not a forecast or economic optimum.",
        "url": "https://design.lemonergy.com/cosim.html?example=charging-home",
        "label": "Open the Studio example",
        "evidence": [
          "js/charging-control.js",
          "js/charging-scenarios.js",
          "docs/CHARGING_BLOCKS_SPEC.md"
        ]
      }
    },
    {
      "id": "workflow:loss-accounting",
      "type": "Workflow",
      "label": "Compare grid and battery energy",
      "properties": {
        "id": "loss-accounting",
        "title": "Compare grid and battery energy",
        "kind": "studio",
        "summary": "Separate energy and loss signals make efficiency visible.",
        "steps": [
          "Keep battery settings fixed.",
          "Change converter efficiency."
        ],
        "example": "7 kW battery-side power at 95% efficiency requires about 7.37 kW grid power and produces about 0.37 kW converter loss.",
        "observe": "Battery I²R loss differs from converter loss.",
        "limits": "A loss signal is not a predicted temperature. This network takes external temperature.",
        "url": "https://design.lemonergy.com/cosim.html?example=charging-home",
        "label": "Open the Studio example",
        "evidence": [
          "js/charging-control.js",
          "js/charging-scenarios.js",
          "docs/CHARGING_BLOCKS_SPEC.md"
        ]
      }
    },
    {
      "id": "workflow:low-current-maintenance",
      "type": "Workflow",
      "label": "Separate low current from float",
      "properties": {
        "id": "low-current-maintenance",
        "title": "Separate low current from float",
        "kind": "studio",
        "summary": "Bounded lithium charging and lead-acid maintenance are distinct.",
        "steps": [
          "Inspect the explicit chemistry setting.",
          "Observe CV taper followed by lower float voltage."
        ],
        "example": "The authored lead-acid example uses 14.4 V charging and 13.6 V float ceilings to expose different states.",
        "observe": "Precharge, completion and maintenance are different.",
        "limits": "These effective parameters are not a recipe. Lithium-ion does not use indefinite trickle or lead-acid float.",
        "url": "https://design.lemonergy.com/cosim.html?example=charging-maintenance",
        "label": "Open the Studio example",
        "evidence": [
          "js/charging-control.js",
          "js/charging-scenarios.js",
          "docs/CHARGING_BLOCKS_SPEC.md"
        ]
      }
    },
    {
      "id": "workflow:ocv-charge-balance",
      "type": "Workflow",
      "label": "Connect SOC and voltage",
      "properties": {
        "id": "ocv-charge-balance",
        "title": "Connect SOC and voltage",
        "kind": "studio",
        "summary": "The battery integrates charge and combines OCV with resistance.",
        "steps": [
          "Inspect capacity, initial SOC and OCV endpoints.",
          "Compare OCV with terminal voltage."
        ],
        "example": "OCV endpoints of 300 and 420 V give 360 V at 50% SOC. Charging at 10 A through 0.08 Ω adds 0.8 V.",
        "observe": "At unity coulombic efficiency, 10 A for 1 h adds ten percentage points to 100 Ah.",
        "limits": "Internal model SOC is not an estimate of an unknown physical battery. OCV is linear and resistance fixed.",
        "url": "https://design.lemonergy.com/cosim.html?example=charging-home",
        "label": "Open the Studio example",
        "evidence": [
          "js/charging-control.js",
          "js/charging-scenarios.js",
          "docs/CHARGING_BLOCKS_SPEC.md"
        ]
      }
    },
    {
      "id": "workflow:opportunity-window",
      "type": "Workflow",
      "label": "Charge during available stops",
      "properties": {
        "id": "opportunity-window",
        "title": "Charge during available stops",
        "kind": "studio",
        "summary": "Availability is an independent signal.",
        "steps": [
          "Inspect availability and preferred windows.",
          "Shorten a stop."
        ],
        "example": "A 15-minute stop at a 100 kW grid cap has a 25 kWh upper grid-energy bound before losses and battery limits.",
        "observe": "More power cannot recover disconnected time.",
        "limits": "All battery and converter limits still apply. A schedule is not an electrochemical law.",
        "url": "https://design.lemonergy.com/cosim.html?example=charging-opportunity",
        "label": "Open the Studio example",
        "evidence": [
          "js/charging-control.js",
          "js/charging-scenarios.js",
          "docs/CHARGING_BLOCKS_SPEC.md"
        ]
      }
    }
  ]
}
