altit_simul

altit_simul - altitude hold controller clear all prt=1 for...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
% % altitude hold controller % clear all prt=1; for ii=1:9 figure(ii);clf; set(gcf,'DefaultLineLineWidth',2); set(gcf,'DefaultlineMarkerSize',10) end Xu=-1.982e3;Xw=4.025e3; Zu=-2.595e4;Zw=-9.030e4;Zq=-4.524e5;Zwd=1.909e3; Mu=1.593e4;Mw=-1.563e5;Mq=-1.521e7;Mwd=-1.702e4; g=9.81;theta0=0;S=511;cbar=8.324; U0=235.9;Iyy=.449e8;m=2.83176e6/g;cbar=8.324;rho=0.3045; Xdp=.3*m*g;Zdp=0;Mdp=0; Xde=-3.818e-6*(1/2*rho*U0^2*S);Zde=-0.3648*(1/2*rho*U0^2*S); Mde=-1.444*(1/2*rho*U0^2*S*cbar);; % % % use the full longitudinal model % % x=[u w q theta h]; % u=[de;dt]; sen_u=1;sen_w=2;sen_q=3;sen_t=4;sen_h=5;sen_de=6;sen_dt=7; act_e=1;act_t=2; % % dot h = U0 (theta - alpha) = U0 theta - w % A=[Xu/m Xw/m 0 -g*cos(theta0) 0;[Zu Zw Zq+m*U0 -m*g*sin(theta0)]/(m-Zwd) 0; [Mu+Zu*Mwd/(m-Zwd) Mw+Zw*Mwd/(m-Zwd) Mq+(Zq+m*U0)*Mwd/(m-Zwd) . .. -m*g*sin(theta0)*Mwd/(m-Zwd) 0]/Iyy; [ 0 0 1 0 0];[0 -1 0 U0 0]]; B=[Xde/m Xdp/m;Zde/(m-Zwd) Zdp/(m-Zwd);(Mde+Zde*Mwd/(m-Zwd))/Iyy . .. (Mdp+Zdp*Mwd/(m-Zwd))/Iyy;0 0;0 0]; C=[eye(5);zeros(2,5)]; D=[zeros(5,2);[eye(2)]]; %last 2 outputs are the controls % % add actuator dynamics % % elevator %tau_e=.1;%sec tau_e=.25;%sec JNe=1;JDe=[tau_e 1]; syse=tf(JNe,JDe); % % thrust % tau_t=3.5;%sec JNt=1;JDt=[tau_t 1]; syst=tf(JNt,JDt); sysd=append(syse,syst); syslong=ss(A,B,C,D); syslong2=series(sysd,syslong); [A,B,C,D]=ssdata(syslong2); na=size(A); % % q and theta loops % % inner loop on theta/q % u=kq*q+Kth*theta + de_c K_th=1;K_q=1.95*K_th;
Background image of page 1

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

View Full DocumentRight Arrow Icon
if 1 figure(1);clf;%orient tall sgrid([.5 .707]',[1]); rlocus(tf(-[1.95 1],1)*tf(syslong2(sen_t,act_e))) r_th=rlocus(tf(-[1.95 1],1)*tf(syslong2(sen_t,act_e)),K_th) hold on plot(r_th+eps*j,'bd','MarkerFace','b');axis([-3,1,-3,3]);hold off axis([-3 .1 -3 3]) title('with q and theta FB to \delta_e'); if prt print -depsc alt_sim1.eps jpdf('alt_sim1') end end % close inner loop syscl=feedback(syslong2,[K_q K_th],act_e,[sen_q sen_t],1) [eig(syscl) [nan;r_th;nan]] [Acl,Bcl,Ccl,Dcl]=ssdata(syscl); % % engine loops % mostly the phugoid ==> design on top of the short period % % system with q/th loop feedback figure(9);clf % interested in vel output and engine input sys_u=syscl(sen_u,act_t); Kun=[1/0.2857 1]; % comp zero on plant pole
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/07/2011 for the course AERO 16.333 taught by Professor Alexandremegretski during the Fall '04 term at MIT.

Page1 / 6

altit_simul - altitude hold controller clear all prt=1 for...

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

View Full Document Right Arrow Icon
Ask a homework question - tutors are online