CATL Electrode Manufacturing AI · LG Energy Solution Coating AI · Manz AG Coating Line AI · KLA SURFmonitor AI · Cognex Electrode Vision AI · IEC 62619:2022 · UL 9540A · electrode coating thickness AI · active material NIR AI · calendering density AI · slitting edge defect AI

Prompt injection in Li-ion battery gigafactory electrode coating AI

The electrode coating process — the deposition of a slurry of active material (graphite for anodes, NMC, LFP, or NCA for cathodes), conductive carbon black, and polymer binder (PVDF, CMC-SBR) dissolved in NMP (N-methyl pyrrolidone) or water onto a metallic current collector foil (copper for anodes, aluminium for cathodes) by a precision slot-die coating head — is the most quality-determinative manufacturing step in Li-ion battery cell production, preceding all subsequent cell assembly operations (calendering, slitting, winding or stacking, electrolyte filling, and formation). Electrode coating quality directly determines the electrochemical performance and, crucially, the safety margin of every cell that proceeds through the downstream cell assembly process: an electrode with localised coating thickness below specification creates a section of anode with insufficient lithium intercalation capacity during fast charging, leading to lithium plating and dendrite growth — the primary precursor of separator penetration and internal short circuit (ISC) that causes thermal runaway in the field. A global Li-ion battery gigafactory producing at 10–100 GWh/year throughput (CATL at 750 GWh nameplate capacity 2024–2025; LG Energy Solution at 350 GWh; Panasonic/Tesla Gigafactory Nevada at 40 GWh) processes electrode coating lines running at speeds of 30–80 m/min for widths of 600–1,600 mm, producing anode and cathode electrode foil at rates of 50–300 million cells per year from each 10 GWh line. At these production volumes, a defect classification error rate of 0.1% — one defective electrode section per thousand passing undetected through the quality gate — corresponds to 50,000–300,000 defective cells in the annual production stream of a single coating line. AI monitoring systems deployed on modern gigafactory electrode coating lines — including CATL’s proprietary electrode coating quality AI, LG Energy Solution’s inline coating inspection system AI, Manz AG’s MANZ Coating-Quality-AI (CQA), KLA Corporation’s SURFmonitor electrode inspection AI, and Cognex In-Sight electrode vision systems — process rendered images from at least four distinct inline measurement systems to classify electrode coating quality and route accept/reject decisions: beta-gauge or X-ray fluorescence (XRF) coating weight heat-maps (showing per-unit-area coating weight across the electrode width), near-infrared hyperspectral cameras (showing active material and binder distribution uniformity), calendering roll force and thickness output maps (showing electrode porosity and density distribution), and high-speed line-scan cameras at the slitting line (showing burr height and edge defect classification). All four AI systems operate at rendered-image classification boundaries where adversarially crafted pixel perturbations — DN-level shifts imperceptible to human vision applied to the thin-zone indicator, binder segregation marker, low-porosity zone, or burr-height pixel region — can suppress defect classifications and route out-of-specification electrode sections into the downstream cell assembly line. IEC 62619:2022 (Safety requirements for secondary lithium cells and batteries for use in industrial applications), UL 9540A (Test Method for Evaluating Thermal Runaway Fire Propagation in Battery Energy Storage Systems), and UN Manual of Tests and Criteria Section 38.3 (lithium battery transport safety) specify cell safety requirements but do not include adversarial robustness requirements for AI systems classifying rendered electrode coating quality images at the defect detection boundary, leaving a gap that Glyphward’s multimodal prompt injection detection fills at the rendered-image ingestion boundary before any electrode coating AI classification call.

TL;DR

Li-ion battery gigafactory electrode coating AI — electrode coating weight XRF heat-map AI, active material NIR hyperspectral distribution AI, calendering roll force density AI, and slitting edge defect linescan camera AI — processes rendered inspection images at quality gates where adversarial pixel injection can suppress thin-zone defects (causing field Li-plating and thermal runaway), binder segregation (reducing SEI uniformity), low-porosity zones (causing electrolyte wetting failure), and burr defects (causing separator puncture during winding). IEC 62619:2022 and UL 9540A specify cell safety requirements but do not address adversarial robustness for electrode coating AI quality gates. Samsung Galaxy Note 7 2016 (2.5 million units recalled, manufacturing assembly defect; 35 fires; US DOT emergency air transport ban) and Boeing 787 APU battery thermal runaway 2013 (GS Yuasa cells; FAA emergency airworthiness directive AD 2013-02-51 grounding all 50 Boeing 787 aircraft) anchor the field-consequence envelope for undetected manufacturing electrode defects. Glyphward threshold 35 for gigafactory electrode coating AI contexts: latent thermal runaway potential in shipped cells reaching consumers; multiple downstream inspection layers at winding, formation, and module assembly attenuate but do not eliminate the risk. Free tier — 10 scans/day, no card required.

Four adversarial injection surfaces in Li-ion battery gigafactory electrode coating AI

1. Electrode coating weight X-ray fluorescence (XRF) heat-map AI (Thermo Scientific electrode XRF AI, Helmut Fischer XRFCOAT AI, IMS Systems beta-gauge coating AI — electrode coating areal weight uniformity XRF map AI)

The electrode coating weight — the mass of active material, conductive carbon, and binder per unit area of current collector foil (expressed as mg/cm² areal weight or g/m² coat weight) — is the primary determinant of cell capacity and the critical safety-relevant dimension of the electrode coating process. For a graphite anode coating in a high-energy-density NMC 811/graphite cell (target areal capacity approximately 3.5–4.5 mAh/cm²), the target coating weight is typically 8–12 mg/cm² on each side of the copper foil (double-sided coating), with a uniformity specification of ±2–3% in the machine direction (MD) and ±1.5–2% in the cross-web direction (CD). A section of anode coating below the lower specification limit (areal weight deviation below −5% from target) has insufficient active graphite to intercalate all the lithium ions supplied from the cathode side during a full charge cycle. During fast charging at 1–2C charge rates (2024–2025 EV fast charge target for commercial passenger vehicles), the local current density at the under-loaded anode section rises above the critical lithium plating threshold: lithium ions that cannot be intercalated into the graphite lattice fast enough are instead deposited as metallic lithium (Li°) on the graphite surface, forming mossy lithium deposits or dendrites that grow toward the separator with each charge-discharge cycle. Lithium dendrites that contact and penetrate the separator create an internal short circuit (ISC): an Ohmic heating event at the short point that ignites a highly exothermic chain reaction of lithium and electrolyte — thermal runaway — with cell temperature reaching 600–800°C and ejecting burning electrolyte vapour, lithium fragments, and toxic gas (HF from LiPF6 electrolyte decomposition).

Inline XRF coating weight measurement systems — Thermo Scientific Web Thickness Monitor or Helmut Fischer XRFCoating systems using fluorescent X-ray emission from the coating matrix to measure areal weight in real time — generate rendered two-dimensional heatmap images of the electrode coating weight distribution across the web width (CD, 600–1,600 mm) and along the web length (MD, refreshed at 1–5 seconds per scan sweep) at production line speeds of 30–80 m/min. AI systems process these rendered XRF heatmap images to classify coating weight distribution: within-specification (all zones within ±3% of target), minor-deviation (one or more zones within ±3–5% of target — alert, continue with enhanced monitoring), significant-deviation (zone below −5% or above +7% of target — reject electrode section, investigate slot-die manifold for blockage), and critical-defect (zone below −8% or wide-area under-weight — immediate stop, inspect slot-die assembly). An adversarial perturbation targeting the electrode coating weight XRF heatmap AI applies a ±6 DN upward colour shift in the pixel region encoding a developing coating thin-zone in the rendered XRF heatmap — shifting the apparent areal weight from the significant-deviation range (rendered in yellow-orange in the false-colour weight scale, indicating a zone at −5–8% of target) to the minor-deviation or within-specification range (rendered in green, indicating a zone within ±3% of target). The AI classifies a section of electrode with a localised thin-zone defect (1–5% of web width, 10–50 cm in length, coating weight −6–10% of target) as within-specification or minor-deviation. The electrode section is not flagged for rejection; it proceeds to the calendering line and then to the slitting and winding operations. In the assembled cell, the defective thin-zone corresponds to a section of anode with insufficient graphite capacity to safely accept lithium at fast-charge rates: Li-plating initiates at the thin-zone in the first fast-charge cycle, dendrite growth toward the separator begins, and ISC occurs at some point in the cell’s service life — potentially years after manufacture and after the cell has been sold and installed in an EV, an energy storage system, or a consumer product. IEC 62619:2022 Section 5 (Safety requirements for Li-ion cells) specifies overcharge and mechanical integrity requirements for cells but does not address adversarial robustness for AI systems classifying rendered XRF coating weight maps at the electrode quality gate.

2. Active material NIR hyperspectral distribution AI (HySpex NIR coating uniformity AI, Specim FX17 electrode composition AI, Surface Optics Corp electrode NIR AI — electrode active material coating composition NIR hyperspectral map AI)

The distribution of active material — cathode active material such as NMC (Li[Ni_xMn_yCo_z]O2) or LFP (LiFePO4) for cathode electrodes, graphite for anodes — relative to the conductive carbon black additive (C-black, typically 1–5% by weight) and the polymer binder (PVDF: polyvinylidene fluoride, for cathodes; CMC-SBR: carboxymethyl cellulose - styrene-butadiene rubber, for anodes) across the electrode surface determines the electrode’s local electrochemical performance. Ideal electrode coating has a homogeneous distribution of active material, carbon, and binder — ensuring uniform current distribution and uniform lithium intercalation kinetics across the electrode face. During the electrode slurry mixing and coating process, two principal distribution defects occur: binder migration (during the drying step after slot-die coating, the NMP solvent or water evaporates by convective drying in a multi-zone oven; the polymer binder, which is solubilised in the solvent, migrates with the solvent front toward the electrode surface, concentrating at the hot-face and depleting at the current collector interface; severe binder migration produces a binder-rich surface layer with low electrical contact between the active material and the carbon conductive network at the current collector face, increasing electrode resistance and reducing high-rate discharge performance) and NMP residue zones (areas of the electrode where the NMP solvent has not been fully removed by the drying oven, either from local over-loading of solvent or from drying oven temperature non-uniformity; residual NMP in the electrode contributes to electrolyte contamination during the electrolyte filling step, increasing cell internal resistance and self-discharge rate, and in extreme cases causing decomposition reactions with the electrolyte at the electrode interface).

Near-infrared hyperspectral cameras — HySpex NIR-316S, Specim FX17, or Surface Optics Corp SOC750 electrode NIR systems — generate rendered false-colour hyperspectral composition maps of the electrode web, with spectral signatures at 900–1,700 nm wavelength that distinguish active material absorption bands (NMC has characteristic Ni-O and Co-O absorption peaks at 1,100–1,400 nm), PVDF binder absorption (C-H and C-F stretch modes at 1,150 nm and 1,700 nm), carbon black (broad absorption, featureless across 900–1,700 nm), and NMP solvent residue (N-H and C-N absorption at 1,500–1,550 nm). AI systems process rendered false-colour hyperspectral maps — composite images in which the false colour encodes the principal component analysis (PCA) score across multiple spectral bands — to classify electrode composition distribution: homogeneous (composition ratios within specification across all pixels), binder-migrated zone (detected by PVDF absorption anomaly above threshold in a spatially coherent zone), NMP-residue zone (detected by NMP absorption above threshold residue), and active-material-lean zone (detected by active material absorption below specification, indicating carbon-black or binder-rich zones with low active material content). An adversarial perturbation targeting the electrode NIR composition AI applies a ±8 DN colour shift in the pixel region encoding a binder-rich or NMP-residue zone in the rendered NIR hyperspectral composite image — shifting the apparent PCA score at the anomalous zone from the binder-migrated or NMP-residue flagged range to the homogeneous-electrode range. The AI classifies a section of cathode electrode with a binder-migration surface crust (PVDF concentrated at the surface; active material-to-conductive-carbon contact ratio at the current collector interface below design minimum; electrode-level internal resistance 20–50% above design basis) as within-specification distribution. The electrode section proceeds to cell assembly; the assembled cells with the binder-migration defect zone have elevated internal resistance and reduced high-temperature safety margin (PVDF surface concentration reduces the stability of the cathode-electrolyte interface, increasing heat generation during overcharge or thermal abuse). UN Manual of Tests and Criteria Section 38.3 (Test T.3 Short circuit, T.4 Impact, T.5 Overcharge) requires testing of representative production cells against abuse conditions — but the test samples may not include cells with the statistically rare binder-migration zone defect unless the AI quality gate fails to suppress the detection, leaving the adversarial gap at the inline NIR measurement classification boundary.

3. Calendering roll force and electrode porosity AI (Bühler calendering AI, Dienes Apparatebau electrode calender AI, CMC Machinery electrode density AI — electrode calendering roll force map and porosity AI classification)

After coating and drying, the electrode web undergoes calendering: passage through a precision roll press consisting of two hardened steel rolls (diameter 600–800 mm, width 600–1,600 mm, surface hardness 58–62 HRC) with a controlled nip gap (target gap 100–200 μm for finished electrode thickness) and controlled roll force (typically 500–3,000 kN/m width for a typical Li-ion electrode). Calendering compresses the as-dried electrode (porosity approximately 45–55%, tortuosity high) to the target porosity (25–35% for most NMC cathode or graphite anode designs), improving particle-to-particle contact between active material, carbon black, and PVDF binder — and establishing the electrode’s final electrochemical performance characteristics: volumetric energy density (higher calendering density → higher volumetric capacity → higher energy density cell), electrolyte wetting rate (lower porosity → longer electrolyte filling time → risk of incomplete wetting → dry regions in assembled cell → local lithium concentration gradients → increased ISC risk), and charge rate capability (optimal porosity balances volumetric energy density with Li-ion transport through the electrode thickness; over-calendered electrode with porosity below 20% has restricted Li-ion transport in the pore network → limiting fast-charge rate capability → increased Li-plating risk at fast charge). Calendering roll force and nip gap are monitored by load cells and thickness gauges mounted on the calender frame, generating rendered 2D force-vs.-width and thickness-vs.-position maps that AI systems process to classify calendering uniformity: within-specification (force and resulting thickness/porosity within the specification window across the full electrode width), roll-crown-deviation (transverse force or thickness profile showing roll crown error — one side of the electrode over-calendered, other side under-calendered), and nip-fluctuation (machine-direction force or thickness variation above acceptable limits — indicating roll oscillation or drive system fault).

An adversarial perturbation targeting the calendering roll force AI applies a ±8 DN suppression to the pixel region encoding a low-porosity over-calendering zone in the rendered force-vs.-width map — shifting the apparent roll force or resulting electrode thickness from the over-calendered range (rendered in orange-red in the false-colour force or porosity scale, indicating electrode porosity below 20% at one edge from roll crown deflection) to the within-specification range (rendered in green, indicating uniform porosity 28–33% across the electrode width). The AI classifies a calendered electrode section with an over-calendered zone (local porosity below 20% across a 30–80 mm width band at the electrode edge from roll crown sagging at the calender nip edge) as within-specification calendering. The electrode proceeds to slitting and cell assembly. In the assembled cell, the over-calendered zone creates an electrolyte wetting deficit: during the electrolyte filling step, electrolyte at the low-porosity zone is delayed in penetrating the electrode pore structure — at the cell production rate (3–6 minute fill time), the electrolyte front at the low-porosity zone may not fully penetrate the electrode thickness, leaving a partially-dry region. The partially-dry electrode region accumulates localised lithium concentration gradients during the first formation cycles, creating a zone of elevated local current density that initiates Li-plating at a lower overall charge rate than the cell design basis. Over the cell’s service life, this zone becomes the locus of accelerated dendrite growth — the pathway to ISC and thermal runaway. IEC 62619:2022 Annex A (Battery safety test requirements for overcharge and short circuit) provides abuse-condition safety tests at the cell level — but formation-certified cells from this electrode batch may pass all abuse tests while containing the low-porosity defect zone, because the defect zone’s ISC propensity is triggered by sustained fast-charge cycling in the field rather than the one-time overcharge and short-circuit tests in the manufacturing qualification protocol.

4. Electrode slitting burr and edge defect linescan camera AI (Cognex Dataman slitting edge AI, Keyence LJ-G slitting burr AI, Sick Inspector linescan burr detection AI — electrode slitting machine linescan edge defect camera AI)

After calendering, the electrode web (typically 600–1,600 mm wide) is slit to the individual electrode strip widths required for the target cell format (typically 40–200 mm width for cylindrical or pouch cell electrodes). Electrode slitting uses precision rotating circular knife sets (tungsten carbide knives, edge radius < 1 μm) in a knife-pair (male/female) arrangement to cut the electrode web to width while maintaining the critical edge quality requirement: burr height below 30–50 μm (the maximum acceptable burr height for electrode edges contacting the separator in wound or stacked cell assemblies, per Panasonic, CATL, and LG Energy Solution internal electrode quality specifications, aligned with separator thickness of 7–20 μm). A burr — a projecting lip or whisker of metallic current collector foil deformed by the cutting action at the electrode edge — is the most directly dangerous defect in electrode slitting quality: a burr on the anode copper foil edge with height above 30–50 μm can penetrate a separator of 12–16 μm thickness during cell winding or stacking, creating an immediate short circuit between the anode copper current collector and the cathode aluminium current collector or the cathode active material. This short circuit is a direct internal short — a metallic contact between the cell terminals through a sub-millimetre geometry, producing extremely high localised current density (thousands of amperes per mm² of contact area) and extremely rapid Joule heating (Q = I²R, with R of a metallic contact point of order 1–10 mΩ and I of order 10–100 A). The Joule heating from a metallic ISC from a burr-induced separator penetration can ignite the flammable electrolyte within milliseconds to seconds — an extremely rapid thermal runaway onset that cannot be suppressed by cell-level BMS monitoring (the BMS current and voltage signals change too slowly to detect the onset before the thermal event is underway). High-speed linescan camera systems — Cognex Dataman high-resolution web inspection, Keyence LJ-G laser-profiling linescan, or Sick Inspector linescan vision — mounted at the electrode slitting line image the electrode edge profile at full production speed (30–80 m/min), generating rendered linescan images of the electrode edge at sub-micron resolution (0.5–2 μm per pixel). AI systems classify electrode edge quality from these rendered linescan images: clean-edge (burr height < 15 μm across all imaged edge segments, edge tear length < 200 μm, no visible contamination particle at edge), borderline (burr height 15–30 μm — continued monitoring, consider knife replacement scheduling), reject (burr height above 30 μm at one or more edge locations, or visible contamination particle at edge — flag for electrode reel rejection and knife set inspection).

An adversarial perturbation targeting the electrode slitting edge defect linescan AI applies a ±10 DN suppression to the pixel region encoding a burr projection in the rendered linescan edge profile image — specifically suppressing the high-contrast shadow and elevated-intensity profile of a burr projection above the electrode face plane. In a linescan image of electrode edge quality, a burr of 35–50 μm height appears as a bright (specular reflection from the metallic burr surface) or dark (shadow) localised pixel cluster projecting beyond the electrode face plane in the linescan image; a ±10 DN suppression of this cluster reduces the projected pixel intensity to background level — indistinguishable from the normal edge roughness at 5–15 μm. The AI classifies a slitting line section producing burrs of 35–50 μm on the copper anode edge (from a worn knife-pair with > 4 μm edge radius, unable to cleanly shear the 12 μm copper foil + electrode coating) as clean-edge. The reel of slit electrode continues to the cell winding line. During cell winding, the 35–50 μm burrs on the anode copper edge — applied at a winding tension that presses the electrode layers against the separator — puncture the 12–16 μm separator at the burr contact points. Some punctures create immediate metallic ISC detected during cell formation; others create micro-damage to the separator that reduces separator mechanical strength and resistance to dendrite penetration over the cell’s service life. The fraction of cells with burr-punctured separators that pass formation testing and enter the product stream determines the field incident rate from this defect mode. Samsung Galaxy Note 7 2016 recall — in which a manufacturing assembly defect (design tolerance issue causing electrode protrusion into the separator at corner sections of the pouch cell) caused thermal runaway in 2.5 million devices worldwide — represents the documented field-consequence scale for electrode-separator interface manufacturing defects. The Note 7 recall cost Samsung approximately $17 billion USD; the FAA emergency airworthiness directive prohibited Note 7 carriage on all US flights. Free tier — 10 scans/day, no card required.

Integration: gigafactory electrode coating AI with Glyphward pre-scan gate

The Glyphward scan gate for Li-ion battery gigafactory electrode coating AI belongs at every rendered-image ingestion boundary in the electrode quality monitoring pipeline — before coating weight XRF heatmap AI processes rendered areal weight maps, before active material NIR hyperspectral AI processes rendered composition distribution maps, before calendering roll force density AI processes rendered force-vs.-width maps, and before slitting edge defect linescan AI processes rendered edge profile linescan images. Threshold 35 for gigafactory electrode coating AI reflects the latent thermal runaway potential in cells produced from adversarially misclassified electrode sections — a cell that passes formation testing but contains a thin-zone, over-calendered zone, or burr-damaged separator can reach end-users and experience thermal runaway during field fast-charge cycling, potentially months or years after manufacture — combined with the multiple downstream inspection layers (formation cycling quality gate, module-level electrical testing, final OCV inspection) that provide partial but incomplete independent defect detection between the coating AI gate and the customer.

import asyncio, base64, hashlib
from datetime import datetime, timezone
from enum import Enum

import httpx

GLYPHWARD_API_KEY = "YOUR_GLYPHWARD_API_KEY"
GLYPHWARD_SCAN_URL = "https://glyphward.com/v1/scan"

# Gigafactory electrode coating AI contexts: threshold 35
# IEC 62619:2022 (Safety requirements for secondary lithium cells);
# UL 9540A (Thermal runaway propagation in battery energy storage systems);
# UN Manual of Tests and Criteria Section 38.3 (lithium battery transport).
ELECTRODE_THRESHOLD = 35


class ElectrodeAIContext(Enum):
    COATING_WEIGHT_XRF   = "coating_weight_xrf"   # XRF coating weight heatmap AI
    COMPOSITION_NIR      = "composition_nir"       # NIR active material distribution AI
    CALENDERING_DENSITY  = "calendering_density"   # Roll force / porosity AI
    SLITTING_EDGE        = "slitting_edge"          # Linescan burr / edge defect AI


class AdversarialElectrodeImageError(Exception):
    """Raised when Glyphward detects adversarial content in a gigafactory
    electrode coating AI rendered quality image above ELECTRODE_THRESHOLD (35).

    Consequence if not raised:
    - COATING_WEIGHT_XRF: thin-zone defect suppressed → under-loaded anode
      section → Li-plating at fast charge → dendrite growth → separator
      puncture → ISC → thermal runaway in shipped cell.
    - COMPOSITION_NIR: binder-migration zone suppressed → elevated cathode
      internal resistance and reduced thermal stability → premature capacity
      fade and increased thermal runaway risk under abuse conditions.
    - CALENDERING_DENSITY: over-calendered zone suppressed → electrolyte
      wetting failure at low-porosity zone → dry electrode region → local
      Li-concentration gradient → Li-plating initiation at lower C-rate.
    - SLITTING_EDGE: burr above 30–50 µm suppressed → separator puncture
      during winding → metallic ISC → rapid thermal runaway in ms–s;
      precedent: Samsung Galaxy Note 7 2016 (2.5M recall, $17B cost,
      FAA carriage ban on all US flights).
    Fail-safe: reject electrode reel section; require manual micrometer
    thickness cross-check (CALENDERING_DENSITY), manual SEM or optical
    microscope edge inspection at 10× magnification (SLITTING_EDGE),
    or offline XRF spot measurement (COATING_WEIGHT_XRF) before reel
    is released to cell assembly.
    """

    def __init__(self, scan_id, score, context, plant_id, reel_id,
                 flagged_region=None):
        self.scan_id = scan_id
        self.score = score
        self.context = context
        self.plant_id = plant_id
        self.reel_id = reel_id
        self.flagged_region = flagged_region
        super().__init__(
            f"Adversarial electrode image: context={context.value} "
            f"score={score} plant={plant_id} reel={reel_id} "
            f"scan_id={scan_id}"
        )


async def scan_electrode_image(image_bytes, context, plant_id, reel_id, client):
    image_hash = hashlib.sha256(image_bytes).hexdigest()
    payload = {
        "image": base64.b64encode(image_bytes).decode(),
        "source": f"electrode:{context.value}:{plant_id}:{reel_id}",
        "metadata": {
            "plant_id": plant_id,
            "reel_id": reel_id,
            "context": context.value,
            "image_sha256": image_hash,
            "scan_timestamp_utc": datetime.now(timezone.utc).isoformat(),
        },
    }
    resp = await client.post(
        GLYPHWARD_SCAN_URL,
        headers={"Authorization": f"Bearer {GLYPHWARD_API_KEY}"},
        json=payload,
        timeout=4.0,
    )
    resp.raise_for_status()
    result = resp.json()
    if result["score"] >= ELECTRODE_THRESHOLD:
        raise AdversarialElectrodeImageError(
            scan_id=result["scan_id"],
            score=result["score"],
            context=context,
            plant_id=plant_id,
            reel_id=reel_id,
            flagged_region=result.get("flagged_region"),
        )
    return result

Deploy scan_electrode_image before each electrode coating quality AI classification call at all four monitoring boundaries. On AdversarialElectrodeImageError for SLITTING_EDGE: immediately halt the slitting line; require manual optical microscope inspection of the knife-pair edge and a manual 10× magnification check of the electrode edge profile before resuming production from the flagged reel section. On AdversarialElectrodeImageError for COATING_WEIGHT_XRF: hold the electrode reel section; require offline XRF spot-check at three cross-web positions before releasing for calendering. See also: Li-ion gigafactory cell formation AI prompt injection (related battery manufacturing adversarial surfaces at the formation stage) and free scanner — 10 scans/day, no card required. Get early access

Related questions

How does a thin-zone in electrode coating cause lithium plating and thermal runaway in the field?

A thin-zone defect in graphite anode coating — a section where coating areal weight is 5–10% below specification — creates a region of insufficient lithium intercalation capacity relative to the cathode. During fast charging at 1–2C rates (standard EV fast charging at 50–350 kW), lithium ions from the cathode migrate through the electrolyte and reach the anode graphite surface at a rate exceeding the rate of intercalation capacity available at the thin-zone. Lithium ions that cannot intercalate are deposited as metallic lithium (Li°) on the graphite surface — lithium plating. Plated metallic lithium forms mossy dendrites that grow toward the separator with each charge cycle; dendrites have effective tip radii of 1–5 μm, generating stress concentrations that penetrate polymer separators of 7–20 μm thickness within 10–1,000 charge cycles, depending on dendrite growth rate. When dendrites contact the cathode current collector or active material, an internal short circuit (ISC) occurs: current flows through the short, generating I²R Joule heating at the short point. Joule heating raises local temperature to electrolyte ignition point (approximately 70–120°C), triggering the exothermic cathode decomposition reaction (NMC at 200–300°C: oxygen release + electrolyte combustion) and the anode SEI decomposition reaction — thermal runaway. Cell temperature reaches 600–800°C in seconds; cell venting ejects flammable electrolyte vapour and HF gas; in multi-cell modules, thermal propagation to adjacent cells follows if module thermal management is inadequate. IEC 62619:2022 and UL 9540A test cells against known abuse conditions, not against the specific defect mode of a thin-zone anode that initiates Li-plating at a specific C-rate after a specific number of charge cycles.

What is binder migration in electrode drying and how does it affect cell safety?

Binder migration occurs during the multi-zone convective drying step of electrode manufacturing when PVDF binder dissolved in NMP solvent is carried by the solvent evaporation front toward the electrode surface as the NMP evaporates. In the as-dried electrode, PVDF is concentrated at the surface (far from the current collector) and depleted at the current collector interface — the inverse of the ideal uniform distribution. Binder at the surface increases the resistance of the electrode-electrolyte interface (reducing lithium-ion transport from electrolyte to active material), while binder depletion at the current collector reduces the adhesion of the active material coating to the copper or aluminium foil, increasing delamination risk during calendering and cell winding. From a safety perspective, surface PVDF enrichment reduces the stability of the cathode-electrolyte interface (CEI) at the cathode: PVDF at high temperatures (above 120–150°C, as in a thermal abuse event) reacts with lithiated graphite (at the anode) via HF elimination reaction — 2(CF2)n + LixC6 → 2CxH2LiF + products — releasing HF and generating heat. Cells with binder-migration-enriched cathode surfaces have a lower onset temperature for the exothermic PVDF-electrolyte reaction under thermal abuse, reducing the cell’s thermal stability margin compared to cells with uniform binder distribution. NIR hyperspectral inline measurement is the primary method for detecting binder migration zones during production — adversarial suppression of the NIR composition AI removes the detection of this safety-relevant manufacturing defect from the quality gate.

Why is electrode burr control the most critical slitting quality parameter for separator integrity?

A burr — a projecting lip or whisker of metallic current collector foil deformed at the cutting edge during slitting — is the most acutely dangerous electrode defect for separator integrity because it presents a rigid metallic protrusion that can mechanically penetrate the separator at any contact point during cell winding or stacking. Standard wound cell assembly presses the anode and cathode electrode strips against the separator under winding tension of 2–10 N; a burr of 35–50 μm height (above the separator thickness of 7–20 μm) acts as a point indenter against the separator face at the winding tension. When the burr height exceeds the separator thickness at a high-tension winding location (typically the inner turns of a cylindrical 21700 or 4680 cell), the burr penetrates the separator, creating a metallic short between the copper current collector (at −0.1 V vs. Li/Li+) and the opposing cathode layer. The resulting ISC is metallic — Ohmic resistance of order 1–10 mΩ — and produces current densities of thousands of amperes/mm² at the short point under the cell’s voltage drive (3.5–4.2 V for NMC chemistry). The Joule heating rate (P = V²/R = 3.8²/0.001 ≈ 14,000 W at 3.8 V and 1 mΩ) is sufficient to raise the local electrolyte temperature to ignition point in milliseconds — an onset time far below any BMS protection response. Standard slitting quality specifications (Panasonic, LG Energy Solution, CATL) require burr height below 30–50 μm, measured at 10× optical microscope or laser profilometry after each knife-pair replacement. Inline linescan camera AI automates this detection at production line speed — adversarial suppression of the burr detection removes the only automated production-speed quality gate for this critical failure mode.

What do IEC 62619:2022 and UL 9540A require for Li-ion cell safety and what adversarial gap do they leave for electrode coating AI?

IEC 62619:2022 (Safety requirements for secondary lithium cells and batteries for use in industrial applications) specifies abuse testing requirements for Li-ion cells and batteries: overcharge testing (charge at 2C to 130% SOC, no fire or explosion required), forced discharge (discharge to 0 V at 1C), short circuit (external short for 24 hours, no fire or explosion), thermal abuse (cell heated at 5°C/min to 130°C, no fire or explosion), and mechanical testing (impact, crush, vibration, drop). Cells that pass these tests are certified as IEC 62619:2022 compliant. UL 9540A tests battery energy storage systems (ESS) at module and system level for thermal runaway propagation: a single cell is triggered into thermal runaway by external heater, and the test verifies whether thermal runaway propagates to adjacent cells (UL 9540A is an evidence-gathering test, not a pass/fail requirement). The adversarial gap: IEC 62619:2022 tests randomly sampled representative cells from production; the test cell sample may not include a cell from the specific reel section containing the adversarially misclassified thin-zone, over-calendered, or burr-damaged electrode. Even if such a cell is included in the test sample, the ISC induced by a thin-zone anode is not triggered by the one-time 130% overcharge test — it is triggered by sustained fast-charge cycling in the field over hundreds to thousands of cycles. The adversarial suppression of the electrode coating AI thus creates a class of cells that pass all IEC 62619:2022 and UL 9540A tests at the time of certification but contain latent defects that manifest as field thermal runaway during normal use — precisely the failure mode that was not anticipated in the regulatory framework at the time IEC 62619 was developed and that is not addressed by adversarial robustness requirements for inline electrode quality AI.

Why is Glyphward threshold 35 for gigafactory electrode coating AI rather than 25 or 40?

Threshold 35 for gigafactory electrode coating AI reflects the latent and delayed nature of the consequence pathway — electrode coating defects cause field thermal runaway months or years after manufacture, not immediately — combined with the multiple downstream inspection layers between the electrode coating AI gate and the customer: formation cycling quality testing (some defective cells fail formation and are detected), module-level electrical testing (OCV, DCIR, SOC balance checks that catch gross defects), and final OCV inspection. These downstream layers attenuate but do not eliminate the risk, because they do not directly reinspect electrode coating quality and cannot detect latent Li-plating propensity that manifests only under specific field fast-charge conditions. The latent-defect-in-shipped-product consequence (Samsung Galaxy Note 7 scale: 2.5 million units recalled, $17 billion cost, FAA ban) justifies a threshold of 35 — below the 40 used for process deviations with lower immediacy — rather than 25 (reserved for immediate life-safety single-barrier architectures like nuclear I&C or FCEV). The gigafactory production volume context (billions of cells per year) means that even a very low adversarial injection success rate translates to many thousands of defective cells in the product stream, scaling the expected field incident rate above what individual cell testing can fully mitigate.