卷积、互相关、自相关可视化比较

g ( τ ) g(\tau ) g(τ) is an even function, ( g ( − τ ) = g ( τ ) ) (g(-\tau)=g(\tau) ) (g(τ)=g(τ)), so convolution is equivalent to correlation.

convolution ( f ∗ g ) ( t ) = ∫ − ∞ ∞ f ( τ ) g ( t − τ ) d τ   . (f∗g)(t) = \int_{-∞}^{∞} f (τ) g (t-τ) dτ\,. (fg)(t)=f(τ)g(tτ)dτ.
cross-correlation ( f ⋆ g ) ( τ ) = ∫ − ∞ ∞ f ( t ) ‾ g ( t + τ ) d t   . (f \star g)(τ) = \int_{-∞}^{∞} \overline{f (t)} g (t+τ) dt\,. (fg)(τ)=f(t)g(t+τ)dt.

1.Express each function in terms of a dummy variable τ \tau τ.

2.Reflect one of the functions: g ( τ ) g(\tau ) g(τ) g ( − τ ) . g(-\tau ). g(τ).

3.Add a time-offset, t, which allows g ( t − τ ) g(t-\tau ) g(tτ) to slide along the τ \tau τ -axis.

4.Start t at −∞ and slide it all the way to +∞. Wherever the two functions intersect, find the integral of their product. In other words, compute a sliding, weighted-sum of function f ( τ ) f(\tau ) f(τ), where the weighting function is g ( − τ ) . g(-\tau ). g(τ).

In this example, the red-colored “pulse”, g ( τ ) g(\tau ) g(τ),is an even function ( g ( − τ ) = g ( τ ) ) (g(-\tau)=g(\tau) ) (g(τ)=g(τ)), so convolution is equivalent to correlation. A snapshot of this “movie” shows functions g ( t − τ ) g(t-\tau ) g(tτ)and f ( τ ) f(\tau ) f(τ) (in blue) for some value of parameter t t t, which is arbitrarily defined as the distance from the τ = 0 \tau =0 τ=0 axis to the center of the red pulse. The amount of yellow is the area of the product f ( τ ) ⋅ g ( t − τ ) f(\tau )\cdot g(t-\tau ) f(τ)g(tτ), computed by the convolution/correlation integral. The movie is created by continuously changing t t t and recomputing the integral. The result (shown in black) is a function of t t t, but is plotted on the same axis as τ \tau τ , for convenience and comparison.

In this depiction, f ( τ ) f(\tau ) f(τ) could represent the response of an RC circuit to a narrow pulse that occurs at τ = 0 \tau =0 τ=0. In other words, if g ( τ ) = δ ( τ ) g(\tau )=\delta (\tau ) g(τ)=δ(τ), the result of convolution is just f ( t ) f(t) f(t). But when g ( τ ) g(\tau ) g(τ) is the wider pulse (in red), the response is a “smeared” version of f ( t ) f(t) f(t). It begins at t = − 0.5 t=-0.5 t=0.5, because we defined t t t as the distance from the τ = 0 \tau =0 τ=0 axis to the center of the wide pulse (instead of the leading edge).

Convolution https://en.wikipedia.org/wiki/Convolution
Cross-correlation https://en.wikipedia.org/wiki/Cross-correlation

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值