本頁是 python_simu/hilbert90_gui.py 的位元精確 JS 移植。訊號源是
relay_feedback2.v 震盪器(kg = 166),再由 L = 62 的二抽頭 Hilbert 對分離,
接法與 new40kHz4.v 完全相同。振盪頻率是以取樣數定義的,因此會隨 fclk 縮放 —
但 I 與 Q 之間的相位差不會。
相關頁面:relay_feedback2 震盪器示範。Bit-accurate JS port of python_simu/hilbert90_gui.py. Source is the
relay_feedback2.v oscillator (kg = 166) split by the 2-tap Hilbert pair with
L = 62, exactly as wired in new40kHz4.v. The oscillation frequency is set in
samples, so it scales with fclk — the I-vs-Q phase does not.
Companion page: relay_feedback2 oscillator demo.本ページは python_simu/hilbert90_gui.py のビット精度 JS 移植です。信号源は
relay_feedback2.v 発振器(kg = 166)で、L = 62 の 2 タップ Hilbert 対で分離します。
配線は new40kHz4.v と同一です。発振周波数はサンプル数で決まるため fclk に比例して
変化しますが、I と Q の位相差は変わりません。
関連ページ:relay_feedback2 発振器デモ。
hilbert_90.v 是 DSIL 超音波雷達鏈路中接在振盪器之後的正交分離器。
它把單一實數載波變成 I/Q 一對,讓接收端可以用 atan2 取回相位,而不是只有振幅。
整個模組只有兩個延遲抽頭、一次相減與一次位移:hilbert_90.v is the quadrature splitter that follows the oscillator in the
DSIL ultrasonic radar chain. It turns one real carrier into an I/Q pair so the receiver
can recover phase by atan2 instead of only amplitude. The entire module is
two delay taps, one subtraction and one shift:hilbert_90.v は、DSIL 超音波レーダーの信号系で発振器の後段に置かれる
直交分離器です。1 本の実数キャリアを I/Q の対に変換し、受信側が振幅だけでなく
atan2 で位相を復元できるようにします。モジュール全体は 2 個の遅延タップ、
1 回の減算、1 回のシフトだけです:
y_0[n] = x[n-1-L]
y_90[n] = (x[n-1-2L] - x[n-1]) >>> 1
沒有濾波器係數,沒有 FIR 陣列,也沒有 CORDIC。與 震盪器的姊妹頁面一樣,圖表來自 RTL 的位元精確 JavaScript 移植,而不是浮點近似,因此算術右移的截斷行為與硬體所做的完全相同。No coefficients, no FIR bank, no CORDIC. As on the companion oscillator page, the charts come from a bit-accurate JavaScript port of the RTL rather than a floating-point stand-in, so the arithmetic-shift truncation is the same one the hardware performs.フィルタ係数も FIR バンクも CORDIC もありません。 発振器の対になるページと同様に、グラフは浮動小数点の 代用ではなく RTL のビット精度 JavaScript 移植から得ているため、算術シフトの切り捨ても ハードウェアが行うものと同一です。
y_90 是對稱的中心差分:相減的兩個取樣
x[n-1] 與 x[n-1-2L],恰好對稱地位於 x[n-1-L] 兩側,
而那正是 y_0 所輸出的抽頭。對任何弦波而言,相距 2L 的兩點相減,結果仍是弦波,
以該中點為中心,並與它相差四分之一週期。因此正交關係來自抽頭位置的對稱性,
而不是某個調校過的係數 — 所以它對每一個輸入頻率、每一種 L 的選擇都成立,
也不會隨時鐘速率、溫度或製程角落漂移。y_90 is a centered difference: the two samples it subtracts,
x[n-1] and x[n-1-2L], sit symmetrically either side of
x[n-1-L], which is exactly the tap y_0 outputs. For any
sinusoid, the difference of two samples spaced 2L apart is itself a sinusoid centered on
that midpoint and shifted by a quarter cycle from it. The quadrature relationship
therefore comes out of the symmetry of the tap positions, not out of a
tuned coefficient — so it holds for every input frequency and every choice of L,
and it cannot drift with clock rate, temperature or process corner.y_90 は中心差分です。減算する 2 つのサンプル
x[n-1] と x[n-1-2L] は、y_0 が出力するタップ
x[n-1-L] の両側に対称に位置します。任意の正弦波について、2L 離れた 2 サンプルの差は
やはり正弦波となり、その中点を中心として 4 分の 1 周期だけずれます。つまり直交関係は
タップ位置の対称性から生じるもので、調整された係数によるものではありません
— あらゆる入力周波数、あらゆる L の選び方で成立し、クロック周波数・温度・
プロセスコーナーによって変動することもありません。
L 真正決定的是振幅。經過 >>>1 之後,差分的增益為
sin(2πfL),當 2L 等於半個週期時達到最大值 1 — 也就是 L 等於四分之一週期的取樣數時。
在出貨設定 kg = 166 下,振盪器頻率為 0.004005 週期/取樣,週期約 249.7 個取樣,
四分之一為 62.4 個取樣,因此取 L = 62,與 new40kHz4.v 的接法一致。
由於振盪頻率是以每取樣為單位固定的,這個四分之一週期的對齊關係在任何時鐘變動下都成立 —
這正是本頁時鐘滑桿所展示的:座標軸重新縮放,但量到的 I 對 Q 相位差不會離開 90°。What L does control is the amplitude. The difference has gain
sin(2πfL) after the >>>1, which peaks at unity when 2L is one
half period — that is, when L is a quarter period in samples. At the shipped
kg = 166 the oscillator runs at 0.004005 cycles/sample, a period of about
249.7 samples, so a quarter period is 62.4 samples: hence L = 62, as
wired in new40kHz4.v. Because the oscillator's frequency is fixed in
cycles per sample, that quarter-period alignment survives any clock change,
which is what the clock slider on this page demonstrates — the axes rescale, the
measured I-vs-Q phase does not move off 90°.L が決めるのは振幅です。>>>1 の後、差分の利得は
sin(2πfL) となり、2L が半周期に等しいとき — つまり L がサンプル数で 4 分の 1 周期の
とき — 1 で最大になります。出荷値 kg = 166 では発振周波数が 0.004005
サイクル/サンプル、周期は約 249.7 サンプルなので、4 分の 1 周期は 62.4 サンプル。
したがって new40kHz4.v の配線どおり L = 62 となります。
発振周波数はサンプルあたりで固定されているため、この 4 分の 1 周期の整合は
クロックを変えても保たれます。本ページのクロックスライダが示すのはまさにその点で、
軸は再スケールされても、測定された I と Q の位相差は 90° から動きません。
y_0 與
y_90,四分之一週期的偏移可以直接看出來。I/Q waveforms — y_0 and y_90 over
the steady-state tail, so the quarter-cycle offset is visible directly.I/Q 波形 — 定常状態の末尾区間における y_0 と
y_90。4 分の 1 周期のずれが直接見て取れます。y_0 為參考,對 y_90 做單一頻格 DFT,
並回報相位與增益,所以 90° 這個說法與 sin(2πfL) 的增益預測都是量測出來的,而非宣稱。The readout takes a single-bin DFT of y_90 referenced to
y_0 and reports the phase and gain, so the 90° claim and the
sin(2πfL) gain prediction are both measured rather than asserted.読み出し欄は y_0 を基準として y_90 の単一ビン DFT を取り、
位相と利得を表示します。90° という主張も sin(2πfL) の利得予測も、
断言ではなく実測値です。← 回到雜項筆記back to Misc Ideas技術ノートに戻る · 昭群科技有限公司AkiraGather Technology昭群科技有限公司 AkiraGather Technology