"The simulation engineers produced a high-level, tested description of the C code—the Simulink model—which the software engineers used to generate the code for the application. Without MathWorks tools I don’t think we could have completed the trainer with as few resources as we did."
Peter Worthington, BAE Systems Surface Ships
Crew members responsible for operating modern warships must train extensively to master the control of the vessels’ systems. Instructors aboard the Type 45 Anti-Air Warfare destroyer, the Royal Navy’s most advanced and largest warship of its type, will use an On-Board Trainer (OBT) to train crew to control, reconfigure, and recover the ship’s main systems in a variety of machinery fault and action damage scenarios.
The trainer simulates, in real time, the Type 45’s sophisticated electric propulsion, generation, and auxiliary machinery, which can be simultaneously controlled by up to 16 crew members via the Platform Management System (PMS). The OBT enables crew members to take their workstations offline to run training simulations; it is the Royal Navy’s first on-ship trainer of this type.
BAE Systems Surface Ships developed the OBT plant simulation using MathWorks tools and Model-Based Design. “By modeling and simulating the ship’s systems in Simulink, we provided a safe learning environment for the crew and gave valuable feedback to the main Type 45 project team at an early stage,” says Peter Worthington, principal engineer at BAE Systems Surface Ships.
BAE Systems Surface Ships engineers had to develop the OBT plant simulation before the systems it emulated were fully designed, and concurrently with the design of the PMS. To handle inevitable changes to system requirements, the engineers needed to be able to trace requirement changes, make design modifications, and communicate those changes with each other and with the customer.
To make the OBT realistic, the team needed to activate approximately 4000 inputs and outputs to PMS with many more internal signals to interconnect the 16 systems it emulated. It also needed to model physical faults as events with secondary effects. “A leak in a pipe would be simulated with a corresponding drop in pressure,” explains Worthington. “That leak would gradually flood a compartment, setting off a bilge alarm. We needed a comprehensive model to simulate this kind of cascade of events.”
In addition, BAE Systems Surface Ships needed to deliver efficient code; customer specifications required the simulation to average less than 20% CPU utilization on a 2 GHz processor.
BAE Systems Surface Ships engineers created Simulink® models of the Type 45’s main physical systems, including shafts, propellers, gas turbines, and diesel generators, as well as electric distribution, steering, bilge, high-pressure seawater, and fire-fighting systems.
Working from the specifications of the physical systems and PMS, the team identified each system’s inputs and outputs and developed plant models using Simulink. They developed test harnesses for each system in Simulink, then ran simulations to test each model independently.
After debugging and verifying the system models, the team combined them into an integrated Simulink model of the Type 45. They combined the individual harnesses to enable testing of the overall plant simulation. The team then simulated numerous scenarios to verify the integration, operation, and initialization states of the overall plant simulation.
During design reviews with the customer, BAE Systems Surface Ships engineers demonstrated the trainer by running various scenarios in Simulink. Any issues raised were easily addressed by changes to the Simulink model. With Simulink Report Generator™, the team automatically created the required software design document from the Simulink model.
Finally, the team used Embedded Coder™ to generate C code for the entire OBT plant simulation. Once compiled, the code was embedded back into the Simulink harnesses for the final Factory Acceptance Test with the customer.
The first phase of the OBT project, which simulates about 80 faults, has been delivered and accepted. Phase two, a shore-based damage control command team trainer that simulates 550 faults, is currently being accepted. Work on the third phase, a Type 45 marine engineering trainer with additional local control panels, is underway.
Develop an on-board training system for the Royal Navy’s Type 45 destroyer
Use MathWorks tools to model and simulate the ship’s physical systems and generate production C code for the training system