% afm_data.m - Model for an AFM system
% KJA, 2007

% System parameters
m1 = 0.15e-3; m2 = 1e-3;
f1 = 40.9e3; f2 = 41.6e3; f3 = 120e3;

% Derived quantities
w1 = 2*pi*f1; w2 = 2*pi*f2; w3 = 2*pi*f3;
z1 = 0.1; z3 = 0.1;
k2 = w2^2*m2; c2 = m2*z1*w1;

% System matrices
% Note: slightly different coordinates than what is given in the text
% but the inputs and outputs are the same
A = [0 1 0 0;-k2/(m1+m2) -c2/(m1+m2) 1/m2 0;0 0 0 1;0 0 -w3^2 -2*z3*w3];
B = [0;0;0;w3^2];
C = (m2/(m1+m2))*[m1*k2/(m1+m2) m1*c2/(m1+m2) 1 0];
D = 0;
