Free SKILL.md scraped from GitHub. Clone the repo or copy the file directly into your Claude Code skills directory.
npx versuz@latest install hiyenwong-ai-collection-collection-skills-hierarchical-control-abstractiongit clone https://github.com/hiyenwong/ai_collection.gitcp ai_collection/SKILL.MD ~/.claude/skills/hiyenwong-ai-collection-collection-skills-hierarchical-control-abstraction/SKILL.md--- name: hierarchical-control-abstraction description: "Hierarchical control design via approximate simulation relations (ε-gAAS). Enables abstraction-based controller synthesis for continuous-time nonlinear systems with formal error bounds and control refinement guarantees. Use when: (1) designing controllers for complex continuous-time systems via model abstraction, (2) needing formal guarantees that abstract controllers transfer to concrete systems, (3) working with simulation relations for control refinement, (4) building hierarchical control architectures with quantifiable approximation errors." --- # Hierarchical Control via Approximate Simulation Relations ## Overview Methodology for hierarchical controller synthesis using ε-generalized Approximate Alternating Simulation (ε-gAAS) relations. Enables designing controllers on simplified abstract models while guaranteeing performance bounds on the original concrete system. Based on: Huang et al., "Hierarchical Control for Continuous-time Systems via General Approximate Alternating Simulation Relations" (arXiv:2604.28108, 2026) ## Core Concept ### ε-gAAS Relation A relaxed simulation relation between abstract system Σ_a and concrete system Σ_c that: - Tolerates larger state mismatches (ε-bounded output divergence) - Supports alternating (game-like) transition matching - Provides formal guarantees: if controller C_a stabilizes Σ_a, refined controller C_c stabilizes Σ_c with bounded error ### Key Properties 1. **Transitivity**: ε-gAAS relations compose across abstraction layers 2. **Error Bounding**: Output divergence bounded by ε + accumulated refinement error 3. **Control Refinement**: Abstract controller → concrete controller via interface function ## Workflow ### Step 1: Construct Abstract Model Given concrete system Σ_c with dynamics f_c(x, u, d): - Choose abstraction granularity (state quantization, input discretization) - Build finite/discrete abstraction Σ_a with dynamics f_a(ξ, ν) - Ensure: for every transition in Σ_a, there exists matching trajectory in Σ_c within ε ### Step 2: Verify ε-gAAS Relation Check existence of relation R ⊆ X_c × X_a satisfying: - **Output closeness**: |h_c(x) - h_a(ξ)| ≤ ε for all (x, ξ) ∈ R - **Forward simulation**: ∀x ∈ X_c, ∀u_c, ∃ξ' ∈ X_a s.t. output matching holds - **Backward simulation**: ∀ξ ∈ X_a, ∀u_a, ∃x' ∈ X_c s.t. output matching holds ### Step 3: Synthesize Abstract Controller Design controller C_a for abstract system Σ_a: - Use formal methods (LTL, reachability, optimal control) - Leverage smaller state space of abstraction - Ensure specification satisfaction on Σ_a ### Step 4: Refine to Concrete Controller Construct interface function u_c = u_int(x, ξ, u_a): - Maps abstract control action u_a to concrete input u_c - Compensates for abstraction error - Guarantees: closed-loop Σ_c under C_c achieves specification within ε tolerance ## Implementation Patterns ### Pattern 1: Linearization-Based Abstraction ```python # For nonlinear system ẋ = f(x, u): # 1. Linearize around operating points # 2. Build piecewise-linear abstraction # 3. Compute ε from linearization error bounds ``` ### Pattern 2: Quantization-Based Abstraction ```python # 1. Quantize state space: X_a = quantize(X_c, η) # 2. Compute reachable sets for each abstract state # 3. ε = η + max reachable set diameter ``` ### Pattern 3: Data-Driven Abstraction ```python # 1. Collect trajectory data from concrete system # 2. Cluster states into abstract states # 3. Learn transition probabilities/relations # 4. Estimate ε from clustering residuals ``` ## Key Formulas ### Control Refinement Interface u_c(t) = u_a(t) + K(x(t) - ξ(t)) where K is a feedback gain ensuring convergence of the error dynamics. ### Error Bound |h_c(x(t)) - h_a(ξ(t))| ≤ ε + β(||x(0) - ξ(0)||, t) where β is a class-KL function from the Lyapunov analysis. ## Advantages Over Existing Methods | Aspect | Traditional ASR | ε-gAAS (this method) | |--------|----------------|---------------------| | Mismatch tolerance | Zero | ε-bounded | | Applicability | Restricted systems | General continuous-time | | Control refinement | Exact matching | Approximate with guarantees | | Scalability | Limited | Improved via relaxation | ## When to Use - **Use this method**: Complex nonlinear systems where exact simulation relations are too restrictive - **Avoid**: When exact specification satisfaction is required (no tolerance for ε) - **Alternative**: Consider standard ASR if ε = 0 is achievable ## Verification Steps 1. Verify ε-gAAS relation holds between abstraction layers 2. Validate abstract controller satisfies specification 3. Check refined controller maintains specification within ε 4. Run case studies to confirm error bounds ## Related Methods - Standard Approximate Simulation Relations (ASR) - Approximate Bisimulation - Control Lyapunov Functions - Formal synthesis via finite abstractions