91876v00_NLD_final

Embed Size (px)

Citation preview

  • 8/6/2019 91876v00_NLD_final

    1/3

    1 MATLAB Digest mathworks.com

    Most NASA GN&C projects ollow a tra-

    ditional process: Domain experts and

    analysts speciy the behavior o the core

    algorithms in detailed requirements docu-

    ments. Following CDR, these documents

    are handed o to the ight soware engi-

    neers or implementation into the ormal

    ight soware. Producing the specication

    document alone oen requires years o e-

    ort, and because coding can begin only

    aer the spec is complete, it can be years

    beore there is any code to test.

    Te design and development o the

    GN&C ight algorithms or Orion is a part-

    nership between NASA, Lockheed Martin,

    and other contractors. Model-Based Design

    has helped these organizations work on

    both the GN&C algorithm and ight so-

    ware development concurrently. Simulink

    models serve as an executable specication

    rom which ight soware is automatically

    generated. As a result, the domain experts

    the GN&C analystswork directly with the

    executable algorithm models rather than

    with documents that must then be inter-

    preted by soware developers (Figure 1).

    Merging the design and analysis environ-

    By Scott Tamblyn and Joel Henry, NASA, and John Rapp, Lockheed Martin

    When the guidance, navigation, and control (GN&C) system for the Orion

    crew vehicle undergoes Critical Design Review (CDR), more than 90% o the

    ight sotware will already be developeda frst or NASA on a project o thisscope and complexity. This achievement is due in large part to a new develop-

    ment approach using Model-Based Design.

    Accelerating NASA GN&C FlightSoftware Development

    MATLAB Digest

    ment with the ight soware development

    environment enables the joint team to iden-

    tiy and resolve problems earlier and has

    the potential to reduce overall development

    time by a year or more.

    Products Used

    Simulink

    Embedded Coder

    Simulink Verification and Validation

    Figure 1. Schematic comparing our traditional design process and the approach we used to developOrion GN&C software. Image courtesy NASA.

  • 8/6/2019 91876v00_NLD_final

    2/3

    2 MATLAB Digest

    Laying the Groundwork for theNew Approach

    While Lockheed Martin was already amil-

    iar with Model-Based Design, this approachrepresented a paradigm shi or many

    NASA engineers and contractors. o prepare

    the ground, lead GN&C and ight soware

    engineers collaborated in detailing the

    benets o the new development process,

    and explained how it would change the roles

    and responsibilities o the GN&C analysts

    and ight soware engineers.

    Modeling standards were developed

    to enable the approximately 100 engineers

    rom multiple organizations working on

    the GN&C algorithms to develop consis-

    tent models, understand each others work,

    and collaborate efciently. Tese standards

    ensure that all models are clear and

    readableparticularly important or a

    large team using the models as documenta-

    tion. Te standards were based on lessons

    learned in earlier projects and on

    MathWorks Automotive Advisory Board

    (MAAB) guidelines.

    Developing and IntegratingGN&C Algorithms

    Te rst step in developing the GN&C

    system architecture was the creation o

    the Empty-Box Architecture (EBA).

    Te EBA contains approximately 100 unc-

    tional modules, or computer soware units

    (CSUs).

    Te engineer or subteam responsible ora CSU assembles a model comprising one

    hundred or more Simulink library blocks

    and components. Because the CSUs are

    specied as Model Reerence blocks, each

    unit can be thoroughly simulated on the

    desktop beore it is handed o to the ight

    soware team. Te engineer then uses

    Simulink Verication and Validation and

    the Simulink Model Advisor tool to veriy

    that the model meets the modeling stan-

    dards. Te engineer also generates code to

    ensure that there are no problems in themodel that would preclude code generation.

    When delivering the CSU, the engineer pro-

    vides both the Simulink model and the test

    inputs and expected test outputs rom the

    unit tests.

    o validate the overall GN&C soware,

    as well, the team runs the higher-level

    model composed o all unctional units in

    closed-loop simulations to urther debug

    and test the algorithms. In these situations,

    NASA relies on rick, a high-delity, six-

    degree-o-reedom simulation inrastruc-

    ture that NASA has been rening or more

    than 20 years. Te simulation environment

    includes mathematical models o the vehi-cles sensors (such as inertial measurement

    units and star trackers) and eectors (such

    as reaction control systems), as well as aero-

    dynamics, gravity, and the space environ-

    ment.

    Te higher-level model is linked to the

    rick environment via a socket connec-

    tion. Tis setup enables engineers to debug

    their CSU algorithms in the ull-eatured

    Simulink environment while runningclosed-loop simulations. For example,

    Orion

    Image courtesy NASA.

    Designed for deep space missions, NASAs Orion crew exploration

    vehicle will carry a new generation of astronauts far beyond low Earth

    orbit to multiple destinations throughout our solar system, such as as-

    teroids, the moon, and eventually, Mars. Orion will replace the space

    shuttle as the agencys principal vehicle for human space exploration.

    mathworks.com

  • 8/6/2019 91876v00_NLD_final

    3/3

    3 MATLAB Digest

    engineers can simulate the atmospheric

    entry phase o ight and use scopes in

    Simulink to observe signals in their own

    CSU or anywhere in the EBA.

    Generating Code withEmbedded Coder

    Because the C++ ight code is automatically

    generated rom the Simulink models, most

    ight soware coding will be completed

    beore CDR. In addition to saving time

    and reducing risk, code generation with

    Embedded Coder provides three advan-

    tages at this stage o the program: First, it

    enables us to veriy that the code that will

    ultimately get deployed aboard the target

    vehicle can be generated and that it pro-

    duces the same results as the Simulink

    simulations o the source models. Second,

    code generation enables engineers who are

    accustomed to writing their own code to

    inspect the generated C++ code and even

    debug directly in the code. Tird, it enables

    analysts to dramatically realize closed-loop

    run-time perormance by embedding thegenerated code directly into the rick simu-

    lation inrastructure.

    Simulink is ideal or running closed-loop

    simulations because its interactive, visual

    environment helps engineers identiy and

    resolve deects quickly. For ull analytical

    verication testing, however, simulation

    speed is a more important consideration

    because o the need to run hundreds o

    thousands o Monte Carlo simulations or a

    range o scenarios.

    Closed-loop simulations employing the

    generated code embedded in rick per-

    orm approximately 10 times aster than

    real time. As a result, a ull 10-day Orion

    mission can be simulated in just one day.

    Engineers have already conducted entry-

    stage simulations using both approaches

    using the Simulink model to drive rick,

    and embedding the generated code into

    rick. When compared, the results o the

    two simulations were ound to be bit-or-bittrue; they matched down to the lowest level.

    Blazing a Trail

    Tis GN&C project is blazing a new

    trail or NASA in many ways. Simu-

    link and Embedded Coder are

    enabling a large team o domain experts

    rom NASA, Lockheed, and other con-

    tractors to develop algorithms or com-

    plicated trajectories and scenarios, run

    simulations within a legacy simulation

    environment, and generate ight soware

    code that will ultimately be deployed on

    the vehicle.

    On long-term projects like this one, it is

    not uncommon or agency requirements

    and priorities to shi. With the algorithms

    captured in models rather than in low-level

    code, the engineers are well positioned to

    take the project in whatever direction it

    needs to go.

    Learn More Orion Crew Exploration Vehicle

    nasa.gov/orion

    Orion GN&C: MATLAB andSimulink Standardsmathworks.com/orion_gnc

    NASAs X-43A Scramjet AchievesRecord-Breaking Mach 10 Speedmathworks.com/nasa-scramjet

    91876v00 04/11

    2011 The M athWorks, Inc. MATLAB and Simulink

    are registered trademarks o The MathWorks, Inc. Seewww.mathworks.com/trademarks or a list o additionaltrademarks. Other product or brand names may be trade-marks or registered trademarks o their respective holders.

    mathworks.com

    http://www.nasa.gov/orionhttp://www.mathworks.com/orion_gnchttp://www.mathworks.com/nasa-scramjethttp://www.mathworks.com/nasa-scramjethttp://www.mathworks.com/orion_gnchttp://www.nasa.gov/orion