Skip to content

Samizo-AITL/aitl-controller-a-type

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

289 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  Samizo-Lab AITL Controller (A-type)

Back to Portal (EN)

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 GitHub Pages EN GitHub Repo EN

๐Ÿ“ 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

AITL Full Demo Ideal

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)

Reliability metrics 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

๐Ÿ“Œ Item Details
Name Shinichi Samizo
Expertise Semiconductor devices (logic, memory, high-voltage mixed-signal)
Thin-film piezo actuators for inkjet systems
Printhead productization, BOM management, ISO training
GitHub GitHub

๐Ÿ“„ 8. License

Hybrid 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.

๐Ÿ’ฌ GitHub Discussions

About

AITL Controller: Hybrid three-layer control architecture combining PID, FSM, and LLM-based tuning. Includes demos, tests, and educational examples.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors