フィルターのクリア

XCORR of two harmonic signals has a triangular shape. Why?

11 ビュー (過去 30 日間)
Artem Smirnov
Artem Smirnov 2017 年 11 月 30 日
編集済み: Christoph F. 2017 年 11 月 30 日
Hello! I have two signals (H and Z), which are almost harmonic. Both vectors contain 4018 elements each (I attach the picture). I want to calculate cross correlation between them, and what I get is shown on the second picture. My code is simple:
C=xcorr(H,Z,'coeff')
What can be the reason of such triangular shape? I tried to calculate xcorr of sin and cos, and even added trend to one of them, but it's not triangular, it must be also harmonic... Why can this happen?

回答 (1 件)

Christoph F.
Christoph F. 2017 年 11 月 30 日
編集済み: Christoph F. 2017 年 11 月 30 日
> What can be the reason of such triangular shape?
The reason is that both signals have a significant DC component/offset. Try removing it. For example
C=xcorr(H-mean(H),Z-mean(Z),'coeff')
or a more sophisticated method like highpass filtering or forward-backward highpass filtering with filtfilt.

カテゴリ

Help Center および File ExchangeCorrelation and Convolution についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by