Content is user-generated and unverified.

健康照護科技(一)— 課程資源彙整

Healthcare Technology (1) — Course Resource Summary

RF IC Design Optimization — LNA cf: Apple C1 Transceiver Architecture · 3.5 GHz LNA · N7

本週習題輔助資料(3/26 週四) Supplementary materials for this week's exercises (Thu 3/26)


Link 1 — 在 Claude VM 中執行 Ngspice / Running Ngspice in Claude VM

來源 Source: https://claude.ai/public/artifacts/51eb7122-afd1-498e-8dcf-83a3834d5f23

標題 Title: 為什麼我們不能直接跑 Spectre? / Why Can't We Just Run Spectre? 副標題 Subtitle: Claude VM 中的 Cadence Spectre vs ngspice — 以及為什麼在 Sub-6 GHz Cascode LNA 需要 Spectre + PDK 才能獲得準確結果 / Cadence Spectre vs ngspice in the Claude VM — and why Spectre + PDK is required for accurate Cascode LNA results at Sub-6 GHz 標籤 Tags: TSMC N7/N4 · 5 GHz target · ngspice-42 used

Slide 01 — 環境:Spectre 在 Claude VM 中不可用 / Environment: Spectre Is Not Available in the Claude VM

❌ Cadence Spectre:

  • 需要授權(每個席位 $50K–$500K/年)/ License required ($50K–$500K/yr per seat)
  • 需要 RHEL/CentOS + lmgrd 授權伺服器 / Requires RHEL/CentOS + lmgrd license daemon
  • PDK 受 NDA 保護(TSMC、Samsung…)/ PDK dependency under NDA (TSMC, Samsung…)
  • 需要 Cadence Virtuoso 完整 EDA 環境 / Requires Cadence Virtuoso full EDA stack
  • 授權伺服器必須可連線(VM 是隔離的)/ License server must be reachable (VM is isolated)

✅ ngspice-42(本次使用):

  • 開源 BSD/LGPL / Open source BSD/LGPL
  • 已預裝於 Claude VM:/usr/bin/ngspice / Pre-installed in Claude VM at /usr/bin/ngspice
  • 無需授權 / No license needed
  • 支援 BSIM4 通用 MOSFET 模型 / Supports BSIM4 generic MOSFET models
  • 快速批次模式 / Fast batch mode

Slide 02 — ngspice 給了我們什麼:模擬結果 / What ngspice Gave Us: Simulation Results

DC 結果(合理)/ DC Results (reasonable):

參數 Parameter數值 Value目標 Target狀態 Status
M1 汲極電流 Drain Current M17.95 mA5–15 mA
M1 的 gm45.9 mS高 gm → 高增益潛力 High gm → high gain potential
DC 功耗 DC Power7.2 mW5–15 mW

RF 結果(錯誤)/ RF Results (wrong):

參數 Parameter數值 Value目標 Target狀態 Status
S₂₁ @ 5 GHz+1.6 dB15–20 dB
S₁₁ @ 5 GHz−0.2 dB< −10 dB
NF @ 5 GHz90 dB0.8–1.5 dB

結論 Conclusion: DC 偏壓合理。RF 性能錯誤不是因為電路壞了,而是因為通用 BSIM4 模型不匹配真實 TSMC N7 元件物理特性。/ DC bias is reasonable. RF performance is wrong not because the circuit is broken, but because the generic BSIM4 model does not match real TSMC N7 device physics.

Slide 03 — 模型精度:通用 BSIM4 vs 校準 PDK 模型 / Model Accuracy: Generic BSIM4 vs Calibrated PDK Model

參數 Parameter通用 BSIM4 (ngspice)TSMC N7 PDK (Spectre)對 LNA 的影響 Impact on LNA
每指 Cgs / Cgs per finger~90 fF(高估)(over-estimated)~30 fF(FinFET 鰭片)(FinFET fins)ωT × Ls >> 50 Ω → S₁₁ 錯誤 wrong
偏壓點 fT / fT at bias~900 GHz(不真實)(unrealistic)~180 GHz(量測值)(measured)增益與匹配偏差 10× / Gain & matching off by 10×
Rds(輸出)/ Rds (output)CLM 建模不足 Under-modelled CLM校準 DIBL + CLM / Calibrated DIBL + CLM增益和穩定性錯誤 / Gain and stability wrong
熱雜訊 γ / Noise γ (thermal)預設 γ = 2/3 / Default γ = 2/3短通道 γ ≈ 1.3–2.0 / Short-channel γ ≈ 1.3–2.0NF 低估 3–6 dB / NF under-estimated by 3–6 dB
閘極電阻 Rg / Gate resistance Rg未包含 (rgatemod=0) / Not included每指 Rg (NQS) / Per-finger Rg (NQS)NF 由缺失的 Rg 主導 / NF dominated by Rg missing
寄生電容(佈局)/ Parasitic C (layout)理想——無 RC 萃取 / Ideal — no RC extraction由 GDS 進行 PEX 萃取 / PEX-extracted from GDS諧振偏移、頻寬變窄 / Resonance shifts, BW narrows
電感模型 / Inductor model理想 L + 串聯 R / Ideal L + series R onlyEM 模擬 π 模型 (Sonnet) / EM-simulated π-model (Sonnet)Q、SRF、趨膚效應缺失 / Q, SRF, skin effect missing

Slide 04 — 根因分析:RF 結果不準確的三個根本原因 / Root Cause Analysis: Three Root Causes of Inaccurate RF Results

① 輸入匹配失敗——ωT 錯誤 / Input match broken — wrong ωT

Re{Zin} = ωT · Ls = 50 Ω,其中 ωT = gm / Cgs。通用 BSIM4 高估 Cgs(90 fF vs 真實 N7 FinFET 的 30 fF)→ ωT ≈ 900 GHz 而非 180 GHz → Re{Zin} ≈ 2700 Ω → S₁₁ ≈ 0 dB。/ Re{Zin} = ωT · Ls = 50 Ω, where ωT = gm / Cgs. Generic BSIM4 over-estimates Cgs (90 fF vs real 30 fF for N7 FinFET) → ωT ≈ 900 GHz instead of 180 GHz → Re{Zin} ≈ 2700 Ω → S₁₁ ≈ 0 dB.

② 諧振增益消失——負載未調諧 / Resonant gain lost — load not tuned

ω₀ = 1 / √((Lg+Ls) · Cgs)。錯誤的 Cgs 將諧振偏移至 ~8 GHz 而非 5 GHz。未加入調諧電容 Ctune。峰值增益 = +6.9 dB @ 8 GHz,而非 15+ dB @ 5 GHz。/ Wrong Cgs shifts resonance to ~8 GHz instead of 5 GHz. No tuning capacitor Ctune added to compensate. Peak gain = +6.9 dB at 8 GHz, not 15+ dB at 5 GHz.

③ 雜訊指數無意義——γ 和 Rg 缺失 / Noise Figure meaningless — γ and Rg absent

NF 主要由以下決定:(a) 熱通道雜訊 NF ∝ γ·gd0/gm——短通道 γ ≈ 1.5–2(非 2/3);(b) 閘極電阻 NF += 4kBT·Rg·ω²Cgs² / gm²。通用模型的 rgatemod=0 且使用預設 γ → NF 完全錯誤(計算出 90 dB)。/ NF dominated by: (a) thermal channel noise NF ∝ γ·gd0/gm — short-channel γ ≈ 1.5–2 (not 2/3); (b) gate resistance NF += 4kBT·Rg·ω²Cgs² / gm². Generic model has rgatemod=0 and default γ → NF completely wrong (90 dB computed).

Slide 05 — MNA vs ngspice:兩種求解器,相反的失敗模式 / Two Solvers, Opposite Failure Modes

屬性 PropertyPython MNAngspice + BSIM4
需要 BSIM4 模型?/ Needs BSIM4 model?否——gm、Cgs 為直接輸入 / No — gm, Cgs are direct inputs是——從元件方程式萃取 / Yes — extracts from device equations
誤差來源 / Where errors come from對 gm、Cgs 的錯誤假設 / Wrong assumptions about gm, Cgs錯誤的元件模型參數 / Wrong device model parameters
使用的 Cgs / Our Cgs used405 fF——由 ωT·Ls=50Ω 反算 / back-calc from ωT·Ls = 50 Ω~90 fF——通用 BSIM4 萃取 / generic BSIM4 extracted
S11 結果 / S11 result構造上完美 / Perfect by construction−0.2 dB——未匹配 / not matched
幾何現實檢查?/ Reality check on geometry?無 / None有——但受限於模型品質 / Yes — but limited by model quality

Python MNA 方法: 僅在小訊號域操作;直接輸入 gm、gds、Cgs、Cgd。無 MOSFET 元件模型——電晶體在求解前已線性化。Cgs = 405 fF ← 由 ωT·Ls = 50 Ω 得出;Gm = 40.5 mS ← 由匹配條件得出。S11 看起來完美——是構造出來的。沒有對真實電晶體能否提供這些值做現實檢查。/ Operates in small-signal domain only; takes gm, gds, Cgs, Cgd as direct inputs. No MOSFET device model — transistors already linearized before solver starts. S11 looked perfect — by construction. No reality check on whether any real transistor can deliver them.

ngspice + BSIM4 方法: 先解完整非線性元件方程式;萃取 DC 操作點 → 再得到小訊號參數。若 BSIM4 錯誤,下游所有結果都錯。Cgs = ~90 fF ← 通用 BSIM4;ωT = 924 GHz ← 高 5 倍。ngspice 實際測試了現實——發現分析假設的 Cgs = 405 fF 在物理上不可達。/ Solves full nonlinear device equations first; extracts DC operating point → then small-signal params. If BSIM4 is wrong, everything downstream is wrong. ngspice actually tested reality — found analytically assumed Cgs = 405 fF is not physically achievable.

Slide 06 — 如何修正:使用 Spectre + PDK 獲得準確結果 / How to Fix It: Getting Accurate Results with Spectre + PDK

  1. 取得 TSMC N7/N4 PDK 存取權 / Get TSMC N7/N4 PDK access: 與 TSMC 簽署 NDA(或使用 MOSIS/eFabless 等 shuttle 服務)。PDK 包含 BSIM-CMG FinFET 模型、RF NMOS 元件、MiM 電容、金屬堆疊電感(EM 校準)、DRC/LVS 規則集。/ Sign NDA with TSMC (or use shuttle service like MOSIS/eFabless). PDK includes BSIM-CMG FinFET models, RF NMOS cells, MiM capacitors, Metal-stack inductors (EM-calibrated), DRC/LVS runsets.
  2. 安裝 Cadence IC / Virtuoso + Spectre APS / Install Cadence IC / Virtuoso + Spectre APS: spectre +preset=liberate <testbench.scs>。需要 RHEL 7/8、8+ GB RAM、LAN 上的授權伺服器。/ Requires RHEL 7/8, 8+ GB RAM, license server on LAN.
  3. 用 PDK 元件替換通用模型 (nfet_rf_4t) / Replace generic model with PDK cell (nfet_rf_4t):cascode_lna.cdl 中,將 nfet_gnfet_rf_4t。設定 fingers=50, w=1u, m=1。更新 cds.lib 路徑至 /pdk/tsmc_n7/
  4. 加入 Ctune 諧振 + 執行 Spectre SP 分析 / Add Ctune for resonance + run Spectre SP analysis: 在 Ld 並聯加入 Ctune = 1/(ω₀²·(Lg+Ls)) − Cgs_pdk。在 Virtuoso ADE-L 中執行 .sp start=1G stop=8G step=10M

Slide 07 — PDK 說明:PDK = 製程設計套件 / PDK Explained: PDK = Process Design Kit

晶圓廠的完整「說明書 + 工具箱」——晶片設計師在特定製造製程(TSMC、Samsung、GlobalFoundries…)中設計電路所需的一切。/ The foundry's complete "instruction manual + toolbox" — everything a chip designer needs to design circuits in a specific fabrication process.

內容 Contents:

  • ⚛ 元件模型 Device Models: 由量測矽片得到的 SPICE/Spectre 方程式——Vth、遷移率、短通道效應、溫度相依性 / SPICE/Spectre equations from measured silicon — Vth, mobility, short-channel effects, temperature dependence
  • 📐 技術檔案 Technology File (.tf): 每層金屬/介層/多晶矽層:厚度、最小寬度、間距、電阻率 / Every metal/via/poly layer: thickness, min width, spacing, resistivity
  • ✅ DRC + LVS 規則集 Decks: DRC 驗證佈局不會在製造中失敗。LVS 驗證佈局匹配電路圖網表。/ DRC verifies layout won't fail fab. LVS verifies layout matches schematic netlist.
  • 🔌 PEX 規則 + IP 函式庫 PEX Rules + IP Libraries: 寄生 RC 萃取規則 + 預特性化元件、螺旋電感、MIM 電容——晶圓廠驗證 / Parasitic RC extraction rules + pre-characterized cells, spiral inductors, MIM caps — foundry-validated
  • 🔒 NDA 保護 NDA Protected: TSMC 從不公開發布 PDK——因此我們使用佔位路徑 /pdk/tsmc_n7/ / TSMC never publishes PDKs publicly — hence our placeholder /pdk/tsmc_n7/ path

對本 LNA 的重要性 Why It Matters for This LNA: 我們的模擬從設計方程式推導 Gm、Cgs、gds、fT。真實的 PDK 模型卡捕捉:14 nm 通道長度的速度飽和、閘極洩漏(在 N7/N4 至關重要)、閃爍雜訊 (1/f) → NF 下限、相鄰鰭片的佈局相依應力。/ Our simulation derived Gm, Cgs, gds, fT from design equations. A real PDK model card captures: velocity saturation at 14 nm channel length, gate leakage (critical at N7/N4), flicker noise (1/f) → NF floor, layout-dependent stress from adjacent fins.

Slide 08 — 總結:ngspice vs Spectre + PDK — 何時使用哪個 / Summary: ngspice vs Spectre + PDK — When to Use Which

使用 ngspice ✓ 的時機 USE ngspice ✓ for: DC 偏壓點、拓撲可行性、粗略 gm/ID 定標、暫態/邏輯模擬、快速設計空間掃描、免費/無授權 / DC bias point, topology feasibility, rough gm/ID sizing, transient/logic sim, quick design-space sweep, free/no license.

使用 Spectre + PDK ✓ 的時機 USE Spectre + PDK ✓ for: S 參數精度(簽核等級)、雜訊指數(準確 γ、Rg)、輸入匹配(真實 Cgs)、線性度/IIP3 (HPSS/PSS)、Tape-out 簽核(必須)、EM 萃取寄生效應 (via EMX/Virtuoso) / S-parameter accuracy (sign-off level), Noise Figure (accurate γ, Rg), input matching (real Cgs), linearity/IIP3 (HPSS/PSS), tape-out sign-off (mandatory), EM-extracted parasitics (via EMX/Virtuoso).

結論 Bottom line: ngspice 正確識別偏壓合理(ID ≈ 8 mA,gm ≈ 46 mS)。對於 RF 規格——S₂₁、S₁₁、NF——Cadence Spectre 搭配 TSMC N7 PDK 是通往準確、可 tape-out 結果的唯一路徑。/ ngspice correctly identified that the bias is reasonable. For RF specs — S₂₁, S₁₁, NF — Cadence Spectre with the TSMC N7 PDK is the only path to accurate, tape-out-ready results.

Slide 09 — 代理能力:一個提示。八個步驟。零人工干預。/ Agentic Capability: One Prompt. Eight Steps. Zero Human Involvement.

  1. 工具探索 Tool Discovery: 執行 which spectre/ngspice/hspice/xyce — 僅在 /usr/bin/ngspice 找到 ngspice / Ran which — found only ngspice at /usr/bin/ngspice
  2. 網表撰寫 Netlist Authoring: 從 HTML 電路圖撰寫完整 BSIM4 SPICE 網表——M1/M2、Lg/Ls/Ld、DC 隔直、偏壓網路 / Wrote complete BSIM4 SPICE netlist from HTML schematic — M1/M2, Lg/Ls/Ld, DC blocks, bias network
  3. 除錯迴圈 Debug Loop: 第一版網表有節點衝突 + M1 在弱反轉。讀取日誌、診斷偏壓錯誤、乾淨重寫——無人工提示 / First netlist had node conflicts + M1 in weak inversion. Read log, diagnosed bias error, rewrote cleanly — no human prompt
  4. 模擬 Simulation: 在 ngspice 批次模式執行 DC + AC(300 點,100 MHz–8 GHz)+ Noise——< 30 ms 完成 / Ran DC + AC (300 points, 100 MHz–8 GHz) + Noise in ngspice batch mode — completed in < 30 ms
  5. 後處理 Post-Processing: Python 腳本解析原始 CSV → 從電壓波計算 S₂₁/S₁₁,插值 NF,找到 3-dB BW 和峰值頻率 / Python script parsed raw CSV → computed S₂₁/S₁₁ from voltage waves, interpolated NF, found 3-dB BW and peak frequency
  6. 視覺化 Visualization: 4 面板 matplotlib 儀表板:S₂₁ 曲線、S₁₁ 曲線、NF vs 頻率、結果摘要表——暗色主題 / 4-panel matplotlib dashboard: S₂₁ curve, S₁₁ curve, NF vs frequency, results summary table — dark themed
  7. 解釋 Interpretation: 診斷為何 RF 數字錯誤:Cgs 高估 3× → ωT = 900 GHz → S₁₁ 和 NF 無意義 / Diagnosed why RF numbers were wrong: Cgs overestimate 3× → ωT = 900 GHz → S₁₁ and NF meaningless
  8. 溝通 Communication: 將整個解釋轉化為此投影片 / Turned the entire explanation into this slide deck

人工輸入:一個電路圖 HTML 檔案 + 「run spectre」。其餘全部自主完成。/ Human input: one schematic HTML file + the words "run spectre". Everything else was autonomous.

Slide 10 — 運作方式:使此成為可能的流程 / How It Works: The Pipeline That Makes This Possible

bash: which ngspice            → /usr/bin/ngspice
file: write lna.sp             → BSIM4 netlist(BSIM4 網表)
bash: ngspice -b lna.sp        → ac_results.csv
bash: read log                 → bias wrong → rewrite lna.sp(偏壓錯誤 → 重寫)
bash: ngspice -b lna_v2.sp     → ac + noise CSV
bash: python postprocess.py    → lna_results.png
file: write slides.html        → this deck(此投影片)

關鍵使能因素 Key enablers: 持久 Ubuntu VM、bash + 檔案建立工具在同一迴圈、ngspice 已預裝、pip 可用(matplotlib, numpy)、日誌檢查 → 自我修正除錯 / Persistent Ubuntu VM, bash + file creation tools in one loop, ngspice pre-installed, pip available (matplotlib, numpy), log inspection → self-correcting debug.

⚠ 硬性限制 The Hard Limit: 代理迴圈的精度僅取決於它能存取的模型。ngspice + 通用 BSIM4 → 正確的拓撲、錯誤的物理。Cadence Spectre + TSMC N7 PDK → 物理校準、可 tape-out。再多的自主性也無法取代授權的 PDK。/ The agentic loop is only as accurate as the models it has access to. ngspice + generic BSIM4 → correct topology, wrong physics. Cadence Spectre + TSMC N7 PDK → physically calibrated, tape-out ready. No amount of autonomy substitutes for a licensed PDK.

✦ 取代了什麼 What This Replaces: 一位 RF 工程師手動做這些需要:~2 小時撰寫 + 除錯 SPICE 網表、~1 小時在 MATLAB 後處理波形、~1 小時製作結果簡報。Claude:一個對話回合,~40 秒。/ An RF engineer doing this manually would spend ~2 hrs writing + debugging the SPICE netlist, ~1 hr post-processing waveforms in MATLAB, ~1 hr making the results presentation. Claude: one conversation turn, ~40 seconds.

觸發這一切的提示:「run spectre」——2 個字 → 8 個自主步驟 → 完整模擬 + 投影片 / Prompt that started all of this: "run spectre" — 2 words → 8 autonomous steps → full simulation + slides


Link 2 — 執行 MNA(Cascode LNA 設計與模擬報告)/ Running MNA (Cascode LNA Design & Simulation Report)

來源 Source: https://claude.ai/public/artifacts/5a3af580-0bea-45ad-a8f9-2b4ee43da5cc

標題 Title: CASCODE LNA — 設計與模擬報告 / Design & Simulation Report 技術 Technology: TSMC N7/N4 CMOS · 目標頻率 Target Freq: 5 GHz Sub-6G 5G NR · 拓撲 Topology: 電感源極退化 Inductive Source Degen. · 求解器 Solver: Python MNA · Spectre-equiv.

Slide 01 — 電路架構:拓撲與設計參數 / Circuit Architecture: Topology & Design Parameters

參數 Parameter數值 Value
M1/M2 寬度 Width50 µm
閘極長度 Gate Length14 nm
指數 Num. Fingers50 nf
汲極電流 Drain Current ID10 mA
電源 Supply VDD0.9 V
閘極電感 Gate Inductor Lg2 nH
源極電感 Source Inductor Ls0.5 nH
負載電感 Load Inductor Ld3 nH
Cgs1405.3 fF
埠阻抗 Port Impedance Z₀50 Ω

Slide 02 — 解析設計流程:關鍵設計方程式 / Analytical Design Flow: Key Design Equations

  • 輸入諧振 Input Resonance: ω₀ = 1/√[(Lg+Ls)·Cgs] → Cgs1 = 405.3 fF
  • 輸入阻抗匹配 Input Impedance Matching: Re{Zin} = ωT·Ls = 50 Ω → ωT = 100 Grad/s → fT = 15.92 GHz
  • 跨導 Transconductance: Gm = ωT·Cgs1 = 100G × 405.3f = 40.53 mS
  • 電壓增益(近似)Voltage Gain (Approximate): Av ≈ Gm·Qin·|ZL|, Qin = 1.26 → ~13.2 dB
  • 最小雜訊指數 Minimum Noise Figure: NFmin ≈ 1 + 2γ·(ω₀/ωT)·√(Gg/Gm), γ = 1.5(短通道 short-channel)→ NFmin = 1.89 dB
  • Rollett 穩定性 Stability: K = 19.09 ≫ 1 → 無條件穩定 Unconditionally Stable ✓

Slide 03 — 模擬引擎:Python 修正節點分析(MNA)/ Simulation Engine: Python Modified Nodal Analysis (MNA)

9 節點電路 9-node circuit:gnd=0, gate1=1, src1=2, drn1=3, gate2=4, drn2=5, out=6, vdd=7, Ls_node=8。

包含 Includes:被動元件戳記(L、C、R 導納)Passive stamps (L, C, R admittances)、M1 小訊號模型(MOSFET VCCS——gm·Vgs, gds, Cgs, Cgd)、M2 cascode(相同尺寸)(same sizing)。透過 Norton 輸入埠注入萃取 S 參數。/ S-parameter extraction via Norton input port injection.

Slide 04 — 埠分析:5 GHz 的 S 參數結果 / Port Analysis: S-Parameter Results @ 5 GHz

參數 Parameter數值 Value目標 Target狀態 Status
S₂₁(增益 Gain)+7.68 dB15–20 dB⚠ 低於目標 BELOW TARGET
S₁₁(輸入回損 Input RL)−30.11 dB< −10 dB✓ 通過 PASS
S₁₂(隔離度 Isolation)−56.91 dB< −30 dB✓ 通過 PASS
3-dB 頻寬 BW4.33 GHz
S₂₁ 峰值 Peak S₂₁9.09 dB @ 3.41 GHz
S₁₁ < −10 dB 頻寬 BW3.99–6.22 GHz
群延遲 Group Delay73.5 ps
IIP3 估計 estimate+17.3 dBm
覆蓋 Coverage5G NR Band ✓

掃描 Sweep:0.3–12 GHz,3000 點 pts。

Slide 05 — RF 性能:雜訊指數與穩定性分析 / RF Performance: Noise Figure & Stability Analysis

  • NF @ 5 GHz: 2.38 dB
  • NFmin: 1.89 dB
  • 雜訊分布 Noise breakdown: M1 通道 channel 55%、M2 通道 channel 20%、Rs 熱雜訊 thermal 18%、Lg 損耗 loss 4%、Ls 損耗 loss 3%
  • 雜訊模型 Noise model: γ = 1.5(短通道 MOSFET short-channel)。所有雜訊源透過轉移函數建模。All sources modeled via transfer functions.
  • K 因子 K-Factor: 19.09 @ 5 GHz — 全頻率範圍無條件穩定 UNCONDITIONALLY STABLE across full frequency range
  • Cascode M2 提供近單向操作。S₁₂ = −57 dB 反向隔離遍及全掃描範圍。/ Cascode M2 provides near-unilateral operation. S₁₂ = −57 dB reverse isolation across full sweep.

Slide 06 — 規格合規性:完整性能摘要 / Specification Compliance: Full Performance Summary

參數 Parameter規格 Specification模擬值 Simulated狀態 Status
S₂₁ 增益 Gain @ 5 GHz15–20 dB7.68 dB⚠ 需檢討 REVIEW
S₁₁ @ 5 GHz< −10 dB−30.11 dB✓ 通過 PASS
雜訊指數 NF @ 5 GHz0.8–1.5 dB2.38 dB⚠ 需檢討 REVIEW
NF 最小值 minimum1.89 dB最佳可達 Best achievable
S₁₂ 隔離度 Isolation< −30 dB−56.91 dB✓ 通過 PASS
穩定性 Stability K> 119.09✓ 通過 PASS
IIP3(估計 estimate)+17.3 dBm強線性度 Strong linearity
群延遲 Group Delay73.5 ps低色散 Low dispersion

根本原因 Root causes: Qin = 1.26(Lg 偏低 low Lg)。50 Ω 輸出主導負載 ZL → 增加 Lg 至 6–8 nH。M1 通道雜訊 = 55%,短通道 γ = 1.5 設定實際 NFmin 為 1.89 dB。

Slide 07 — 下一步:設計最佳化路線圖 / Next Steps: Design Optimization Roadmap

達成 15–20 dB 目標 Achieving 15–20 dB Target:

  1. 增加閘極電感 Lg / Increase Gate Inductor Lg: Lg = 6–8 nH → Qin = 3–4 → ≈ +6 dB 增益改善 gain improvement
  2. 加入諧振負載 (Ctune) / Add Resonant Load (Ctune): Ctune = 338 fF 跨接 Ld 形成 LC 槽路,在 f₀ 產生增益峰值 / creates LC tank, gain peaking at f₀
  3. 變壓器回授 Transformer Feedback: 耦合 Ld–Ls 提升有效 Qin 而不增加面積 / Coupled Ld–Ls boosts effective Qin without area penalty
  4. 串接共源級 Cascaded CS Stage: 第二級增加 6–10 dB 且 NF 懲罰最小 / Second stage adds 6–10 dB with minimal NF penalty

增益路線圖 Gain roadmap: 基線 Baseline 7.68 dB → +Lg 6 nH → ~13 dB → +Ctune 諧振 resonant → ~16 dB → 兩者結合 both combined → ~18–20 dB ✓

NF 改善 NF Improvement:

  1. 降低汲極電流 Reduce Drain Current: 較低 ID → 降低 gds,與增益權衡 / Lower ID → reduced gds, trades off with gain
  2. 雜訊最佳偏壓 Noise-Optimal Biasing: ID ≈ 5–7 mA 是 N7 NFmin 的甜蜜點 / sweet spot for NFmin in N7
  3. 更高 Q 電感 Higher-Q Inductors: Q > 15 for Lg, Ls → 更低電阻性雜訊基底 lower resistive noise floor

Link 3 — 看看 MNA(模擬結果驗證與最佳化)/ Check out MNA (Simulation Results Verification & Optimization)

來源 Source: https://claude.ai/share/72920709-50f6-44c5-adf6-70002e8de97b

分享的 Claude 對話,標題為「模擬結果驗證」。/ Shared Claude conversation titled "Simulation results verification."

圖表 vs 數據一致性 / Plot vs. Data Consistency

所有標註在四捨五入範圍內匹配 CSV:/ All annotations match CSV within rounding:

參數 Parameter圖表標註 Plot AnnotationCSV 數據 CSV Data匹配?Match?
f₀5.0 GHz5.001 GHz
S₂₁ @ f₀+7.7 dB+7.68 dB
S₁₁ @ f₀−30.1 dB−30.11 dB
NF @ f₀2.38 dB2.38 dB
NFmin1.89 dB1.89 dB
K @ f₀19.0919.09
GD @ f₀73 ps73.5 ps
3-dB BW4.33 GHz4.33 GHz
S11 BW2.23 GHz2.23 GHz

問題 vs 電路圖目標 / Issues vs. Schematic Targets

  • 增益偏低 Gain is low: S₂₁ @ f₀ = 7.7 dB,峰值僅 9.1 dB @ 3.4 GHz。Ld = 3 nH 且 gm1 = 40.5 mS 時,|jωLd| ≈ 94 Ω → |Av| ≈ 3.8 ≈ 11.6 dB 開路。考慮損耗後 → 7.7 dB 合理。/ peak only 9.1 dB @ 3.4 GHz. With Ld = 3 nH and gm1 = 40.5 mS, |jωLd| ≈ 94 Ω → |Av| ≈ 3.8 ≈ 11.6 dB open-circuit. After losses → 7.7 dB plausible.
  • NF 超過目標 NF above target: 規格 0.8–1.5 dB,NFmin = 1.89 dB,NF @ f₀ = 2.38 dB。NFmin 出現在 3.8 GHz(低於 5 GHz)→ Cgs 和 Lg/Ls 調諧從雜訊角度最佳化於較低頻率。/ NFmin occurring at 3.8 GHz (below 5 GHz) → Cgs and Lg/Ls tuning optimized for lower frequency from noise perspective.
  • S₂₂ 很差 S₂₂ is poor(−0.62 dB @ f₀): 無輸出匹配網路。適當的輸出匹配或 Ld 並聯電容的諧振槽路調諧可恢復數 dB 的轉導增益。/ No output matching network. Proper output matching would recover several dB of transducer gain.
  • 增益峰值 vs S₁₁ 零點不匹配 Gain peak vs. S₁₁ null mismatch: S₂₁ 峰值在 3.4 GHz 而最佳 S₁₁ 在 5.0 GHz。Ctune = 338 fF 使負載諧振在與輸入匹配不同的頻率。/ Peak S₂₁ at 3.4 GHz while best S₁₁ at 5.0 GHz.
  • 穩定性良好 Stability fine: K > 17 遍及整個頻帶,全頻無條件穩定。/ K > 17 across entire band, unconditionally stable everywhere.

電路圖 vs 模擬一致性 / Schematic vs. Simulation Consistency

一致 Consistent: 拓撲 Topology(M1 CS + M2 CG)、Lg = 2 nH、Ls = 500 pH、Ld = 3 nH、VDD = 0.9 V、ID = 10 mA。

不一致(性能宣稱 vs 模擬)/ Inconsistent (performance claims vs. sim):

項目 Item電路圖宣稱 Schematic Claim模擬結果 Simulation Result
增益 Gain15–20 dB7.7 dB
NF0.8–1.5 dB2.38 dB
IIP3−5 ~ +5 dBm17.3 dBm(反算,非雙音 back-calculated, not two-tone)

Ctune = 338 fF 出現在模擬中但未顯示於電路圖上。/ Ctune = 338 fF appears in sim but not shown on schematic.

最佳化歷程(全在一個對話中完成)/ Optimization Journey (All Within One Conversation)

階段 Stage說明 Description關鍵結果 Key Result
1MOSFET 模型給出不真實的 gm = 1200 mS / Unrealistic gm = 1200 mS以校準 FinFET 模型修正 / Fixed with calibrated FinFET model
2擴展 Ld 最佳化器 / Expand optimizer for Ld13.6 dB 增益 gain, 1.72 dB NF
3進一步調諧 / Further tuningS₂₁ = 15.5 dB, NF = 1.62 dB; RLg ≈ 6 Ω 造成 ~0.5 dB NF costs
4持續最佳化 / Continued optimizationNF = 1.49 dB, S₂₁ = 21.2 dB — 但 S₂₂ = −8.0 dB,負載諧振漂移至 5.6 GHz / but S₂₂ = −8.0 dB, load resonance drifted
5功耗感知調諧 / Power-aware tuningS₂₁ = 17.0 dB, NF = 1.49 dB — 均在規格內!功耗 23.7 mW(超出預算)/ both in spec! Power over budget
6功耗約束 + 多次隨機重啟 / Power constraints + random restarts最佳化器持續碰到 Ld 下限 / Optimizer keeps hitting Ld lower bound
7釋放 C₁/C₂ 為獨立變數 / Freed C₁/C₂ as independent variablesS₂₁ = 20.0 dB, S₂₂ = −10.0 dB
8NF 最佳值搜索 / NF optimum searchW = 35 µm, ID = 18 mA: NF = 1.38 dB, S₂₁ = 16.6 dB
最終 Final所有規格達標 All specs metS₂₁ = 20.0 dB, NF = 1.46 dB, S₁₁ = −13.0 dB, S₂₂ ≈ −10 dB, Pdiss = 12.3 mW

最佳化前後對比 / Before / After Comparison

參數 Parameter原始 Original最佳化 Optimized目標 Target
S₂₁(增益 Gain)7.7 dB20.0 dB15–20 dB
NF @ f₀2.38 dB1.46 dB0.8–1.5 dB
S₁₁−30.1 dB−13.0 dB< −10 dB
S₂₂−0.6 dB−9.9 dB
功耗 Pdiss9 mW12 mW5–15 mW
K(穩定性 stability)19.111.7> 1

三項關鍵改變 / Three Key Changes

  1. 分接電容輸出匹配 Tapped-capacitor output matching(C₁ = 326 fF, C₂ = 2176 fF)——原始電路圖缺少的關鍵部分。將高槽路阻抗(Rp ≈ 1557 Ω)向下變換至接近 50 Ω,恢復 ~12 dB 的轉導增益。/ Missing piece from original schematic. Transforms high tank impedance (Rp ≈ 1557 Ω) down toward 50 Ω, recovering ~12 dB of transducer gain.
  2. 偏壓重新最佳化 Bias re-optimization(W = 35 µm, ID = 14 mA)——更高的電流密度將 fT 從 15.9 → 19.4 GHz 推升,降低 NF,改善輸入匹配 Q。/ Higher current density pushes fT from 15.9 → 19.4 GHz, reduces NF, improves input matching Q.
  3. 高品質電感 Q Premium inductor Q(QLg = 22, QLs = 25, QLd = 16)——Lg 串聯電阻貢獻 ~0.35 dB 的 NF。Q = 14 → 22 是 NF = 1.6 與 NF = 1.46 之間的差異。/ Lg series resistance contributes ~0.35 dB to NF. Q = 14 → 22 is the difference between NF = 1.6 and NF = 1.46.

最佳化方法——三個階段 / Optimization Method — 3 Stages

第一階段——解析約束 Stage 1 — Analytical constraints:

  • Re{Z_in} = ωT·Ls = 50 Ω → Ls = 50/ωT
  • 諧振 Resonance ω₀² = 1/[(Lg+Ls)·Cgs] 固定 Lg / fixes Lg
  • 輸出 Output:R_p = Q_Ld·ω₀·Ld, 分接比 tap ratio n = C₁/(C₁+C₂) → R_load = Rp·n² = 50 Ω
  • 自由變數 Free variables:W, I_D, Ld(僅 3 個自由度 only 3 degrees of freedom)

第二階段——網格搜索 Stage 2 — Grid search:

  • W ∈ {40…80 µm}, I_D ∈ {8…18 mA}, Ld ∈ {2…8 nH} with Q_Ld ∈ {12, 14, 16}
  • 關鍵權衡 Key tradeoff:較小 W → 較高 fT(更好的元件 NF)但較大 Lg(更多串聯電阻,更差的電感 NF)/ smaller W → higher fT (better device NF) but larger Lg (more series resistance, worse inductor NF)
  • 甜蜜點 Sweet spot:W = 35–40 µm

第三階段——Nelder-Mead(5 變數 5-var:Ld, W, I_D, C₁, C₂)/ Stage 3 — Nelder-Mead:

Cost = 3·max(0, 15.5−S₂₁)²
     + 1·max(0, S₂₁−20)²
     + 12·max(0, NF−1.35)²
     + 2·max(0, S₁₁+10)²
     + 8·max(0, S₂₂+10)²
     + 0.5·(Pdiss/14)²

升級為差分進化(DE)/ Upgraded to Differential Evolution (DE):

方法 Method電路評估次數 Circuit Evals時間 TimeR_load
v1(網格 + NM grid + NM)~26,000+~15 sRp·n² = 50 Ω(強制 forced)
v2(DE)25,0265.4 sRp·n² = 73 Ω(真正最佳值,因頻率相依電感損耗 true optimum due to frequency-dependent inductor losses)

最終 DE 結果 Final DE result: S₂₁ = 20.0 dB, NF = 1.48 dB, S₁₁ = −13 dB, S₂₂ = −9.9 dB, Pdiss = 11.2 mW。

模擬模型限制 / Simulation Model Limitations

以下適用於 v1 和 v2:/ These apply to both v1 and v2:

  • MOSFET 模型 model: 單點校準(gm 隨 √(ID·W) 縮放)——無速度飽和衰減、無次臨界、無 DIBL、除固定 VA 外無短通道效應 / Single-point calibration (gm scales as √(ID·W)) — no velocity saturation rolloff, no subthreshold, no DIBL, no short-channel effects beyond fixed VA
  • 電感模型 Inductor model: 單一 Q₀ 加經驗頻率縮放——無基板渦流、趨膚效應、鄰近效應、自諧振。Q = 22 for Lg 即使在 5 GHz 超厚金屬也過於樂觀。/ Single Q₀ with empirical frequency scaling — no substrate eddy currents, skin effect, proximity effect, self-resonance. Q = 22 for Lg is optimistic even for ultra-thick metal at 5 GHz.
  • Lg、Ls、Ld 之間無 EM 耦合 No EM coupling: 互感可能偏移諧振並降低隔離度 / mutual inductance can shift resonance and degrade isolation
  • 雜訊模型 Noise model: 缺少感應閘極雜訊(δ 項)、閃爍雜訊上轉換、基板雜訊耦合 → 真實 NF 可能為 1.7–2.0 dB,而非 1.48 dB / Missing induced gate noise (δ term), flicker noise upconversion, substrate noise coupling → real NF likely 1.7–2.0 dB, not 1.48 dB
  • 無互連寄生萃取 No interconnect parasitic extraction: 僅佈線電容就在 N7 的每個節點增加 30–50 fF,使匹配網路失調 / routing capacitance alone adds 30–50 fF at each node in N7, detuning matching networks
  • IIP3 是虛構的 IIP3 is fictional: 由增益反算,非非線性 Volterra/諧波平衡分析 / back-calculated from gain, not from nonlinear Volterra/harmonic balance analysis

要獲得真實結果 To get realistic results: 需要 BSIM-CMG/PDK 模型、EM 萃取電感 S 參數(包含互耦合)、寄生萃取佈局網表、Cadence Spectre 或 ADS。/ need BSIM-CMG/PDK model, EM-extracted inductor S-params (including mutual coupling), parasitic-extracted layout netlists, Cadence Spectre or ADS.

Content is user-generated and unverified.
    Healthcare Tech: RF IC LNA Design & Simulation Guide | Claude