【Fourier Convolution】傅里叶卷积

原文地址: https://terpconnect.umd.edu/~toh/spectrum/Convolution.html

什么是卷积

Convolution is an operation performed on two signals which involves multiplying one signal by a delayed or shifted version of another signal, integrating or averaging the product, and repeating the process for different delays.
Convolution is a useful process because it accurately describes some effects that occur widely in scientific measurements, such as the influence of a frequency filter on an electrical signal or of the spectral bandpass of a spectrometer on the shape of a recorded optical spectrum.

卷积是对两个信号执行的操作,包括将一个信号与另一个信号的延迟或移位版本相乘,积分或求积平均,并对不同的延迟重复该过程。 卷积是一个有用的过程,因为它准确地描述了科学测量中广泛发生的一些影响,例如,频率滤波器对电信号的影响或光谱仪的光谱带通对记录的光谱形状的影响。

如何计算傅里叶卷积

In practice, the calculation is usually performed by point-by-point multiplication of the two signals in the Fourier domain.
First, the Fourier transform of each signal is obtained. Then the two Fourier transforms are multiplied point-by-point by the rules for complex multiplication and the result is then inverse Fourier transformed. Fourier transforms are usually expressed in terms of “complex numbers”, with real and imaginary parts; if the Fourier transform of the first signal is a + ib, and the Fourier transform of the second signal is c + id, then the product of the two Fourier transforms is (a + ib)(c + id) = (ac - bd) + i(bc + ad).
Although this seems to be a round-about method, it turns out to be faster then the shift-and-multiply algorithm when the number of points in the signal is large.
Convolution can be used as a powerful and general algorithm for smoothing and differentiation. Many computer languages will perform this operation automatically when the two quantities divided are complex.

实际上,通常通过在傅立叶域中两个信号的逐点相乘来执行计算。

首先,获得每个信号的傅立叶变换。然后将两个傅立叶变换逐点乘以复杂乘法的规则,然后对结果进行傅立叶逆变换。
傅立叶变换通常用“复数”来表示,具有实部和虚部。如果第一个信号的傅立叶变换为a + ib,第二个信号的傅立叶变换为c + id,则两个傅立叶变换的乘积为a+ibc+id=acbd+ibc+ad(a + ib)(c + id)=(ac-bd )+ i(bc + ad)

尽管这似乎是一种环回方法,但事实证明,当信号中的点数很大时,它比移位和乘法算法要快。卷积可以用作一种强大且通用的平滑和微分算法。当两个被除数复杂时,许多计算机语言将自动执行此操作。

Fourier convolution can also be used as a very general algorithm for the smoothing and differentiation of digital signals, by convoluting the signal with a (usually) small set of numbers representing the convolution vector.
Smoothing is performed by convolution with sets of positive numbers, e.g. [1 1 1] for a 3-point boxcar. Convolution with [–1 1] computes a first derivative; [1 -2 1] computes a second derivative.
Successive convolutions by Conv1 and then Conv2 is equivalent to one convolution with the convolution of Conv1 and Conv2. First differentiation with smoothing is done by using a convolution vector in which the first half of the coefficients are negative and the second half are positive (e.g.[-1 -2 0 2 1]).

傅立叶卷积还可以用作数字信号的平滑和微分的非常通用的算法,方法是使用代表卷积矢量的(通常)小数字集对信号进行卷积。

通过对正数集进行卷积执行平滑处理,例如 [1 1 1]适用于三点棚车。 与[–1 1]的卷积计算一阶导数; [1-2-1]计算二阶导数。 由Conv1然后由Conv2进行的连续卷积等效于一次具有Conv1和Conv2的卷积的卷积。 通过使用卷积向量来完成带平滑的一次微分,其中系数的前半部分为负,后半部分为正(例如[-1 -2 0 2 1])。

实际使用样例

【Fourier Convolution】傅里叶卷积
图例: 此处使用傅里叶卷积来确定当用光谱仪扫描时窗口1(window 1)的光谱将如何出现,该光谱仪的狭缝功能(光谱分辨率)由窗口2(window 2)的高斯函数描述。 高斯函数已经倒转,因此其最大值落在x = 0处。 产生的回旋光谱(window 3)显示,x = 110和120附近的两条线将无法分辨,但x = 40处的线将被部分分辨。