5.8 KiB
| title | tags | date | ||
|---|---|---|---|---|
| Fourier Transform |
|
2023-11-30 |
Almost Fourier Transform
It is important to see there are 2 different frequencies here:
- The frequency of the original signal
- The frequency with which the little rotating vector winds around the circle
Different patterns appear as we wind up this graph, but it is clear that the x-coordinate for the center of mass is important when the winding frequency is 3; The same number as the original signal
这个发现就是Fourier transform的基础
而如何将一维信息拉到平面中,很容易想到设计complex plane,如何describe rotating at a rate of f, 用:
e^{2\pi i ft}
因为在Fourier transform中,convention way是顺时针旋转,所以使用$e^{-2\pi ift}$,那如何衡量center of mass呢,如下图:
\frac{1}{N}\sum_{k=1}^N g(t_k)e^{-2\pi i ft_k}
然后more points → continuous:
\frac{1}{t_2-t_1}\int_{t_1}^{t_2}g(t)e^{-2\pi ift} dt
这个就是Almost Fourier Transform, 但是实际情况上,Fourier transform倾向于得到scaled center mass,越长的time,旋转越多圈,其Fourier transform也会成倍放大
Fourier Transform (FT)
\hat{g}(f)=\int_{t_1}^{t_2}g(t)e^{-2\pi ift}dt
一般来说,Fourier transform的bounds在-\infty \rightarrow \infty
\hat{g}(f)=\int_{t_1}^{t_2}g(t)e^{-2\pi ift}dt
Inverse Fourier Transform
g(t)=\int_{-\infty}^{\infty}\hat{g}(f)e^{2\pi ift}df
Discrete-time Fourier Transform(DTFT)
x[n]\xrightleftharpoons[\text{IDTFT}]{\text{DTFT}} X(\omega)\ or\ X(e^{j\omega})
X(\omega)=\sum_{n=-\infty}^{\infty}x[n]e^{-j\omega n}
[!hint] Z transform:
X(z)=\sum_{n=-\infty}^{\infty}x(n)z^{-n}
After DTFT, the signal X(\omega) will have period 2\pi
X(\omega+2\pi)=\sum_{n=-\infty}^\infty x[n]e^{-j(\omega+2\pi)n}=\sum_{n=-\infty}^{\infty}x[n]e^{-j\omega n}=X(\omega)
IDTFT:
x(n)=\frac{1}{2\pi}\int_{-\pi}^\pi X(\omega)e^{j\omega n}d\omega
Also, for X(\omega), it have polar form and rectangular form
- Polar form:
X(\omega)=|X(\omega)|\angle X(\omega)
- Rectangular form:
X(\omega)=X_r(\omega)+jX_i(\omega)
so, magnitude and angle
|X(\omega)|=\sqrt{{X_r(\omega)}^2 + {X_i(\omega)}^2} \\
\angle X(\omega)=\tan^{-1}[\frac{X_i(\omega)}{X_r(\omega)}]
Complex Fouerier Series
为了解决热方程和弦振动,因此有了傅里叶级数;
复数形式推导
三角函数推导
见这个知乎:
f(t)=\frac{1}{2}a_0 + \sum_{k=1}^\infty (a_k\cos 2\pi kt + b_k\sin 2\pi kt)
Discrete Fourier Transform(DFT)
\{f_1,f_2,f_3,\cdots,f_n\}\xRightarrow{\text{DFT}}\{{\hat{f_1},\hat{f_2},\hat{f_3},\cdots,\hat{f_n}}\}
X[k]=\sum_{n=0}^{N-1}x[n]\cdot e^{-\frac{j2\pi kn}{N}}
\frac{k}{N}\hat{=} F, \quad n\hat{=}t
Video: Discrete Fourier Transform - Simple Step by Step
Also, when we do DFT, we need to notice Nyquist Limit
Also,we can write DFT in matrix version:
\text{make } \omega_N=e^{\frac{-2\pi i}{N}}
it have:
\begin{bmatrix}
X[0] \\
X[1] \\
X[2] \\
\vdots \\
X[N-1] \\
\end{bmatrix} =
\begin{bmatrix}
1 & 1 & 1 & \cdots & 1 \\
1 & \omega_N & \omega_N^2 & \cdots & \omega_N^{N-1} \\
1 & \omega_N^2 & \omega_N^4 & \cdots & \omega_N^{2(N-1)} \\
\vdots & \vdots & \vdots & \ddots & \vdots \\
1 & \omega_N^{N-1} & \omega_N^{2(N-1)} & \cdots & \omega_N^{(N-1)^2} \\
\end{bmatrix}
\begin{bmatrix}
x[0] \\
x[1] \\
x[2] \\
\vdots \\
x[N-1] \\
\end{bmatrix}
For X[k], it means a \cos wine like this:
Fast Fourier transform(FFT)
FFT is a computationally efficient way of computing the DFT
The time complexity of FFT is O(n\log{n}), and the time complexity of DFT is O(n^2)
for DFT:
\hat{f}=\underbrace{F_{1024}}_{\text{DFT Matrix}} \cdot f
Z transform
The Z-transform (ZT) is a mathematical tool which is used to convert the difference equations in time domain into the algebraic equations in z-domain.
通常,Z变换有两种类型,unilateral (or one-sided) and bilateral (or two-sided)
bilateral:
Z[x(n)]=X(z)=\sum_{n=-\infty}^\infty x(n)z^{-n}
unilateral:
Z[x(n)]=X(z)=\sum_{n=0}^{\infty} x(n)z^{-n}
where, z is a complex variable and it is given by:
z=re^{j \omega}
The unilateral or one-sided z-transform is very useful because we mostly deal with causal sequences. Also, it is mainly suited for solving difference equations with initial conditions.





