HFSS-AI · PLATFORM GUIDE · 9 CHAPTERS HFSS-AI · 平台技术手册 · 共 9 章

How HFSS-AI Handles Complex Antenna Modeling & Multi-Hour Optimization HFSS-AI 平台介绍:架构、防错机制与长程优化实践

This handbook covers how the platform is architected, how each safeguard keeps full-wave HFSS runs reliable across hours of iteration, how engineers collaborate through the Web Console, and detailed post-mortems of two complex antenna builds. 本手册按章节介绍 HFSS-AI 的四层架构、建模防错机制、命令行闭环、四种驱动方式,并结合 L 波段 8×8 圆极化阵列和 1–4 GHz 小型化 PCB 对数周期天线两个复杂项目,复盘长程自主优化的全过程。

CHAPTER 01

Why build a dedicated platform around HFSS为什么需要专门的 HFSS AI 平台

On a challenging antenna or microwave design, running the finite-element solver is only part of the work. Maintaining clean parametric 3D CAD, verifying port alignment and grounding, comparing dozens of candidates under consistent cut definitions, and remembering why a topology hit a physical ceiling hours earlier consume most of the design cycle. 在有难度的天线与微波器件研发中,单次有限元求解只占一部分时间,大量精力消耗在求解器外围:维护复杂三维参数化模型、核对端口与接地、按统一口径比对数十次仿真曲线,以及在数小时迭代后清楚记住之前每条路线的物理瓶颈。

Pointing an LLM directly at raw PyAEDT scripts runs into five recurring failure modes: 直接让大模型编写原生 PyAEDT 脚本,在复杂项目里往往会遇到五个反复出现的问题:

  • Silent CAD mistakes: inverted coordinates, floating metal sheets, or shorted probes that waste 15+ minutes of solver time before anyone notices.模型画错没拦住:坐标正负号写反、金属片悬空或馈针短路,进 HFSS 白算十几分钟看结果异常才发现。
  • Throwaway rebuilds: changing one dimension rewrites and recreates the entire model, discarding HFSS's solved variations and history.改尺寸就推倒重画:每改一个参数都删了重来,之前算好的 variation 缓存全丢,没法复用也没法回溯。
  • Long-run amnesia: once chat context compacts after an hour, the agent forgets earlier sweeps and loops back into ruled-out dead ends.长任务失忆:连续优化超过一两个小时,上下文一压缩,AI 容易反复回到早就否决过的参数区间。
  • Constraint drift: optimizing S11 while quietly exceeding board outlines, minimum trace widths, or port normalization rules.越界当最优:为了压低 S11 悄悄把外形扩超,或者开了端口重归一化,把不可行解报成“达标”。
  • Black-box execution: the engineer cannot see the 3D geometry or curves in real time without interrupting the remote AEDT desktop.过程不透明:脚本在终端黑盒里跑,工程师想看一眼模型就得去抢远程 HFSS 桌面窗口。
Core engineering principle核心思路 Reliable AI-assisted EM design depends on both model reasoning and disciplined tooling: offline geometry checks before solving, persistent file-backed memory across hours, explicit hard constraints, and isolated Design history for human review. 要让 AI 稳定完成复杂电磁设计,除了大模型本身的推理能力,关键在于平台提供四项基础保障:求解前先看懂模型、跨小时记得住规律、严格守住物理约束、完整留存全部历史模型供工程师核查。
CHAPTER 02

Four-layer decoupled architecture四层解耦架构

HFSS-AI separates human/agent interaction and task memory from the Windows AEDT compute workstation. Task state stays lightweight locally (laptop or WSL), while full-wave FEM solves execute on a multi-core AEDT server over SSH tunnel — or locally on a single machine when AEDT is installed on the same host. HFSS-AI 把“人机交互与任务记忆”和“Windows AEDT 重算力求解”解耦拆开。控制端与任务数据留在本地(笔记本或 WSL),重算力全波求解跑在多核仿真工作站上通过 SSH 隧道通信;单机装有 AEDT 时也可直接切为本地 Worker。

HFSS-AI four-layer architecture and seven-step loop Click to zoom点击放大
Left: four-layer separation from UI/CLI down to pluggable device packs. Right: the disciplined seven-step engineering loop. 左:从交互入口到器件工程包的四层解耦架构;右:七步自主研发闭环。
Repository layout (internal platform)tree
server.py            # Local web server + /agent task/AI API + /api proxy
hfss.py              # Unified CLI for external agents and engineers
agent/               # store.py · prompt.py (brief) · backends.py · report.py
ui/                  # Zero-dependency Web Console (3D, SVG plots, cards)
tasks/<task_name>/   # task.json · forms · exp · selfcheck · notes.md
remote/              # Synced to AEDT host via `python hfss.py deploy`
  worker.py          # Project-agnostic PyAEDT gRPC service + job engine
  core.py            # Setup, sweep, S-param/pattern extraction, contracts
  actions/           # Cross-project actions (run_case, sweep, optimize...)
  projects/<device>/ # project.json + designs/<Name>.py + device actions/
  • Project-agnostic resident worker: adding a new antenna means adding a folder under remote/projects/ and running python hfss.py deploy — no worker rewrite or restart.项目无关的常驻 Worker:换新器件只需在 remote/projects/ 新建工程目录并执行 python hfss.py deploy 增量同步和热重载,无需修改或重启 worker.py。
  • Isolated from your personal AEDT projects: the worker uses its own gRPC port (e.g. 50060) and dedicated working .aedt path, never colliding with your open GUI designs.与个人工程物理隔离:Worker 运行在独立 gRPC 端口与专用工作目录 .aedt 上,不干扰工程师日常打开的参考工程。
  • Four action scopes: scripts live in core (cross-project), project (device physics adapters), task (single-task experiments), or scratch (one-off checks, unregistered).脚本四级作用域:按 core(跨项目通用)→ project(器件物理适配)→ task(单任务专用)→ scratch(一次性诊断,不入库)分层管理。
CHAPTER 03

Four core safeguards in the kernel内核里的四项防错硬机制

These checks are enforced in code rather than left to prompt instructions: 以下四项机制由平台代码强制执行,不依赖大模型“自觉记住”:

1. Single-source parametric files (designs/<Name>.py)1. 单文件双模式(designs/<Name>.py)

Every geometry coordinate is written as a symbolic expression referencing design variables or prior part bounds (such as Ridge0.z0). Before starting AEDT, the dry-run engine evaluates the file in milliseconds to output part coordinates, Web 3D primitives, a physical contact graph, probe DC continuity checks, and explicit EXPECT assertions. During actual modeling, the same expressions compile straight into native HFSS design variables. 每个候选拓扑对应一个独立脚本,所有坐标一律写作符号表达式(支持引用变量或前置零件边界如 Ridge0.z0)。不启动 AEDT 时,干跑引擎毫秒级算出零件精确坐标、网页 3D 图元、物理接触关系图、探针直流通路(检查是否悬空或短路)以及 EXPECT 断言;送进 HFSS 时,同一套表达式直接编译成 HFSS 原生变量表达式。

2. Structural hashing & non-destructive isolation (<Name>_<rev>)2. 结构指纹与版本隔离(<Name>_<rev>)

The platform hashes the modeling code into a short revision tag <rev>. Updating dimensions keeps the hash unchanged, modifies HFSS variables in place, and reuses cached variations. Changing the topology changes the hash and creates a new HFSS Design in the same .aedt file, leaving every earlier topology untouched. 系统对建模代码计算结构指纹 <rev>。仅调尺寸时指纹不变,直接在原 Design 里改变量并自动复用已算缓存;一旦改了结构拓扑,指纹更新并派生新 HFSS Design,旧 Design 和历史仿真解原封不动保留。

3. Mandatory pre-solve gate (look + selfcheck)3. 求解前硬门禁(look + selfcheck)

Whenever a new structural hash appears, run_case, sweep, and optimize block execution until the agent runs look, inspects the generated _look.png drawing, and submits a written selfcheck verifying the geometry against user requirements. Dimension sweeps on an already checked topology proceed normally. 凡是出现新结构指纹,在 AI 跑完 look、看过 _look.png 零件图并提交书面 selfcheck 之前,run_case、sweep 和 optimize 均会被系统拦截;已经核对过的结构只调尺寸则不再拦截。

4. Explicit metric contracts & feasibility separation4. 显式口径与可行解隔离

Every metric declares its frequency band, cut plane, angular window, and normalization rule. Parameter bounds and engineering limits (tagged with source=user|ai|project) form hard constraints. Rankings strictly separate best_feasible from best_theoretical, and raw S-parameter/pattern files are archived with SHA-256 hashes. 每项指标显式声明频段、切面、角度范围与归一化规则;参数上下限和用户/AI 登记的物理限制自动构成硬约束。排行榜把约束内最佳与越界理论最佳严格分开,原始曲线按 SHA-256 校验存盘。

CHAPTER 04

Seven-step loop & core CLI commands七步工程闭环与常用 CLI 命令

All HFSS-AI operations — whether invoked by an external coding agent or the built-in console backend — share one compact CLI interface: 无论是外部 Agent 还是网页内置后端,所有仿真与管理操作都统一收口到精简的 hfss.py 命令集:

Core hfss.py workflowsh
# 1. Restore full engineering context (targets, constraints, form trends, notes)
python hfss.py brief
python hfss.py exp show

# 2. Register a new topology form & experiment hypothesis
python hfss.py form add "43.8 deg Forward-Swept V LPDA" --define "geo=LPDA_SweptV13" --use
python hfss.py exp new "Unfold first dipole inside 90mm width" --hyp "Sweeping arms 43.8 deg restores 59.3 mm arm length"

# 3. Sync parametric designs/*.py to the AEDT worker (hot reload)
python hfss.py deploy

# 4. Offline dry-run & mandatory self-check before solving
python hfss.py look geo=LPDA_SweptV13
python hfss.py selfcheck "13-element swept-V, 89.5x104.5mm FR4, coax port + end shorting via verified" geo=LPDA_SweptV13

# 5. Parametric solve, 1D sweep, or resumable batch study
python hfss.py run run_case geo=LPDA_SweptV13 label=f14_init
python hfss.py sweep d_via 2.0,3.5,5.0 geo=LPDA_SweptV13
python hfss.py study run recipe.json

# 6. Compare runs, inspect far-field metrics, close experiment & export report
python hfss.py show id1 id2 --plot
python hfss.py pattern analyze <result_id> --metric SLL
python hfss.py exp close --summary "61/61 points pass 1.0-4.2 GHz, worst S11 = -10.01 dB"
python hfss.py report
CHAPTER 05

Web Console & human-in-the-loop review网页控制台与人机协同

During multi-hour optimization runs, engineers can inspect live progress directly in the browser without logging into the simulation server: 在 AI 连续数小时建模和优化期间,工程师无需登录仿真服务器,打开浏览器控制台即可实时查看全部进展:

  • Interactive 3D + HFSS renders: inspect parametric primitives locally (updates instantly when variables change) or switch to off-screen isometric/top/front/right renders exported from HFSS.交互 3D 与 HFSS 实景视图:本地旋转缩放参数化 3D 预览(改参数秒级刷新),也可一键切换查看 HFSS 离屏导出的等轴/正/俯/右四视角实景图。
  • Per-topology Design cards: filter 3D models, overlaid S-parameter runs, constraints, and single-variable sensitivity tables by candidate topology.设计对象卡片:按候选结构筛选查看 3D 模型、历次曲线叠加、约束条件与单变量敏感度趋势表,支持跨拓扑最佳曲线叠图比对。
  • Manual runs sync to AI context: clicking Solve in the browser logs the run directly into the task timeline so the agent sees your result on its next turn.手动操作同步写进任务:在网页上手动改参点按钮试算,结果会自动写入当前任务对话,AI 下一轮立刻感知并承接优化。
Design Object Center in HFSS-AI Click to zoom点击放大
Design Object view for F22 (Ku-band machinable stepped-ridge transition, −16.77 dB worst S11 across 48 runs), showing 3D primitives, overlaid S11/S21, constraints, and parameter sensitivity rankings. 设计对象页实景(Ku 波段 F22 可加工单件阶梯脊,48 条算例,最差 S11 = −16.77 dB):集中呈现 3D 模型、曲线叠加、约束与参数敏感度排序。
CHAPTER 06

Four ways to drive the platform四种驱动方式与适用场景

Task state and solver execution live beneath the interface layer, so teams can choose whichever driver fits the job and switch mid-project with zero data loss: 任务状态与求解执行都沉淀在平台底层,上层可以根据项目复杂度和个人习惯任选驱动方式,同一项目中途切换也完全同步:

Driver Mode驱动方式 How It Connects接入机制 Strengths主要优势 Best Fit适用场景
1. External AI IDE / Agent1. 外部 AI IDE / Agent Antigravity, Claude Code, Codex, etc. edit designs/*.py and call hfss.pyAntigravity、Claude Code 等直接读写设计文件并调 hfss.py Strongest multimodal vision & synthesis: reads PDFs, inspects renders, runs local ABCD/de-embedding scripts, writes reports复杂建模与物理分析最强:能看论文图、审模型图、跑本地去嵌综合并直接输出技术报告 From-scratch complex arrays, novel topologies, multi-hour runs从 0 到 1 的复杂新结构、文献复现、长程攻坚
2. Built-in Web Chat2. 网页内嵌对话 Browser sidebar backed by DeepSeek Harness ACP, Claude Code CLI, or APIs / Ollama浏览器右侧直接对话,后台接 ACP 持久会话、CLI 或兼容 API Zero terminal friction; rotate 3D models while chatting; swap models without losing task history零命令行门槛,边转 3D 边调参;随时换模型不影响任务记录 Routine tuning on established templates, GUI-first RF engineers成熟工程模板日常调参、快速指标复核
3. Harness Plugin3. Harness 宿主插件 dsh-plugin embeds HFSS-AI inside DeepSeek Harness Web with structured tools通过 dsh-plugin 嵌进 DSH 侧栏,走 hfss_context / hfss_cli Clean structured tool args (no shell quoting bugs), bounded logs, centralized team audit trail自动处理路径编码与有界日志,避免 Shell 引号转义问题,权限留痕统一 Team-wide managed Agent platforms & scheduled batch studies团队统一 Agent 底座、批量研究编排
4. Manual + AI Hybrid4. 人工可视化混跑 Click parameters / Run in Web UI or run CLI sweeps directly随时在网页改参数点按钮求解,或在终端手动跑扫参 Zero lock-in; test physical intuition instantly and hand results straight back to the AI随时接管验证物理直觉,结果自动写回任务时间线,AI 下一轮无缝承接 Boundary sanity checks, live design reviews关键边界把关、方案评审现场演示
Recommended workflow for complex antennas复杂项目的常用协同模式 Both flagship case studies in Chapter 07 ran in an "AI IDE drives the multi-hour optimization + Engineer monitors 3D models and curves live in the Web Console" setup. The engineer only stepped in at key business pivots (such as adding the 6.2 kg mass/cost constraint on the L-band array). 第 07 章的两个复杂项目,都采用了“Antigravity 驱动数小时自主建模与优化 + 工程师随时在 HFSS-AI 网页端查看 3D 模型、曲线趋势与设计卡片”的协同方式——高频迭代交给 AI,遇到重量/成本约束等关键决策时人再介入拍板。
CHAPTER 07

Two multi-hour flagship case studies两大长程复杂项目复盘

Across these two builds combined, HFSS-AI logged 13.09 hours of continuous design runtime, 141 completed remote HFSS jobs, and 24 isolated parametric Designs — including a 6.04-hour unattended autonomous run and 15.4-minute single full-wave solves with zero disconnects or overwritten models. 这两个项目合计连续运行 13.09 小时、完成 141 次远端 HFSS 全波作业、在工程中完整留存 24 个独立参数化 Design,其中最长单次无人值守连续运行 6.04 小时,单次 64 单元整阵全波求解耗时 15.4 分钟,全程零断连、零覆写。

Case A · L-Band 8×8 LHCP Satellite Terminal Array (6.62 h, 2 generations)项目一 · L 波段 8×8 圆极化卫星终端阵列(6.62 小时,两代演进)

After Generation 1 (single-layer 6 mm RT/duroid 5880, 4.40 h) validated the dual-sequential-rotation architecture but exceeded weight and panel cost targets, the customer requested a ≤ 6.2 kg low-cost build inspired by stamped aluminum patches. In 2.22 h, the agent built and verified Plan B: 64 stamped 1.0 mm aluminum parasitic patches on central M4 grounding studs, a 6.5 mm air gap, a 1.0 mm domestic F4BM220 proximity-coupled sequential-rotation feed network, and a rear IEC 61169-16 50 Ω Type-N air coaxial port. By extracting HFSS Zin(f), de-embedding the feed line, and running ABCD synthesis before each scaling step, the full 64-element coax-fed array passed every spec on its first full-wave solve. 第一代单层 6 mm RT5880 方案(耗时 4.40 小时)验证了双级顺序旋转架构,但重量与板材成本超标。客户追加 ≤ 6.2 kg 减重和冲压铝片降本要求后,仅用 2.22 小时即完成方案 B的四阶段重构:64 块 1.0 mm 冲压铝片中心 M4 螺柱锁地 + 6.5 mm 空气层 + 1.0 mm 国产薄板近场耦合双级顺序旋转馈网 + 背面标准 N 型空气同轴。每扩展一级均结合 HFSS 复阻抗提取去嵌与 ABCD 综合再回写模型,最终含 N 型同轴的 64 单元整阵一次全波仿真全指标通过。

L-band 8x8 four-stage scaling Click to zoom点击放大
L-band 8x8 full-wave simulation results Click to zoom点击放大

Case B · 1–4 GHz Ultra-Compact PCB LPDA (6.47 h, 14 topologies F1–F14)项目二 · 1–4 GHz 极小型化 PCB 对数周期天线(6.47 小时,14 轮拓扑)

Fitting a 1.0 GHz half-wave dipole (~59.3 mm arm on 1.6 mm FR4) inside a strict 90 × 105 mm trapezoid compresses perpendicular arms by >27%. Over a 6.04-hour unattended loop, the agent evaluated 13 conventional vertical miniaturization designs (F1–F13: L-bends, T-hats, C-hooks, high-Z λ/4 meander stubs, 16 via offsets) and proved a −8.90 dB seesaw ceiling between 1.0 GHz resonance and the 1.4 GHz transition mismatch. Abandoning local bends, F14 swept all 13 dipole pairs forward by 43.83° in a strict self-similar V geometry (89.5 × 104.5 mm), unfolding the first dipole to 59.33 mm straight length and passing 61/61 points from 1.00 to 4.20 GHz (worst S11 = −10.01 dB). When the client later asked for proof that vertical layouts could not meet spec, all 13 earlier HFSS Designs were still intact in the project and were batch-exported into a limit-analysis report in under 30 minutes. 在 1.6 mm FR4 上,1.0 GHz 半波偶极子单臂需约 59.3 mm,而 90 × 105 mm 梯形外廓将传统垂直振子压缩至 43 mm 以内。在 6.04 小时无人值守探索中,AI 依次构建了 F1–F13 共 13 种传统垂直小型化结构(L 折弯、T 帽、C 折钩、高阻 λ/4 弯折短截线及 16 组过孔位置),清楚锁定了 −8.90 dB 的物理跷跷板极限。第 14 轮放弃局部折弯,改用全直臂 43.83° 前掠 V 形严格自相似构型,在 89.5 × 104.5 mm 内将首振子自然展开至 59.33 mm,实现 1.00–4.20 GHz 61/61 频点全部 ≤ −10.01 dB。客户随后询问“传统垂直结构为何无法达标”,因 F1–F13 的 13 个真实 HFSS Design 与曲线原样留存,半小时内即批量导图交付了完整的极限分析报告。

LPDA F1-F14 topology grid Click to zoom点击放大
LPDA F14 full-band simulation performance Click to zoom点击放大
CHAPTER 08

When to use PyAEDT, MCP, or HFSS-AIPyAEDT、MCP 与 HFSS-AI 的能力边界

  • Use raw PyAEDT directly when writing a one-off custom physics script, a research solver hook, or lower-level actions inside a platform like HFSS-AI.直接使用原生 PyAEDT:适合编写高度定制的底层物理脚本、一次性科研算法验证,或作为平台底层驱动实现。
  • Use a thin MCP server for short, stateless read queries — or as an outer adapter exposing 8–10 high-level HFSS-AI commands rather than 100 atomic CAD primitives.使用轻量 MCP:适合低频、短耗时、单步查询类工具,或作为 HFSS-AI 最外层的薄协议适配器(只暴露少量高内聚命令,而不把底层画图 API 逐个暴露)。
  • Use HFSS-AI when an antenna or RF component must progress from specs to a reviewable deliverable across hours of iteration, multiple candidate topologies, strict physical limits, and human sign-off.使用 HFSS-AI:适合从真实指标出发、历时数小时至数天、跨越多轮拓扑迭代、严守尺寸工艺限制并需要留痕供人复查的完整电磁设计项目。
CHAPTER 09

Current status & trial request当前进度与试用申请

Working reliably today: single-device and multi-stage array modeling, offline look + selfcheck gates, non-destructive Design versioning, 6-hour resumable optimization, explicit far-field & S-parameter contracts, and multi-backend AI drivers. 目前已经稳定跑通:单器件到大型多级阵列的建模与全波求解、离线 look + selfcheck 核验门禁、按拓扑隔离的 Design 版本管理、6 小时级断点续跑、显式远场与 S 参数口径,以及多 AI 入口接入。

In active development: higher-level planar PCB geometry primitives, automated tolerance/yield sweeps, reverse-parsing existing complex .aedt assemblies, multi-worker parallel task scheduling, and external deployment packaging. 正在继续完善:更丰富的平面 PCB 几何原语、自动化公差扫描流程、已有复杂 .aedt 工程的逆向解析、多 Worker 并行调度,以及面向外部部署的安装打包。

Submit an antenna requirement for a free trial提交真实天线需求,申请免费试用 Email your frequency band, RF specs, physical constraints, and any reference papers to woodybuendia@gmail.com (limited to 1 free trial per person — please use a university/company email or include a GitHub/Google Scholar/ORCID/LinkedIn link). Copy the ready-made email template on the Overview Trial section →. 欢迎将频段、技术指标、约束与参考资料发送至 woodybuendia@gmail.com(每人限免费试用 1 次,请尽量使用高校/单位邮箱或在正文中附 GitHub / Google Scholar / ORCID / LinkedIn 链接)。可前往 首页试用申请区直接复制邮件模板 →。