Supervisory Small Language Models for Hardware Signal Control and System-of-Systems Optimization
The paper puts a small, quantized language model beside a control board, not inside its fast loop. The model reads the board's signals as tokens and proposes parameters; deterministic code decides what reaches the pins.
Six hypotheses frame the study
The paper states these as falsifiable claims to evaluate. It presents the architecture; it does not report experiments that test them. Select one to jump to the part of the paper that develops it.
Two ways to move control inside the model
CELI · Controller-Embedded Language Model Interactions
Wagner et al., 2024
Conventional integrations wrap the model in a hard-coded external loop and query it as a passive text generator. CELI moves the control logic into the prompt architecture, so the model drives multi-stage execution itself.
ELF · Embedded Language Flows
Hu et al., 2026
Projecting onto discrete tokens at every step adds quantization noise and latency at a continuous physical interface. ELF keeps reasoning in the embedding space via flow matching, so live sensor feedback can enter the generative trajectory smoothly.
Fitting a transformer onto edge silicon
Four optimization pillars, as surveyed by Lamaakal et al. (2025), take a transformer (Vaswani et al., 2017) down to MCU and SoC budgets.
Knowledge distillation
A large teacher Mt transfers domain reasoning to a compact student Ms (Hinton et al., 2015).
Ltotal = (1 − α)·Ltask + α·T²·KL(Pt ‖ Ps)
INT4 / INT8 quantization
Survey figures the paper cites: over 50% less memory and over 2× faster inference, with minimal accuracy loss.
Structured and magnitude pruning
Weights, heads or channels below a sensitivity threshold τ are removed, giving sparse, low-latency graphs.
wp = 0 if |w| < τ, else w
Memory-efficient attention
Grouped-Query Attention (Ainslie et al., 2023) or Multi-Head Latent Attention shares key-value caches across query groups; RoPE and RMSNorm bound SRAM on edge NPUs.
| Feature | On-device edge SLMs | Cloud foundation models |
|---|---|---|
| Model size | 500M to 3B parameters, down to <1B nano-models | Hundreds of billions (e.g. 175B to 540B) |
| Hardware | ARM Cortex-M, ESP32, STM32MP1, Raspberry Pi 5, local NPUs | Cloud GPU and TPU clusters |
| Constraints | 4 to 8 GB DRAM down to MB-scale SRAM | High compute, distributed VRAM, high power |
| Optimization | INT4/INT8, structured pruning, distillation | None required on the client edge |
| Benefit | Zero latency variance, privacy, offline, low power | Broad multi-domain reasoning |
Cascaded control loops
Nano models (Qwen2-0.5B, MobiLlama-0.5B, SmolLM-135M/360M, OpenELM-270M) handle sensory filtering, immediate safety heuristics and routine tokens on device. An out-of-distribution exception or a system-wide diagnostic cascades up to an edge server or cloud-augmented SLM for planning.
Hardware-in-the-loop development
Virtual hardware such as Wokwi lets an agent flash firmware to a simulated MCU, watch GPIO and PWM, and self-correct before deployment. EmbedCopilot-Bench evaluates vision-language models on schematics, layouts and register configurations (Yuan et al., 2026).
A three-tier hierarchical edge mesh
Select a tier to see where it runs, how fast, and what it owns.
Each tier runs on its own clock
Loop period on a log scale. Three to five orders of magnitude separate Tier 1 from the SLM.
Two objective functions, arbitrated by token priority
Hardware I/O as a sliding context window
Raw readings are normalized into state tokens such as [TEMP-CRIT-104C] or [FLOW-RATE-DEGRADED], and the recent register history becomes the model's context:
Local objective
Hardcoded as primary attention priorities in the Tier 2 system prompt: stability, minimal mechanical and thermal wear, immediate goals such as pump throughput or avoiding thermal throttling.
Global SoS objective
Built at Tier 3 from grid pricing, load forecasts and weather, then broadcast as Policy Envelopes over CAN, EtherCAT, Modbus-TCP or ROS2, e.g. [MAX-BATTERY-RESERVE-DISCHARGE] [LOAD-SHED-PRIORITY-HIGH].
The paper's arbitration example
A battery node receives a global request while reading its own health.
Balancing across nodes: under the global goal of maximum system efficiency and revenue, a battery node (local target: minimize degradation) dictates its max discharge, while an appliance node (local target: user comfort) defers its HVAC cycle.
Every proposal passes the interlock
The SLM never writes pins. It proposes a register map; a compiled C/C++ kernel or bounded SMT verifier checks it against physical limits (Sha, 2001; Mohan et al., 2013; Nesti et al., 2026).
Try a proposal
Example field and bound from the paper's node code listing (§5.1): chargeCurrentLimitA, 120.0 A. The paper describes two ways to handle a breach; switch between them.
| Dimension | LM-driven supervisory control | Traditional MPC / PID |
|---|---|---|
| Complex SoS adaptability | High Translates vague or changing objectives into parameters on the fly. | Low Needs heavy re-mathematization if global constraints change drastically. |
| Unmodeled dynamics | High Semantic reasoning works around unforeseen sensor faults or wear. | Medium Relies on precise, predetermined physical models. |
| Execution latency | Varying Milliseconds to seconds on an edge NPU. | Deterministic Microseconds on the bare-metal loop. |
From volts to tokens, with hysteresis
The HTM runs as deterministic firmware on the Tier 2 processor. Its Dynamic Boundary Processor splits each register into Magnitude, Delta and Frequency/noise tokens, each with a 16-bit hex ID.
DC bus voltage magnitude
The other two vectors for the same register come from its trend and spectrum: [V-STABLE] 0x4A30 within ±0.5 V/s, [V-SPIKE-POS] 0x4A31 above 5.0 V/s, [V-DROP-NEG] 0x4A32 below −5.0 V/s; [F-CLEAN] 0x4A41 for THD under 3% and [F-HARMONIC-DIST] 0x4A42 at 3% or more (10 kHz FFT ripple).
The paper's three-step example
>40 km/h → [WIND-GUST]
Every compiled payload follows one syntax: [SYSTEM-CONTEXT] [GLOBAL-OBJECTIVE-TOKEN] [LOCAL-TELEMETRY-TOKENS] → [INFERENCE-TARGET]
Hysteresis filter loop: battery cell temperature
Illustrative simulation of the paper's rule, one sample every 100 ms[TEMP-NOM] 0x5B13
Enter [TEMP-CRIT-HIGH] only after the reading stays above 45.0 °C for ≥ 3 consecutive 100 ms samples (300 ms dwell). Exit back to [TEMP-NOM] only below 43.5 °C, a 1.5 °C deadband.
Samples above 45.0 °C in a row: 0 / 3
Other battery tokens in the table: [TEMP-COLD] 0x5B12 below 5 °C; [THERM-EQUILIBRIUM] 0x5B25 at ≤ 0.1 °C/min; [THERM-RUNAWAY-RISK] 0x5B26 above 2.0 °C/min.
Control-state engineering textures, not web text
Pillar 1 · Industrial telemetry interleaving
SCADA archives, historians (TimescaleDB) and inverter logs; the HTM turns floating-point time series into chronological state-token transitions.
Pillar 2 · Hardware domain context
Component datasheets, battery thermal manuals, firmware register maps and IEEE 1547 compliance protocols, parsed into structured markdown rule sets.
Pillar 3 · Operator-in-the-loop interventions
Maintenance logs, override tickets and field records, such as retarding DC bus engagement by 15 minutes when Inverter 4 shows a high-side leakage spike under morning dew.
Four-block causal reasoning format
Instruction tuning makes the model justify its physics before emitting registers. The paper's worked sample:
A training-sample illustration in the paper, not a measured result. The reasoning block is shortened here.
The SLM steers the optimizers
An SLM cannot reliably optimize a nonlinear, multi-variable equation through token generation alone. PSO runs on each Tier 2 node (e.g. finding the global maximum power point on a partially shaded string); GA runs at Tier 3 (e.g. battery discharge sequencing across 50 nodes over 24 hours). The SLM supervises them (van Stein & Bäck, 2025; Narimani & Emami, 2026).
1 · Solution-space bounding
On fragmented cloud shading, the PSO tilt search narrows to 12° to 18° instead of the full 90° horizon.
2 · Fitness function adaptation
On this SoS token, the SLM rewrites the active fitness function's penalty weights so searches aggressively penalize battery temperature spikes.
3 · Algorithmic switching
The SLM halts the PSO thread and starts an alternate recovery algorithm, such as a simulated annealing cooling loop, to reset the system smoothly.
A swarm of node SLMs under one orchestrator
Each node runs a quantized 500M to 1.5B SLM on an ARM Cortex-M7, STM32MP1 or NPU module, talking to the Global SoS Orchestrator over Modbus-TCP / CANopen.
The node control loop (§5.1 listing)
Five micro-scale paradigms for energy capture (§5.2)
Nano-scale cell degradation
Micro-amperage and impedance reveal micro-cracks and soiling; smart junction boxes reconfigure series-parallel sub-strings to isolate bottlenecked cells.
Cognitive albedo tracking
When diffuse light off clouds, panels, ground or water beats the obscured direct beam, trackers tilt slightly away from the sun.
Predictive pre-cooling
Ahead of a forecast clear-sky window, the inverter cycles MPPT out of phase so cells cool and meet peak sun at higher efficiency.
Swarm wake deflection
At low sun angles, front rows flatten their tilt to clear shadows for rear rows and lift net farm yield (Cooper et al., 2025).
EMI noise harvesting
Inverters shift switching frequencies so IGBT noise cancels or aligns with passive capacitor harvesting loops feeding the DC bus (Zhang et al., 2021).
All seven layers in one context window
The OSI-SLM intercepts payloads and metadata at each layer boundary through kernel hooks and eBPF (Soldani et al., 2023). Select a layer.
Zero-trust intrusion detection
A valid Layer 7 Modbus command [MOVE-TILT-90] over an established Layer 3 IP still gets caught when it coincides with an anomalous Layer 5 login pattern and an unexpected Layer 1 impedance shift on that wire.
Semantic compression, as stated
Bars drawn at the paper's stated maxima; the paper reports no measurement of them.
| Scenario | Layers | Static stack | Unified model |
|---|---|---|---|
| High irradiance + thermal load | L7 L4 L1 | Max extraction until a hard thermal trip; static TCP window causes bus collisions; fans start late. | Detunes MPPT before the ceiling; packs non-critical frames into multi-second arrays; pre-overclocks cooling. |
| Severe weather transients | L3 L2 | Central cloud loses signal, trackers stall; frames drop with line jitter. | Local peer-to-peer wireless mesh; shorter L2 packet intervals between interference bursts. |
| Congestion / swarm inundation | L6 L5 | Verbose JSON overflows MCU buffers; heartbeat timeouts trigger re-handshake storms. | Switches JSON to CBOR on the fly; stretches heartbeats by payload criticality. |
Design quality principles: strict state isolation through the guardrail interlock; shared global/local context that scales down to local survival if the orchestrator drops; graceful degeneracy back to classical PID and static Modbus maps under CPU or memory strain.
A semantic gateway between OT fieldbuses and IT
Byte stream sniffer → protocol tokenizer → semantic cross-router. Select a byte to see the token it maps to in the paper's example frame.
Byte-to-token compilation
Schemaless register payloads (0x03, 0x04, 0x1A, 0x2C) are mapped onto SunSpec Alliance solar data models. On [MODBUS-ERROR-04], the SLM checks Layer 1 noise to tell line noise from an overloaded inverter MCU and throttles polling instead of crashing the bus.
One northbound intent, two southbound frames
Semantic Diary State. During a cloud dropout the SLM keeps compiling Modbus and CAN frames into a compressed diary (MQTT-ACK store-and-forward). On reconnect it publishes one continuous state-history token instead of millions of raw registers.
Corrected reference list
- Ainslie, J., Lee-Thorp, J., de Jong, M., Zemlyanskiy, Y., Lebrón, F., & Sanghai, S. (2023). GQA: Training Generalized Multi-Query Transformer Models from Multi-Head Checkpoints. arXiv:2305.13245.
- Anderson, K. (2020). Maximizing Yield with Improved Single-Axis Backtracking on Cross-Axis Slopes: Preprint. NREL/CP-5K00-76023. 47th IEEE Photovoltaic Specialists Conference.
- Anderson, K. S., Jensen, A. R., & Riley, D. M. (2026). A Linear Programming Approach to Backtracking for Single-Axis Trackers on Rolling Terrain. IEEE Journal of Photovoltaics, 16(2), 291–298. doi:10.1109/JPHOTOV.2025.3645781
- Bosio, C., Guarrera, M., Sangiovanni-Vincentelli, A., & Mueller, M. W. (2025). Combining Large Language Models and Gradient-Free Optimization for Automatic Control Policy Synthesis. arXiv:2510.00373.
- Cooper, E., Anderson, K., & Riley, D. (2025). Performance Improvements Through Advanced PV Backtracking on Uneven Terrain. IEEE Journal of Photovoltaics, 15(4), 593–599. doi:10.1109/JPHOTOV.2025.3558254
- Hinton, G., Vinyals, O., & Dean, J. (2015). Distilling the Knowledge in a Neural Network. arXiv:1503.02531.
- Hu, K., Qiu, L., Lu, Y., Zhao, H., Li, T., Kim, Y., Andreas, J., & He, K. (2026). ELF: Embedded Language Flows. arXiv:2605.10938.
- Lamaakal, I., Maleh, Y., El Makkaoui, K., Ouahbi, I., Pławiak, P., Alfarraj, O., Almousa, M., & Abd El-Latif, A. A. (2025). Tiny Language Models for Automation and Control: Overview, Potential Applications, and Future Research Directions. Sensors, 25(5), 1318. doi:10.3390/s25051318
- Maher, G. (2025). LLMPC: Large Language Model Predictive Control. Computers, 14(3), 104. doi:10.3390/computers14030104
- Mohan, S., Bak, S., Betti, E., Yun, H., Sha, L., & Caccamo, M. (2013). S3A: Secure System Simplex Architecture for Enhanced Security and Robustness of Cyber-Physical Systems. HiCoNS '13, 65–74.
- Narimani, M., & Emami, S. A. (2026). GA-Agent: Large Language Models as Hyperparameter Optimizers for Evolutionary Controller Synthesis. arXiv:2609.27725.
- Nesti, F., Salamini, N., Marinoni, M., Cicero, G., Serra, G., Biondi, A., & Buttazzo, G. (2026). The use of the Simplex architecture to enhance safety in deep-learning-powered autonomous systems. Engineering Applications of Artificial Intelligence, 174, 114583. doi:10.1016/j.engappai.2026.114583
- Scherer, M., Macan, L., Jung, V. J., Wiese, P., Bompani, L., Burrello, A., Conti, F., & Benini, L. (2024). Deeploy: Enabling Energy-Efficient Deployment of Small Language Models on Heterogeneous Microcontrollers. arXiv:2408.04413.
- Sha, L. (2001). Using Simplicity to Control Complexity. IEEE Software, 18(4), 20–28. doi:10.1109/MS.2001.936213
- Soldani, D., Nahi, P., Bour, H., Jafarizadeh, S., Soliman, M. F., Di Giovanna, L., Monaco, F., Ognibene, G., & Risso, F. (2023). eBPF: A New Approach to Cloud-Native Observability, Networking and Security for Current (5G) and Future Mobile Networks (6G and Beyond). IEEE Access, 11, 57174–57202. doi:10.1109/ACCESS.2023.3281480
- van Stein, N., & Bäck, T. (2025). LLaMEA: A Large Language Model Evolutionary Algorithm for Automatically Generating Metaheuristics. IEEE Transactions on Evolutionary Computation, 29(2), 331–345. doi:10.1109/TEVC.2024.3497793
- Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, L., & Polosukhin, I. (2017). Attention Is All You Need. NeurIPS 2017, 30.
- Wagner, J.-S., DeCaprio, D., Muthu Raja, A. C., Holman, J. M., Brady, L. K., et al. (2024). CELI: Controller-Embedded Language Model Interactions. arXiv:2410.14627.
- Wang, H., Li, W., Zhang, J., & Ren, L. (2026). AI Control Scientist: LLM-driven Agentic System for Automated Control Design. arXiv:2608.26780.
- Xia, Y., Jazdi, N., Zhang, J., Shah, C., & Weyrich, M. (2024). Control Industrial Automation System with Large Language Model Agents. arXiv:2409.18009.
- Yuan, D., Deng, Y., & Chen, H. (2026). EmbedCopilot-Bench: Evaluating Vision-Language Models for Hardware-Aware Embedded System Development. ECCV 2026.
- Zhang, Z., Hu, Y., Chen, X., Jewell, G. W., & Li, H. (2021). A Review on Conductive Common-Mode EMI Suppression Methods in Inverter Fed Motor Drives. IEEE Access, 9, 18345–18360. doi:10.1109/ACCESS.2021.3054514