“If I had to rely on someone else to code the controller after I designed it, I would always wonder if problems were introduced during the implementation. With MathWorks tools, I know that if the helicopter is working on my laptop, then the real-time implementation will work, too.”
Marco La Civita, Flying-Cam
With movie credits for the James Bond, Harry Potter, and Mission Impossible film series, and an Academy Award for technical achievement, Flying-Cam has an established reputation for delivering reliable, precision aerial filming. The company’s mini-helicopters, which weigh 30 lbs and carry a movie camera with a top air speed of 75 mph, enable directors to shoot from virtually any position, including close-ups and sweeping aerial views.
Piloting helicopters is a complex skill requiring hundreds of training hours. Flying mini-helicopters by remote control on complex movie shots requires even more specialized expertise. Using MathWorks tools for Model-Based Design, Flying-Cam has developed an advanced autopilot control system that simplifies remote helicopter control and enables better image stability.
"We developed a sophisticated autopilot control system with MathWorks tools that enables novices to perform basic flight with only minutes of training and allows our skilled pilots to perform extremely difficult maneuvers," explains Dr. Marco La Civita, developer and director of technology innovation at Flying-Cam.
Developing an advanced helicopter autopilot system would enable pilots to conduct more complicated film shoots and allow directors to perform identical takes in which the helicopter automatically retraces its path. The system would also open new business opportunities for Flying-Cam by enabling less-experienced users to pilot helicopters for search and rescue, surveillance, law enforcement, and aerial mapping.
To achieve these goals, the company would need to address several technical challenges, such as developing a sophisticated control system that incorporated pilot control input with sensor input to deliver image stability and precise tracking while adjusting for wind effects. Because they also had limited in-house experience in real-time software implementation, Flying-Cam would require modeling and automatic code-generation tools.
Working on his own with MathWorks tools, La Civita completed all stages of the engineering effort for the autopilot control system, including modeling, simulation, automatic code generation, and hardware-in-the-loop testing.
Using a modeling technique developed in his Ph.D. thesis, La Civita created a nonlinear model of the helicopter by combining first principles of physics with system identification data obtained during flight tests. He then imported the model into MATLAB and Simulink for control system synthesis and analysis.
The control system receives input from the pilot to control thrust, pitch, roll, and yaw as well as input from an onboard inertial navigation/GPS system. Working from specifications for the control system and the linear models extracted from the nonlinear model, La Civita used the Robust Control Toolbox and the Control System Toolbox to design the controller by applying loop shaping and robust stabilization.
Using the Optimization Toolbox and genetic algorithms, La Civita determined the proper loop-shaping weights to satisfy the various and conflicting specifications.
La Civita then used Simulink to simulate the controller and the helicopter, introducing factors such as delays and rate and range servo saturation. Simulink scopes enabled him to perform linear analysis and verify step responses, input response, and transfer functions. He then used Simulink Coder™ to automatically generate C code from the controller model for PC/104 embedded hardware.
To verify the model and code, La Civita first used Simulink and the nonlinear model. Later, he used xPC Target to conduct hardware-in-the-loop tests and actual flight tests.
Throughout development, Flying-Cam received expert technical support from The MathWorks as a member of the Software Maintenance Service program. "When I had a question, MathWorks Technical Support, a key component of the MathWorks Software Maintenance Service, always had the knowledge and expertise to help me," says La Civita.
Flying-Cam’s first helicopter equipped with the autonomous controller has passed initial flight tests, and the company is moving the new design into field testing and production. They are integrating the helicopter and camera controls into one unit and a system that will enable the helicopter to be preprogrammed to follow a flight plan without pilot assistance.
Flying-Cam is exploring applications in other industries made possible by the advanced autopilot controller.
To develop an autonomous helicopter control to support aerial camera shots in the film industry
Use MathWorks tools to model a complete control system, generate code, and run hardware-in-the-loop simulations