2010年11月14日 星期日

density factor...

在數位信號處理的領域中,濾波器是一個重要的課題。而在Matlab的Signal Processing Toolbox™中,有一個工具,就是濾波器設計Filter Design and Analysis Tool (FDATool)。你只要在 MATLAB command視窗,輸入:
>>fdatool
即可開始一個圖形介面GUI displays,而預設濾波器default filter如下:
圖一


視窗中有三個區域,上半部包括了目前的濾波器的規格以及響應,上半部左邊是濾波器的性質,包括濾波器結構、階數、使用區段、是否穩定(the filter structure, order, number of sections used and whether the filter is stable or not)
上半部的右邊則是顯示各種濾波器的響應,如幅度、群延遲、濾波器係數等magnitude response, group delay and filter coefficients。
下半部則是互動式視窗,也就設計面板The Design Panel,可以定義濾波器的規格
例如設計一個低通濾波器,可以如下圖設定,但Density Factor是什麼呢?
Matlab的說明指出:The FIR Equiripple filter has a Density Factor option which controls the density of the frequency grid. Increasing the value creates a filter which more closely approximates an ideal equiripple filter, but more time is required as the computation increases.
我就使用了二種不同的設定,二種不同的設計結果,發現係數幾乎完全一樣(差距的數量級在10的負5次方),因此在結果上差異不大。
圖二-Density factor=16

圖三-Density factor=64

圖四和圖五是各自得到的濾波器響應,
無法分辨差異


那係數呢?如圖六,差別也很小,因此這個設定似乎不是很重要,就設一個中等的數字(幾十)就好了

沒有留言:

張貼留言