目录
- 基本概念
- 复数
- 傅里叶级数
- 冲激函数及其取样(筛选)性质
- 连续单变量函数的傅里叶变换
- 卷积
基本概念
复数
复数CCC的定义为
C=R+jI(4.3)C = R + jI \tag{4.3}C=R+jI(4.3)
R,IR,IR,I为实数,RRR是实部,III是虚部,j=−1j = \sqrt{-1}j=−1。复数的共轭表示为C∗C^*C∗
C∗=R−jI(4.4)C^* = R - jI \tag{4.4}C∗=R−jI(4.4)
从几何角度来看,复数可视为平面(称为复平面)上的一个点,其横坐标是实轴,纵坐标是虚轴,也就是说R+jIR+jIR+jI是得平面直角坐标系中的点(R,I)(R,I)(R,I)
极坐标表示复数
C=∣C∣(cosθ+jsinθ)(4.5)C = |C|(\text{cos}\theta + \text{jsin}\theta) \tag{4.5}C=∣C∣(cosθ+jsinθ)(4.5)
∣C∣=R2+I2|C|=\sqrt{R^2 + I^2}∣C∣=R2+I2是从复平面的原点延伸到点(R,I)(R,I)(R,I)的向量长度,θ\thetaθ是该向量与实轴的夹角。
使用欧拉公式
ejθ=cosθ+jsinθ(4.6)e^{j\theta} = \text{cos}\theta + \text{jsin}\theta \tag{4.6}ejθ=cosθ+jsinθ(4.6)
可以给坐极坐标的复数表示为
C=∣C∣ejθ(4.7)C = |C|e^{j\theta} \tag{4.7}C=∣C∣ejθ(4.7)
复函数:
F(u)=R(u)+jI(u)F(u) = R(u) + jI(u)F(u)=R(u)+jI(u)
F∗(u)=R(u)−jI(u)F^*(u) = R(u) - jI(u)F∗(u)=R(u)−jI(u)
幅值是
∣F(u)∣=R(u)2+I(u)2|F(u)| = \sqrt{R(u)^2 + I(u)^2}∣F(u)∣=R(u)2+I(u)2
a = np.complex(1 + 2j)
radian = np.arctan2(a.imag, a.real)
radian
1.1071487177940904
degree = np.rad2deg(radian)
degree
63.43494882292201
傅里叶级数
周期为TTT的连续变量ttt的周期函数f(t)f(t)f(t),可表示为乘以适当系数的正弦函数和余弦函数之和
f(t)=∑n=−∞∞cnej2πnTt(4.8)f(t) = \sum_{n=-\infty}^{\infty} c_n e^{j\frac{2\pi n}{T}t} \tag{4.8}f(t)=n=−∞∑∞cnejT2πnt(4.8)
cn=1T∫−T/2T/2f(t)e−j2πnTt(4.9)c_n = \frac{1}{T}\int_{-T/2}^{T/2}f(t)e^{-j\frac{2\pi n}{T}t} \tag{4.9}cn=T1∫−T/2T/2f(t)e−jT2πnt(4.9)
冲激函数及其取样(筛选)性质
连续变量ttt在t=0t=0t=0处的单位冲激表示为δ(t)\delta(t)δ(t),定义是
δ(t)={∞,t=00,t≠0(4.10)\delta(t) =\begin{cases} \infty, & t=0 \\ 0, & t \neq 0 \end{cases} \tag{4.10}δ(t)={∞,0,t=0t=0(4.10)
它被限制为满足恒等式
∫−∞∞δ(t)dt=1(4.11)\int_{-\infty}^{\infty}\delta(t)dt= 1 \tag{4.11}∫−∞∞δ(t)dt=1(4.11)
自然地,将ttt解释为时间时,冲激就可视为幅度无限、持续时间为0、具有单位面积的尖峰信息。冲激具有关于积分的所谓取样性质
∫−∞∞f(t)δ(t)dt=f(0)(4.12)\int_{-\infty}^{\infty} f(t) \delta(t)dt= f(0) \tag{4.12}∫−∞∞f(t)δ(t)dt=f(0)(4.12)
冲激
冲激并不是通常意义上的函数,更准确的名称是分布或广义函数。
任意一点t0t_0t0的取样性质为:
∫−∞∞f(t)δ(t−t0)dt=f(t0)(4.13)\int_{-\infty}^{\infty} f(t) \delta(t - t_0)dt= f(t_0) \tag{4.13}∫−∞∞f(t)δ(t−t0)dt=f(t0)(4.13)
例如: 若f(t)=cos(t)f(t) = \text{cos}(t)f(t)=cos(t),则使用冲激δ(t−π)\delta(t-\pi)δ(t−π)得到结果f(π)=cos(π)=−1f(\pi) = cos(\pi)=-1f(π)=cos(π)=−1
冲激串KaTeX parse error: \tag works only in display equations
离散冲激定义为
δ(x)={1,x=00,x≠0(4.15)\delta(x) = \begin{cases} 1, & x = 0 \\0, & x \neq 0 \end{cases} \tag{4.15}δ(x)={1,0,x=0x=0(4.15)
∑−∞∞δ(x)=1(4.16)\sum_{-\infty}^{\infty}\delta(x)= 1 \tag{4.16}−∞∑∞δ(x)=1(4.16)
∑−∞∞f(x)δ(x)=f(0)(4.17)\sum_{-\infty}^{\infty} f(x) \delta(x)= f(0) \tag{4.17}−∞∑∞f(x)δ(x)=f(0)(4.17)
∑−∞∞f(x)δ(x−x0)dt=f(x0)(4.18)\sum_{-\infty}^{\infty} f(x) \delta(x - x_0)dt= f(x_0) \tag{4.18}−∞∑∞f(x)δ(x−x0)dt=f(x0)(4.18)
def impulse(x, x0):return np.piecewise(x, [x==x0, x!=x0], [1, 0])
# 按定义写的,不知道是否正确,如不正确,请指出,感谢,只做展示
x = np.arange(10)
plt.stem(x, impulse(x, 5), )
plt.show()
def impulse_serial(x):s = np.ones_like(x)return s
# 只做展示
x = np.arange(10)
plt.stem(impulse_serial(x))
plt.show()
连续单变量函数的傅里叶变换
傅里叶变换对
连续变量ttt的连续函数f(t)f(t)f(t)的傅里叶变换由J{f(t)}\mathfrak{J}\{f(t)\}J{f(t)}表示,定义为
J{f(t)}=∫−∞∞f(t)e−j2πμtdt(4.19)\mathfrak{J}\{f(t)\} = \int_{-\infty}^{\infty} f(t) e^{-j2\pi\mu t}dt \tag{4.19}J{f(t)}=∫−∞∞f(t)e−j2πμtdt(4.19)
J{f(t)}=F(μ)\mathfrak{J}\{f(t)\} = F(\mu)J{f(t)}=F(μ)
所以有
F(μ)=∫−∞∞f(t)e−j2πμtdt(4.20)F(\mu) = \int_{-\infty}^{\infty} f(t) e^{-j2\pi\mu t}dt \tag{4.20}F(μ)=∫−∞∞f(t)e−j2πμtdt(4.20)
反变换:
f(t)=∫−∞∞F(μ)e−j2πμtdμ(4.21)f(t) = \int_{-\infty}^{\infty} F(\mu) e^{-j2\pi\mu t}d\mu \tag{4.21}f(t)=∫−∞∞F(μ)e−j2πμtdμ(4.21)
通常表示为f(t)⇔F(μ)f(t) \Leftrightarrow F(\mu)f(t)⇔F(μ)
使用欧拉公式,可以写为
F(μ)=∫−∞∞f(t)[cos(2πμt)−jsin(2πμt)]dt(4.22)F(\mu) = \int_{-\infty}^{\infty} f(t) [\text{cos}(2\pi \mu t) - \text{jsin}(2\pi \mu t)]dt \tag{4.22}F(μ)=∫−∞∞f(t)[cos(2πμt)−jsin(2πμt)]dt(4.22)
傅里叶变换是f(t)f(t)f(t)乘以正弦函数的展开式, 其中正弦函数的频率是由μ\muμ值决定。因此积分后留下的唯一变量是频率,因此,我们说傅里叶变换域是频率域。
盒式函数的傅里叶变换
F(μ)=∫−∞∞f(t)e−j2πμtdt=∫−W/2W/2f(t)Ae−j2πμtdt=−Aj2πμ[e−j2πμt]−W/2W/2=−Aj2πμ[e−jπμW−ejπμW]=Aj2πμ[ejπμW−e−jπμW]=AWsin(πμW)(πμW)\begin{aligned} F(\mu) & = \int_{-\infty}^{\infty} f(t) e^{-j2\pi\mu t}dt = \int_{-W/2}^{W/2} f(t) A e^{-j2\pi\mu t}dt\\ & = \frac{-A}{j2\pi\mu}[e^{-j2\pi\mu t}]_{-W/2}^{W/2} = \frac{-A}{j2\pi\mu}[e^{-j\pi\mu W} - e^{j\pi\mu W}]\\ & = \frac{A}{j2\pi\mu}[e^{j\pi\mu W} - e^{-j\pi\mu W}] \\ & = AW \frac{sin(\pi \mu W)}{(\pi \mu W)} \\ \end{aligned}F(μ)=∫−∞∞f(t)e−j2πμtdt=∫−W/2W/2f(t)Ae−j2πμtdt=j2πμ−A[e−j2πμt]−W/2W/2=j2πμ−A[e−jπμW−ejπμW]=j2πμA[ejπμW−e−jπμW]=AW(πμW)sin(πμW)
最后的结果是sinc\text{sinc}sinc函数
sinc(m)=sin(πm)(πm)(4.23)\text{sinc}(m) = \frac{\text{sin}(\pi m)}{(\pi m)} \tag{4.23}sinc(m)=(πm)sin(πm)(4.23)
通常傅里叶变换中包含复数项,这是为了显示变换的幅值(一个实量)的约定。这个幅值称为傅里叶频谱或频谱:
∣F(μ)∣=AW∣sin(πμW)(πμW)∣|F(\mu)| = AW \bigg|\frac{sin(\pi \mu W)}{(\pi \mu W)}\bigg|∣F(μ)∣=AW∣∣∣∣(πμW)sin(πμW)∣∣∣∣
def box_function(x, w):w_2 = w / 2y = np.where(x, x > -w_2, 0)y = np.where(x < w_2, y, 0)return y
import mpl_toolkits.axisartist as axisartist
def setup_axes(fig, rect):ax = axisartist.SubplotZero(fig, rect)fig.add_axes(ax)for direction in ["xzero", "yzero"]:# adds arrows at the ends of each axisax.axis[direction].set_axisline_style("-|>")# adds X and Y-axis from the originax.axis[direction].set_visible(True)for direction in ["left", "right", "bottom", "top"]:# hides bordersax.axis[direction].set_visible(False)return ax
# 盒式函数的傅里叶变换
x = np.arange(-5, 5, 0.1)
y = box_function(x, 6)fig = plt.figure(figsize=(15, 5))
ax_1 = setup_axes(fig, 131)
ax_1.plot(x, y), ax_1.set_title('f(t)', loc='center', y=1.05), ax_1.set_ylim([0, 2]), ax_1.set_yticks([])f_u = np.sinc(x)
ax_2 = setup_axes(fig, 132)
ax_2.plot(x, f_u), ax_2.set_title('F(u)', loc='center', y=1.05), ax_2.set_yticks([]), #ax_2.set_ylim([-1, 2]),f_u_absolute = abs(f_u)
ax_3 = setup_axes(fig, 133)
ax_3.plot(x, f_u_absolute), ax_3.set_title('|F(u)|', loc='center', y=1.05), ax_3.set_yticks([]), #ax_3.set_ylim([-1, 2]),plt.tight_layout()
plt.show()
冲激和冲激串的傅里叶变换
J{δ(t)}=F(μ)=∫−∞∞δ(t)e−j2πμtdt=∫−∞∞e−j2πμtδ(t)dt=e−j2πμ0=e0=1\begin{aligned} \mathfrak{J}\{\delta(t)\} & = F(\mu) = \int_{-\infty}^{\infty} \delta(t) e^{-j2\pi\mu t}dt \\ & = \int_{-\infty}^{\infty} e^{-j2\pi\mu t} \delta(t)dt \\ & = e^{-j2\pi\mu_0} \\ & = e^0 = 1 \end{aligned}J{δ(t)}=F(μ)=∫−∞∞δ(t)e−j2πμtdt=∫−∞∞e−j2πμtδ(t)dt=e−j2πμ0=e0=1
J{δ(t−t0)}=F(μ)=∫−∞∞δ(t−t0)e−j2πμtdt=∫−∞∞e−j2πμtδ(t−t0)dt=e−j2πμt0\begin{aligned} \mathfrak{J}\{\delta(t - t_0)\} & = F(\mu) = \int_{-\infty}^{\infty} \delta(t - t_0) e^{-j2\pi\mu t}dt \\ & = \int_{-\infty}^{\infty} e^{-j2\pi\mu t} \delta(t - t_0)dt \\ & = e^{-j2\pi\mu t_0} \\ \end{aligned}J{δ(t−t0)}=F(μ)=∫−∞∞δ(t−t0)e−j2πμtdt=∫−∞∞e−j2πμtδ(t−t0)dt=e−j2πμt0
冲激串的傅里叶变换
S(μ)=J{SΔT(t)}=J{1Δ∑n=−∞∞ej2πnΔTt}=1ΔTJ{∑n=−∞∞ej2πnΔTt}=1ΔT∑n=−∞∞δ(μ−nΔT)\begin{aligned} S(\mu) & = \mathfrak{J}\{S_{\Delta T}(t)\} = \mathfrak{J}\{\frac{1}{\Delta } \sum_{n=-\infty}^{\infty} e^{j\frac{2\pi n}{\Delta T}t}\} \\ & = \frac{1}{\Delta T} \mathfrak{J}\{\sum_{n=-\infty}^{\infty} e^{j\frac{2\pi n}{\Delta T}t}\} \\ & = \frac{1}{\Delta T} \sum_{n=-\infty}^{\infty} \delta(\mu - \frac{n}{\Delta T}) \\ \end{aligned}S(μ)=J{SΔT(t)}=J{Δ1n=−∞∑∞ejΔT2πnt}=ΔT1J{n=−∞∑∞ejΔT2πnt}=ΔT1n=−∞∑∞δ(μ−ΔTn)
卷积
(f⋆h)(t)=∫−∞∞f(τ)h(t−τ)dτ(4.24)(f\star h)(t) = \int_{-\infty}^{\infty} f(\tau) h(t - \tau) d\tau \tag{4.24}(f⋆h)(t)=∫−∞∞f(τ)h(t−τ)dτ(4.24)
J{(f⋆h)(t)}=∫−∞∞[∫−∞∞f(τ)h(t−τ)dτ]e−j2πμtdt=∫−∞∞f(τ)[∫−∞∞h(t−τ)e−j2πμtdt]dτ=H(μ)∫−∞∞f(τ)e−j2πμτdτ=H(μ)F(μ)=(H∙F)(μ)\begin{aligned} \mathfrak{J}\{(f \star h)(t) \} & = \int_{-\infty}^{\infty} \bigg[\int_{-\infty}^{\infty} f(\tau) h(t - \tau) d\tau \bigg] e^{-j2\pi \mu t} dt\\ & = \int_{-\infty}^{\infty} f(\tau) \bigg[\int_{-\infty}^{\infty} h(t - \tau) e^{-j2\pi \mu t} dt\bigg] d\tau \\ & = H(\mu) \int_{-\infty}^{\infty} f(\tau) e^{-j2\pi \mu \tau} d\tau \\ & = H(\mu)F(\mu) = (H \bullet F)(\mu) \end{aligned}J{(f⋆h)(t)}=∫−∞∞[∫−∞∞f(τ)h(t−τ)dτ]e−j2πμtdt=∫−∞∞f(τ)[∫−∞∞h(t−τ)e−j2πμtdt]dτ=H(μ)∫−∞∞f(τ)e−j2πμτdτ=H(μ)F(μ)=(H∙F)(μ)
-
傅里叶正变换
(f⋆h)(t)⇔(H∙F)(μ)(4.25)(f\star h)(t) \Leftrightarrow (H \bullet F)(\mu) \tag{4.25}(f⋆h)(t)⇔(H∙F)(μ)(4.25) -
傅里叶反变换
(f∙h)(t)⇔(H⋆F)(μ)(4.26)(f\bullet h)(t) \Leftrightarrow (H \star F)(\mu) \tag{4.26}(f∙h)(t)⇔(H⋆F)(μ)(4.26)