design_final_i

# design_final_i - EMFFORCE OPS MANUAL Space Systems Product...

This preview shows pages 1–5. Sign up to view the full content.

EMFFORCE OPS MANUAL Space Systems Product Development – Spring 2003 I Code I.1 Control Test Code (LS, AB) I.1.1 Test Case 1 Code %r=0.1; % Effective Radius [m] %m=2; % Estimated Body Mass [kg] %I=0.5*m*r^2; % Estimated Inertia [kg-m^2] I = 1; % Estimated Inertia [kg-m^2] A=[0 1 ; 0 0 ]; B=[0 ; 1/I]; lamda=1; rho=lamda/4; type=input('Input case(in quotes)'); % 0 for Regulator, 1 for Slew to Reference switch type case 'a' Rxx=[1e-5 0 ; 0 lamda]; Ruu=rho; [K,S,E]=lqr(A,B,Rxx,Ruu) case 'b' n=1e-2; Rxx=[lamda 0 ; 0 lamda/1000]; Ruu=rho; [K,S,E]=lqr(A,B,Rxx,Ruu) C=[n^3 1]; D=0; G = B; H = 0; sys=ss(A,[B G],C,[D H]); [Kest,L,P]=kalman(sys,n,n,n) end Massachusetts Institute of Technology 1 Dept of Aeronautics and Astronautics

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
EMFFORCE OPS MANUAL Space Systems Product Development – Spring 2003 I.1.2 Test Case 2 Code clear all; mu_b1 = 100*40*(.75/2)^2*pi; %Guess at value mu_b2 = 1/10*mu_b1; %arbitrary decision mu_0 = 4*pi*1e-7; ma = 15; %Estimate in kg Ia = 1; %Inertia of a and b in z direction Ib = 1; %Change this!!!! r = 2; %separation distance in meters n = 1e-5; rho = 1/4; %weighting factor c = input('Which case(in quotes)'); A = zeros(8); A(1:4, 5:8) = eye(4); B = zeros(8,4); B(5,1) = -15*mu_b1*mu_0/(2*pi*r^4*ma); B(5,2) = 15*mu_b2*mu_0/(4*pi*r^4*ma); B(6,1) = 15*mu_b2*mu_0/(4*pi*r^4*ma); B(6,2) = 15*mu_b1*mu_0/(4*pi*r^4*ma); B(7,1) = -mu_b2*mu_0/(pi*r^3*Ia); B(7,2) = -2*mu_b1*mu_0/(pi*r^3*Ia); B(7,3) = 1/Ia; B(8,1) = -2*mu_b2*mu_0/(pi*r^3*Ib); B(8,2) = -mu_b1*mu_0/(pi*r^3*Ib); B(8,4) = 1/Ib; switch c case 'a' %two vehicles, 1 fixed, disturbance rejection A=A([1:6], [2:7]); B=B([2:7], [1:3]); Q = n*eye(6); Q(4:6, 4:6) = eye(3); R = diag([rho, rho, rho/2]); [Ka, S, E] = lqr(A, B, Q, R); Ka case 'b' %two vehicles, 1 fixed, tracking A=A([1:6], [2:7]); B=B([2:7], [1:3]); Massachusetts Institute of Technology 2 Dept of Aeronautics and Astronautics
EMFFORCE OPS MANUAL Space Systems Product Development – Spring 2003 Q = n*eye(6); Q(1:3, 1:3) = eye(3); R = diag([rho, rho, rho/2]); [Kb, S, E] = lqr(A, B, Q, R); Kb case 'c' %two vehicles, both free, disturbance rejection Q = n*eye(8); Q(5:8, 5:8) = eye(4); R = diag([rho, rho, rho/2, rho/2]); [Kc, S, E] = lqr(A, B, Q, R); Kc case 'd' %two vehicles, both free, tracking Q = n*eye(8); Q(1:4, 1:4) = eye(4); R = diag([rho, rho, rho/2, rho/2]); [Kd, S, E] = lqr(A,B,Q,R); Kd end Massachusetts Institute of Technology 3 Dept of Aeronautics and Astronautics

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
EMFFORCE OPS MANUAL Space Systems Product Development – Spring 2003 I.1.3 Test Case Three Code clear mu_b1 = 100*40*(.75/2)^2*pi; %Guess at value mu_b2 = 1/10*mu_b1; %arbitrary decision mu_0 = 4*pi*1e-7; ma = 15; %Estimate in kg mb = 15; %Estimate in kg mc = 15; %Estimate in kg Ia = .5*ma*(.75/2)^2; %Inertia estimates of a and b in z direction Ib = .5*mb*(.75/2)^2; %Inertia estimates of a and b in z direction Ic = .5*mc*(.75/2)^2; %Inertia estimates of a and b in z direction r_ab = 2; r_bc = 2; n = 1e-5; c = input('Which case(in quotes)'); A=zeros(14); A(1:7,8:14)=eye(7);
This is the end of the preview. Sign up to access the rest of the document.

## This note was uploaded on 11/08/2011 for the course AERO 16.810 taught by Professor Olivierdeweck during the Winter '07 term at MIT.

### Page1 / 14

design_final_i - EMFFORCE OPS MANUAL Space Systems Product...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online