信號的自相關、互相關和協方差


信號的相關矩陣或協方差矩陣在系統識別中扮演着重要角色。事實上,對於一個LTI隨機系統,其輸出序列的二階統計量完全可以確定該系統。

定義

 

 

 

 

 

 

互相關和協方差

 

對於均值為0的白噪聲序列,二者形式是一致的。

Matlab計算

matlab中的相關命令:

% 協方差矩陣

data_cov = cov((data));

 

%信號自相關
autocorr(data, 1023)

 

% 互相關系數

R = corrcoef(data);

 

% 互功率譜密度(互功率譜密度與信號的互相關函數具有傅里葉變換關系)

pxy = cpsd(x,y,window,noverlap,nfft)

 

% Cross-correlation 互相關or自相關

[a,b]=xcorr(x,'unbiased');

[a,b]=xcorr(x,y,'unbiased');

 

scaleopt — Normalization option
'none' (default) | 'biased' | 'unbiased' | 'coeff'

 

 

 

 

returns the cross-correlation of two discrete-time sequences, x and y.

Cross-correlation measures the similarity between x and shifted (lagged) copies of y as a function of the lag.

If x and y have different lengths, the function appends zeros at the end of the shorter vector so it has the same length, N, as the other.

 

 

 

autocorr和xcorr有什么不一樣的?

 

 

% 與xcorr類似的還有互協方差xcov

c = xcov(x,y)

c = xcov(x)

 returns the cross-covariance of two discrete-time sequences, x and y.

Cross-covariance measures the similarity between x and shifted (lagged) copies of y as a function of the lag.

If x and y have different lengths, the function appends zeros at the end of the shorter vector so it has the same length as the other.

 

 

 

 

 

 

 

https://blog.csdn.net/jonathanlin2008/article/details/6566802

https://www.cnblogs.com/maxwell-maxwill/p/12146919.html

https://blog.csdn.net/scuthanman/article/details/5588138

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM