Gulfstream engineers used Simulink, Aerospace Blockset™, and Simulink Coder™ to develop the simulator and evaluate control law designs in real time during simulated flight.
They developed the aircraft dynamics model by translating existing equations for the aircraft into Simulink. Originally developed in Fortran, these equations were based on a traditional flat-earth model. The team used Aerospace Blockset to upgrade this model with round-earth equations of motion that incorporate the shape of the earth, its rotation, and the variation of gravity.
For the equations of motion and the wind and turbulence model, the engineers adapted predefined blocks in Aerospace Blockset.
The team also used Aerospace Blockset to perform coordinate transformation, converting Euler angles to directional cosine matrices. With Control System Toolbox™ they calculated eigenvalues, natural frequencies, and damping factors. Model referencing in Simulink enabled multiple teams to develop individual components independently and organize them hierarchically into a complete system.
After validating the aircraft dynamics model against flight test data, the team used Simulink Coder to automatically generate C code, which they compiled to create a real-time simulation of the aircraft. A separate Gulfstream team developed the flight-control system model in Simulink. The two models, which communicated via shared memory, were then simulated together.
The simulation ran in interpreted mode, enabling Gulfstream engineers to analyze and debug the model as it ran by placing scopes on signals, introducing faults, and evaluating new algorithms.
Using a standard block from Aerospace Blockset, they connected the Simulink model to FlightGear flight simulation software to display window views based on aircraft state data.
The team used MATLAB® to postprocess simulation results and to create a user interface for changing flight conditions, selecting an airport, and inducing failure modes during simulation.
Gulfstream continues to employ the simulation lab for a variety of aircraft. "Because of the flexibility of Simulink, we can use the lab for a wide range of purposes," says Saeed. "It is highly modular and reconfigurable, so we can easily shift between different aircraft models, or evaluate different components."