developing the apollo lunar module digital autopilot -凯发k8网页登录
"working on the design of the lunar module digital autopilot was the highlight of my career as an engineer. when neil armstrong stepped off the lm (lunar module) onto the moon's surface, every engineer who contributed to the apollo program felt a sense of pride and accomplishment. we had succeeded in our goal. we had developed technology that never existed before, and through hard work and meticulous attention to detail, we had created a system that worked flawlessly." -richard j. gran,
this example shows how richard and the other engineers who worked on the apollo lunar module digital autopilot design team could have done it using simulink® and aerospace blockset™ if they had been available in 1961.
model description
developing the autopilot in simulink takes a fraction of the time it took for the original design of the apollo lunar module autopilot.
if ~bdisloaded("aero_dap3dof") open_system("aero_dap3dof"); end
the reaction jet control subsystem models the digital autopilot design proposed (and implemented) by mit instrumentation laboratories (mit il), now called draper laboratory. a stateflow® diagram in the model specifies the logic that implements the phase-plane control algorithm described in the the apollo 11 moon landing: spacecraft design then and now. depending on which region of the diagram the lunar module is executing, the stateflow diagram is in either a fire_region
or a coast_region
. note, the transitions between these different regions depend on certain parameters. the stateflow diagram determines whether to transition to another state and then computes which reaction jets to fire.
translational and rotational dynamics of the lunar module are approximated in the lunar module dynamics
subsystem. access various visualization methods of the lunar module states and autopilot performance in the visualization
area of the model, including simulink scopes, animation with simulink 3d animation, and a phase plane plot.
interactive controls
to interact with the lunar module model, vary autopilot settings and lunar module initial states in the commands
area. for example, to observe how the digital autopilot design handles increased initial body rates, use the slider components in configure lm attitude
.
mission description
the lm digital autopilot has three degrees of freedom. this means that by design, the reaction jet thrusters are configured and commanded to rotate the vehicle without impacting the vehicle's orbital trajectory. therefore, the translational dynamics in his model are approximated via orbit propagation using the spacecraft dynamics block from aerospace blockset. the block is configured to use moon spherical harmonic gravity model lp-100k.
to demonstrate the digital autopilot design behavior, the "descent orbit insertion" mission segment, just prior to the initiation of the powered descent, was selected from the .
(image credit: nasa)
the "descent orbit insertion" burn began 101 hours, 36 minutes, and 14 seconds after lift-off and lasted 30 seconds. the burn set the lunar module on a trajectory to lower its orbit from approximately 60 nautical miles to 50,000 ft over about an hour. at 50,000 ft, the module initiated its powered descent.
initialize the model aero_dap3dof
with the approximate trajectory of the lunar module immediately after the descent orbit insertion burn.
mission.t_rangezero = datetime(1969,7,16,13,32,0); % lift-off mission.t_descentinsertionstart = mission.t_rangezero hours(101) minutes(36) seconds(14); mission.t_descentinsertion = mission.t_descentinsertionstart seconds(30); mission.t_powereddescentstart = mission.t_rangezero hours(102) minutes(33) seconds(5.2); disp(timetable([mission.t_rangezero, mission.t_descentinsertionstart, ... mission.t_descentinsertion, mission.t_powereddescentstart]', ... {'range zero (lift-off)', 'descent orbit insertion (engine ignition)', ... 'descent orbit insertion (engine cutoff)', 'powered descent (engine ignition)'}', variablenames="mission phase"));
time mission phase ____________________ _____________________________________________ 16-jul-1969 13:32:00 {'range zero (lift-off)' } 20-jul-1969 19:08:14 {'descent orbit insertion (engine ignition)'} 20-jul-1969 19:08:44 {'descent orbit insertion (engine cutoff)' } 20-jul-1969 20:05:05 {'powered descent (engine ignition)' }
the trajectory of the module at "descent orbit insertion (engine cutoff)" and "powered descent initiation (engine ignition)" is provided in the (table 7-ii.- trajectory parameters).
mission.latitude_deg = [-1.16, 1.02]'; % [deg] mission.longitude_deg = [-141.88, 39.39]'; % [deg] mission.altitude_mi = [57.8, 6.4]'; % [nautical miles] mission.altitude_ft = convlength(mission.altitude_mi, 'naut mi', 'ft'); mission.velocity_fps = [5284.9, 5564.9]'; % [ft/s] (in inertial frame) mission.flightpathangle_deg = [-0.06, 0.03]'; % [deg] (measured upward from local horizontal plane) mission.headingangle_deg = [-75.19 -101.23]'; % [deg] (measured east of north) disp(table({'range zero (lift-off)'; 'descent orbit insertion (engine ignition)'}, ... mission.latitude_deg, mission.longitude_deg, mission.altitude_mi, ... mission.velocity_fps, mission.flightpathangle_deg, mission.headingangle_deg, ... variablenames=["mission phase", ... "latitude (deg)", "longitude (deg)", "altitude (mi)", ... "velocity (ft/s)", "flight path angle (deg)", "heading (deg)"]));
mission phase latitude (deg) longitude (deg) altitude (mi) velocity (ft/s) flight path angle (deg) heading (deg) _____________________________________________ ______________ _______________ _____________ _______________ _______________________ _____________ {'range zero (lift-off)' } -1.16 -141.88 57.8 5284.9 -0.06 -75.19 {'descent orbit insertion (engine ignition)'} 1.02 39.39 6.4 5564.9 0.03 -101.23
model initialization
initialize model parameters for the mission phase "descent orbit insertion (engine cutoff)" using the data defined above.
the intialization function aero_dap3dofdata
requires information about the orientation of the moon, which can be calculated using the aerospace blockset function moonlibration
. this function requires "ephemeris data for aerospace toolbox". use aerodatapackage
to install this data if it is not already installed.
mission.librationangles_deg = moonlibration(juliandate(mission.t_descentinsertion), "405");
this example uses saved libration angle data corresponding with t_descentinsertion
. use the above command after installing the required ephemeris data.
mission.librationangles_deg = [0.006379917345247; 0.382328074214300; 6.535718297208969];
run the intialization function:
[moon, ic, vehicle, rcs] = aero_dap3dofdata(... mission.latitude_deg(1), mission.longitude_deg(1), mission.altitude_ft(1), ... mission.velocity_fps(1), mission.flightpathangle_deg(1), ... mission.headingangle_deg(1), mission.librationangles_deg)
moon = struct with fields:
r_moon_eq: 5702428
f_moon: 0.0012
ic = struct with fields:
t_runtime: 120
pos_inertial: [-3.6488e 06 -4.4381e 06 -1.9070e 06]
vel_inertial: [4.0625e 03 -3.3792e 03 86.4867]
euler_0: [-30 -10 -60]
vehicle = struct with fields:
inertia_0: [3x3 double]
mass_0: 33296
rcs = struct with fields:
force: 100
l_arm: 5.5000
db: 0.0060
tmin: 0.0140
alph1: 0.0550
alph2: 0.0039
alph3: 0.0050
alphu: 0.0063
alphv: 7.8553e-04
alphs1: 0.0055
alphsu: 6.2855e-04
alphsv: 7.8553e-05
clockt: 0.0050
delt: 0.1000
closing remarks
building a digital autopilot was a daunting task in 1961 because there was very little industrial infrastructure for it - everything about it was in the process of being invented. here is an excerpt from the the apollo 11 moon landing: spacecraft design then and now:
"one reason why the [autopilot's machine code] was so complex is that the number of jets that could be used to control the rotations about the pilot axes was large. a decision was made to change the axes that the autopilot was controlling to the "jet axes" shown in aero_dap3dof
. this change dramatically reduced the number of lines of code and made it much easier to program the autopilot in the existing computer. without this improvement, it would have been impossible to have the autopilot use only 2000 words of storage. the lesson of this change is that when engineers are given the opportunity to code the computer with the system they are designing, they can often modify the design to greatly improve the code."
references
[1] national aeronautics and space administration manned spacecraft center, mission evaluation team. (november 1969). apollo 11 mission report msc-00171. retrieved from
[2] richard j. gran, mathworks. (2019). the apollo 11 moon landing: spacecraft design then and now. retrieved from
see also
|