"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 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.
Efficient production code generated. “The final deliverable comprised 90,000 lines of code generated using Embedded Coder,” says Worthington. “The code consumed just 2% of CPU time—an order of magnitude less than the customer’s performance requirement of 20%.”
Development effort cut in half. “Using MathWorks tools for Model-Based Design, just three engineers developed the OBT plant simulation at about half the cost of the nearest competitive bid,” says Worthington. “Using conventional techniques, the project would have required 2 to 4 times more development effort.”
Early feedback on system specification provided to Type 45 project. “In the first stages of development, our simulation results raised issues around how the PMS interacted with certain systems,” says Worthington. “The MATLAB® and Simulink models helped us communicate what was happening to the Type 45 project team. That knowledge enabled them to review the PMS, identify and address specification issues early, and avoid costly rework later on.”