docs(measurement): 新增 PD132T 端到端时序图(三段横轴)+ 符号约定勘误 + 生成工具

- 图示 docs/img/timing-chain-pd132t.{svg,png}:① 一个窗(0~11.2ms)② 检测到输出(0~600ms)③ 基线块平均(0~12s)
  · 曲线按 §1~§4 公式真算:Xn=480 tick/160µs、窗=68×480/3MHz=10.880ms、α=79(τ=35.26ms)、
    dlt=(32640×60)>>16=29、判据线 32611、大信号(+0.5%) 第 1 窗即越线(t≈10.9ms)、小信号(+0.1%) ≈2.2τ≈78ms
  · 同时标注:两种检测路径、50ms 输出节拍量化、上电时 Origin 只有首窗单点样本
- 新工具 tools/plot_timing_chain.py:纯 stdlib 手写 SVG;chromium --headless 转 PNG(零第三方依赖)
- ⚠ 新增 §0.1 符号约定:车辆 ⇒ L↓ ⇒ f↑ ⇒ 周期/Xn↓ ⇒ Value/CAPVD↓(判据取下降侧)
  ⇒ 修正 5 处「深占压(频偏 −5%)⇒ 窗 +5.3%」的方向错误:车辆是频率升高、窗长应【缩短】(−4.8%)
- README:目录树补 img/ 与两个 tools 脚本;表格校验 0 异常(15 文件)
This commit is contained in:
wangfq
2026-09-11 10:21:42 +08:00
parent 3a679ee373
commit 91ed16a9b8
10 changed files with 514 additions and 6 deletions
+1 -1
View File
@@ -44,7 +44,7 @@
| **基线更新周期** | **0.82 s**100 窗;⚠ 勘误) | **2.73 s** | **1.09 s**(勘误) | **5.59 s**256 窗) | **5 s**500 窗) | **4.37 s**500 窗) |
| IIR 时间常数 τ | **22~27 ms**(⚠ 勘误) | 88 ms / 109 ms | **35.4 / 43.7 ms**(α79/α64;精确 29.6 / 38.0 | 87 ms(精确 76.0 | 32 ms | **28 ms** |
> ⚠ **测量节拍是区间,不是定值**2026-09-11 补):`LPCNT = ⌊BASE/Xn₀⌋` 是**整数除法且学习后冻结**,窗长 = `⌊BASE/Xn₀⌋·Xn₁` 个 tick ⇒ **上表中"测量节拍 / 基线更新周期 / IIR 时间常数"三行数值均为标称上限**。站点实际值 = 标称 × `(BASEr₀)/BASE` × `f₀/f_now``r₀ = BASE mod Xn₀`):100kHz 站点 **0.39%**、60kHz 站点 **2.34%**、带内最差 **6.2%**Xn₀=2049);深占压(频偏 5%)再 +5.3%。**Δf/f 口径不受影响**`Value/Origin = Xn₁/Xn₀` 精确,余数完全约掉)。公式/数值表/位宽约束(`INT8U LPCNT` ⇒ 需 `Xn>129`)见 [measurement-window-quantization.md](measurement-window-quantization.md)。
> ⚠ **测量节拍是区间,不是定值**2026-09-11 补):`LPCNT = ⌊BASE/Xn₀⌋` 是**整数除法且学习后冻结**,窗长 = `⌊BASE/Xn₀⌋·Xn₁` 个 tick ⇒ **上表中"测量节拍 / 基线更新周期 / IIR 时间常数"三行数值均为标称上限**。站点实际值 = 标称 × `(BASEr₀)/BASE` × `f₀/f_now``r₀ = BASE mod Xn₀`):100kHz 站点 **0.39%**、60kHz 站点 **2.34%**、带内最差 **6.2%**Xn₀=2049);深占压(Δf/f +5%,频率升高)窗长再 **4.8%**。**Δf/f 口径不受影响**`Value/Origin = Xn₁/Xn₀` 精确,余数完全约掉)。公式/数值表/位宽约束(`INT8U LPCNT` ⇒ 需 `Xn>129`)见 [measurement-window-quantization.md](measurement-window-quantization.md)。
>
> IIR 系数 79/64 的量化对比(α/τ/阶跃响应/噪声抑制/单频衰减/模拟验证)见 [filter-coefficient-79-vs-64.md](filter-coefficient-79-vs-64.md)2026-08-28 新增;**2026-08-31 v2 扩展:时间常数公式详解 + 释放路径影响 + 方案 A 案例**)。
+1 -1
View File
@@ -84,7 +84,7 @@ y[n] = 1 (1−α)^n
| DLD154V4B | 10 ms | **32 ms** | 40 ms |
| DLD154Pro | 8.74 ms | 28 ms | 35 ms |
> ⚠ **表中 T 是"标称上限"**2026-09-11 补):实际测量窗 = `⌊BASE/Xn₀⌋·Xn₀/f_cap`,按**站点线圈频率**浮动 0 ~ 6.2%100kHz 站点 0.39%),深占压再 +5%;**τ 按同一因子缩放**(本表未逐一改写,读数时按百分比折算即可)。公式与数值表见 [measurement-window-quantization.md](measurement-window-quantization.md)。
> ⚠ **表中 T 是"标称上限"**2026-09-11 补):实际测量窗 = `⌊BASE/Xn₀⌋·Xn₀/f_cap`,按**站点线圈频率**浮动 0 ~ 6.2%100kHz 站点 0.39%),深占压(Δf/f +5%)窗长 4.8%;**τ 按同一因子缩放**(本表未逐一改写,读数时按百分比折算即可)。公式与数值表见 [measurement-window-quantization.md](measurement-window-quantization.md)。
---
Binary file not shown.

After

Width:  |  Height:  |  Size: 334 KiB

+209
View File
@@ -0,0 +1,209 @@
<svg xmlns="http://www.w3.org/2000/svg" width="1680" height="1560" viewBox="0 0 1680 1560"><rect width="1680" height="1560" fill="#ffffff"/>
<text x="28.0" y="44.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="21" fill="#0b2c4d" text-anchor="start" font-weight="bold">PD132T 端到端时序图(检测通道:线圈 → CD4060 ÷32 → PCA 捕获 → 窗结账 → IIR → 基线 → 继电器)</text>
<text x="28.0" y="70.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="14" fill="#555" text-anchor="start" font-weight="normal">站点:线圈 100 kHz / 捕获时钟 3 MHz12MHz÷4,官方手册直证)/ Xn₀=480 tick / LPCNT=68 / 窗=32640 tick=10.88 ms / α=79(τ=35.3 ms) / 进入档1=60(0.0916%Δf/f)</text>
<rect x="1170.0" y="20.0" width="470.0" height="62.0" rx="6" fill="#fbfcfe" stroke="#0a58ca" stroke-width="1.2" opacity="1.00"/>
<text x="1182.0" y="44.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="16" fill="#0a58ca" text-anchor="start" font-weight="bold">三段横轴(跨 6 个数量级,非线性)</text>
<text x="1182.0" y="68.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="14" fill="#333" text-anchor="start" font-weight="normal">① 微观 0~11.2 ms(一个窗) ② 中观 0~0.6 s(检测到输出)</text>
<text x="1182.0" y="89.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="14" fill="#333" text-anchor="start" font-weight="normal">③ 宏观 0~12 s(基线块平均 / 上电学习)</text>
<text x="28.0" y="120.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="17" fill="#0a58ca" text-anchor="start" font-weight="bold">① 微观:一个测量窗(0 ~ 11.2 ms)</text>
<line x1="250.0" y1="628.0" x2="1470.0" y2="628.0" stroke="#888" stroke-width="1.2" opacity="1.00"/>
<line x1="250.0" y1="628.0" x2="250.0" y2="635.0" stroke="#888" stroke-width="1.0" opacity="1.00"/>
<text x="250.0" y="651.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#666" text-anchor="middle" font-weight="normal">0</text>
<line x1="467.9" y1="628.0" x2="467.9" y2="635.0" stroke="#888" stroke-width="1.0" opacity="1.00"/>
<text x="467.9" y="651.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#666" text-anchor="middle" font-weight="normal">2 ms</text>
<line x1="685.7" y1="628.0" x2="685.7" y2="635.0" stroke="#888" stroke-width="1.0" opacity="1.00"/>
<text x="685.7" y="651.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#666" text-anchor="middle" font-weight="normal">4 ms</text>
<line x1="903.6" y1="628.0" x2="903.6" y2="635.0" stroke="#888" stroke-width="1.0" opacity="1.00"/>
<text x="903.6" y="651.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#666" text-anchor="middle" font-weight="normal">6 ms</text>
<line x1="1121.4" y1="628.0" x2="1121.4" y2="635.0" stroke="#888" stroke-width="1.0" opacity="1.00"/>
<text x="1121.4" y="651.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#666" text-anchor="middle" font-weight="normal">8 ms</text>
<line x1="1339.3" y1="628.0" x2="1339.3" y2="635.0" stroke="#888" stroke-width="1.0" opacity="1.00"/>
<text x="1339.3" y="651.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#666" text-anchor="middle" font-weight="normal">10 ms</text>
<line x1="1470.0" y1="628.0" x2="1470.0" y2="635.0" stroke="#888" stroke-width="1.0" opacity="1.00"/>
<text x="1470.0" y="651.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#666" text-anchor="middle" font-weight="normal">11.2 ms</text>
<text x="236.0" y="633.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="15" fill="#0b2c4d" text-anchor="end" font-weight="bold">时间</text>
<polyline points="250.00,194.00 315.36,194.00 315.36,182.00 1470.00,182.00" fill="none" stroke="#c1121f" stroke-width="2.0" opacity="1.00" stroke-linejoin="round"/>
<line x1="236.0" y1="194.0" x2="254.0" y2="194.0" stroke="#c1121f" stroke-width="1.0" opacity="1.00" stroke-dasharray="3,3"/>
<text x="1476.0" y="188.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#c1121f" text-anchor="start" font-weight="normal">线圈谐振频率</text>
<text x="236.0" y="168.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="15" fill="#0b2c4d" text-anchor="end" font-weight="bold">A1 线圈 f</text>
<text x="236.0" y="188.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="12" fill="#777" text-anchor="end" font-weight="normal">100.000 kHz</text>
<text x="325.4" y="164.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="14" fill="#c1121f" text-anchor="start" font-weight="normal">车辆进入(0.6 ms):L↓ ⇒ f↑ +0.5% ⇒ 周期↓、Xn↓</text>
<polyline points="250.00,284.00 250.00,284.00 267.43,284.00 267.43,258.00 284.86,258.00 284.86,284.00 302.29,284.00 302.29,258.00 319.71,258.00 319.71,284.00 337.14,284.00 337.14,258.00 354.57,258.00 354.57,284.00 372.00,284.00 372.00,258.00 389.43,258.00 389.43,284.00 406.86,284.00 406.86,258.00 424.29,258.00 424.29,284.00 441.71,284.00 441.71,258.00 459.14,258.00 459.14,284.00 476.57,284.00 476.57,258.00 494.00,258.00 494.00,284.00 511.43,284.00 511.43,258.00 528.86,258.00 528.86,284.00 546.29,284.00 546.29,258.00 563.71,258.00 563.71,284.00 581.14,284.00 581.14,258.00 598.57,258.00 598.57,284.00 616.00,284.00 616.00,258.00 633.43,258.00 633.43,284.00 650.86,284.00 650.86,258.00 668.29,258.00 668.29,284.00 685.71,284.00 685.71,258.00 703.14,258.00 703.14,284.00 720.57,284.00 720.57,258.00 738.00,258.00 738.00,284.00 755.43,284.00 755.43,258.00 772.86,258.00 772.86,284.00 790.29,284.00 790.29,258.00 807.71,258.00 807.71,284.00 825.14,284.00 825.14,258.00 842.57,258.00 842.57,284.00 860.00,284.00 860.00,258.00 877.43,258.00 877.43,284.00 894.86,284.00 894.86,258.00 912.29,258.00 912.29,284.00 929.71,284.00 929.71,258.00 947.14,258.00 947.14,284.00 964.57,284.00 964.57,258.00 982.00,258.00 982.00,284.00 999.43,284.00 999.43,258.00 1016.86,258.00 1016.86,284.00 1034.29,284.00 1034.29,258.00 1051.71,258.00 1051.71,284.00 1069.14,284.00 1069.14,258.00 1086.57,258.00 1086.57,284.00 1104.00,284.00 1104.00,258.00 1121.43,258.00 1121.43,284.00 1138.86,284.00 1138.86,258.00 1156.29,258.00 1156.29,284.00 1173.71,284.00 1173.71,258.00 1191.14,258.00 1191.14,284.00 1208.57,284.00 1208.57,258.00 1226.00,258.00 1226.00,284.00 1243.43,284.00 1243.43,258.00 1260.86,258.00 1260.86,284.00 1278.29,284.00 1278.29,258.00 1295.71,258.00 1295.71,284.00 1313.14,284.00 1313.14,258.00 1330.57,258.00 1330.57,284.00 1348.00,284.00 1348.00,258.00 1365.43,258.00 1365.43,284.00 1382.86,284.00 1382.86,258.00 1400.29,258.00 1400.29,284.00 1417.71,284.00 1417.71,258.00 1435.14,258.00 1435.14,284.00 1452.57,284.00 1452.57,258.00 1470.00,258.00" fill="none" stroke="#0a7d4b" stroke-width="1.6" opacity="1.00" stroke-linejoin="round"/>
<circle cx="250.0" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="267.4" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="284.9" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="302.3" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="319.7" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="337.1" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="354.6" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="372.0" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="389.4" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="406.9" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="424.3" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="441.7" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="459.1" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="476.6" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="494.0" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="511.4" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="528.9" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="546.3" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="563.7" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="581.1" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="598.6" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="616.0" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="633.4" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="650.9" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="668.3" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="685.7" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="703.1" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="720.6" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="738.0" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="755.4" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="772.9" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="790.3" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="807.7" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="825.1" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="842.6" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="860.0" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="877.4" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="894.9" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="912.3" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="929.7" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="947.1" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="964.6" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="982.0" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="999.4" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="1016.9" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="1034.3" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="1051.7" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="1069.1" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="1086.6" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="1104.0" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="1121.4" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="1138.9" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="1156.3" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="1173.7" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="1191.1" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="1208.6" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="1226.0" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="1243.4" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="1260.9" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="1278.3" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="1295.7" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="1313.1" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="1330.6" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="1348.0" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="1365.4" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="1382.9" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="1400.3" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="1417.7" cy="258.0" r="2.6" fill="#c1121f"/>
<circle cx="1435.1" cy="284.0" r="2.6" fill="#c1121f"/>
<circle cx="1452.6" cy="258.0" r="2.6" fill="#c1121f"/>
<text x="236.0" y="264.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="15" fill="#0b2c4d" text-anchor="end" font-weight="bold">A2 P23 方波</text>
<text x="236.0" y="284.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="12" fill="#777" text-anchor="end" font-weight="normal">÷32 / 320 µs 周期</text>
<text x="1476.0" y="272.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#0a7d4b" text-anchor="start" font-weight="normal">绿=P23,红点=捕获点(双沿)</text>
<line x1="337.1" y1="288.0" x2="511.4" y2="288.0" stroke="#c1121f" stroke-width="1.2" opacity="1.00"/>
<line x1="337.1" y1="284.0" x2="337.1" y2="292.0" stroke="#c1121f" stroke-width="1.2" opacity="1.00"/>
<line x1="511.4" y1="284.0" x2="511.4" y2="292.0" stroke="#c1121f" stroke-width="1.2" opacity="1.00"/>
<text x="424.3" y="308.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#c1121f" text-anchor="middle" font-weight="normal">Xn = 相邻捕获差 = 480 tick = 160 µs= Xn/f_cap</text>
<text x="236.0" y="488.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="15" fill="#0b2c4d" text-anchor="end" font-weight="bold">A3 CapSum</text>
<text x="236.0" y="506.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="12" fill="#777" text-anchor="end" font-weight="normal">Σ Xntick</text>
<line x1="250.0" y1="488.0" x2="1470.0" y2="488.0" stroke="#aaa" stroke-width="1.0" opacity="1.00" stroke-dasharray="4,4"/>
<line x1="250.0" y1="348.0" x2="1470.0" y2="348.0" stroke="#aaa" stroke-width="1.0" opacity="1.00" stroke-dasharray="4,4"/>
<text x="1476.0" y="352.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="12" fill="#777" text-anchor="start" font-weight="normal">32768BASE 标称)</text>
<text x="1476.0" y="492.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="12" fill="#777" text-anchor="start" font-weight="normal">0</text>
<polyline points="250.00,488.00 250.00,485.95 267.94,485.95 267.94,483.90 285.88,483.90 285.88,481.85 303.82,481.85 303.82,479.80 321.76,479.80 321.76,477.75 339.71,477.75 339.71,475.70 357.65,475.70 357.65,473.64 375.59,473.64 375.59,471.59 393.53,471.59 393.53,469.54 411.47,469.54 411.47,467.49 429.41,467.49 429.41,465.44 447.35,465.44 447.35,463.39 465.29,463.39 465.29,461.34 483.24,461.34 483.24,459.29 501.18,459.29 501.18,457.24 519.12,457.24 519.12,455.19 537.06,455.19 537.06,453.14 555.00,453.14 555.00,451.09 572.94,451.09 572.94,449.04 590.88,449.04 590.88,446.98 608.82,446.98 608.82,444.93 626.76,444.93 626.76,442.88 644.71,442.88 644.71,440.83 662.65,440.83 662.65,438.78 680.59,438.78 680.59,436.73 698.53,436.73 698.53,434.68 716.47,434.68 716.47,432.63 734.41,432.63 734.41,430.58 752.35,430.58 752.35,428.53 770.29,428.53 770.29,426.48 788.24,426.48 788.24,424.43 806.18,424.43 806.18,422.38 824.12,422.38 824.12,420.32 842.06,420.32 842.06,418.27 860.00,418.27 860.00,416.22 877.94,416.22 877.94,414.17 895.88,414.17 895.88,412.12 913.82,412.12 913.82,410.07 931.76,410.07 931.76,408.02 949.71,408.02 949.71,405.97 967.65,405.97 967.65,403.92 985.59,403.92 985.59,401.87 1003.53,401.87 1003.53,399.82 1021.47,399.82 1021.47,397.77 1039.41,397.77 1039.41,395.71 1057.35,395.71 1057.35,393.66 1075.29,393.66 1075.29,391.61 1093.24,391.61 1093.24,389.56 1111.18,389.56 1111.18,387.51 1129.12,387.51 1129.12,385.46 1147.06,385.46 1147.06,383.41 1165.00,383.41 1165.00,381.36 1182.94,381.36 1182.94,379.31 1200.88,379.31 1200.88,377.26 1218.82,377.26 1218.82,375.21 1236.76,375.21 1236.76,373.16 1254.71,373.16 1254.71,371.11 1272.65,371.11 1272.65,369.05 1290.59,369.05 1290.59,367.00 1308.53,367.00 1308.53,364.95 1326.47,364.95 1326.47,362.90 1344.41,362.90 1344.41,360.85 1362.35,360.85 1362.35,358.80 1380.29,358.80 1380.29,356.75 1398.24,356.75 1398.24,354.70 1416.18,354.70 1416.18,352.65 1434.12,352.65 1434.12,350.60 1452.06,350.60 1452.06,348.55 1470.00,348.55" fill="none" stroke="#e07b00" stroke-width="1.8" opacity="1.00" stroke-linejoin="round"/>
<line x1="274.4" y1="518.0" x2="1421.2" y2="518.0" stroke="#e07b00" stroke-width="1.2" opacity="1.00"/>
<text x="258.0" y="334.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="14" fill="#a35b00" text-anchor="start" font-weight="normal">每 160 µs 累加一次 Xn(共 68 级台阶)⇒ CapCnt≥LPCNT 时「窗结账」</text>
<circle cx="1470.0" cy="348.0" r="4.5" fill="#c1121f"/>
<text x="258.0" y="614.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="14" fill="#c1121f" text-anchor="start" font-weight="normal">窗结账:Value = Σ(68 个 Xn) = 32640 ⇒ CAP_OK=1 ⇒ 主循环随即调用 VD1_TASK()</text>
<polyline points="250.00,548.00 1435.14,548.00 1435.14,582.00 1470.00,582.00" fill="none" stroke="#0a58ca" stroke-width="2.0" opacity="1.00" stroke-linejoin="round"/>
<line x1="250.0" y1="548.0" x2="1470.0" y2="548.0" stroke="#aaa" stroke-width="1.0" opacity="1.00" stroke-dasharray="4,4"/>
<text x="236.0" y="548.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="15" fill="#0b2c4d" text-anchor="end" font-weight="bold">A4 Value</text>
<text x="236.0" y="568.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="12" fill="#777" text-anchor="end" font-weight="normal">每窗更新一次</text>
<text x="1476.0" y="552.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="12" fill="#0a58ca" text-anchor="start" font-weight="normal">Origin 基准 32640</text>
<text x="1476.0" y="586.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="12" fill="#0a58ca" text-anchor="start" font-weight="normal">车后 32486(−0.5%</text>
<text x="1423.1" y="536.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="14" fill="#0a58ca" text-anchor="end" font-weight="normal">窗边界 10.88 ms(本窗只含 0.6~10.88 ms ⇒ 部分反映)</text>
<text x="890.0" y="302.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="14" fill="#0b2c4d" text-anchor="start" font-weight="bold">窗 = LPCNT·Xn / f_cap = ⌊32768/Xn₀⌋·Xn / f_cap = 68 × 480 / 3 MHz = 10.880 ms(标称上限)</text>
<text x="28.0" y="682.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="17" fill="#0a58ca" text-anchor="start" font-weight="bold">② 中观:检测延迟与输出(0 ~ 600 ms) 车辆进入 @0.6 ms</text>
<line x1="250.0" y1="1098.0" x2="1470.0" y2="1098.0" stroke="#888" stroke-width="1.2" opacity="1.00"/>
<line x1="250.0" y1="1098.0" x2="250.0" y2="1105.0" stroke="#888" stroke-width="1.0" opacity="1.00"/>
<text x="250.0" y="1121.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#666" text-anchor="middle" font-weight="normal">0</text>
<line x1="453.3" y1="1098.0" x2="453.3" y2="1105.0" stroke="#888" stroke-width="1.0" opacity="1.00"/>
<text x="453.3" y="1121.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#666" text-anchor="middle" font-weight="normal">100 ms</text>
<line x1="656.7" y1="1098.0" x2="656.7" y2="1105.0" stroke="#888" stroke-width="1.0" opacity="1.00"/>
<text x="656.7" y="1121.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#666" text-anchor="middle" font-weight="normal">200 ms</text>
<line x1="860.0" y1="1098.0" x2="860.0" y2="1105.0" stroke="#888" stroke-width="1.0" opacity="1.00"/>
<text x="860.0" y="1121.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#666" text-anchor="middle" font-weight="normal">300 ms</text>
<line x1="1063.3" y1="1098.0" x2="1063.3" y2="1105.0" stroke="#888" stroke-width="1.0" opacity="1.00"/>
<text x="1063.3" y="1121.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#666" text-anchor="middle" font-weight="normal">400 ms</text>
<line x1="1266.7" y1="1098.0" x2="1266.7" y2="1105.0" stroke="#888" stroke-width="1.0" opacity="1.00"/>
<text x="1266.7" y="1121.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#666" text-anchor="middle" font-weight="normal">500 ms</text>
<line x1="1470.0" y1="1098.0" x2="1470.0" y2="1105.0" stroke="#888" stroke-width="1.0" opacity="1.00"/>
<text x="1470.0" y="1121.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#666" text-anchor="middle" font-weight="normal">600 ms</text>
<text x="236.0" y="1103.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="15" fill="#0b2c4d" text-anchor="end" font-weight="bold">时间</text>
<text x="236.0" y="998.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="15" fill="#0b2c4d" text-anchor="end" font-weight="bold">B1 CAPVD</text>
<text x="236.0" y="1016.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="12" fill="#777" text-anchor="end" font-weight="normal">IIR 平滑值</text>
<line x1="250.0" y1="817.0" x2="1470.0" y2="817.0" stroke="#0a58ca" stroke-width="1.2" opacity="1.00" stroke-dasharray="6,4"/>
<text x="1476.0" y="821.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="12" fill="#0a58ca" text-anchor="start" font-weight="normal">Origin 32640(基线)</text>
<line x1="250.0" y1="844.7" x2="1470.0" y2="844.7" stroke="#c1121f" stroke-width="1.4" opacity="1.00" stroke-dasharray="6,4"/>
<text x="1476.0" y="848.7" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="12" fill="#c1121f" text-anchor="start" font-weight="normal">判据线 32611(−dlt=29 / 0.0916%</text>
<polyline points="250.00,32640.00 272.12,32640.00 272.12,32592.65 294.25,32592.65 294.25,32557.15 316.37,32557.15 316.37,32532.61 338.49,32532.61 338.49,32515.64 360.61,32515.64 360.61,32503.90 382.74,32503.90 382.74,32495.79 404.86,32495.79 404.86,32490.18 426.98,32490.18 426.98,32486.30 449.10,32486.30 449.10,32483.62 471.23,32483.62 471.23,32481.77 493.35,32481.77 493.35,32480.48 515.47,32480.48 515.47,32479.60 537.59,32479.60 537.59,32478.98 559.72,32478.98 559.72,32478.56 581.84,32478.56 581.84,32478.27 603.96,32478.27 603.96,32478.07 626.09,32478.07 626.09,32477.93 648.21,32477.93 648.21,32477.83 670.33,32477.83 670.33,32477.76 692.45,32477.76 692.45,32477.72 714.58,32477.72 714.58,32477.68 736.70,32477.68 736.70,32477.66 758.82,32477.66 758.82,32477.65 780.94,32477.65 780.94,32477.64 803.07,32477.64 803.07,32477.63 825.19,32477.63 825.19,32477.62 847.31,32477.62 847.31,32477.62 869.43,32477.62 869.43,32477.62 891.56,32477.62 891.56,32477.62 913.68,32477.62 913.68,32477.61 935.80,32477.61 935.80,32477.61 957.93,32477.61 957.93,32477.61 980.05,32477.61 980.05,32477.61 1002.17,32477.61 1002.17,32477.61 1024.29,32477.61 1024.29,32477.61 1046.42,32477.61 1046.42,32477.61 1068.54,32477.61 1068.54,32477.61 1090.66,32477.61 1090.66,32477.61 1112.78,32477.61 1112.78,32477.61 1134.91,32477.61 1134.91,32477.61 1157.03,32477.61 1157.03,32477.61 1179.15,32477.61 1179.15,32477.61 1201.27,32477.61 1201.27,32477.61 1223.40,32477.61 1223.40,32477.61 1245.52,32477.61 1245.52,32477.61 1267.64,32477.61 1267.64,32477.61 1289.77,32477.61 1289.77,32477.61 1311.89,32477.61 1311.89,32477.61 1334.01,32477.61 1334.01,32477.61 1356.13,32477.61 1356.13,32477.61 1378.26,32477.61 1378.26,32477.61 1400.38,32477.61 1400.38,32477.61 1422.50,32477.61 1422.50,32477.61 1444.62,32477.61 1444.62,32477.61 1466.75,32477.61 1466.75,32477.61 1488.87,32477.61 1488.87,32477.61 1510.99,32477.61 1510.99,32477.61 1533.11,32477.61 1533.11,32477.61 1555.24,32477.61 1555.24,32477.61 1577.36,32477.61 1577.36,32477.61" fill="none" stroke="#c1121f" stroke-width="2.0" opacity="1.00" stroke-linejoin="round"/>
<polyline points="250.00,32640.00 272.12,32640.00 272.12,32630.49 294.25,32630.49 294.25,32623.36 316.37,32623.36 316.37,32618.44 338.49,32618.44 338.49,32615.03 360.61,32615.03 360.61,32612.67 382.74,32612.67 382.74,32611.04 404.86,32611.04 404.86,32609.92 426.98,32609.92 426.98,32609.14 449.10,32609.14 449.10,32608.60 471.23,32608.60 471.23,32608.23 493.35,32608.23 493.35,32607.97 515.47,32607.97 515.47,32607.79 537.59,32607.79 537.59,32607.67 559.72,32607.67 559.72,32607.58 581.84,32607.58 581.84,32607.52 603.96,32607.52 603.96,32607.48 626.09,32607.48 626.09,32607.46 648.21,32607.46 648.21,32607.44 670.33,32607.44 670.33,32607.42 692.45,32607.42 692.45,32607.41 714.58,32607.41 714.58,32607.41 736.70,32607.41 736.70,32607.40 758.82,32607.40 758.82,32607.40 780.94,32607.40 780.94,32607.40 803.07,32607.40 803.07,32607.40 825.19,32607.40 825.19,32607.39 847.31,32607.39 847.31,32607.39 869.43,32607.39 869.43,32607.39 891.56,32607.39 891.56,32607.39 913.68,32607.39 913.68,32607.39 935.80,32607.39 935.80,32607.39 957.93,32607.39 957.93,32607.39 980.05,32607.39 980.05,32607.39 1002.17,32607.39 1002.17,32607.39 1024.29,32607.39 1024.29,32607.39 1046.42,32607.39 1046.42,32607.39 1068.54,32607.39 1068.54,32607.39 1090.66,32607.39 1090.66,32607.39 1112.78,32607.39 1112.78,32607.39 1134.91,32607.39 1134.91,32607.39 1157.03,32607.39 1157.03,32607.39 1179.15,32607.39 1179.15,32607.39 1201.27,32607.39 1201.27,32607.39 1223.40,32607.39 1223.40,32607.39 1245.52,32607.39 1245.52,32607.39 1267.64,32607.39 1267.64,32607.39 1289.77,32607.39 1289.77,32607.39 1311.89,32607.39 1311.89,32607.39 1334.01,32607.39 1334.01,32607.39 1356.13,32607.39 1356.13,32607.39 1378.26,32607.39 1378.26,32607.39 1400.38,32607.39 1400.38,32607.39 1422.50,32607.39 1422.50,32607.39 1444.62,32607.39 1444.62,32607.39 1466.75,32607.39 1466.75,32607.39 1488.87,32607.39 1488.87,32607.39 1510.99,32607.39 1510.99,32607.39 1533.11,32607.39 1533.11,32607.39 1555.24,32607.39 1555.24,32607.39 1577.36,32607.39 1577.36,32607.39" fill="none" stroke="#7aa7d9" stroke-width="1.6" opacity="1.00" stroke-linejoin="round"/>
<text x="250.0" y="0.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="1" fill="#111" text-anchor="start" font-weight="normal"></text>
<circle cx="272.1" cy="844.7" r="5.0" fill="#c1121f"/>
<text x="282.1" y="832.7" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="14" fill="#c1121f" text-anchor="start" font-weight="normal">越线 ⇒ 有车(大信号 Δf/f=+0.5%:第 1 窗即越线,t≈10.9 ms)</text>
<circle cx="404.9" cy="844.7" r="4.4" fill="#1f6fb2"/>
<text x="416.9" y="890.7" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="14" fill="#1f6fb2" text-anchor="start" font-weight="normal">小信号 Δf/f=+0.1%:≈2.2τ 才越线(t≈76 ms)—— τ 主导</text>
<rect x="1020.0" y="698.0" width="610.0" height="110.0" rx="6" fill="#fbfcfe" stroke="#0a58ca" stroke-width="1.2" opacity="1.00"/>
<text x="1032.0" y="722.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="16" fill="#0a58ca" text-anchor="start" font-weight="bold">两种检测路径(同一条判据)</text>
<text x="1032.0" y="746.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="14" fill="#333" text-anchor="start" font-weight="normal">大信号(+0.5%):第 1 窗越线,窗内平均主导</text>
<text x="1032.0" y="767.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="14" fill="#333" text-anchor="start" font-weight="normal">小信号(+0.1%≈阈值):≈2.2τ≈78 msIIR 主导</text>
<text x="1032.0" y="788.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="14" fill="#333" text-anchor="start" font-weight="normal">⇒ 延迟 ≈ 窗平均(≤1 窗) + IIR + 输出节拍(50 ms)</text>
<text x="236.0" y="1046.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="15" fill="#0b2c4d" text-anchor="end" font-weight="bold">B2 输出</text>
<text x="236.0" y="1064.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="12" fill="#777" text-anchor="end" font-weight="normal">FLAG_IN / 脉冲</text>
<line x1="250.0" y1="1072.0" x2="1470.0" y2="1072.0" stroke="#888" stroke-width="1.0" opacity="1.00"/>
<polyline points="250.00,1072.00 250.00,1046.00 351.67,1046.00 453.33,1046.00 555.00,1046.00 656.67,1046.00 758.33,1046.00 860.00,1046.00 961.67,1046.00 1063.33,1046.00 1165.00,1046.00 1266.67,1046.00 1368.33,1046.00" fill="none" stroke="#666" stroke-width="1.2" opacity="1.00" stroke-linejoin="round"/>
<line x1="250.0" y1="1046.0" x2="272.1" y2="1046.0" stroke="#666" stroke-width="1.6" opacity="1.00"/>
<polyline points="272.12,1072.00 272.12,1044.00 1288.79,1044.00 1288.79,1072.00" fill="none" stroke="#0a7d4b" stroke-width="2.2" opacity="1.00" stroke-linejoin="round"/>
<text x="256.0" y="1100.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="14" fill="#0a7d4b" text-anchor="start" font-weight="normal">50 ms 主节拍(T1 ISR)量化:FLAG_IN 在下一拍被消费 ⇒ 输出起点 ≤ 越线+50 ms。绿=继电器脉冲输出(500 ms)</text>
<text x="28.0" y="1182.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="17" fill="#0a58ca" text-anchor="start" font-weight="bold">③ 宏观:基线 Origin 的块平均(0 ~ 12 s</text>
<line x1="250.0" y1="1348.0" x2="1470.0" y2="1348.0" stroke="#888" stroke-width="1.2" opacity="1.00"/>
<line x1="250.0" y1="1348.0" x2="250.0" y2="1355.0" stroke="#888" stroke-width="1.0" opacity="1.00"/>
<text x="250.0" y="1371.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#666" text-anchor="middle" font-weight="normal">0</text>
<line x1="453.3" y1="1348.0" x2="453.3" y2="1355.0" stroke="#888" stroke-width="1.0" opacity="1.00"/>
<text x="453.3" y="1371.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#666" text-anchor="middle" font-weight="normal">2 s</text>
<line x1="656.7" y1="1348.0" x2="656.7" y2="1355.0" stroke="#888" stroke-width="1.0" opacity="1.00"/>
<text x="656.7" y="1371.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#666" text-anchor="middle" font-weight="normal">4 s</text>
<line x1="860.0" y1="1348.0" x2="860.0" y2="1355.0" stroke="#888" stroke-width="1.0" opacity="1.00"/>
<text x="860.0" y="1371.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#666" text-anchor="middle" font-weight="normal">6 s</text>
<line x1="1063.3" y1="1348.0" x2="1063.3" y2="1355.0" stroke="#888" stroke-width="1.0" opacity="1.00"/>
<text x="1063.3" y="1371.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#666" text-anchor="middle" font-weight="normal">8 s</text>
<line x1="1266.7" y1="1348.0" x2="1266.7" y2="1355.0" stroke="#888" stroke-width="1.0" opacity="1.00"/>
<text x="1266.7" y="1371.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#666" text-anchor="middle" font-weight="normal">10 s</text>
<line x1="1470.0" y1="1348.0" x2="1470.0" y2="1355.0" stroke="#888" stroke-width="1.0" opacity="1.00"/>
<text x="1470.0" y="1371.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#666" text-anchor="middle" font-weight="normal">12 s</text>
<text x="236.0" y="1353.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="15" fill="#0b2c4d" text-anchor="end" font-weight="bold">时间</text>
<text x="236.0" y="1318.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="15" fill="#0b2c4d" text-anchor="end" font-weight="bold">C1 Origin</text>
<text x="236.0" y="1336.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="12" fill="#777" text-anchor="end" font-weight="normal">基线(块平均)</text>
<polyline points="250.00,32644.00 2462.27,32644.00 2462.27,32638.00 4674.53,32638.00 4674.53,32641.00 6886.80,32641.00 6886.80,32640.00 9099.07,32640.00 9099.07,32643.00 11311.33,32643.00 11311.33,32639.00 13523.60,32639.00 13523.60,32640.00 15735.87,32640.00 15735.87,32642.00 17948.13,32642.00 17948.13,32640.00 20160.40,32640.00 20160.40,32641.00 22372.67,32641.00 22372.67,32640.00 24584.93,32640.00 24584.93,32640.00" fill="none" stroke="#0a58ca" stroke-width="2.0" opacity="1.00" stroke-linejoin="round"/>
<polyline points="250.00,32650.00 11577.70,32650.00 11577.70,32636.00 22905.40,32636.00 22905.40,32641.00" fill="none" stroke="#999" stroke-width="1.8" opacity="1.00" stroke-linejoin="round"/>
<line x1="250.0" y1="1295.5" x2="1470.0" y2="1295.5" stroke="#aaa" stroke-width="1.0" opacity="1.00" stroke-dasharray="4,4"/>
<circle cx="250.0" cy="1291.0" r="4.2" fill="#c1121f"/>
<text x="258.0" y="1340.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="13" fill="#c1121f" text-anchor="start" font-weight="normal">上电:Origin = 首窗单点(噪声最大)</text>
<text x="1476.0" y="1299.5" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="12" fill="#777" text-anchor="start" font-weight="normal">真值</text>
<text x="1476.0" y="1277.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="12" fill="#0a58ca" text-anchor="start" font-weight="normal">PD132T: 100 窗=1.088 s(蓝)</text>
<text x="1476.0" y="1299.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="12" fill="#888" text-anchor="start" font-weight="normal">PD136HA: 256 窗=5.571 s(灰)</text>
<text x="605.8" y="1206.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="14" fill="#0b2c4d" text-anchor="middle" font-weight="normal">块平均 ⇒ 基线跟踪是「阶梯式」,块内一直用上一块的均值;有车期间冻结并重新累计</text>
<rect x="28.0" y="1398.0" width="780.0" height="126.0" rx="6" fill="#fbfcfe" stroke="#0a58ca" stroke-width="1.2" opacity="1.00"/>
<text x="40.0" y="1422.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="16" fill="#0a58ca" text-anchor="start" font-weight="bold">四条关系(讨论快慢时用「窗」最稳)</text>
<text x="40.0" y="1446.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="14" fill="#333" text-anchor="start" font-weight="normal">① t_Xn = 分频比/(边沿系数·f_coil)PD132T = 16/f、PD136HA = 32/f(随站点变,不是常数)</text>
<text x="40.0" y="1467.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="14" fill="#333" text-anchor="start" font-weight="normal">② Value = Σ(LPCNT 个 Xn) 是箱式积分(计数域降采样)⇒ Δf/f = 表值/65536 精确</text>
<text x="40.0" y="1488.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="14" fill="#333" text-anchor="start" font-weight="normal">③ τ/T = 256/αα79 = 3.24 窗、α64 = 4.0 窗(与型号无关)</text>
<text x="40.0" y="1509.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="14" fill="#333" text-anchor="start" font-weight="normal">④ Origin = 块平均(100 / 256 窗),非滑动 ⇒ 基线粒度 = 1 块</text>
<rect x="830.0" y="1398.0" width="770.0" height="126.0" rx="6" fill="#fbfcfe" stroke="#0a58ca" stroke-width="1.2" opacity="1.00"/>
<text x="842.0" y="1422.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="16" fill="#0a58ca" text-anchor="start" font-weight="bold">PD136HA 对照(同站点、同 ÷32)</text>
<text x="842.0" y="1446.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="14" fill="#333" text-anchor="start" font-weight="normal">捕获:320 µs/次(单沿,整周期 32 个线圈周期);Xn₀ 同为 480 tick</text>
<text x="842.0" y="1467.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="14" fill="#333" text-anchor="start" font-weight="normal">窗:68 × 320 µs = 21.760 ms(标称上限 21.845</text>
<text x="842.0" y="1488.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="14" fill="#333" text-anchor="start" font-weight="normal">τ(α64) = 87.0 ms = 4.0 窗;Origin = 256 窗 = 5.571 s</text>
<text x="842.0" y="1509.0" font-family="Noto Serif CJK SC, Noto Sans CJK SC, sans-serif" font-size="14" fill="#333" text-anchor="start" font-weight="normal">⇒ 全链时间 ×2(基线 ×5.1)—— 响应更慢但积分深度 ×2</text></svg>

After

Width:  |  Height:  |  Size: 35 KiB

+18
View File
@@ -16,6 +16,19 @@
---
### 0.1 符号约定(先钉死,避免把曲线画反)
| 环节 | 车辆进入时的方向 |
|---|---|
| 线圈电感 `L` | **↓**(涡流去磁为主;铁磁体不改变结论方向) |
| 谐振频率 `f` | **↑**`f = 1/(2π√(LC))`);典型 Δf/f = **+0.02% ~ +1%**,大车/深占压可达 **+5%** |
| 分频后周期 / `Xn``∝ 1/f` | **↓** |
| `Value` / `CAPVD``∝ Xn` | **↓** ⇒ 判据 `CAPVD < Origin dlt` 取的正是**下降侧** ✓ |
| 测量窗时长(`∝ 1/f` | **↓**(−0.02% ~ 4.8% |
与交付报告一致的关系式:`CAPVD ≈ BASE·f₀/f``(Origin CAPVD)/Origin ≈ Δf/f`**车辆时 > 0**)✓
**"深占压"= 频率升高、窗长缩短**;旧稿"频偏 5% ⇒ 窗 +5.3%"方向写反,2026-09-11 已改正(窗长公式 `∝ f₀/f_now` 本身对两个方向都成立,只是场景标注错了)。
## 1. 代码机理(PD132T / PD136HA 逐行同构)
```c
@@ -173,6 +186,11 @@ Value / Origin = Xn₁ / Xn₀ ← 精确,r₀ 完全约掉 ✓
## 9. 时序链详解:六个量的更新时间(2026-09-11 补,用户提出)
![PD132T 端到端时序图:三段横轴 —— ① 一个窗(0~11.2ms)② 检测到输出(0~600ms)③ 基线块平均(0~12s](img/timing-chain-pd132t.png)
> 矢量版(可放大/edit):`docs/img/timing-chain-pd132t.svg`(由 `tools/plot_timing_chain.py` 生成,纯 stdlib 手写 SVG;图中曲线按 §1~§4 公式**真算**而非示意):
> `python3 tools/plot_timing_chain.py && chromium --headless=new --disable-gpu --no-sandbox --default-background-color=FFFFFFFF --window-size=1680,1560 --screenshot=docs/img/timing-chain-pd132t.png file://$PWD/docs/img/timing-chain-pd132t.svg`
整条链是**三级降采样**:捕获级(每 `Xn` 一次)→ 窗级(每 `LPCNT` 次捕获一次)→ 基线级(每 100/256 窗一次)。
```
+1 -1
View File
@@ -75,7 +75,7 @@ const uint16_t SensTable_1[4] = { 60, 32, 21, 14}; // 离开:分档与 PD1
净效果:**进入/离开阈值双向对齐后,V4B 因确认机制反而比 PD132T 稳**(代价:进入/释放各慢 ~20~30ms)。
> ⚠ **2026-09-11 勘误**PD132T 捕获时钟 = **3MHz**(旧稿 0.75MHz 无寄存器依据)⇒ 测量节拍 **10.92ms**(旧 43.7ms)、精确 τ(α79) **29.6ms**(旧口径 142ms)。本节 5 条对比中前两条的「快/密 4.4×」结论作废,改为「同量级」。**阈值/灵敏度口径不受影响**(与时钟无关)。⚠ 另:**测量节拍是区间** —— `LPCNT=⌊32768/Xn₀⌋` 整数除法 + 学习后冻结 ⇒ 标称 10.92ms 为**上限**,实际按站点线圈频率 0.4%~6.2%100kHz 站点 10.88ms),深占压再 +5%;**Δf/f 口径同样不受影响**。详见 `docs/measurement-window-quantization.md`。推导见 `docs/pd136ha-to-dld154v4b-delivery-alignment.md` §2.3。
> ⚠ **2026-09-11 勘误**PD132T 捕获时钟 = **3MHz**(旧稿 0.75MHz 无寄存器依据)⇒ 测量节拍 **10.92ms**(旧 43.7ms)、精确 τ(α79) **29.6ms**(旧口径 142ms)。本节 5 条对比中前两条的「快/密 4.4×」结论作废,改为「同量级」。**阈值/灵敏度口径不受影响**(与时钟无关)。⚠ 另:**测量节拍是区间** —— `LPCNT=⌊32768/Xn₀⌋` 整数除法 + 学习后冻结 ⇒ 标称 10.92ms 为**上限**,实际按站点线圈频率 0.4%~6.2%100kHz 站点 10.88ms),深占压(Δf/f +5%)窗长 4.8%;**Δf/f 口径同样不受影响**。详见 `docs/measurement-window-quantization.md`。推导见 `docs/pd136ha-to-dld154v4b-delivery-alignment.md` §2.3。
## 2. 触发/释放手感(存在输出 + 延时模式)
+1 -1
View File
@@ -15,7 +15,7 @@
| 2 | 硬件前端 | **完全同构**:线圈 → 9015 PNP×2 振荡 → CD4060 施密特整形 + **÷32Q5** → MCU | ✅ |
| 3 | 线圈频段 | **两者覆盖同一频段 ≈23.4~118kHz** —— PD132T 走「3MHz **双沿**捕获(Xn = 半周期)」、PD136HA 走「1.5MHz **单沿**(Xn = 整周期)」,两项差异**恰好互相抵消**:判据常数 `C = 32·f_cap/边沿系数` **同为 4.8×10⁷** ⇒ 这就是两者 Xn 窗口常量几乎逐字相同(406~2050 vs 400~2030)的真正原因 | ⭐ 关键 |
| 4 | 归一化基数 | **同为 32768**(换 MCU 未重定标)⇒ 相对阈值 `表值/65536` 可**直接跨型号对比** | ✅ |
| 5 | 测量节拍 | **10.88ms → 21.76ms**(100kHz 站点实测口径;标称上限 10.923/21.845ms)⇒ 每窗有效平均 1088 → **2176** 个线圈周期(积分深度 ×2)|⚠ 节拍**是区间**:按站点线圈频率浮动 0 ~ −6.2%,深占压再 +5%(见 `measurement-window-quantization.md` | ⚖️ 权衡 |
| 5 | 测量节拍(端到端时序图见 `measurement-window-quantization.md` §9 | **10.88ms → 21.76ms**(100kHz 站点实测口径;标称上限 10.923/21.845ms)⇒ 每窗有效平均 1088 → **2176** 个线圈周期(积分深度 ×2)|⚠ 节拍**是区间**:按站点线圈频率浮动 0 ~ −6.2%,深占压(Δf/f +5%)窗长 4.8%(见 `measurement-window-quantization.md` | ⚖️ 权衡 |
| 6 | 滤波 / 基线 | IIR τ:**29.6~38ms → 76~87ms**(慢 2~2.9×);基线窗 **100 → 256**1.09s → 5.59s | ⚠ PD136HA 更稳更慢 |
| 7 | 判据强度 | 两者**均为单次越线判定**(无进入/离开确认计数)—— 响应快、抗单点扰动弱 | ⚖️ 相同 |
| 8 | 灵敏度表 | **重标定**:进入 {300,60,32,21} → {162,81,54,28}。**档位一一照搬会产生 46%~+69% 偏差** ⇒ 跨代必须按 Δf/f 重新对齐 | ❌ 不可照搬档位 |
@@ -114,7 +114,7 @@ CAPVD = LPCNT × Xn_分频后 = 32768 ← 与 N 无关
| PD132L | **1.2MHz** = 12MHz/10 | `TIM1_PSCRL=0x09`(10 分频)+ 外部 12MHz 晶振(`CLK_ECKR`/`CLK_SWR=0xB4``CLK_CKDIVR&=0xF8` 无分频) | 27.3 ms |
| PD136HA | **1.5MHz** = XTH(12MHz)/8 ✅**已确认** | `enCntClkDiv = AdtClkPClk0Div8`PCLK0/8+ `CLK_INIT()``XTH_CR \|= 0x07`(作者注释「**8-16MHZ**,最强驱动」)→ 直取 XTH、**无 PLL / 无 HCLK_PRS·PCLK_PRS 分频** ⇒ PCLK0 = XTH = **12MHz****用户确认 2026-09-11:外部晶振也是 12M**);`Delay_ms` 1330 次/ms 亦印证 ~12MHz | **21.85 ms**(标称上限) |
> ⚠ **测量窗是区间,不是定值(2026-09-11 补,用户提出)**`LPCNT = ⌊32768/Xn₀⌋` 是**整数除法且学习后冻结**,窗长 = `⌊32768/Xn₀⌋·Xn₁` 个 tick ⇒ 上表「测量窗」列全部为**标称上限**。实际 = 标称 × `(32768r₀)/32768` × `f₀/f_now``r₀ = 32768 mod Xn₀`):100kHz 站点 **0.39%**PD132T 10.88ms / PD136HA 21.76ms)、60kHz 站点 2.34%、带内最差 **6.16%**Xn₀=2050);深占压(频偏 5%)再 +5.3%。**Δf/f 口径不受影响**(余数在分子分母约掉,`Value/Origin = Xn₁/Xn₀` 精确)。⚠ 另:`loop1_LPCNT` 为 **`INT8U`** ⇒ 需 `Xn>129`,而 PD136HA 的频率窗口已注释 ⇒ **8 位保护消失**(异常线圈可能报"堵车"而非"故障")。详见 `docs/measurement-window-quantization.md`。
> ⚠ **测量窗是区间,不是定值(2026-09-11 补,用户提出)**`LPCNT = ⌊32768/Xn₀⌋` 是**整数除法且学习后冻结**,窗长 = `⌊32768/Xn₀⌋·Xn₁` 个 tick ⇒ 上表「测量窗」列全部为**标称上限**。实际 = 标称 × `(32768r₀)/32768` × `f₀/f_now``r₀ = 32768 mod Xn₀`):100kHz 站点 **0.39%**PD132T 10.88ms / PD136HA 21.76ms)、60kHz 站点 2.34%、带内最差 **6.16%**Xn₀=2050);深占压(车辆 Δf/f ≈ **+5%**,频率升高)窗长再 **4.8%**(⚠ 符号见 `measurement-window-quantization.md` §0.1。**Δf/f 口径不受影响**(余数在分子分母约掉,`Value/Origin = Xn₁/Xn₀` 精确)。⚠ 另:`loop1_LPCNT` 为 **`INT8U`** ⇒ 需 `Xn>129`,而 PD136HA 的频率窗口已注释 ⇒ **8 位保护消失**(异常线圈可能报"堵车"而非"故障")。详见 `docs/measurement-window-quantization.md`。
>
> ⚠ **本轮勘误**:专项文档 `hardware-loop-frontend-pd132t-vs-v4b.md` 旧记 PD132T 捕获时钟 **0.75MHz / 测量窗 43.7ms ⇒ 修正为 3MHz / 10.92ms**。
> 0.75MHz 系早期误按「T0 走 SYSCLK/4」(旧表写 `12M/4/4`)推算;实配 `AUXR=0xC0`T0x12=1 → T0 走 SYSCLK/1)⇒ PCA 时钟 = SYSCLK/4 = 3MHz,作者注释 `//溢出供PCA时钟,时钟/4` 亦指此,并被 T1 的 5ms 定时反证(60000 计数 ÷ 5ms = 12MHz = SYSCLK)。