%
% Demo file for Subspace identification
%
% Copyright:
% Peter Van Overschee, December 1995
% peter.vanoverschee@esat.kuleuven.ac.be
%
clc
disp(' ')
disp(' ')
disp(' SUBSPACE IDENTIFICATION ')
disp(' -------------------------')
disp(' ')
disp(' Welcome to the world of Subspace Identification');
disp(' This demo will illustrate the power of subspace identification')
disp(' algorithms with a simple multivariable example.');
disp(' ')
disp(' Note that in this tutorial demo we consider a simulated example.')
disp(' However, numerous real-life industrial applications can be')
disp(' found under the directory "subspace\applic"');
disp(' ')
disp(' ')
disp(' Hit any key to continue')
pause
clc
echo on
%
% Consider a multivariable fourth order system a,b,c,d
% with two inputs and two outputs:
a = [0.603 0.603 0 0;-0.603 0.603 0 0;0 0 -0.603 -0.603;0 0 0.603 -0.603];
b = [1.1650,-0.6965;0.6268 1.6961;0.0751,0.0591;0.3516 1.7971];
c = [0.2641,-1.4462,1.2460,0.5774;0.8717,-0.7012,-0.6390,-0.3600];
d = [-0.1356,-1.2704;-1.3493,0.9846];
m = 2; % Number of inputs
l = 2; % Number of outputs
% The bode plot:
w = [0:0.005:0.5]*(2*pi); % Frequency vector
m1 = dbode(a,b,c,d,1,1,w);m2 = dbode(a,b,c,d,1,2,w);
figure(1);hold off;subplot;clf;
subplot(221);plot(w/(2*pi),m1(:,1));title('Input 1 -> Output 1');
subplot(222);plot(w/(2*pi),m2(:,1));title('Input 2 -> Output 1');
subplot(223);plot(