m1 = 3.06e-001;
l1 = 1.20e-001;
L1 = 2.27e-001;
J2 = 1.38e-003;
m2 = 1.04e-001;
l2 = 1.75e-001;
c2 = 1.86e-004;
g  = 9.81e+000;
as = 6.25e+000;
bs = 1.56e+001;
% ---------------------------
a2  = J2 + m2*l2^2;
a3  = m2*L1*l2;
a4  = (m1*l1 + m2*L1)*g;
a5  = m2*l2*g;
% ---------------------------
A21 = [ 0   0
        0 a5/a2 ];
A22_0 = [     -as          0
          (as*a3+c2)/a2 -c2/a2 ];
A22_1 = [    0      0
         -as*a3/a2  0 ];
B2_0  = [    bs
         -bs*a3/a2 ];
B2_1  = [    0
          bs*a3/a2 ];
% ---------------------------
k = 2; p = 1;
A_0 = [ zeros(k,k)  eye(k)
        A21         A22_0 ];
A_1 = [ zeros(k,k)  zeros(k,k)
        zeros(k,k)  A22_1 ];
B_0 = [ zeros(k,p)
        B2_0 ];
B_1 = [ zeros(k,p)
        B2_1 ];

