function [A,B]=wp(alpha)
    l1=1;l2=1; lt1=0.5;lt2=0.5; % m
    m1=1;m2=1; % kg
    I1=1/3; I2=1/3; % kg * m^2
    g=9.81; % m/s^2
    a=I1+m2*l1^2;
    b=I2;
    c=m2*lt2^2/2;
    d=m2*l1*lt2;
    e=(m1*lt1+m2*l1)*g;
    f=m2*g*lt2;
    beta=asin(-e/f*sin(alpha))-alpha;
    MI=inv([a+2*d+2*c*cos(beta),d+c*cos(beta);d+c*cos(beta),b]);
    A=[zeros(2),eye(2);MI*(f*cos(alpha+beta)*ones(2)+e*cos(alpha)*[1,0;0,0]),zeros(2)];
    B=[0;0;MI(:,2)];
end