Auto-correlation sequence of 2nd order system
with conjugate complex pole pair ** lab10_acf.m * mw * 08/07/2006
Contents
Impulse response and acf
b = [.2 .4 .2]; a = [1 -.71 .25]; % numerator and denominator N = 21; % simulation lenght of impulse response h = impz(b,a,N); % impulse response Rhh = conv(h,flipud(h)); % acf % graphics graph10_h(h,Rhh,'lab10_acf : Impulse response, acf and pds')
Analytic impulse response
n = 0:N-1; p = roots(a); p1 = p(1); % poles W = angle(p1); r = abs(p1); B0 = b(3)/r^2; B1 = ( b(1)*p1 + b(2) + b(3)/p1 ) / (j*2*imag(p1)); ha = 2*(r.^n).*(real(B1)*cos(W*n)-imag(B1)*sin(W*n)); ha(1) = ha(1) + B0; % add B0 subplot(2,2,3), stem(0:N-1,ha/max(abs(ha))),grid xlabel('n \rightarrow'), ylabel('h_a[n] / max|h[n]| \rightarrow') title('Impulse response - (analytical)')
Analytic acf
B0 = B0*b(1); B1 = B1 * ( b(1)/p1^2 + b(2)/p1 + b(3)); B1 = B1 / ((p1^-1-p1)*(p1^-1-conj(p1))); Rhha = 2*(r.^n).*(real(B1)*cos(W*n)-imag(B1)*sin(W*n)); Rhha(1) = Rhha(1) + B0; % add B0 subplot(2,2,4), stem(-N+1:N-1,[fliplr(Rhha(2:N)) Rhha]/Rhha(1)),grid xlabel('l \rightarrow'), ylabel('R_{hha}[l] / R_{hha}[0] \rightarrow') title('ACF (analytic)')