Home > src > demos > reentry_demo > reentry_df_dx.m

reentry_df_dx

PURPOSE ^

Jacobian of the state transition function in reentry demo.

SYNOPSIS ^

function da = reentry_df_dx(x,param)

DESCRIPTION ^

 Jacobian of the state transition function in reentry demo.

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % Jacobian of the state transition function in reentry demo.
0002 
0003 %
0004 % Copyright (C) 2005-2006 Simo S�kk�%               2007      Jouni Hartikainen
0005 %
0006 % This software is distributed under the GNU General Public
0007 % Licence (version 2 or later); please refer to the file
0008 % Licence.txt, included with the software, for details.
0009 
0010 function da = reentry_df_dx(x,param)
0011 
0012   dt  = param{1};
0013   b0  = param{2};
0014   H0  = param{3};
0015   Gm0 = param{4};
0016   R0  = param{5};
0017 
0018   R = sqrt(x(1,:).^2 + x(2,:).^2);
0019   V = sqrt(x(3,:).^2 + x(4,:).^2);
0020   b = b0 * exp(x(5,:));
0021   D = b .* exp((R0-R)/H0) * V;
0022   G = -Gm0 ./ R.^3;
0023 
0024   dR_dx1 = x(1) / R;
0025   dR_dx2 = x(2) / R;
0026   dV_dx3 = x(3) / V;
0027   dV_dx4 = x(4) / V;
0028   db_dx5 = b;
0029   dD_dx1 = b * (-dR_dx1/H0) * exp((R0-R)/H0) * V;
0030   dD_dx2 = b * (-dR_dx2/H0) * exp((R0-R)/H0) * V;
0031   dD_dx3 = b * exp((R0-R)/H0) * dV_dx3;
0032   dD_dx4 = b * exp((R0-R)/H0) * dV_dx4;
0033   dD_dx5 = db_dx5 * exp((R0-R)/H0) * V;
0034   dG_dx1 = -Gm0 * (-3 * dR_dx1 / R^4);
0035   dG_dx2 = -Gm0 * (-3 * dR_dx2 / R^4);
0036 
0037   df = zeros(5,5);
0038   df(1,3) = 1;
0039   df(2,4) = 1;
0040   df(3,1) = dD_dx1 * x(3) + dG_dx1 * x(1) + G;
0041   df(3,2) = dD_dx2 * x(3) + dG_dx2 * x(1);
0042   df(3,3) = dD_dx3 * x(3) + D;
0043   df(3,4) = dD_dx4 * x(3);
0044   df(3,5) = dD_dx5 * x(3);
0045   
0046   df(4,1) = dD_dx1 * x(4) + dG_dx1 * x(2); 
0047   df(4,2) = dD_dx2 * x(4) + dG_dx2 * x(2) + G;
0048   df(4,3) = dD_dx3 * x(4);
0049   df(4,4) = dD_dx4 * x(4) + D;
0050   df(4,5) = dD_dx5 * x(4);
0051 
0052   da = eye(size(df,1)) + dt * df;
0053

Generated on Fri 12-Aug-2011 15:15:16 by m2html © 2005