% motordrive_obs.m
%   Design of observers for the motor drive
%   kja 070822
%
%   Part 1 regular observer
%   Get process model
motordrive_data;
%   Compute observer gain
P=[-4 -2 2*(-1+i) 2*(-1-i)];
L=place(A',C2',P)';Acl=A-L*C2;
disp('Observer gain L=')
disp(L')
%Check the results
disp('Specified closed loop eigenvalues')
disp(P);
disp('Closed loop eigenvalues obtained')
disp(eig(Acl)')
%
%   Part 2 Oserver with load disturbance estimation