縱然已知向量
構成了 維離散傅立葉變換 DFT 之正交基底。故該空間裡任何向量都可藉此表現,無有疑焉?想那 個角頻率 雖多,並不能含括所有頻率乎??比方說這一 不在其中也!
那麼我們將如何詮釋 DFT 的計算結果耶!!
※ 參考
scipy.fftpack.fft
scipy.fftpack.
fft
(x, n=None, axis=-1, overwrite_x=False)- Return discrete Fourier transform of real or complex sequence.
The returned complex array contains
y(0), y(1),..., y(n-1)
wherey(j) = (x * exp(-2*pi*sqrt(-1)*j*np.arange(n)/n)).sum()
.Parameters: x : array_like
Array to Fourier transform.
n : int, optional
Length of the Fourier transform. If
n < x.shape[axis]
, x is truncated. Ifn > x.shape[axis]
, x is zero-padded. The default results inn = x.shape[axis]
.axis : int, optional
Axis along which the fft’s are computed; the default is over the last axis (i.e.,
axis=-1
).overwrite_x : bool, optional
If True, the contents of x can be destroyed; the default is False.
Returns: z : complex ndarray
with the elements:
[y(0),y(1),..,y(n/2),y(1-n/2),...,y(-1)] if n is even [y(0),y(1),..,y((n-1)/2),y(-(n-1)/2),...,y(-1)] if n is odd
where:
y(j) = sum[k=0..n-1] x[k] * exp(-sqrt(-1)*j*k* 2*pi/n), j = 0..n-1
Notes
The packing of the result is “standard”: If
A = fft(a, n)
, thenA[0]
contains the zero-frequency term,A[1:n/2]
contains the positive-frequency terms, andA[n/2:]
contains the negative-frequency terms, in order of decreasingly negative frequency. So for an 8-point transform, the frequencies of the result are [0, 1, 2, 3, -4, -3, -2, -1]. To rearrange the fft output so that the zero-frequency component is centered, like [-4, -3, -2, -1, 0, 1, 2, 3], usefftshift
.Both single and double precision routines are implemented. Half precision inputs will be converted to single precision. Non floating-point inputs will be converted to double precision. Long-double precision inputs are not supported.
This function is most efficient when n is a power of two, and least efficient when n is prime.
Note that if
x
is real-valued thenA[j] == A[n-j].conjugate()
. Ifx
is real-valued andn
is even thenA[n/2]
is real.If the data type of x is real, a “real FFT” algorithm is automatically used, which roughly halves the computation time. To increase efficiency a little further, use
rfft
, which does the same calculation, but only outputs half of the symmetrical spectrum. If the data is both real and symmetrical, thedct
can again double the efficiency, by generating half of the spectrum from half of the signal.
因此 JULIUS O. SMITH III 先生特論
《 Frequencies in the “Cracks” 》 以解惑勒。
正好趁機對照振動現象物理說明哩◎
依據牛頓第二運動定律,一個受驅振子的方程式為
,一般將之改寫為
,此處 稱為『無阻尼』角頻率,而 叫做『阻尼比率』。如果『外力』,那個方程式就成了『阻尼振子』的方程式
,當 它的解是
,此處 是相位角。
假使 它的解是
。
如果我們從 的值來看『阻尼振子』的系統行為,當 時,這一個系統已經『振動』不起來了,通常叫做『過阻尼』,負數的『指數項』使得系統的能量隨時間逐漸減少, 的數值愈大能量減少將慢愈遲回到平衡。當 時,這一個系統也『振動』不起來了,通常稱之為『臨界阻尼』,此時系統會用最快的方式設法回到平衡,這個可是『關門』系統的『最佳解』!!。當 時,這樣的諧振子系統稱作『低阻尼』,這時系統用著『低於無阻尼』的『頻率』振動,系統的『振幅』隨著時間以 為比率逐漸減小以至於『不振動 』為止。事實上從自然界中來的一般現象都會比『理論值』更快的到達『停止點』,就像說不只有『動摩擦力』與『靜摩擦力』之區分,摩擦力的『速度相關性』也不是這麼『簡單的正比』之假設,更別說理論上還有著『摩擦生熱』的問題必須要考慮。我們也許可以說為著追求『基本現象的理解』,通常都會『假設』了一些數學上『解答問題』的『理想條件』。
現在談談受外力影響下的受驅振子︰
它的解是
,此處相位角 由 所決定。
這個系統因為零點時刻突然受到固定大小的外力 所驅動,震盪以 為比率逐漸增大,一般用 為時間尺度來衡量這個變化,每一 單位時間,系統將以 為比率改變振幅,在物理上稱之為『弛豫時間』Relaxation Time,工程上常用多的 單位時間,來談震盪達到預期大小的『安定時間』settling time。果真是『風吹枝擺 』,待其風歇『搖曳而止』!!
是驅動力的振幅大小。在線性微分方程式如 的『求解』裡,如過『』是 的一個解,『』是 一個『特解』,那麼『』就是該方程式的『通解』。我們已經知道 的『低阻尼振子』之解在若干個弛豫時間後數值將變得太小了,所以它對於系統長時間之後的『行為 』沒有太多的貢獻。因此我們說這個系統的『穩態解』steady-state solution 是
,此處
是『響應阻抗』函數。而 是驅動力引發的相位角,可由
所決定,一般它表達著相位『遲滯』 lag 現象。
物理上所說的『慣性』是指一個系統遭受外力時,它會發生『抵抗變化』的作為。這就是『響應阻抗』和『相位遲滯』的物理原由與命名由來。假使考察穩態解,我們是否可以講︰『原因 』── ── 產生成正比之『結果』── ── 的呢??
─── 摘自《【Sonic π】聲波之傳播原理︰振動篇》