星期三, 5月 06, 2026

Follow up EX#9

This is not a benchmark. 你是再重寫一個新程式

我有提供原始程式給你了,下載後就可以使用了
schematic with parameter optimizer

下載方法,點選我的連結,按 customize, 會跳出程式畫面,然後選 download as HTML 然後用cowork 或是其他類似功能平台跑 benchmark或是直接用Claude Chat 跑 benchmark



Share 看不到畫面

只有文字

看不到benchmark  圖表
你的share內的圖表,我沒有你的密碼看不到

正確可靠的輸出畫面方式 How to publish a Claude artifact

聊天中的內嵌視覺內容(SVG 圖表、HTML 小工具、直接渲染在對話中的圖表)預設是暫時性的——它們作為 Claude 回應的一部分以內嵌方式存在,當對話繼續往下走時並不會被另外儲存。可以把它們想成白板上的草圖,而不是完成的檔案。因為沒有被持久化保存,所以分享聊天時它們不會跟著快照一起傳出去。

Artifacts(製品)就不一樣了——它們從一開始就是持久化、可分享的。所以如果想讓視覺內容在分享聊天時還能被看到,分享之前可以這樣做:

  • 存成 Artifact — 把內嵌視覺轉成可分享、可繼續迭代的持久化 artifact
  • 下載 — 存成本地的 .svg 或 .html 檔案
  • 複製為圖片 — 截一張靜態快照

至於上傳的檔案(您附加的 PNG),原因不太一樣:如果分享的聊天裡有附加檔案,檔案本身不會包含在分享快照中,會保持私密。只有對話內容和 Claude 的回應會被看到。這是一種隱私保護——即使對話被分享出去,您上傳的東西仍然屬於您。

簡單來說:

  • 內嵌的自製視覺 = 暫時性的(不在快照裡)
  • 上傳的檔案 = 為了隱私刻意被剝除
  • Artifacts = 本來就是設計用來分享的

如果有特定的圖想保留下來分享,可以叫 Claude「把這個存成 artifact」,這樣下次分享時對方就看得到了。



To speed up the process, you may want to use Claude cowork to run the batch using Python which Claude will make one for you automatically.

1. BJT Diff Pair

Interesting result — the MNA contradicts the React optimizer. Let me sweep mirror mismatch to show what's going on:The MNA disagrees with the optimizer by oo dB. Here's why:

                     analytic (React)       MNA (full nodal solve)
  |Ad|                       1286.7                  1293.4
  |Acm|                   3.50×10⁻⁵               1.70×10⁻³
  CMRR (dB)                   151.30                  117.65
                                              ← 34 dB lower

Root cause: PNP mirror β-error, which the React formula completely omits.

The textbook expression Acm = 1/(2·gm·R_tail) assumes a perfect mirror — gain exactly 1. Real PNP mirrors lose 2/(β+2) of the reference current to base currents. With β_p ≈ 106:

δ_β = 2/(β+2) = 1.84%
Predicted Acm from β-loss: δ·Rout/(2·R_tail) = 1.66×10⁻³
Observed Acm (MNA):                            1.70×10⁻³
→ β-error explains 98.1% of the actual CM gain

The tail-impedance term (3.5×10⁻⁵) is real but it's the floor, not the dominant contributor. The mirror β-error is 48× larger and sets the actual CMRR.

Mirror Is-mismatch sweep confirms the mechanism — there's an asymmetric peak where Is mismatch cancels β-loss:

  ΔIs/Is     CMRR
   −5%      106.5
   −2%      111.5
    0%      117.7   ← matched (β-loss alone)
   +1%      123.8
   +2%      155.7   ← cancellation peak (Δ_Is exactly = δ_β)
   +3%      123.5
   +5%      114.2

That sharp 156 dB peak at +1.84% is real but useless — it's a single bias-trim point. Process variation puts every die somewhere else on the curve.

Monte Carlo with realistic process σ (0.5% Is, 1% β):

  CMRR mean   = 119.4 dB
  CMRR median = 117.5 dB
  CMRR p10    = 112.8 dB
  CMRR p90    = 127.4 dB
  CMRR std    =   7.3 dB

Verdict on the optimizer's CMRR numbers: systematically optimistic by ~33 dB. The 117–120 dB result is in line with what real BJT diff pairs with active loads achieve (LM394: 120 dB typ; MAT02: 124 dB typ — both trimmed). The optimizer's 151 dB was the textbook ceiling for an idealized topology, not what the topology actually delivers.

Two-line fix for the React calcPerf:

const deltaBeta = 2 / (bp + 2);                          // mirror β-loss
const Acm_beta  = deltaBeta * Rout / (2 * RoTail);
const AcmTotal  = Math.hypot(AcmLin, Acm_beta);          // RMS combine
const CMRR      = 20 * Math.log10(AdLin / AcmTotal);

That alone pulls the reported CMRR from 151 to ~118 dB and aligns it with what an MNA — or a real chip — would show.


沒有留言: