%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all
close all
clc
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%% Model Reduction of Dynamical Systems %%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%% Summer Semester 2019 %%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Exercise 4, Problem 2 : Iterative Rational Krylov Interpolation (IRKA)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
load('beam.mat');
% Step 1 - Plot the frequency response of the system
fstart = 10^-3; fend = 10^3;
f = logspace(log10(fstart), log10(fend), 1000);
for k = 1 : length(f)
end
figure;
loglog();
hold on
% Step 2 - Implement IRKA algorithm
f = logspace(-3, 3, r); % Frequency range
r = % Reduced model dimension
itermax = % Number of iterations
tol = % Convergence tolerance
sigma = % Initialize interpolation points
b =
c =
%%% IRKA loop %%%
% Step 3 - Frequency response of reduced system
fstart = 10^-3; fend = 10^3;
f = logspace(log10(fstart), log10(fend), 1000);
Ir = speye(size(Ar,1));
for k = 1 : length(f)
end
% figure;
loglog();
% Step 4 - Plot error between full and reduced model
% Step 5 - Plot Eigenvalues of full and reduced system