法国数学家傅里叶发现,任何周期函数都可以用正弦函数和余弦函数构成的无穷级数来表示。
f ( t ) = a 0 2 + ∑ n = 1 ∞ [ a n c o s ( n w 0 t ) + b n s i n ( n w 0 t ) ] f(t)=\frac{a_0}{2}+\sum_{n=1}^\infty \big[a_ncos(nw_0t)+b_nsin(nw_0t)\big] f(t)=2a0+n=1∑∞[ancos(nw0t)+bnsin(nw0t)]
由于正弦函数和余弦函数构成正交函数系,进行如下推导:
计算 a 0 a_0 a0
∫ − π w 0 π w 0 f ( t ) d t = ∫ − π w 0 π w 0 a 0 2 d t = π w 0 a 0 ⇒ a 0 = w 0 π ∫ − π w 0 π w 0 f ( t ) d t = 2 T 0 ∫ − T 0 2 T 0 2 f ( t ) d t \int_{-\frac{\pi}{w_0}}^{\frac{\pi}{w_0}} f(t)dt=\int_{-\frac{\pi}{w_0}}^{\frac{\pi}{w_0}} \frac{a_0}{2}dt=\frac{\pi}{w_0}a_0 \\[2mm] \Rightarrow\ a_0=\frac{w_0}{\pi}\int_{-\frac{\pi}{w_0}}^{\frac{\pi}{w_0}} f(t)dt=\frac{2}{T_0}\int_{-\frac{T_0}{2}}^\frac{T_0}{2}f(t)dt ∫−w0πw0πf(t)dt=∫−w0πw0π2a0dt=w0πa0⇒ a0=πw0∫−w0πw0πf(t)dt=T02∫−2T02T0f(t)dt
计算 a n a_n an
∫ − π w 0 π w 0 f ( t ) c o s ( n w 0 t ) d t = ∫ − π w 0 π w 0 a n c o s 2 ( n w 0 t ) d t = π w 0 a n ⇒ a n = w 0 π ∫ − π w 0 π w 0 f ( t ) c o s ( n w 0 t ) d t = 2 T 0 ∫ − T 0 2 T 0 2 f ( t ) c o s ( n w 0 t ) d t \int_{-\frac{\pi}{w_0}}^{\frac{\pi}{w_0}} f(t)cos(nw_0t)dt=\int_{-\frac{\pi}{w_0}}^{\frac{\pi}{w_0}} a_ncos^2(nw_0t)dt=\frac{\pi}{w_0}a_n \\[2mm] \Rightarrow\ a_n=\frac{w_0}{\pi}\int_{-\frac{\pi}{w_0}}^{\frac{\pi}{w_0}} f(t)cos(nw_0t)dt=\frac{2}{T_0}\int_{-\frac{T_0}{2}}^\frac{T_0}{2}f(t)cos(nw_0t)dt ∫−w0πw0πf(t)cos(nw0t)dt=∫−w0πw0πancos2(nw0t)dt=w0πan⇒ an=πw0∫−w0πw0πf(t)cos(nw0t)dt=T02∫−2T02T0f(t)cos(nw0t)dt
计算 b n b_n bn
∫ − π w 0 π w 0 f ( t ) s i n ( n w 0 t ) d t = ∫ − π w 0 π w 0 b n s i n 2 ( n w 0 t ) d t = π w 0 b n ⇒ b n = w 0 π ∫ − π w 0 π w 0 f ( t ) s i n ( n w 0 t ) d t = 2 T 0 ∫ − T 0 2 T 0 2 f ( t ) s i n ( n w 0 t ) d t \int_{-\frac{\pi}{w_0}}^{\frac{\pi}{w_0}} f(t)sin(nw_0t)dt=\int_{-\frac{\pi}{w_0}}^{\frac{\pi}{w_0}} b_nsin^2(nw_0t)dt=\frac{\pi}{w_0}b_n \\[2mm] \Rightarrow\ b_n=\frac{w_0}{\pi}\int_{-\frac{\pi}{w_0}}^{\frac{\pi}{w_0}} f(t)sin(nw_0t)dt=\frac{2}{T_0}\int_{-\frac{T_0}{2}}^\frac{T_0}{2}f(t)sin(nw_0t)dt ∫−w0πw0πf(t)sin(nw0t)dt=∫−w0πw0πbnsin2(nw0t)dt=w0πbn⇒ bn=πw0∫−w0πw0πf(t)sin(nw0t)dt=T02∫−2T02T0f(t)sin(nw0t)dt
到此,我们成功将原周期函数表示成了三角级数形式,而傅里叶又使用欧拉公式将三角级数化为了复指数形式,于是引出傅里叶级数。
由欧拉公式:
e j x = c o s ( x ) + j s i n ( x ) e^{\ jx}=cos(x)+jsin(x) e jx=cos(x)+jsin(x)
得:
c o s ( n w 0 t ) = e j n w 0 t + e − j n w 0 t 2 s i n ( n w 0 t ) = e j n w 0 t − e − j n w 0 t 2 j cos(nw_0t) = \frac{e^{\ jnw_0t}+e^{-jnw_0t}}{2} \\[2mm] sin(nw_0t) = \frac{e^{\ jnw_0t}-e^{-jnw_0t}}{2j} cos(nw0t)=2e jnw0t+e−jnw0tsin(nw0t)=2je jnw0t−e−jnw0t
代入到 f ( t ) f(t) f(t) 得:
f ( t ) = a 0 2 + ∑ n = 1 ∞ ( a n − j b n 2 e j n w 0 t + a n + j b n 2 e − j n w 0 t ) f(t)=\frac{a_0}{2}+\sum_{n=1}^\infty \Big(\frac{a_n-jb_n}{2}e^{\ jnw_0t}+\frac{a_n+jb_n}{2}e^{-jnw_0t}\Big) f(t)=2a0+n=1∑∞(2an−jbne jnw0t+2an+jbne−jnw0t)
令 F n = a n − j b n 2 F_n=\frac{a_n-jb_n}{2} Fn=2an−jbn,则 F − n = a n + j b n 2 , F 0 = a 0 2 F_{-n}=\frac{a_n+jb_n}{2},\ F_0=\frac{a_0}{2} F−n=2an+jbn, F0=2a0,代入到 f ( t ) f(t) f(t) 得到傅里叶级数:
f ( t ) = F 0 + ∑ n = 1 ∞ ( F n e j n w 0 t + F − n e − j n w 0 t ) = ∑ n = − ∞ ∞ F n e j n w 0 t f(t)=F_0+\sum_{n=1}^\infty \Big(F_ne^{\ jnw_0t}+F_{-n}e^{-jnw_0t}\Big)=\sum_{n=-\infty}^\infty F_ne^{\ jnw_0t} f(t)=F0+n=1∑∞(Fne jnw0t+F−ne−jnw0t)=n=−∞∑∞Fne jnw0t
将 a n , b n a_n,\ b_n an, bn 代回到 F n F_n Fn 中,得到:
F n = 1 T 0 ∫ − T 0 2 T 0 2 f ( t ) e − j n w 0 t d t F_n=\frac{1}{T_0}\int^{\frac{T_0}{2}}_{-\frac{T_0}{2}} f(t)e^{-jnw_0t}dt Fn=T01∫−2T02T0f(t)e−jnw0tdt
傅里叶级数解决的是周期函数的表达问题,其频谱图是离散的,而傅里叶变换解决的则是非周期函数的表达问题,其频谱图是连续的。本节所说的傅里叶变换均指连续傅里叶变换。
对于非周期函数,有 T 0 → ∞ , w 0 → d w , n w 0 → w T_0\to \infty,\ w_0\to dw,\ nw_0\to w T0→∞, w0→dw, nw0→w
将式子
F n = 1 T 0 ∫ − T 0 2 T 0 2 f ( t ) e − j n w 0 t d t F_n=\frac{1}{T_0}\int^{\frac{T_0}{2}}_{-\frac{T_0}{2}} f(t)e^{-jnw_0t}dt Fn=T01∫−2T02T0f(t)e−jnw0tdt
两边同乘 T 0 T_0 T0 并取极限得:
lim T 0 → ∞ F n T 0 = lim T 0 → ∞ ∫ − T 0 2 T 0 2 f ( t ) e − j n w 0 t d t = ∫ − ∞ ∞ f ( t ) e − j w t d t \lim_{T_0\to\infty }F_nT_0=\lim_{T_0\to\infty }\int^{\frac{T_0}{2}}_{-\frac{T_0}{2}} f(t)e^{-jnw_0t}dt=\int^{\infty}_{-\infty}f(t)e^{-jwt}dt T0→∞limFnT0=T0→∞lim∫−2T02T0f(t)e−jnw0tdt=∫−∞∞f(t)e−jwtdt
令 F ( w ) = lim T 0 → ∞ F n T 0 F(w)=\lim\limits_{T_0\to\infty}F_nT_0 F(w)=T0→∞limFnT0 得到傅里叶正变换:
F ( w ) = ∫ − ∞ ∞ f ( t ) e − j w t d t F(w)=\int^{\infty}_{-\infty}f(t)e^{-jwt}dt F(w)=∫−∞∞f(t)e−jwtdt
将 F ( w ) = lim T 0 → ∞ F n T 0 F(w)=\lim\limits_{T_0\to\infty}F_nT_0 F(w)=T0→∞limFnT0 稍作变换还可以得到:
lim T 0 → ∞ F n = lim T 0 → ∞ F ( w ) T 0 = lim T 0 → ∞ F ( w ) w 0 2 π = F ( w ) d w 2 π \lim_{T_0\to\infty}F_n=\lim_{T_0\to\infty}\frac{F(w)}{T_0}=\lim_{T_0\to\infty}\frac{F(w)w_0}{2\pi}=\frac{F(w)dw}{2\pi} T0→∞limFn=T0→∞limT0F(w)=T0→∞lim2πF(w)w0=2πF(w)dw
将式子
f ( t ) = ∑ n = − ∞ ∞ F n e j n w 0 t f(t)=\sum_{n=-\infty}^\infty F_ne^{\ jnw_0t} f(t)=n=−∞∑∞Fne jnw0t
取极限得傅里叶反变换:
f ( t ) = lim T 0 → ∞ ∑ n = − ∞ ∞ F n e j n w 0 t = 1 2 π ∫ − ∞ ∞ F ( w ) e j w t d w f(t)=\lim_{T_0\to \infty}\sum_{n=-\infty}^\infty F_ne^{\ jnw_0t}=\frac{1}{2\pi}\int^{\infty}_{-\infty}F(w)e^{\ jwt}dw f(t)=T0→∞limn=−∞∑∞Fne jnw0t=2π1∫−∞∞F(w)e jwtdw
当我们原始信号为离散的时候,就需要使用离散傅里叶变换对信号进行处理,离散傅里叶变换得到的频谱也是离散的,因此其公式可以由傅里叶级数公式简单推出。
将 w 0 = 2 π T 0 w_0=\frac{2\pi}{T_0} w0=T02π 带入到 F n F_n Fn 得:
F n = 1 T 0 ∫ − T 0 2 T 0 2 f ( t ) e − j n w 0 t d t = 1 T 0 ∫ − T 0 2 T 0 2 f ( t ) e − j 2 π n t T 0 d t F_n=\frac{1}{T_0}\int^{\frac{T_0}{2}}_{-\frac{T_0}{2}} f(t)e^{-jnw_0t}dt=\frac{1}{T_0}\int^{\frac{T_0}{2}}_{-\frac{T_0}{2}} f(t)e^{-j2\pi\frac{nt}{T_0}}dt Fn=T01∫−2T02T0f(t)e−jnw0tdt=T01∫−2T02T0f(t)e−j2πT0ntdt
转换成离散情况:
F ( u ) = 1 N ∑ x = 0 N f ( x ) e − j 2 π u x N , u = 0 , 1 , … , N − 1 F(u)=\frac{1}{N}\sum^{N}_{x=0}f(x)e^{-j2\pi\frac{ux}{N}},\ u=0,1,\ \dots\ ,N-1 F(u)=N1x=0∑Nf(x)e−j2πNux, u=0,1, … ,N−1
一般离散傅里叶变化把 1 N \frac{1}{N} N1 移到逆变换上,因此离散傅里叶正变换的最终表达式为:
F ( u ) = ∑ x = 0 N f ( x ) e − j 2 π u x N , u = 0 , 1 , … , N − 1 F(u)=\sum^{N}_{x=0}f(x)e^{-j2\pi\frac{ux}{N}},\ u=0,1,\ \dots\ ,N-1 F(u)=x=0∑Nf(x)e−j2πNux, u=0,1, … ,N−1
类比可得离散傅里叶反变换表达式为:
f ( x ) = 1 N ∑ u = 0 N F ( u ) e j 2 π u x N , x = 0 , 1 , … , N − 1 f(x)=\frac{1}{N}\sum^{N}_{u=0}F(u)e^{\ j2\pi\frac{ux}{N}},\ x=0,1,\ \dots\ ,N-1 f(x)=N1u=0∑NF(u)e j2πNux, x=0,1, … ,N−1