Hvac control

From XuShuwenn/RedAct · View interactive version

Hvac control is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Implement PID temperature controller for HVAC system to maintain 22.0C with specific performance requirements.

How to use this skill

Skill file

HVAC Temperature Controller

When to Use

Targets

Workflow

  1. Calibration: Run a fixed-power heater step test (commonly ~50% power) long enough to capture the thermal rise clearly; prefer 30+ seconds and enough samples for model fitting (dense logging such as ~20+ points minimum, more when feasible) → calibration_log.json
  2. Parameter Estimation: Fit thermal model (K, tau) → estimated_params.json
  1. Gain Tuning: Start from the identified first-order model and use a standard model-based rule (prefer IMC/lambda; PI is a strong default for first-order thermal plants) before doing manual retuning → tuned_gains.json
  2. Closed-loop Control: Run to 22.0°C → control_log.json + metrics.json
  1. Verification & Finalization: Confirm the control run finished end-to-end; inspect estimated_params.json, tuned_gains.json, control_log.json, and metrics.json directly; compare every item in Targets against observed values using the original task-specified metric definitions; if evaluation code appears inconsistent with the spec, change it only to restore exact alignment with the stated definitions, then rerun and cross-check settling time, overshoot, and steady-state error against the raw trajectory before trusting metrics.json; ensure control_log.json and metrics.json come from the same latest completed run; and only then report success or emit any exact runtime/task-specified completion token.

If any required metric fails, do not present the task as complete. Continue tuning and rerun, or explicitly report the unmet requirement.

If 2-3 retuning attempts produce the same failing pattern (especially settling time, oscillation, or noise-driven non-settling), stop sweeping one gain knob and change the design: add measurement filtering, strengthen anti-windup, or switch tuning/control structure. Do not keep retrying the same PI/PID form with only a new lambda or gain scale once the failure pattern is unchanged.

  1. Protocol + plant/task pre-flight: Before any tool use, extract any task-mandated action schema, command wrapper, turn-taking rule, allowed tools, and exact completion token/string. Use that interface verbatim for every step. Also read the simulator/model and configuration files before choosing identification or tuning logic; extract the governing thermal equation when available, plus timestep, ambient conditions, noise, safety limits, and setpoint so the controller matches the actual process assumptions.

Prefer one reproducible end-to-end entry point that performs calibration, parameter estimation, gain tuning, closed-loop control, metrics calculation, and all required JSON writes in sequence, while keeping phases logically separable for targeted reruns.

Execution Discipline

Execution Discipline

Model

First-order thermal system:

Output Files

Tips

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.