๐ง Samizo-Lab AITL Controller (A-type)
A lightweight educational implementation of the
AITL layered control architecture,
designed to clearly distinguish:
- โ๏ธ runtime control responsibility
- ๐ง design-time intelligence
Inner Loop : PID Controller
Middle Loop: FSM (Finite State Machine, Safety & Mode Supervision)
Adaptive Assist Layer: NN / RL (bounded, runtime optional)
LLM: Offline / Non-Real-Time Design Assistant (A-type)
๐ Links
| Language | GitHub Pages ๐ | GitHub ๐ป |
|---|---|---|
| ๐บ๐ธ English |
๐ Official Architecture Definition & Reliability Boundary of AITL Controller (A-Type)
This page defines the design rationale, operating assumptions,
and verified reliability limits of the AITL architecture.
โ ๏ธ Important Architectural Clarification
In practical runtime systems, the valid control configurations are:
- โ PID ร FSM
- โ PID ร FSM ร NN / RL (bounded)
โ LLM is never placed inside the real-time control loop
LLM is used exclusively outside real-time operation for:
- analysis
- design review
- architecture exploration
- documentation and explanation
๐ฏ Project Intent
This project demonstrates a clear and modular control-design methodology,
not the pursuit of:
- maximum performance
- autonomous intelligence
- black-box optimization
Instead, the emphasis is on:
- ๐งฉ architectural clarity
- ๐ก safety and determinism
- ๐ explicit responsibility separation
- ๐ง human-verifiable control logic
๐ AITL (A-type) Design Philosophy
- PID handles continuous physical dynamics
- FSM governs discrete safety and mode transitions
- NN / RL may assist within bounded, supervised domains
- LLM supports design-time reasoning only
Intelligence is layered โ
but responsibility is never ambiguous.
This controller is intended as a reference architecture,
suitable for:
- education
- architectural discussion
- early-stage system design
- safety-oriented control thinking
It is not intended as a drop-in production controller,
nor as a demonstration of autonomous AI control.
๐ Demo Result โ AITL Full Demo (Ideal / Conceptual)
This figure is generated by:
demos/05_aitl_full_demo.py
โถ Full AITL Ideal Output

Note
This demo visualizes the conceptual integration of the AITL architecture
under ideal conditions and does not imply that all components
operate simultaneously in real time.
๐ Technical Document (PDF)
๐ aitl-controller-a-type.pdf
๐งฑ 1. Project Structure
AITL-CONTROLLER-A-TYPE/
โ
โโโ src/
โ โโโ controllers/
โ โ โโโ pid.py
โ โ โโโ fsm.py
โ โ โโโ hybrid.py
โ โ
โ โโโ models/
โ โ โโโ llm.py
โ โ
โ โโโ core/
โ โโโ base.py
โ
โโโ demos/
โ โโโ 01_pid_step_response.py
โ โโโ 02_fsm_mode_switch.py
โ โโโ 03_hybrid_pid_fsm_demo.py
โ โโโ 04_hybrid_fsm_llm_demo.py
โ โโโ 05_aitl_full_demo.py
โ โ
โ โโโ 12_vi_current_control_sales_demo.py
โ โ โโ VโI current control comparison under aging & disturbance
โ โโโ 13_aging_sweep_delta_t.py
โ โ โโ reliability metrics sweep (ฮt, max|e| vs aging)
โ โโโ 15_fsm_explainability_demo.py
โ โโ FSM explainability & audit-ready transition rationale
โ
โโโ data/
โ โโโ aitl_full_demo_ideal.png
โ โโโ aitl_full_demo_ideal.pdf
โ โ
โ โโโ 12_vi_current_control_sales_demo.png
โ โ โโ waveform comparison (Fixed PID / PIDรFSM / AITL)
โ โโโ 13_aging_sweep_delta_t.png
โ โ โโ quantitative reliability & safety metrics
โ โโโ 15_fsm_explainability_demo.png
โ โโ explainable FSM mode switching visualization
โ
โโโ tests/
โ
โโโ paper.pdf
โโโ README.md
โ๏ธ 2. AITL Architecture Overview
๐ 2.1 PID Layer
- โฑ๏ธ variable sampling period
dt - ๐ integral & derivative reset
- ๐๏ธ normal / high-response gain profiles
Role:
๐ก๏ธ Provides deterministic stability and baseline performance in real time.
๐ 2.2 FSM Layer
Switching logic:
normal โ high (if |error| > threshold_high)
high โ normal (if |error| < threshold_low)
๐งฉ Provides explainable and auditable control-mode transitions.
Role:
- ๐งฏ supervises safety and mode selection
- ๐ฆ gates whether adaptive assistance is permitted
- โฉ๏ธ provides explicit fallback behavior
๐ง 2.3 Adaptive Assist Layer (NN / RL, A-type)
- ๐ applies a bounded assist term under FSM supervision
- โก improves recovery timing only within a verified operating region
- ๐ educational and reproducible
(not a claim of universal optimality)
โ ๏ธ Note (Runtime Validity):
The recommended runtime configurations are
PID ร FSM and PID ร FSM ร NN/RL (bounded).
๐งพ 2.4 LLM (Offline Design Assistant, A-type)
- ๐ด used exclusively outside the real-time control loop
- ๐ supports log analysis, design review, and documentation
- ๐ ๏ธ may propose parameter updates, but does not execute control actions in real time
๐ซ Strict prohibitions:
- โ no real-time I/O
- โ no direct gain injection during runtime
- โ no FSM state or transition control
๐ฎ 3. Included Demos
| Script | Description |
|---|---|
01_pid_step_response.py |
Basic PID response (baseline behavior) |
02_fsm_mode_switch.py |
FSM threshold-based mode switching |
03_hybrid_pid_fsm_demo.py |
PID ร FSM hybrid control (runtime reference) |
04_hybrid_fsm_llm_demo.py |
Offline design-support demo (LLM is not in the real-time loop) |
05_aitl_full_demo.py |
Conceptual AITL integration demo (ideal condition visualization) |
| ย | ย |
12_vi_current_control_sales_demo.py |
VโI current control comparison under aging & disturbance (Fixed PID / PID ร FSM / AITL) |
13_aging_sweep_delta_t.py |
Reliability metrics sweep vs aging (ฮt, max e) |
15_fsm_explainability_demo.py |
FSM explainability demo (why and when modes switched) |
Note:
Demos 12, 13, and 15 provide quantitative and explainable evidence
supporting reliability-related design conclusions.
๐ 4. Running the Main Demo
cd demos
python 05_aitl_full_demo.py
Output:
../data/aitl_full_demo_ideal.png
๐ 5. Educational Value
- ๐งฑ emphasizes architecture over tuning
- ๐ interpretable and FSM-supervised adaptive behavior
- ๐ visual understanding of mode switching and intervention
- ๐ suitable for teaching materials and research prototypes with auditability
๐ง 6. Future Plans (Clarified)
- B-Type AITL (reliability permission layer)
- ๐ง advanced FSM with multi-modes / hysteresis
- ๐ nonlinear plants
- ๐ฏ RL-based bounded adaptive tuning (ฮต-term, FSM-supervised)
- ๐งฉ integration with AITL-H system
Note (Scope Clarification):
LLM is not planned as a self-optimizing runtime controller.
Any use of LLM is restricted to offline analysis, design review, and documentation.
๐ Reliability Investigation โ Plant Aging
Purpose (Normative):
This investigation provides design evidence to identify
the operational reliability boundary of A-Type.
It does not modify runtime control authority.
Beyond ideal conditions, the AITL controller was evaluated under
severe long-term plant degradation, modeled as
friction aging equivalent to 1000 days.
The objective of this investigation is not to claim superiority,
but to identify the operational boundary of adaptive control.
The primary focus is temporal reliability:
- โฑ๏ธ recovery timing consistency (ฮt)
- ๐ degradation detectability
- ๐ซ explicit criteria for when adaptation must be restricted
Representative Result โ Aging Sweep (ฮt vs Aging)

Interpretation (Design-Relevant, Not Marketing)
This result demonstrates that:
- ๐ all controllers degrade as plant aging progresses
- ๐ AITL improves recovery timing only within a limited aging range
- โ beyond that range, continued adaptation does not preserve temporal reliability
- ๐ the degradation trend is explicitly measurable via ฮt
Crucially, this means:
AITL is effective only within a clearly identifiable operating region.
Outside that region, adaptation must be restricted or stopped by design.
Why This Result Matters
This analysis does not argue that AITL is universally better.
Instead, it establishes that:
- ๐งญ adaptive control has a finite, observable reliability boundary
- ๐จ that boundary can be detected before instability or failure
- ๐งฎ ฮt serves as a design-time and run-time decision metric
In other words, the result answers:
โUntil when is AITL safe to use?โ
โnot merely โDoes it work?โ
Design Implication
This finding directly motivates a reliability-first extension:
- A-Type: demonstrates adaptive capability
- B-Type: decides whether adaptation should be allowed
The reliability investigation provides the evidence layer
that makes B-Type a necessary architectural evolution,
not a conceptual add-on.
Further Details
Detailed waveforms, quantitative metrics, and explainable supervisory logic
are documented separately.
๐ Full reliability analysis (reproducible evidence):
One-Line Summary
AITL is not always beneficial โ and that fact is measurable.
This investigation identifies the operating region
where adaptive control should be applied โ and where it should not.
๐ข B-Type: Reliability-First AITL (Design Extension)
The A-Type results demonstrate that adaptive control has a finite reliability boundary.
Beyond a certain aging or degradation range, continued adaptation may degrade
temporal reliability (ฮt) rather than improve performance.
B-Type is a design extension that transforms this empirical boundary into an explicit operational rule by introducing a dedicated reliability permission layer.
What B-Type Adds (Conceptual)
B-Type does not aim to maximize performance.
Instead, it determines whether adaptation is permitted based on
monitored reliability conditions.
Typical monitored quantities include:
- โฑ๏ธ ฮt: recovery time / temporal reliability
- ๐ maxโeโ: safety envelope (worst-case deviation)
- ๐๏ธ โฮKpโ or dKp/dt: adaptation aggressiveness (stability risk)
Core Idea
A-Type proves adaptation capability.
B-Type enforces adaptation responsibility.
Adaptive tuning is enabled only when reliability metrics satisfy design-time acceptance criteria. If these conditions are violated, the system restricts adaptation and falls back to a conservative operating mode (e.g., fixed-gain PID control).
๐ B-Type Design Documentation (architecture & guard logic)
โ docs/b_type/
๐ก๏ธ True Robust Control โ Operating Robustness as a Design Process
While A-Type demonstrates adaptive capability
and B-Type enforces reliability and responsibility,
True Robust Control addresses a deeper question:
How should robustness itself be operated
before theoretical guarantees collapse?
This theme extends the AITL framework by treating robustness
not as a fixed design result, but as an operational capability.
What Is Added Beyond A-Type and B-Type
True Robust Control introduces the following design concepts:
- ๐ Uncertainty ฮ as an observable state, not a static worst-case bound
- ๐ก Frequency-aware interpretation of degradation
- low-frequency: performance degradation
- high-frequency: stability margin loss
- input-side: actuator stress and saturation
- ๐ Proactive intervention before robustness guarantees collapse
- ๐งฎ Selective redesign of robustness weight functions
- \(W_s\): performance demand
- \(W_t\): robustness margin
- \(W_u\): actuator protection
- ๐งฑ Strict role separation
- FSM decides when to intervene
- LLM decides which design lever to move (offline only)
- Controllers execute safely without reasoning
Position Within the AITL Framework
| Layer | Primary Role |
|---|---|
| A-Type | Demonstrates adaptive capability |
| B-Type | Restricts adaptation for reliability |
| True Robust Control | Operates robustness as a dynamic design process |
A-Type asks: Can the system adapt?
B-Type asks: Should the system adapt?
True Robust Control asks: How should robustness be operated?
These layers are complementary, not competing.
Documentation
๐ True Robust Control โ Design Documentation
โ docs/true_robust_control/
This section is recommended when:
- Hโ control feels too static or overly conservative
- plant degradation evolves over time
- robustness decisions must be explainable and auditable
- design intervention must occur before instability
๐ค 7.ใAuthor
๐ 8. License
| ๐ Item | License | Description |
|---|---|---|
| Source Code | MIT License | Free to use, modify, and redistribute |
| Text Materials | CC BY 4.0 or CC BY-SA 4.0 | Attribution required; share-alike applies for BY-SA |
| Figures & Diagrams | CC BY-NC 4.0 | Non-commercial use only |
| External References | Follow the original license | Cite the original source properly |
๐ฌ 9.ใFeedback
Suggestions, improvements, and discussions are welcome via GitHub Discussions.