The Design of A Real-Time Engineering Flight Simulator For The Rapid Prototyping of Avionics Systems
The Design of A Real-Time Engineering Flight Simulator For The Rapid Prototyping of Avionics Systems
This paper describes the design of a real-time flight Fighter Aircraft programme at British Aerospace, the
simulator, which is based on a modular architecture of PCs Boeing-777 programme and the continuing development
coupled by Ethernet. The simulator is required to provide a of flight control laws for Airbus aircraft by Aerospatiale.
rapid prototyping environment to support the design and As a result of the advances in PC technology and the
evaluation of avionics systems and flight control systems. supporting chip sets for commercial applications, there
Methods are described to ensure real-time implementation has been an increasing emphasis on the use of ’commer-
of the equations of motions using a standard PC and the cial aff the-shelf’ systems (COTS) in the procurement of
provision of real-time graphics to simulate aircraft displays training equipment. Up to the last 5 years, the intensive
using SVGA. The paper includes analysis of the perform- processing, which is necessitated by real-time simulation,
ance of the flight modelling methods and the simulation of could only be achieved by high performance mini-
aircraft displays. The paper concludes that high fidelity computers and custom hardware. However, with the
flight models and aircraft displays can be implemented increases in the processing capacity and memory
using standard PC platforms and Ethernet cards, if capacity af FCs, combined with a concomitant reduction
attention is given to the design of the simulator architec- in the cost of processors, PCs can now be used for the
ture. The resultant simulator provides a rapid prototyping real-time computation required in flight simulation.
environment, standardising on the packet format and low- This paper focuses on three aspects of engineering
level packet protocols of Ethernet, simulation:
Keywords: Flight simulation; rapid prototyping; avionics o real-time modelling methods in the simulation of
system design. vehicle dynamics - to ensure that the model has
sufficient rigour and realism to replicate aircraft and
engine dynamics accurately, while sustaining the itera-
1. Introduction tion rates which are essential in real-time simulation
9 real-time computer graphics to simulate aircraft
Flight simulators have had a major impact on airline displays - to replicate the functionality of specific
safety during the last 20 years. As a result of the aircraft displays and to meet the real-time require-
improvements in simulator fidelity, which has only been ments for display update rates
possible with the advances in computer technology, the o a distributed approach to the organisation of simu-
flight simulator is now accepted as an essential element lator modules - to partition the overall processing
of pilot training (International Standards, 1996). For load and to ensure the data throughput of the
many major airlines, specific pilot training programmes simulator (Valentino, 1994).
are conducted completely in a flight simulator rather
than an aircraft. This paper describes a COTS approach to the design of
In recent years, simulators have also been used in a an engineering flight simulator based on PCs, SVGA
different role; that is, in the development and evalua- graphics and Ethernet network cards. The paper
tion of aircraft systems; these simulators are termed establishes the requirements for real-time engineering
’engineering flight simulators’ rather than training flight simulation and shows that standard PCs can
simulators. These simulators allow engineering designs provide sufficient fidelity and performance, provided that
to be integrated into the flight deck of a civil aircraft or care is given to the design, organisation and implementa-
the cockpit of a military aircraft and to be evaluated in a tion of the simulator architecture. The paper focuses on
realistic manner that can avoid potentially dangerous or real-time modelling techniques and the provision of
expensive flight trials. Indeed, engineering simulation computer graphics to provide a rapid prototyping
has been a major component of several recent aircraft environment to develop and evaluate avionics systems
development programmes including the European and flight control systems. This approach to engineering
simulation includes the acquisition of simulator data
during simulator-based trials and the storage and
College of Aeronautics, Cranfield University, Bedford- presentation of flight data, both during trials and in
shire MK43 OAL. UK. off-line analysis.
51
52
arise from the application of these forces as a set of requiring extrapolation and interpolation at run-time,
moments about the centre of gravity and secondly, from incurring further increase in the processing load
the aerodynamic moments caused by the airframe and * forces, moments, accelerations, velocities and position
by the inceptors used to control aircraft attitude. need to be derived in the most appropriate axis
The computation of the forces and moments are more system - inevitably, this requires transformations
straightforward in specific axes systems. For example, between axes systems
propulsion forces are more readily computed in aircraft * the transformations and computations of forces and
body axes, whereas aerodynamic data is commonly moments involve trigonometric functions, typically in
derived from forces and moments measured in stability the form of series expansions. The accuracy required
axes. Similarly, the aircraft position and attitude seen by in these computations, which is determined by the
the pilot is best represented in ’world co-ordinates’ requirements for fidelity, also affects the number of
defined by the axes system of the simulator visual system. instructions executed per frame.
A detailed definition of the reference frames used to
define aircraft motion is given in Baarspul (1990).
The simulation of the equations of motion of any 4~a . ~~r~~~~~t~~~~~ issues
vehicle can be decomposed into three stages: Most applications in simulation require the precise
o
computation of the forces and moments modelling of system characteristics. However, real-time
simulation extends these requirements to the repeated
@ transformation of forces, accelerations and velocities
solution of the system equations within the frame time.
between axes systems
In practice, this requirement imposes a minimum update
a integration of accelerations and velocities to derive rate of 50 frames per second, or 20 ms per frame. This
position and attitude. requirement is exacting in two senses. Firstly, the com-
This simplified outline of the equations of motion for an plexity and fidelity of the modelled equations must be
aircraft is shown in Fig 3. These equations are solved acceptable. In other words, although a simplified model
repeatedly, with a sufficiently fast iteration rate, so that a may reduce the amount of processing and thus increase
pilot cannot discern delays between an input and its the update rate, the equations must be solved with
effect, in comparison with the response of an actual sufficient rigour that all aspects of the modelling are
aircraft. Typically, the solution of these equations is acceptable to a pilot. Secondly, the update rate must be
required at rates in excess of 50 Hz, giving 20 ms per maintained at all times and under all conditions. This
iteration or frame. In practice, part of this frame time is second requirement is particularly apposite in a dis-
dedicated to communications (data transfers) with other tributed system, where delays in one sub-system are, in
systems and secondly, a margin is required to ensure that effect, passed on to other systems. Both of these
the frame time is never exceeded. In order to maintain requirements are paramount in the acceptance phase of
this overall processing rate, there are a number of a simulator, where it is to demonstrate that
implications for the real-time solution of the equations both the fidelity and latencies of the simulator fulfil the
of motion: specific requirements for a reai-time simulator.
A number of methods are used to ensure that the real-
o a processor has a ~r~i~e ~i~c4~ speed and thereifore,
there is a finite limit to the number of instructions performance be art all times:
which can be executed per frame. In addition, the o timing individual modules, particularly for ’worst-
number of instructions executed per frame may vary case’ conditions to estimate the delay in executing each
with time. Nevertheless, there is a requirement to procedure. For example, extra code may be executed
maintain the minimum frame update rate at all times, during stalling if a high-incidence model is invoked
including ’worst-case’ situations under these conditions
e aerodynamic data is likely to be provided in tabular * estimation of delays from inspection of the code,
form, derived from flight tests, wind-tunnel data or based on timing information from processor data
predictions (Smetana, 1984) - this data may be sheets
inconsistent and may be a function of two or three . selection of an optimising compiler
variables (not necessarily defined at regular intervals), . selection of a faster processor
53
s time-out code which abandons non-critical code if the The use of cubic spline methods avoids the introduction
frame time is exceeded. of discontinuities in the data. Interpolation is used
between tabulated data points and extrapolation is used
Data is acquired by the flight model from two sources:
to obtain points outside the range of generated data
analogue and digital data from inceptors and commands {Sinnett et al. 1989). The majority of aerodynamic data
issued by the instructor station. Analogue data is
tables are functions of two or more variables (e.g. mach
sampled autonomously by programming a 12-bit number, flap position, angle of attack) and multi-
analogue-to-digital (A/D) converter to interrupt the dimensional interpolation is used on these forms of
processor on the completion of every A/D conversion, at tabulated data.
the rate of 32 conversions per frame (32 channels) or
1600 interrupts per second. On completion of each
conversion, the processor is interrupted, the converted
data is copied to a shared buffer and the AID is reset to ~e Display
sample the next channel. There are two advantages to Computer generated graphics offers several advan-
this approach. Firstly, the processor never waits for
tages in the rapid prototyping of aircraft systems:
completion of an A,~’I3 conversion and secondly, data is
simply read from a shared buffer when it is required ~ it is
straightforward to change (i.e. to re-program) the
during the frame. The data is guaranteed to have been displays
sampled during the previous frame, and on average 8 EFIS (Electronic Flight Instrument Systems) aircraft
within 10 ms at a 50 Hz frame rate. This latency can be displays are commonplace on modern flight decks
reduced by increasing the sampling rate, but there is still @
integration of a display is reduced to a software task,
a context switch in responding to each of the 1600 minimising the disruption to the simulator configura-
interrupts per second. If the response time for each tion.
interrupt is 100 ~ts, say, then 3200 ps (over 3 ms) is ’lost’ However, there are also several problems associated with
per frame in handling the interrupts from the A/D card. the provision of aircraft displays in a PC-based rapid
A similar approach is adopted to the receipt of environment:
Ethernet packets from other processors. Each packet is prototyping
copied to a shared buffer on interrupt. As only one 8 the SVGA graphics architecture of the PC is not
packet is received per frame, the overhead of Ethernet strictly designed to support real-time graphics
transfers is negligible. However, there is an overhead in * the display resolution is limited to 640:480 or 1024:768
54
55
for a 33 MHz 486 PC. The pixel drawing rate varies from rendering rate. However, gains in graphics speed are also
6.9 gs per pixel to 0.63 gs per pixel according to the line dependent on the interface between the processor and
length and orientation owing to the variation in the the graphics card and the access speed of the memory on
number of arithmetic operations for each line. The the SVGA graphics card.
distribution of vector lengths for a typical aircraft Several of the aircraft displays contain both vectors
display is shown in Fig 7. This clearly the characters, for the compass of
majority of vectors are less than 30 pixels in length and the Horizontal Situation Indicator and the Radio
that a worst case figure of 1.5 gs per pixel can be Magnetic Indicator. Although characters can be drawn
assumed. as a set of straight line segments, it is also possible to
In addition, specific aircraft instruments contain large store character set fonts and to extract the appropriate
areas of in-filled colour, for example, the attitude character from the font set as an array of pixels, as
indicator. If the complete region occupied by the attitude shown in Fig 8.
indicator illustrated in Fig 5 is re-drawn, then approxi-
mately 10000 pixels need to be re-drawn per frame, con- 7. Colour plane mapping
suming 15 5 ms of the 20 ms frame. Of course, one solution
is to use a faster PC, where the gain in clock speed is (to a In the 256 colour mode, each pixel corresponds to a
large degree) proportional to the improvement in pixel single byte of SVGA RAM. As each byte is accessed by
56
the display, it is transformed from an 8-bit byte to a This approach provides eight distinct planes and a
video signal containing red, green and blue components maximum of 256 colour options for overlapping planes.
by the colour palette chip. The mapping of the colour For example, a display pointer could be drawn in plane
palette register allows each of the 256 possible bytes to be 6 with the remainder of the display drawn in the other
specified in terms of three 6-bit colour components, planes. To move the pointer, it is erased but, for each
giving 21’ possible colours. For example, the following pixel of the pointer, this only requires bit 6 to be cleared,
components produce the colours defined below: leaving the pixels ’under’ the pointer unaffected. More-
over, if the pointer overlays a region of red, then the
mapping of the white pointer over a red object can be
defined as white, to give the effect of the pointer lying on
top of the red plane or alternatively, it can be set to red,
to give the effect of the pointer passing under the red
plane.
Although this arrangement appears to be complicated,
the SVGA RAM is organised as a conventional memory,
allowing logical operations in addition to read and write
operations. For example, pixels can be written in an
individual plane by a logical OR operation without
Although the mapping of the colour palette can be
changed at run-time, in practice it is programmed with a altering the pixel values in other planes and similarly, a
set of colour mappings, prior to the generation of any pixel can be erased by a logical AND operation, without
graphics. For the application of aircraft displays, it is affecting pixels in other planes.
possible to consider each bit of each pixel byte to Consider the example of the Radio Magnetic
Indicator (RMI), shown in Fig 5. The rotating compass
represent a colour plane. For example, bit 2 could
card could be drawn in plane 0, the fixed objects could be
represent plane 2, which maps to red, say:
drawn in plane 1, the green pointer drawn in plane 2 and
the yellow pointer in plane 3.
One further benefit of this approach is that one plane
can deliberately occlude another plane, simply by
Similarly, bit 5 could define plane 5 which maps to ~r~e~a4 parts of a display, for example the rounded bezel of an
say EFIS display, shown in Fig 9.
Region (2) represents pixels in both blue and grey
planes. The mapping allows the blue region to be written
to a rectangular boundary (for example, to simplify any
clipping operations) but to appear to be grey, i.e. under
the grey region ( ~ ).
Another example where this feature can be exploited is
A combination of these two bytes is shown below. This the provision of sliding scales, which are commonly used
byte, which represents the value 3610, can map to a third in EFIS displays, as shown in Fig 10(a), which shows the
colour, purple say, such that a pixel drawn in planes 2 and Primary Flight Display (PFD) of a Boeing 747-400
5, maps to purple. aircraft. The digits of the expanded airspeed indicator,
shown in Fig 10(b), are occluded by the window, as a
result of the colour palette mapping function, avoiding
any computation of the hidden portion of the digits.
This technique can also simplify clipping operations. For
57
Fig 10(a) Boeing 747-400 primary flight display; (b) airspeed indicator
58
In practice, although the overall data rate is 1(~~ bits off-line, the packets are obtained as sequential disk
per second, time is also required to form transmitted blocks.
packets and to extract received packets. For a 33 MHz This approach also provides the basis of a real-time
PC, an overall data rate of 2.~I~I bits per second was flight data recorder for flight test applications. Ethernet
achieved for back-to-back transmissions. At 2M bits packets are buffered in XMS memory as they are
per second, the data rate is approximately 200K bytes received. As the XMS memory fills, packets are copied
per second or 4K bytes per frame. Limiting the transfers to disk, as a background task. However, applications
to 3 ms of the 20 ms frame time, reduces the throughput software can access the current packet, packets stored in
to 600 bytes per frame. This ensures that packets are XMS or packets saved to disk, in a totally transparent
received at the start of each frame. However, data that is manner. In effect, the limit on data storage is the disk
not time critical can also be sent during the remainder of capacity rather than the XMS memory capacity.
the frame and transferred as a background task with
minimal disruption to the real-time performance.
The equations of motion are solved at 50 Hz and 9. Results
aerodynamic data, engine data and navigation data is
transmitted by the flight model computer as a single The flight models have been validated in a number of
512 byte Ethernet packet every frame. This data includes ways:
accelerations, velocities, position, attitude, engine fuel o standard test inputs were applied to the flight model,
flows, propeller blade angles, glide-slope deviation, etc., for example, step inputs and doublets and compared
in an agreed format. At this rate, 25K bytes of data is
with published aircraft data
acquired per second or 1.5M bytes per minute. For o the simulator flight models have been evaluated by an
example, a 24M byte system can store up to 16 min of experienced test pilot
continuous flight data, without data compression and o data was obtained from flight tests and applied to the
without discarding any data.
simulator in order to compare the simulator response
This data acquisition time is achieved by means of the
with equivalent aircraft inputs.
Extended Memory System (XMS) provided under the
DOS operating system for the PC. A small library was Figure 12 illustrates the short period phugoid response
written to read or write 1/2K byte blocks to XMS of a Boeing 747-200 the manual application of 18° of
to
memory. Each Ethernet packet is copied directly to elevator for 2s. The acceleration ~, pitch
XMS memory during the Ethernet interrupt response. attitude, angle of attack and elevator input are plotted
Data for specific frames is then acquired from XMS (at a 50 Hz sampling rate) over a period of 12 s.
memory. This method ensures that data packets are One further advantage of this modular approach is
stored as a background task, without disrupting the that simulator modules can be re-used off-line to
instructor station functions but, more importantly, no undertake analysis of the flight model and to investigate
data packets are lost. Subsequently, XMS data packets the various modes of motion. By careful organisation of
are written directly to disk and can be recovered as the simulator modules, it is possible to use actual
512 byte blocks as the equivalent of ’raw’ Ethernet simulator modules for c~~ line analysis.
packets. For teaching, this approach allows identical The resultant timing for typical instrument display
data analysis software to be used on-line or off-line; on- updates for the Boeing 747-200. illustrated in Fig 5, is
line, the packets are obtained as sequential XMS blc~~~s; shown in Fig 13, which also indicates the amount of
59
processing required for the aerodynamic model and the these conditions requires the maximum number of
engine model. These results are ’worst-case’ figures, vectors and characters to be re-drawn per frame.
where fast roll and pitch rates were applied to the From this graph, it is clear that a single 66 MHz
simulator to exercise the primary flight displays over a 486 PC is capable of updating the flight model for a
period of 10 s. The amount of graphical updating under Boeing 747-200= an engine model for four Pratt and
60
61
Transaction Papers
Papers are invited on all aspects of measurement and control - research, development,
application and education - and from any discipline.
The technology covered by the Transactions is naturally inter- or cross-disciplinary and for this
reason the field is very wide. The Institute has technical groups currently working in the following
subject areas:
Measurement and Instrumentation Technology concerned with design and application of instruments
for the measurement of physical and chemical variables, Also with signals, signal processing and
display of information.
Systems and Control Technology concerned with the theory and practice of control systems;
modelling and analysis of systems; identification of systems; application of control; digital control
systems ir~~ludin~ on-line computation and software systems; and applications of programmable
logic controllers.
Social and Biological Systems concerned with the application of measurement and control techniques
to areas outside the more ’traditional’ areas of the Institute’s coverage; eg, to management and
economic systems, systems engineering, measurement and identification of biological systems,
aids to medical diagnostics, etc.
Educational Activities concerned with the advancement and communication of knowledge of
education and training in the art of measurement and control.
Standards Policy concerned ~.~ith standards and codes of practice c~~rerin~ measuring instruments and
control equipment.
Robotics
§~~~;.U~i’P..Yv&dquo;&dquo; *3’.gLP4’.~I~~.E be welcomed on Safety and information £4av&48~~Y.Ja’iX~lB,
Guide Notes for intending contributors to the Transactions are available from:
Transactions of the Institute of Measurement and Control, Editcar~al Administration
Office, Queens University, Department of Mechanical and Manufacturing Engineering,
Ashby Building, Stranmillis Road, Belfast BT9 5AH (Tel: 01232 274112; Fax: 01232
661729; e-mail: [email protected])
62