數字音頻重採樣

1. 什麼是有限帶寬插值(Bandlimited Interpolation)

 

        在數字信號處理中,作用於離散時間信號的有限帶寬插值是一個得到廣泛應用的基本工具。一般而言,我們所面臨的問題是,給定一系列離散時間信號幅度樣本,如何利用它們正確地計算出任意連續時間的樣本幅度值。換句話說,我們必須能夠在這些離散信號之間進行插值。由於原始信號總是被假定爲有限帶寬的——採樣率的二分之一(否則在採樣的過程中會發生摺疊失真(aliasing distortion)),因此根據香農採樣定理,利用有限帶寬插值對採樣點進行處理將可以正確和唯一地還原到原始的信號。

        有很多方法都可以對離散點進行插值。例如,拉格朗日插值定理(Lagrange interpolation)就是一種經典的插值方法,它可以從N+1個點中構造出一個N次多項式。

        還有一些其它的插值方法,如三次樣條曲線(cubic spline)插值法和貝塞爾曲線(Bezier splines)插值法等等。

        上面這些提到的方法適用於圖形和其它問題的處理,但是對於數字音頻處理來說它們不是理想的。在數字音頻中,最要緊的是可聽樣本之間的採樣誤差(audibility of interpolation error between samples)。香農定理告訴我們,從離散的採樣點恢復原始信號是完全可能的,因此最佳的數字音頻插值方法應當儘可能地依據香農定理的理論,這樣的“理想”插值方法被稱爲有限帶寬插值。

 

2. 工作原理(Theory of Operation)

 

2.1 摘要

        這篇指南講述了一種對離散時間信號進行有限帶寬插值的技術,該技術支持對任意時刻信號求值,並且對於平穩變化採樣率表現良好。該方法是基於在一個濾波器係數表中進行內插查找,以使得濾波器衝擊響應在連續時間形式上有效。一個已經預先計算好的濾波器表將被用於處理所有的插值時間和採樣率轉換比率。下面也會給出一些公式來確定查找表的大小,以滿足給定的精度要求。

        This tutorial describes a technique for bandlimited interpolation of discrete-time signals which supports signal evaluation at an "arbitrary" time, and which performs well for smmothly changing sampling rates, such as needed for digital audio "scrubbing." The method is based on interpolated look-up in a table of filter coefficients, so as to make the filter impulse response available effectively in continuous-time form. A single pre-computed filter table handles all interpolation times and sampling-rate conversion ratios. Formulas are given for determinning the look-up table size needed for a given precision requirement. 

 

2.2 理想有限帶寬插值理論(Theory of Ideal Bandlimited Interpolation)

        我們來簡單回顧一下采樣速率轉換中的“模擬插值法”,這也是現有方法實現的根基。假設我們擁有連續可積信號x(t)的一組採樣值x(nTs),其中t代表時間(按秒計),n取值爲整數,Ts爲採樣週期。假設x(t)被帶寬限制在±Fs/2,其中Fs=1/Ts是採樣頻率。如果X(ω)代表x(t)的傅里葉變換,那麼,

假設對於|ω| ≥ πFsX(ω) = 0。那麼,香農的採樣理論告訴我們,通過這些採樣信號值,連續信號x(t)將可以被唯一地重新構建:

其中,

爲了將x(t)重採樣到一個新的頻率F′s = 1 / T′s,我們只需要選取時間爲T's的整數倍的取值點重新計算公式(1)即可。

        當新的採樣率F's比原來的採樣率Fs小時,低通截止必須低於新的更低的採樣率的一半(the lowpass cutoff must be placed below half the new lower sampling rate)。因此,在理想低通的情形下,hs(t) = min{1, F's/Fs}sinc(min{Fs, F's}t),其中比例因子在通帶內將會保持單位增益。

        sinc函數sinc(t) ≈ sin(πt) / (πt)的圖形如圖1所示。注意該函數的峯值爲幅度1,並且對於所有的非0整數t,sinc(t) = 0。

        如果“※”代表數字信號的卷積操作,那麼等式(1)所代表的加法可以被重新書寫爲(x ※ hs)(t)

        公式(1)可以被理解爲移位縮放後的一系列sinc函數hs的疊加和。一個sinc函數的實例被轉換到每一個信號採樣點並且被該採樣點縮放,然後所有的這些實例將會加到一起。注意sinc(z)的所有過零點發生在除了z=0以外的所有整數點上,這意味着在時刻t = nTs,只有x(nTs)對於加權和有唯一貢獻。因此,正是通過現有的這些採樣點使得內插可行。

        Equation Eq.(1) can be interpreted as a superposition of shifted and scaled sinc functions hs. A sinc function instance is translated to each signal sample and scaled by that sample, and the instances are all added together. Note that zero-crossings of sinc(z) occur at all integers except z = 0. That means at time t = nTs, (i.e., on a sample instant), the only contribution to the sum is the single sample x(nTs). All other samples contribute sinc functions which have a zero-crossing at time t = nTs. Thus, the interpolation goes precisely through the existing samples, as it should.

      

        一幅圖說明sinc函數是如何相互疊加以獲得原始有限帶寬信號的,如圖2。圖中展示了五個sinc函數的相互疊加,每個函數都具有單位幅度,並且以一個採樣點爲間隔。這些sinc函數可以被用於重構離散時間信號x = [..., 0, 1, 1, 1, 1, 1, 0,...].的有限帶寬插值點。注意在時刻t = nTs,實線將正好穿過對應於該時刻的採樣點:

        A plot indicating how sinc functions sum together to reconstruct bandlimited signals is shown in Fig.2. The figure shows a superposition of ifve sinc functions, each at unit amplitude, and displaced by one-sample intervals. These sinc functions would be used to reconstruct the bandlimited interpolation of the discrete-time signal x = [..., 0, 1, 1, 1, 1, 1, 0,...]. Note that at each sampling instant t = nTs, the solid line passes exactly through the tip of the sinc function for that sample.

        第二種公式(1)的解釋如下:(實在不知道該如何翻譯了,原文如下)

        A second interpretation of Eq.(1) is as follows: to obtain the interpolation at time t, shift the signal samples under one sinc function so that time t in the signal is translated under the peak of the sinc function, then create the output as a linear combination of signal samples where the coefficient of each signal sample is given by the value of the sinc function at the location of each sample. That this interpretation is equivalent to the first can be seen as a aresult of the fact that convolution is commutative; in the first interpretation, all signal samples are used to form a linear combination of shifted sinc functions, while in the second interpretation, samples from one sinc function are used to form a linear combination of samples of the shifted input signal. The practical bandlimited interpolation algorithm presented below is based on the second interpretation.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章