傅里叶级数是用来求解热传导方程提出来的,热传导方程 f ( x , t ) f(x,t) f(x,t)满足以下偏微分方程
{ ∂ f ∂ t = K ∂ 2 f ∂ x 2 f ( x , 0 ) = f ( x ) \left \{ \begin{array}{c} \frac{\partial f}{\partial t}= K \frac{\partial ^2f}{\partial x^2}\\ f(x,0)=f(x) \end{array} \right. {∂t∂f=K∂x2∂2ff(x,0)=f(x)
对于一般的函数 f ( x ) f(x) f(x),上述方程没有解,但是如果 f ( x ) f(x) f(x)是某些特殊函数,热传导方程则存在解,有三种情况存在解(满足热传导方程)
情况1. 当 f ( x ) = B f(x)=B f(x)=B时, f ( x , t ) = B f(x,t)=B f(x,t)=B
情况2. 当 f ( x ) = B c o s ( ω x ) f(x)=Bcos(\omega x) f(x)=Bcos(ωx)时, f ( x , t ) = B c o s ( ω x ) e − K ω 2 t f(x,t)=Bcos(\omega x)e^{-K \omega ^2t} f(x,t)=Bcos(ωx)e−Kω2t
情况3. 当 f ( x ) = C s i n ( ω x ) f(x)=Csin(\omega x) f(x)=Csin(ωx)时, f ( x , t ) = C s i n ( ω x ) e − K ω 2 t f(x,t)=Csin(\omega x)e^{-K \omega ^2t} f(x,t)=Csin(ωx)e−Kω2t
傅里叶提出的
如果 f ( x ) = B 0 + ∑ k = 1 + ∞ B k c o s ( k ω 0 x ) + ∑ k = 1 + ∞ C k s i n ( k ω 0 x ) f(x)=B_0+\sum_{k=1}^{+\infty}B_kcos(k\omega_0x)+\sum_{k=1}^{+\infty}C_ksin(k\omega_0x) f(x)=B0+k=1∑+∞Bkcos(kω0x)+k=1∑+∞Cksin(kω0x),
则热传导方程为
f ( x , t ) = B 0 + ∑ k = 1 + ∞ B k c o s ( k ω 0 x ) e − K k 2 ω 0 2 t + ∑ k = 1 + ∞ C k s i n ( k ω 0 x ) e − K k 2 ω 0 2 t f(x,t)=B_0+\sum_{k=1}^{+\infty}B_kcos(k\omega_0x)e^{-Kk^2\omega_0^2t}+\sum_{k=1}^{+\infty}C_ksin(k\omega_0x)e^{-Kk^2\omega_0^2t} f(x,t)=B0+k=1∑+∞Bkcos(kω0x)e−Kk2ω02t+k=1∑+∞Cksin(kω0x)e−Kk2ω02t
其中 ω 0 \omega_0 ω0为基波频率, k ω 0 k\omega_0 kω0为k次谐波频率, B 0 B_0 B0为直流分量, T 0 = 2 π ω 0 T_0=\frac{2\pi}{\omega_0} T0=ω02π
当上述热传导方程的三种特殊解叠加起来后,则构成了傅里叶所提出的,为什么能够叠加呢,因为热传导方程为LTI系统
在情况2和情况3频率为 ω \omega ω,那么傅里叶为什么要用 ω 0 \omega_0 ω0呢?为了求解 B 0 、 B k 、 C k B_0、B_k、C_k B0、Bk、Ck
既然 f ( x . t ) f(x.t) f(x.t)函数得到,那么式中只有 B 0 、 B k 、 C k B_0、B_k、C_k B0、Bk、Ck为未知数,只要把 B 0 、 B k 、 C k B_0、B_k、C_k B0、Bk、Ck求解出来,则 f ( x . t ) f(x.t) f(x.t)就可以得到求解
推导 B 0 、 B k 、 C k B_0、B_k、C_k B0、Bk、Ck
∫ 0 T 0 f ( x ) d x = ∫ 0 T 0 B 0 d x + ∑ k = 1 + ∞ ∫ 0 T 0 B k c o s ( k ω 0 x ) d x + ∑ k = 1 + ∞ ∫ 0 T 0 C k s i n ( k ω 0 x ) d x = B 0 T 0 \int_{0}^{T_0}f(x)dx=\int_{0}^{T_0}B_0dx+\sum_{k=1}^{+\infty}\int_{0}^{T_0}B_kcos(k\omega_0x)dx+\sum_{k=1}^{+\infty}\int_{0}^{T_0}C_ksin(k\omega_0x)dx=B_0T_0 ∫0T0f(x)dx=∫0T0B0dx+k=1∑+∞∫0T0Bkcos(kω0x)dx+k=1∑+∞∫0T0Cksin(kω0x)dx=B0T0
因此, B 0 = 1 T 0 ∫ 0 T 0 f ( x ) d x B_0=\frac{1}{T_0}\int_{0}^{T_0}f(x)dx B0=T01∫0T0f(x)dx B 0 B_0 B0为直流分量
∫ 0 T 0 f ( x ) c o s ( k ω 0 x ) d x = ∫ 0 T 0 B 0 c o s ( k ω 0 x ) d x + ∑ u = 1 + ∞ ∫ 0 T 0 B u c o s ( u ω 0 x ) c o s ( k ω 0 x ) d x + ∑ u = 1 + ∞ ∫ 0 T 0 C u s i n ( u ω 0 x ) c o s ( k ω 0 x ) d x = B k T 0 2 \int_{0}^{T_0}f(x)cos(k\omega_0x)dx=\int_{0}^{T_0}B_0cos(k\omega_0x)dx+\sum_{u=1}^{+\infty}\int_{0}^{T_0}B_ucos(u\omega_0x)cos(k\omega_0x)dx+\sum_{u=1}^{+\infty}\int_{0}^{T_0}C_usin(u\omega_0x)cos(k\omega_0x)dx=B_k\frac{T_0}{2} ∫0T0f(x)cos(kω0x)dx=∫0T0B0cos(kω0x)dx+u=1∑+∞∫0T0Bucos(uω0x)cos(kω0x)dx+u=1∑+∞∫0T0Cusin(uω0x)cos(kω0x)dx=Bk2T0
因此, B k = 2 T 0 ∫ 0 T 0 f ( x ) c o s ( k ω 0 x ) d x B_k=\frac{2}{T_0}\int_{0}^{T_0}f(x)cos(k\omega_0x)dx Bk=T02∫0T0f(x)cos(kω0x)dx
∫ 0 T 0 f ( x ) s i n ( k ω 0 x ) d x = ∫ 0 T 0 B 0 s i n ( k ω 0 x ) d x + ∑ u = 1 + ∞ ∫ 0 T 0 B u c o s ( u ω 0 x ) s i n ( k ω 0 x ) d x + ∑ u = 1 + ∞ ∫ 0 T 0 C u s i n ( u ω 0 x ) s i n ( k ω 0 x ) d x = C k T 0 2 \int_{0}^{T_0}f(x)sin(k\omega_0x)dx=\int_{0}^{T_0}B_0sin(k\omega_0x)dx+\sum_{u=1}^{+\infty}\int_{0}^{T_0}B_ucos(u\omega_0x)sin(k\omega_0x)dx+\sum_{u=1}^{+\infty}\int_{0}^{T_0}C_usin(u\omega_0x)sin(k\omega_0x)dx=C_k\frac{T_0}{2} ∫0T0f(x)sin(kω0x)dx=∫0T0B0sin(kω0x)dx+u=1∑+∞∫0T0Bucos(uω0x)sin(kω0x)dx+u=1∑+∞∫0T0Cusin(uω0x)sin(kω0x)dx=Ck2T0
因此, C k = 2 T 0 ∫ 0 T 0 f ( x ) s i n ( k ω 0 x ) d x C_k=\frac{2}{T_0}\int_{0}^{T_0}f(x)sin(k\omega_0x)dx Ck=T02∫0T0f(x)sin(kω0x)dx
总结:
当 f ( x ) = B 0 + ∑ k = 1 + ∞ B k c o s ( k ω 0 x ) + ∑ k = 1 + ∞ C k s i n ( k ω 0 x ) f(x)=B_0+\sum_{k=1}^{+\infty}B_kcos(k\omega_0x)+\sum_{k=1}^{+\infty}C_ksin(k\omega_0x) f(x)=B0+k=1∑+∞Bkcos(kω0x)+k=1∑+∞Cksin(kω0x),
则 B 0 = 1 T 0 ∫ 0 T 0 f ( x ) d x B_0=\frac{1}{T_0}\int_{0}^{T_0}f(x)dx B0=T01∫0T0f(x)dx
B k = 2 T 0 ∫ 0 T 0 f ( x ) c o s ( k ω 0 x ) d x B_k=\frac{2}{T_0}\int_{0}^{T_0}f(x)cos(k\omega_0x)dx Bk=T02∫0T0f(x)cos(kω0x)dx
C k = 2 T 0 ∫ 0 T 0 f ( x ) s i n ( k ω 0 x ) d x C_k=\frac{2}{T_0}\int_{0}^{T_0}f(x)sin(k\omega_0x)dx Ck=T02∫0T0f(x)sin(kω0x)dx
此时,热传导方程为:
f ( x , t ) = B 0 + ∑ k = 1 + ∞ B k c o s ( k ω 0 x ) e − K k 2 ω 0 2 t + ∑ k = 1 + ∞ C k s i n ( k ω 0 x ) e − K k 2 ω 0 2 t f(x,t)=B_0+\sum_{k=1}^{+\infty}B_kcos(k\omega_0x)e^{-Kk^2\omega_0^2t}+\sum_{k=1}^{+\infty}C_ksin(k\omega_0x)e^{-Kk^2\omega_0^2t} f(x,t)=B0+k=1∑+∞Bkcos(kω0x)e−Kk2ω02t+k=1∑+∞Cksin(kω0x)e−Kk2ω02t
傅里叶级数的复数表达形式
{ x ( t ) = ∑ k = − ∞ + ∞ a k e j k ω 0 t a k = 1 T 0 ∫ 0 T 0 x ( t ) e − j k ω 0 t d t \left \{ \begin{array}{c} x(t)= \sum_{k=-\infty}^{+\infty}a_ke^{jk\omega_0t}\\ a_k=\frac{1}{T_0}\int_{0}^{T_0}x(t)e^{-jk\omega_0t}dt \end{array} \right. {x(t)=∑k=−∞+∞akejkω0tak=T01∫0T0x(t)e−jkω0tdt
其中, ω 0 = 2 π T 0 \omega_0=\frac{2\pi}{T_0} ω0=T02π
{ B 0 = a 0 B k = a k + a − k C k = j ( a k − a − k ) \left \{ \begin{array}{c} B_0 = a_0\\ B_k = a_k + a_{-k}\\ C_k=j(a_k-a_{-k}) \end{array} \right. ⎩ ⎨ ⎧B0=a0Bk=ak+a−kCk=j(ak−a−k)
{ a 0 = B 0 a k = 1 2 ( B k − j C k ) a − k = 1 2 ( B k + j C k ) \left \{ \begin{array}{c} a_0=B_0 \\ a_k = \frac{1}{2}(B_k - jC_k)\\ a_{-k} = \frac{1}{2}(B_k + jC_k) \end{array} \right. ⎩ ⎨ ⎧a0=B0ak=21(Bk−jCk)a−k=21(Bk+jCk)
傅里叶虽然提出了 f ( x ) f(x) f(x)的表达式,但是没有给出该式子收敛性的证明,因此狄里赫利给出了傅里叶级数收敛的3个条件:
引理1:
若 x ( t ) x(t) x(t)满足狄里赫利三条件,则有:
l i m N → + ∞ ∫ 0 T 0 x ( t ) s i n ( N t ) d t = 0 lim_{N \to +\infty}\int_{0}^{T_0}x(t)sin(Nt)dt=0 limN→+∞∫0T0x(t)sin(Nt)dt=0
l i m N → + ∞ ∫ 0 T 0 x ( t ) c o s ( N t ) d t = 0 lim_{N \to +\infty}\int_{0}^{T_0}x(t)cos(Nt)dt=0 limN→+∞∫0T0x(t)cos(Nt)dt=0
引理2:
∫ − ∞ + ∞ s i n ( ω t ) t d t = π \int_{-\infty}^{+\infty}\frac{sin(\omega t)}{t}dt = \pi ∫−∞+∞tsin(ωt)dt=π
引理3:
l i m ω → + ∞ s i n ( ω t ) π t = δ ( t ) lim_{\omega \to +\infty}\frac{sin(\omega t)}{\pi t} = \delta (t) limω→+∞πtsin(ωt)=δ(t)
若以 T 0 T_0 T0为周期的信号 x ( t ) x(t) x(t)满足狄里赫利的三个条件,可以得到,当:
x N ( t ) = B 0 + ∑ k = 1 N B k c o s ( k ω 0 t ) + ∑ k = 1 N C k s i n ( k ω 0 t ) x_N(t)=B_0+\sum_{k=1}^{N}B_kcos(k\omega_0t)+\sum_{k=1}^{N}C_ksin(k\omega_0t) xN(t)=B0+k=1∑NBkcos(kω0t)+k=1∑NCksin(kω0t)
其中:
B 0 = 1 T 0 ∫ 0 T 0 f ( x ) d x B_0=\frac{1}{T_0}\int_{0}^{T_0}f(x)dx B0=T01∫0T0f(x)dx
B k = 2 T 0 ∫ 0 T 0 f ( x ) c o s ( k ω 0 x ) d x B_k=\frac{2}{T_0}\int_{0}^{T_0}f(x)cos(k\omega_0x)dx Bk=T02∫0T0f(x)cos(kω0x)dx
C k = 2 T 0 ∫ 0 T 0 f ( x ) s i n ( k ω 0 x ) d x C_k=\frac{2}{T_0}\int_{0}^{T_0}f(x)sin(k\omega_0x)dx Ck=T02∫0T0f(x)sin(kω0x)dx
则有:
l i m N → ∞ x N ( t ) = x ( t ) lim_{N \to \infty}x_N(t)=x(t) limN→∞xN(t)=x(t)
具体推导过程:
x N ( t ) = 1 T 0 ∫ T 0 x ( u ) d u + 2 T 0 ∑ k = 1 N [ ∫ T 0 x ( u ) c o s ( k ω 0 u ) d u ] c o s ( k ω 0 t ) + + 2 T 0 ∑ k = 1 N [ ∫ T 0 x ( u ) s i n ( k ω 0 u ) d u ] s i n ( k ω 0 t ) = 2 T 0 ∫ T 0 1 2 + ∑ k = 1 N [ c o s ( k ω 0 u ) c o s ( k ω 0 t ) + s i n ( k ω 0 u ) s i n ( k ω 0 t ) ] x ( u ) d u = 2 T 0 ∫ T 0 1 2 + ∑ k = 1 N c o s [ k ω 0 ( u − t ) ] x ( u ) d u = 2 T 0 ∫ T 0 s i n [ ( N + 1 2 ) ω 0 ( u − t ) ] 2 s i n [ 1 2 ω 0 ( u − t ) ] x ( u ) d u = 1 T 0 ∫ 0 T 0 s i n [ ( N + 1 2 ) ω 0 ( u − t ) ) ] s i n [ 1 2 ω 0 ( u − t ) ] x ( u ) d u \begin{aligned} x_N(t)&=\frac{1}{T_0}\int_{T_0}x(u)du+\frac{2}{T_0}\sum_{k=1}^{N}\big [\int_{T_0}x(u)cos(k\omega_0u)du \big]cos(k\omega_0t)++\frac{2}{T_0}\sum_{k=1}^{N}\big [\int_{T_0}x(u)sin(k\omega_0u)du \big]sin(k\omega_0t) \\ &=\frac{2}{T_0}\int_{T_0}\frac{1}{2}+\sum_{k=1}^{N}\big[cos(k\omega_0u)cos(k\omega_0t) + sin(k\omega_0u)sin(k\omega_0t)\big]x(u)du \\ &=\frac{2}{T_0}\int_{T_0}\frac{1}{2}+\sum_{k=1}^{N}cos[k\omega_0(u-t)]x(u)du \\ &=\frac{2}{T_0}\int_{T_0}\frac{sin \big[ (N+\frac{1}{2})\omega_0(u-t)\big]}{2sin \big[ \frac{1}{2}\omega_0(u-t)\big]}x(u)du \\ &=\frac{1}{T_0}\int_{0}^{T_0}\frac{sin \big[ (N+\frac{1}{2})\omega_0(u-t))\big]}{sin \big[ \frac{1}{2}\omega_0(u-t)\big]}x(u)du \\ \end{aligned} xN(t)=T01∫T0x(u)du+T02k=1∑N[∫T0x(u)cos(kω0u)du]cos(kω0t)++T02k=1∑N[∫T0x(u)sin(kω0u)du]sin(kω0t)=T02∫T021+k=1∑N[cos(kω0u)cos(kω0t)+sin(kω0u)sin(kω0t)]x(u)du=T02∫T021+k=1∑Ncos[kω0(u−t)]x(u)du=T02∫T02sin[21ω0(u−t)]sin[(N+21)ω0(u−t)]x(u)du=T01∫0T0sin[21ω0(u−t)]sin[(N+21)ω0(u−t))]x(u)du
设 ω 0 ( u − t ) = u ′ \omega_0(u-t)=u' ω0(u−t)=u′
x N ( t ) = 1 ω 0 T 0 ∫ − ω 0 t 2 π − ω 0 T 0 s i n [ ( N + 1 2 ) u ′ ) ] s i n [ 1 2 u ′ ] x ( u ′ ω 0 + t ) d u ′ = 1 2 π ∫ − ω 0 t 2 π − ω 0 T 0 s i n [ ( N + 1 2 ) u ) ] s i n [ 1 2 u ] x ( u ω 0 + t ) d u = 1 π ∫ − π π s i n [ ( N + 1 2 ) u ) ] 2 s i n [ 1 2 u ] x ( u ω 0 + t ) d u = 1 π ∫ − π π x ( u ω 0 + t ) 2 s i n [ 1 2 u ] s i n [ ( N + 1 2 ) u ) ] d u = 1 π ∫ − π π x ( u ω 0 + t ) [ 1 2 s i n ( 1 2 u ) − 1 u ] s i n [ ( N + 1 2 ) u ] d u + 1 π ∫ − π π x ( u ω 0 + t ) s i n [ ( N + 1 2 ) u ] u d u l i m N → + ∞ x N ( t ) = 1 π ∫ − π π x ( u ω 0 + t ) l i m N → + ∞ s i n [ ( N + 1 2 ) u ] u d u = 1 π ∫ − π π x ( u ω 0 + t ) δ ( u ) d u = x ( 0 ω 0 + t ) = x ( t ) \begin{aligned} x_N(t)&=\frac{1}{\omega_0T_0}\int_{-\omega_0t}^{2\pi-\omega_0T_0}\frac{sin \big[ (N+\frac{1}{2})u')\big]}{sin \big[ \frac{1}{2}u'\big]}x(\frac{u'}{\omega_0}+t)du'\\ &=\frac{1}{2\pi}\int_{-\omega_0t}^{2\pi-\omega_0T_0}\frac{sin \big[ (N+\frac{1}{2})u)\big]}{sin \big[ \frac{1}{2}u\big]}x(\frac{u}{\omega_0}+t)du\\ &=\frac{1}{\pi}\int_{-\pi}^{\pi}\frac{sin \big[ (N+\frac{1}{2})u)\big]}{2sin \big[ \frac{1}{2}u\big]}x(\frac{u}{\omega_0}+t)du\\ &=\frac{1}{\pi}\int_{-\pi}^{\pi}\frac{x(\frac{u}{\omega_0}+t)}{2sin \big[ \frac{1}{2}u\big]}sin \big[ (N+\frac{1}{2})u)\big]du\\ &=\frac{1}{\pi}\int_{-\pi}^{\pi}x(\frac{u}{\omega_0}+t)\big[\frac{1}{2sin ( \frac{1}{2}u)}-\frac{1}{u}\big]sin \big[ (N+\frac{1}{2})u\big]du + \frac{1}{\pi}\int_{-\pi}^{\pi}x(\frac{u}{\omega_0}+t)\frac{sin \big[ (N+\frac{1}{2})u\big]}{u}du\\ lim_{N \to +\infty}x_N(t)&=\frac{1}{\pi}\int_{-\pi}^{\pi}x(\frac{u}{\omega_0}+t)lim_{N \to +\infty}\frac{sin \big[ (N+\frac{1}{2})u\big]}{u}du\\ &=\frac{1}{\pi}\int_{-\pi}^{\pi}x(\frac{u}{\omega_0}+t)\delta(u)du\\ &=x(\frac{0}{\omega_0}+t)\\ &=x(t) \end{aligned} xN(t)limN→+∞xN(t)=ω0T01∫−ω0t2π−ω0T0sin[21u′]sin[(N+21)u′)]x(ω0u′+t)du′=2π1∫−ω0t2π−ω0T0sin[21u]sin[(N+21)u)]x(ω0u+t)du=π1∫−ππ2sin[21u]sin[(N+21)u)]x(ω0u+t)du=π1∫−ππ2sin[21u]x(ω0u+t)sin[(N+21)u)]du=π1∫−ππx(ω0u+t)[2sin(21u)1−u1]sin[(N+21)u]du+π1∫−ππx(ω0u+t)usin[(N+21)u]du=π1∫−ππx(ω0u+t)limN→+∞usin[(N+21)u]du=π1∫−ππx(ω0u+t)δ(u)du=x(ω00+t)=x(t)
在化简过程中用到的公式:
1 + 2 c o s ( ω ) + 2 c o s ( 2 ω ) + … … + 2 c o s ( N ω ) = s i h [ ( N + 1 2 ) ω ] s i n ( 1 2 ω ) 1+2cos(\omega)+2cos(2\omega)+……+2cos(N\omega)=\frac{sih\big[(N+\frac{1}{2})\omega\big]}{sin(\frac{1}{2}\omega)} 1+2cos(ω)+2cos(2ω)+……+2cos(Nω)=sin(21ω)sih[(N+21)ω]
l i m N → + ∞ s i n [ ( N + 1 2 ) u ] u = π δ lim_{N \to +\infty}\frac{sin \big[ (N+\frac{1}{2})u\big]}{u}=\pi\delta limN→+∞usin[(N+21)u]=πδ
∫ − ∞ ∞ x ( u ) δ ( u ) d u = x ( 0 ) \int_{-\infty}^{\infty}x(u)\delta(u)du=x(0) ∫−∞∞x(u)δ(u)du=x(0)
在自然界中,不可能真的有无穷个数据的计算,因此 f ( x ) f(x) f(x)表示为 f N ( x ) = B 0 + ∑ k = 1 N B k c o s ( k ω 0 x ) + ∑ k = 1 N C k s i n ( k ω 0 x ) f_N(x)=B_0+\sum_{k=1}^{N}B_kcos(k\omega_0x)+\sum_{k=1}^{N}C_ksin(k\omega_0x) fN(x)=B0+k=1∑NBkcos(kω0x)+k=1∑NCksin(kω0x)
这样就造成了吉布斯现象,对于一个方波,对着 N N N的增大, f N ( x ) f_N(x) fN(x)越接近于方波,但是只能无限接近,因为正弦、余弦函数无限的叠加不能够成为直上直下的情况。