SciTech-Mathmatics-Sinusoids正弦波/Harmonics(谐波) + FrequenciesSynthesis(频率合成) + Fourier Series(傅里叶级数):PeriodicalFunctions + (Discrete)FourierTransform:AllFunctions + Spectral Analysis

几何角度看,Fourier Series(傅立叶级数) 其实非常容易理解:

  1. 每一组(cos(2πnft), sin(2πnft))三角函数都可看作决定一“谐波空间”的 x 轴与 y 轴;
    Time-domain 的信号, 是用 Freq.-domain 的 N 个独立空间的谐波合成;
    每一个“谐波空间”, 都是一对可配置(freq., magnitude, phase)三角函数(cos/sin);
    每一个“谐波空间”, 都有三个坐标轴: (1,cos(2πnft),sin(2πnft)):
    x(t)=a02+n=1[ ancos(2πnft)+bnsin(2πnft) ]a021()ancos(2πnft)bnsin(2πnft)

    x(t)=n=+Snei2πntTdtSn=1Tt0t0+Tx(t)ei2πntTdtSn:() ei2πnft whenT,,F(ω)=12π+x(t)eiωtdtω:

  2. 合成的 X(t) 周期为 T=1f,
    是因为其 kFrequency Components(频率成分) 的 周期的最小公倍数为 T;
    这些 Harmonics(Frequency Components) 谐波任意“加减”组合, 周期最小公倍数为 T.
    下文 “Preliminaries.3. Frequency Components) for Synthesis” 有述;

  3. 内积(inner product of vectors) 与 分解;

    • 向量的内积, 在有限维向量空间, 两个向量的内积:
      uv=x1x2+y1y2whereu=(x1,y1), v=(x2,y2)

    • 函数的内积, 在无限维函数空间, 两个函数(连续)的内积(内积要重新定义,用到积分):
      <f,g>=t0t0+Tf(t)g(t)dt

    • 离散向量分解:
      将向量 u 分解到 两个"正交向量" v1v2上:
      假设在(v1, v2)两坐标轴上坐标为(c1, c2), 则有:
       u=c1v1+c2v2(c1,c2):c1=uv1v1v1, c2=uv2v2v2

    • 连续向量分解:
      将连续向量函数 x(t) 分解到 两个"正交基函数" cos(2πnft)sin(2πnft)上:
      要将以上向量分解公式,由 有限维的向量空间 扩展到 无限维的函数空间;
      要将内积有限维向量空间 扩展到 无限维函数空间,
      并且, 要将每个三角函数(cos/sin)都看作一个“独立的坐标轴”,
      用到 上文的 “函数的内积” 积分公式.
      但是为方便高效, 最好用 Eulers Equation 将$cos/sin转换为:
      sn=1Tt0t0+Tx(t)ei2πnftdtT=F(ω)=12π+x(t)eiωtdt

  4. 向量的正交与分解: 投影到正交的一堆向量为基的空间;
    之所以选择分解到 f(θ)=cosθf(θ)=sinθ, 是因为这是“一对正交基函数”,
    而且在任意时刻 t0 开始, 时长 2πsinxcosx 信号的积分都是0:
    <sin,cos>=t0t0+2πsinxcosxdx=0

    类比: 就像XOY平面的XY 是正交的,
    因此XOY平面上任何一点, 可用其分别在XY上的投影作为(x,y)坐标;

    向量正交: 对于 XOY平面上两个向量 u=(x1,y1), v=(x2,y2),
    如果它们的内积为0, 夹角为90, 则称这两个向量点是“正交的”, 即 :
    uv=x1x2+y1y2=0

    函数正交: 余弦函数cosθ 与 正弦函数sinθ,
    可看作 无限维的 Hilbert 空间无限维向量, 向量的各个“元”是连续区间的“函数值”;
    无限维空间向量内积需要用到积分重新定义为“两个连续函数的函数值先相乘后积分”:
    <f,g>=x0x0+Tf(x)g(x)dx<sin,cos>=t0t0+2πsintcostdt=0

  5. 分解 Time-domain 信号到 Frequency-domain,
    总体思路上, 与“Taylor Series(泰勒级数)拟合任意N阶可导函数”类似:

    • Taylor Series 是以无限项 aj(xx0)j(带可调参数的幂函数) 合成任意的 f(x);
      确定系数 ajx0 是用 f(x), f(x),f3(x), ... , ,fn(x) 无限高阶导数进行拟合与误差估计;

    • Fourier Series 是以无限项 [ ancos(2πnft)+bnsin(2πnft) ](可配置系数的sin正弦信号发生器);
      确定系数 anbn 是用 积分/复数 运算 进行拟合与误差估计;

    实际上, 把 Time-domain 的 Signal 函数 X(t) 分解/投影到 Frequency-domain 的多个“平面”(sin信号发生器):

    • 每个“平面”有 一对“正交基函数”(cos/sin), 实现上是一组(N个)“可配置系数”的sin信号发生器(谐波信号轮);
      每个“sin正弦信号轮”的用:

      • 半径(Radius)表示magnitude系数,
      • 用起始的距0弧度的bias量表示phase系数,
      • 以配置的常数的转动频率周期转动(产生信号)表示 Harmonic(nf0) 固定的谐波频率;

      通过这一组(N个)“sin信号轮”以配置好的(magnitude, phase, harmonic)同时转动(产生信号),
      可以合成任意的周期函数; 谐波信号轮个数越多(N越大)越精准;

    • 参数 (aj,bj) 可以导出(magnitude, phase), 因为 frequency这个系数,
      总是 Harmonic(谐波频点, “基频f”的自然数倍), 所以可视为可变的常数;
      因此实际最需要确定的系数(magnitude, phase)(aj,bj) 导出就足够;
      Sampling在任意时刻t0, 最短采集(T0=1f0(the fundamental period)$时长就足够;

  6. 既可以选用 sin 系列的正弦函数, 也可以选用 cos系列的余弦函数;
    之所以选用 cos 与 sin 两个函数作为“基函数”:

    • 因为 cos 与 sin 这一对“基函数”正交.
    • cos 与 sin 可以非常好的与 Complex Space 转换;
    • cos 与 sin 可以用 Euler's Equation eiθ=cosθ+isinθ 进行变换计算;
    • cos 与 sin 在 实现、转换、变换 以及 实际应用 时非常方便实现.
      cosθ 可用 sin(θπ2) 合成(即phase左移π2);
      实现上, 只要做好一种可配置(freq., magnitude, phase)的 sin正弦信号发生器就可规模化量产;
    • 总之优点众多.

Preliminaries

  1. Periodic signals:

    At least to begin, we’ll mainly be concerned with signals that are periodic.
    Informally, a periodic signal is one that repeats, over and over, forever. To be more precise:
    A signal x(t) is said to be periodic if there exists some number T,
    such thatx(t)=x(t+T) , for all t T: the period of the signal smallest T: the fundamental period.

  2. Sinusoids:

    Precisely what do we mean by a sinusoid? The term “sinusoid” means a sine wave,
    but we don’t just mean the standard sin(t). To enable our analysis,
    we want to be able to work sine waves of different heights, widths and phases.
    So, to us, a single sinusoid means a function of the form
        x(t)=Asin(2πft+ϕ)for someAits amplitudefits frequency, period T=1fϕits phase,

  3. Frequency Components for Synthesis:

    GIVINGx1(t)=A1sin(1×(2πft+ϕ)) ,  freq.:  f ,  amplitude:A1 ,  phase: ϕx2(t)=A2sin(2×(2πft+ϕ)) ,  freq.: 2f ,  amplitude:A2 ,  phase:2ϕx3(t)=A3sin(3×(2πft+ϕ)) ,  freq.: 3f ,  amplitude:A3 ,  phase:3ϕ...xk(t)=Aksin(k×(2πft+ϕ)) ,  freq.: nf ,  amplitude:Ak ,  phase:kϕX(t)=n=1kxn(t)=n=1kAnsin[ n(2πft+ϕ) ]
     THEN the period of X(t) is T=1f,SINCE
      period(x1)=T=1f,  period(x2)=T2=12f,  period(x3)=T3=13f,  ...  period(xk)=Tk=1kf,

  4. Harmonics/Sinusoids:

    The sinusoidal terms are often called harmonics, a term borrowed from music.
    The harmonics will have frequencies f , 2f , 3f , 4f and so on.
    We also call each harmonic, Ansin(2πnft+ϕn), the frequency component of x(t) at frequency nf.
    For example, if f=10Hz, we call the harmonic for which
    n=3 the “30Hz component”, reflecting that
    in this case sin(2πnft+ϕn) is a sinusoid of frequency 30Hz

  5. Frequency-domain and Time-domain Representation:

    • the frequency-domain representation of the periodic signal:
      represent a signal using the magnitudes and phases in its Fourier series.
      We often plot the magnitudes in the Fourier series,
      using a stem graph and labeling the frequency axis by frequency.
      In this sense, this representation is a function of frequency.
    • the time-domain representation of the signal:
      represent a periodic signal as a function of time in its Fourier series.
    • Example:

The Fourier Series:

  • Joseph Fourier’s idea was to express periodic signals as a sum of sinusoids.
  • Theorem.
    • If x(t) is a  well-behaved periodic signal  with period T,

       We call  following sum the  Fourier series of x(t)
      x(t)=(1F)A0+n=1Ansin(2πnft+nϕ)frequency:f=1/T,magnitudes:Ai , i[ 1,+ ]phasesϕi , i[ 1,+ ]
      Another fact relating to Fourier series is that:
      the magnitudes A0 , A1 , A2 , ... and phases ϕ1 , ϕ2 , ...
      in above equation uniquely determine x(t). That is, if we can find these
      magnitudes and phases corresponding to a periodic signal x(t),
      then, in effect, we have another way of describing x(t).

    •  Another useful form of Fourier series of x(t)
      x(t)=(2F)a02+n=1[ ancos(2πnft)+bnsin(2πnft) ]a0=2A0 ,an=Ancos(nϕ) , bn=Ansin(nϕ) ,(an)2+(bn)2=(An)2  above coefficients can then be found,  using the following integrals, where T=1f:an=2T0Tx(t)cos(2πnft)dtbn=2T0Tx(t)sin(2πnft)dt and a0, a1, a2, ... and b1, b2, ...  can be converted to magnitudes and phases,  to fit above form (1F) .

       Proof of form (1F) and form (2F) are the same 
      sin(X+Y)=sinXcosY+cosXsinYsin(2πnft+nϕ)=sin(2πnft)cos(nϕ)+cos(2πnft)sin(nϕ)x(t)=A0+n=1Ansin(2πnft+nϕ)=A0+n=1(Ancos(nϕ))sin(2πnft)+(Ansin(nϕ))cos(2πnft) ]=a02+n=1[ ancos(2πnft)+bnsin(2πnft) ]

    •  Complex form of Fourier series of x(t)
      eiθ=cosθ+isinθ, the Euler's Equationei2πnft=cos(2πnft)+isin(2πnft)x(t)=a02+n=1[ ancos(2πnft)+bnsin(2πnft) ]=1Tt0t0+Tx(t)ei2πnftdt

      Sn=1Tt0t0+Tx(t)ei2πnftdtT=F(ω)=12π+x(t)eiωtdt

Time Domain + Frequency Domain

and Fourier Transforms @ Princeton University:

Fourier Series: Periodical Functions

Fourier Transform: All Functions
Frequency Domain and Fourier Transforms @ Princeton University:
https://www.princeton.edu/~cuff/ele201/kulkarni_text/frequency.pdf

Signals and the frequency domain

ENGR 40M lecture notes — July 31, 2017 Chuan-Zheng Lee, Stanford University
https://web.stanford.edu/class/archive/engr/engr40m.1178/slides/signals.pdf

https://www.mathworks.com/help/signal/ug/extract-regions-of-interest-from-whale-song.html

https://web.stanford.edu/class/stats253/lectures_2014/lect7.pdf
https://web.stanford.edu/class/stats253/lectures_2014/
https://resources.pcb.cadence.com/blog/2020-time-domain-analysis-vs-frequency-domain-analysis-a-guide-and-comparison

  • Time Domain and Frequency Domain:
    • Illustrations:
      | | | |
      | ---- | ---- | ---- |
      | | | |


  • Application: The role of ECoG magnitude and phase in decoding position, velocity, and acceleration during continuous motor behavior

The Frequency Domain

(Discrete) Fourier Transform

Spectral Analysis

This is a new course.
• The material that we will be covering has not really been synthesized—because it is at the frontiers of statistics!
• We will be loosely following the books
• Shumway and Stoffer. Time Series Analysis and Applications (with R
Applications).
• Sherman. Spatial Statistics and Spatio-Temporal Data.
• You don’t have to purchase these books: they are available for free for Stanford students. (Link on course website.)
• Other useful references:
• Bivand et al. Applied Spatial Data Analysis with R. (also available free) • Cressie and Wikle. Statistics for Spatio-Temporal Data.















点击查看代码

posted @   abaelhe  阅读(23)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· winform 绘制太阳,地球,月球 运作规律
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)
· 超详细:普通电脑也行Windows部署deepseek R1训练数据并当服务器共享给他人
点击右上角即可分享
微信分享提示