38150 bae uav aeroeng

2
14 Aerospace Engineering April 2004 Controlling UAVs BAE Systems and The MathWorks work together on UAV flight software using embedded code generation and a high- integrity RTOS. A s flight-control and avionics sys- tems of military and commerical aircraft are required to deliver more functionality and perform more com- plex missions, their onboard software be- comes increasingly complicated to design and produce. Flight-control systems for unmanned aerial vehicles (UAVs) have the added complexity of autonomous or re- mote control. UAV system architecture is highly so- phisticated and requires the configuration of such items as a vehicle management controller, actuators, data-link receivers and transmitters, payload assembly, a GPS receiver, a power generator, and a battery. Within limited budgets and aggressive schedules, BAE Systems Controls in Johnson City, NY, and Los Angeles, CA, routinely has to deliver reliable, flight-criti- cal software that operates remotely and autonomously from a ground control sta- tion. The company must also create de- signs that allow both the hardware and the software to be cost-effectively integrated and migrated to new applications. Integration of new and existing ap- plications with a real-time operating system (RTOS) can be very complicated and labor intensive. BAE has success- fully integrated its CsLEOS RTOS with The MathWorks modeling and code Executable UAV model with sensors, actuators, plant, and controller model, shown via a typical Simulink model. generation tools on a variety of manned and unmanned aircraft programs. Within the last year, CsLEOS and au- tomatically generated code has been de- ployed in the integrated vehicle man- agement system computer on the Northrop Grumman Pegasus X-47A UCAV (unmanned combat aerial ve- hicle); the flight-control computer de- signed for the Boeing -built C-17 Globemaster III U.S. Air Force trans- port; fly-by-wire flight control for Sikorsky’s S-92 and H-92 helicopters; and various other current and future systems being developed. The tools The CsLEOS RTOS, designed specifically for embedded applications, employs “brick-wall” time and space partitioning to operate multiple systems indepen- dently of each other. If one system experi- ences a failure, the others are unaffected. The system’s ARINC-653 compliant ap- plications programming interface ensures ease of use. Its RTCA/DO-178B, Level A, certification support package provides re- liability standards for safety-critical use. The CsLEOS is a scaleable, real-time, deter- ministic, multi-tasking operating system targeted for applications that operate in a flight/safety critical environment. The CsLEOS provides temporal and spatial partitioning for each separately loadable application. Each application is called a partition and it is allocated a re- served area of memory that is not available for use by other partitions. The CsLEOS executes the partitions according to a pre- defined schedule. Within these partitions exist one or more tasks that carry out the functional requirements of the partition. Reserved operating windows for each par- tition ensure applications have a fixed pe- riod of uninterrupted access to the proces- 404uav.p65 3/19/04, 11:37 AM 14

Upload: venkatesh-kumar

Post on 18-Apr-2015

30 views

Category:

Documents


4 download

TRANSCRIPT

Page 1: 38150 Bae Uav Aeroeng

14 Aerospace Engineering April 2004

Controlling UAVs

BAE Systems and TheMathWorks work togetheron UAV flight softwareusing embedded codegeneration and a high-integrity RTOS.

As flight-control and avionics sys-tems of military and commericalaircraft are required to deliver

more functionality and perform more com-plex missions, their onboard software be-comes increasingly complicated to designand produce. Flight-control systems forunmanned aerial vehicles (UAVs) have theadded complexity of autonomous or re-mote control.

UAV system architecture is highly so-phisticated and requires the configurationof such items as a vehicle managementcontroller, actuators, data-link receiversand transmitters, payload assembly, a GPSreceiver, a power generator, and a battery.Within limited budgets and aggressiveschedules, BAE Systems Controls inJohnson City, NY, and Los Angeles, CA,routinely has to deliver reliable, flight-criti-cal software that operates remotely andautonomously from a ground control sta-tion. The company must also create de-signs that allow both the hardware and thesoftware to be cost-effectively integratedand migrated to new applications.

Integration of new and existing ap-plications with a real-time operatingsystem (RTOS) can be very complicatedand labor intensive. BAE has success-fully integrated its CsLEOS RTOS withThe MathWorks modeling and code

Executable UAV model with sensors,actuators, plant, and controller model,shown via a typical Simulink model.

generation tools on a variety of mannedand unmanned aircraft programs.

Within the last year, CsLEOS and au-tomatically generated code has been de-ployed in the integrated vehicle man-agement system computer on theNorthrop Grumman Pegasus X-47AUCAV (unmanned combat aerial ve-hicle); the flight-control computer de-signed for the Boeing-built C-17Globemaster III U.S. Air Force trans-port; fly-by-wire flight control forSikorsky’s S-92 and H-92 helicopters;and various other current and futuresystems being developed.

The toolsThe CsLEOS RTOS, designed specificallyfor embedded applications, employs“brick-wall” time and space partitioningto operate multiple systems indepen-dently of each other. If one system experi-ences a failure, the others are unaffected.

The system’s ARINC-653 compliant ap-plications programming interface ensuresease of use. Its RTCA/DO-178B, Level A,certification support package provides re-liability standards for safety-critical use.The CsLEOS is a scaleable, real-time, deter-ministic, multi-tasking operating systemtargeted for applications that operate in aflight/safety critical environment.

The CsLEOS provides temporal andspatial partitioning for each separatelyloadable application. Each application iscalled a partition and it is allocated a re-served area of memory that is not availablefor use by other partitions. The CsLEOSexecutes the partitions according to a pre-defined schedule. Within these partitionsexist one or more tasks that carry out thefunctional requirements of the partition.Reserved operating windows for each par-tition ensure applications have a fixed pe-riod of uninterrupted access to the proces-

404uav.p65 3/19/04, 11:37 AM14

Page 2: 38150 Bae Uav Aeroeng

15Aerospace Engineering April 2004

Controlling UAVs

sor. Since the CsLEOS separates partitionsfrom each other in both time and space,applications of different critical levels canbe executed on the same processor withoutinterfering with each other.

MathWorks products are used exten-sively in the control industry. COTS(commerical off-the-shelf) tools based onSimulink and Stateflow allow model-based design for many different types ofreal-time systems. From these designs, effi-cient, readable code can be auto-generatedfor an array of target processors by usingthe Real-Time Workshop EmbeddedCoder. Documentation can also be auto-generated using the same set of designsfrom which the code was generated.

Flight software designTo reduce overall integration time of theembedded application, BAE usesMathWorks’ MATLAB, Simulink, andStateflow tools to create executable math-ematical models that accurately simulateUAV system behavior. BAE uses thesemodels to design UAV embedded soft-ware components, including autopilotmodels and integrated navigation algo-rithms. The autopilot model includes flightphase and mode logic; longitudinal, lat-eral, and directional loop control; throttleand fuel mixture control; guidance andnavigation data computation; and enginestatus monitoring.

The UAV system models also containcomponents of the plant environment,which include six-degrees-of-freedomnonlinear dynamic models of the aircraftwith all variables computed as outputs.The plant model also includes atmosphereand turbulence, the landing gear, the steer-ing wheel, control surfaces, actuators, sen-sors, engine speed, exhaust gas tempera-ture, propeller thrust, and a data link.

The control system is modeled in dis-crete time and uses fixed sample rates. The

plant is modeled in continuous time andmay or may not use variable step rates. Theoverall system model is hybrid since it in-volves a combination of discrete and con-tinuous time dynamics. The typical modelalso contains finite state machines withinStateflow for mode logic in addition to theclassic feedback control block diagramsprovided by Simulink. Table lookups,legacy code insertion, detailed data types,and function and file partitioning are allhandled within the modeling and simula-tion environment.

During simulation, model profiling in-formation can be collected to evaluate per-formance and optimize loading. Modelcoverage tools are used to reveal possibleerrors by providing structural coveragesuch as modified condition/decision cov-erage. If the system does not meet therequirements, changes can easily be madein the model-based environment and thetests run again. Once the system meets allrequirements, code can be generated forthe application partition, which can beloaded into the target running CsLEOS.

ImplementationAfter using Simulink and Stateflow fordesign and development UAV develop-ers then automatically generate flightcode with the Real-Time WorkshopEmbedded Coder. The code generatedis ANSI-C and can be run on any systemthat can compile standard C code.

After the application code is generated,the next step is to integrate the generatedcode with BAE’s CsLEOS. Its brick wallpartitioning scheme allow multiple appli-cations to run in separate partitions withno spatial or temporal interference. Thetotal flight software consists of applicationlayer software provided by Real-TimeWorkshop, which is controlled and sched-uled by the underlying CsLEOS RTOSlayer software.

The process for generating the code involves selection of appropriate code optimizationswitches and configuration settings.

Control systems designed withCsLEOS and MathWorks products areoften comprised of a set of control lawsembedded in CsLEOS partitions. In-cluded in each partition are CsLEOStasks (threads) that can control the in-put and output from the control laws.This I/O could be from a supportedexternal device or from another parti-tion in the system. The CsLEOS toolboxfor Simulink includes blocks for parti-tion creation, task creation andI/O through the use of built-inintrapartition communication services.

To simplify integration, a set ofSimulink blocks was developed forCsLEOS, allowing developers to createand test entire applications as models,which can then be transferred directlyto the target system for implementation.

Testing and documentationWithin Simulink, documentation of thesystem and software designs is auto-matically generated from the samemodels as those used to generate thecode and verify the simulation. Codereports are generated for the applica-tion code and include HTML traceabil-ity links back to the correspondingSimulink blocks. This documentationand traceability feature facilitate UAVdesign reviews and analysis.

BAE engineers quickly resolve flighttest issues by logging and identifyingproblems and then modifying theSimulink model, testing the new require-ments by simulating the model, automati-cally generating code, and conductinghardware-in-the-loop testing and a flighttest checkout. New functionality is addedto the system in a similar way.

Model-based design saves time duringsoftware development and the ability toauto-generate entire CsLEOS applicationscontributes to less overall design time. Thebuilt-in test and simulation tools of theMathWorks software products reducedtesting efforts by allowing design tests tobe run without the hardware. Once thedesign met the requirements, the Real-Time Workshop generated an entireCsLEOS application that was downloadedto the target processor.

This article was written for Aerospace Engineer-ing by William G. Barnes, Senior Principle Soft-ware Engineer, BAE Systems Controls, andTom Erkkinen, The MathWorks, EmbeddedApplications Manager.

404uav.p65 3/19/04, 11:37 AM15