I hope somebody can help !!
N = 8000; % Number of Samples
n = 0:N-1;
sigmax = 0.01
L = 12
f1 = 101.7
f2 = 142.4
f3 = 231.5
fs = 1000
K = 20 % Number of realizations
cumensq = zeros(K,N)
en1 = zeros(K,N)
% length of filter coefficients
wn = zeros(1,L);
a = 0.0001;
muhat = 1.00
wmat = zeros(N+1,L); % 8001 filters
for kk = 1: K % ensemble process
xn1 = cos(2*pi*f1/fs*n)+cos(2*pi*f2/fs*n)+cos(2*pi*f3/fs*n);
dn = sin(2*pi*f2/fs*n);
prepad = zeros(1,L-1)
xnlong = [prepad ,xn];
mu = 0.01;
en = zeros(1,N); % Matrix : Each Row represents one realization :
Column is samples for one Realization
ensq = zeros(1,N)
for k = 1:N % sample process
yn(k) = xx*wn';
wn = wn + mu * en(k)*xx
%wn = wn + muhat/(a+xx*xx')* en(k)*xx
%wn = wn + mu*en(k).*xx; % filter update
wmat(k+1,:) = wn;
ensemble = sum(cumensq)/K
I have trying to get the autocorrelation of the error signal !!
As you could see that sigmax is defined above and the square of sigmax
should give me the variance and the highest peak value on the
autocorrelation plot !!
I believe the xcorr is not working according to my standard so i tried
which is defined as
function R = CalcCovarianceMatrix(SignalVector, timeStart, timeEnd)
N = length(SignalVector(:,1));
% Initialize R.
R_n = zeros(N,N);
% Compute the time averaged auto-correlation matrix.
for TimeIndex = timeStart:timeEnd,
Value = SignalVector(:,TimeIndex)*SignalVector(:,TimeIndex)';
R_n = R_n + Value;
% Scale the Result.
R = R_n/(timeEnd - timeStart + 1);
however i still not able to get this peak value of sigmax squared
kindly somebody assist me !!
what the helly pelly is the problem