Download Computing the covariance function of an ARMA process

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
!
"
#
$
"%&&
'()*+,,-#
.
/ 01
covf)
2
%
/
1
pol
1
032covf
!
covf
% covf
%
% This function computes the covariance function
% of the discrete-time ARMA process y defined by
%
% A(z)y(t) = C(z)e(t)
%
% with e standard white noise.
function r = covf(A,C,n)
4
1
)
0
xaaxb..5
% Solve the two-sided polynomial matrix equation
X = xaaxb(A,C*C');
6
X =
-20 + 8.3z + 28z^2
6
77 6
longldiv
8
+
3
/ "
#
% Apply long division to X\A
[Q,R] = longldiv(X,A,n);
6
5
% Construct the covariance function
r = R;
r{0} = r{0}+r{0}';
5
r = covf(1-2.4*z+1.43*z^2,1,40);
32
5
plot(0:40,r{:},'o')
title('Covariance function - Example 1')
xlabel('tau'), ylabel('r'), grid on
6+
!
5
A = [1-2*z 0; 6 1-2.5*z]; C = eye(2,2);
r = covf(A,C,10);
+9
:;<+=
+9
32
covf5
% Plot the covariance function
figure; clf
k = length(C);
for i = 1:k
for j = 1:k
subplot(k,k,(i-1)*k+j)
plot(0:n,r{:}(i,j),'o')
grid on; xlabel('tau')
end
end
6="#
Related documents