應用於腦電訊號分析之即時 Holo-Hilbert 頻譜建構 FPGA 加速器
An FPGA-Based Real-Time Holo-Hilbert Spectrum Construction Accelerator for EEG Analysis
摘要
Holo-Hilbert 頻譜分析(Holo-Hilbert Spectral Analysis, HHSA)能刻畫腦電訊號中的非線性與非穩態調變結構,惟其巢狀分解計算負擔沉重,難以在閉迴路神經調控所需的時間尺度內即時完成。現有硬體加速多集中於前段經驗模態分解(Empirical Mode Decomposition, EMD),而最終的 Holo-Hilbert 頻譜(Holo-Hilbert Spectrum, HHS)建構階段仍缺乏專用硬體,成為整條 HHSA 流程硬體化與串流化的關鍵缺口。
本論文針對 HHS 建構階段,提出一套基於 FPGA 的串流式加速器。該架構將頻率索引映射、有效性分類、能量計算與頻譜累加整合於單一管線化資料路徑,並以定點數運算實作;透過參數化設計,單一位元流即可支援 Ff、Ft、ft 三種投影與線性/對數頻率軸,並以兩級資料前遞機制解決連續累加的讀後寫相依,維持每時脈週期處理一筆樣本的吞吐率。系統並整合 Gigabit Ethernet 通訊子系統,負責參數下發、樣本傳輸與結果回傳。
驗證方面,以載波 40 Hz、調幅 5 Hz 的合成相位-振幅耦合訊號確認能量峰值正確定位,並以取樣率 1 kHz、4095 筆的實測腦電訊號進行數值比較,FPGA 定點輸出與 MATLAB 浮點參考之相關係數達 0.99998 以上。在本研究量測條件下,末筆輸入至結果回傳的平均系統回應延遲為 2.8 ms,相較 MATLAB 的 27 ms 約快 9.6 倍。
本論文針對 HHS 建構階段,提出一套基於 FPGA 的串流式加速器。該架構將頻率索引映射、有效性分類、能量計算與頻譜累加整合於單一管線化資料路徑,並以定點數運算實作;透過參數化設計,單一位元流即可支援 Ff、Ft、ft 三種投影與線性/對數頻率軸,並以兩級資料前遞機制解決連續累加的讀後寫相依,維持每時脈週期處理一筆樣本的吞吐率。系統並整合 Gigabit Ethernet 通訊子系統,負責參數下發、樣本傳輸與結果回傳。
驗證方面,以載波 40 Hz、調幅 5 Hz 的合成相位-振幅耦合訊號確認能量峰值正確定位,並以取樣率 1 kHz、4095 筆的實測腦電訊號進行數值比較,FPGA 定點輸出與 MATLAB 浮點參考之相關係數達 0.99998 以上。在本研究量測條件下,末筆輸入至結果回傳的平均系統回應延遲為 2.8 ms,相較 MATLAB 的 27 ms 約快 9.6 倍。
Holo-Hilbert spectral analysis (HHSA) characterizes nonlinear and nonstationary modulation structures in electroencephalographic (EEG) signals, but its nested decomposition is computationally intensive and difficult to complete within the time scale required for closed-loop neuromodulation. Existing hardware acceleration has focused mainly on the preceding empirical mode decomposition (EMD), whereas the final Holo-Hilbert spectrum (HHS) construction stage still lacks a dedicated hardware implementation, forming a key gap toward a fully hardware-based and streaming HHSA pipeline.
This thesis presents an FPGA-based streaming accelerator for HHS construction. It integrates frequency-index mapping, validity classification, energy computation, and spectrum accumulation into a single fixed-point pipeline. A single bitstream supports the Ff, Ft, and ft projections and linear or logarithmic frequency axes, while a two-stage forwarding mechanism resolves the read-after-write dependency in continuous accumulation to sustain one sample per clock cycle. A Gigabit Ethernet subsystem handles parameter configuration, sample transfer, and result return.
A synthetic phase-amplitude coupling signal (40 Hz carrier, 5 Hz modulation) confirmed correct localization of the spectral energy peak, and measured EEG data (1 kHz, 4,095 samples) were used for numerical comparison. The FPGA output achieved a correlation coefficient above 0.99998 with the MATLAB floating-point reference. Under the adopted conditions, the average system response latency from last input to result return was 2.8 ms, about 9.6 times faster than the 27 ms MATLAB HHS construction function.
This thesis presents an FPGA-based streaming accelerator for HHS construction. It integrates frequency-index mapping, validity classification, energy computation, and spectrum accumulation into a single fixed-point pipeline. A single bitstream supports the Ff, Ft, and ft projections and linear or logarithmic frequency axes, while a two-stage forwarding mechanism resolves the read-after-write dependency in continuous accumulation to sustain one sample per clock cycle. A Gigabit Ethernet subsystem handles parameter configuration, sample transfer, and result return.
A synthetic phase-amplitude coupling signal (40 Hz carrier, 5 Hz modulation) confirmed correct localization of the spectral energy peak, and measured EEG data (1 kHz, 4,095 samples) were used for numerical comparison. The FPGA output achieved a correlation coefficient above 0.99998 with the MATLAB floating-point reference. Under the adopted conditions, the average system response latency from last input to result return was 2.8 ms, about 9.6 times faster than the 27 ms MATLAB HHS construction function.