% % Filename: example8.m % % Description: m-file to simulate satellite response to step input. % clear; clf; A = [0 1;0 0]; % Define System Matrices B = [0;0.2]; C = [1 0]; D = [0]; x0 = [0;0]; % Initial Conditions p = [-4+j*5; -4-j*5]; % Desired Pole Location K = acker(A,B,p); % Compute Feedback Matrix K t = 0:0.01:1.5; xd1 = (pi/2)*ones(size(t)); % Reference input [y,x] = lsim((A-B*K), K(1)*B, C, D, xd1, t, x0); % Simulate Response plot(t,y); xlabel('timeMATLAB Plot Generated:') ; ylabel('x_{1}(t)'); title('Satellite Orientation'); hold on; plot(t,xd1,'--'); hold off;