Aerial robotics researchers are using drones to develop ground-breaking flight control algorithms and novel solutions to problems in many fields, including emergency response, home healthcare, and precision agriculture. However, projects are often slowed down by the time researchers must spend implementing basic capabilities such as sensor data processing, orientation and altitude calculation, and in-flight navigation.
We developed the IntelinAir RD-100 hexacopter to address this issue. The RD-100 is a ready-to-fly drone with prebuilt autopilot flight software developed in Simulink® (Figure 1). Capable of maintaining stability in flight as well as automating take-offs, landings, and waypoint navigation, the flight software can be customized to meet specific research goals.
By using Model-Based Design with the RD-100 development environment, research teams can rapidly prototype, simulate, and deploy control software and jumpstart new drone research programs. They have full access to the Simulink models and can add features, implement cooperative flight algorithms and other advanced applications, and verify their designs and algorithms in hardware-in-the-loop (HIL) simulations. Researchers can move from simulation directly to actual flight tests, and it is this capability that sets the RD-100 apart from other drones in its class.
Developing RD-100 Flight Software with Model-Based Design
The RD-100 is designed to simplify flight software development. Model-Based Design is a natural fit for our development approach because it makes it easy for researchers to use the models we provide to run simulations, run HIL tests, and generate flight code. We could have written the code by hand, but we believe that Model-Based Design is not only the fastest way to develop flight software, it is also preferred by members of the academic research community, who are already comfortable using MATLAB® and Simulink.
IntelinAir engineered the ground station used to communicate with the drone, the hexacopter hardware, and the flight software. One group developed a six-degrees-of-freedom (6 DOF) Simulink model of the drone, incorporating the airframe, motors, and electronic speed controls. This model has blocks for the drone’s mass properties, propulsion (thrust), aerodynamics, equations of motion, and sensors, including the accelerometer, gyroscope, magnetometer, barometer, and GPS receiver.
Another group modeled the flight control system. This model, developed with Simulink and Control System Toolbox™, includes a navigation block that uses sensor input to calculate the drone’s velocity, orientation, and position. It also includes a guidance block for autonomous flight modes as well as a motor control block that generates commands based on input from the navigation block and the operator interface. To simplify the design and facilitate reuse, the flight software group organized the models hierarchically using Simulink model referencing and created a custom Simulink library of components frequently used in the design (Figure 2).
A major challenge in drone control design is dealing with changes in system dynamics caused by high winds and changing payloads. RD-100 addresses this challenge with L1 adaptive control, an advanced technique developed by IntelinAir co-founder Dr. Naira Hovakimyan at the University of Illinois at Urbana-Champaign. By decoupling the adaptation loop from the control loop, L1 adaptive control enables the RD-100 to rapidly compensate for undesirable effects. This allows for stable, precise flight in even the most challenging conditions and is critical to accurate data collection.
From Desktop Simulation to HIL and Flight Testing
When using the RD-100 software, researchers follow an iterative process of control design, software simulation, HIL simulation, and flight tests (Figure 3).
This process starts with closed-loop software simulations in Simulink. These produce plots of the performance of the aircraft during simulation (Figure 4).
After verifying the basic functionality of the control algorithms on the desktop, the researcher can test the algorithms on hardware in HIL simulations without leaving the desktop. C code is generated from the controller model using Embedded Coder® and deployed to the RD-100 autopilot hardware. C code from the 6 DOF vehicle model, generated using Simulink Coder™, is deployed to target hardware running Simulink Real-Time™. During HIL simulations, the flight software running on the drone autopilot processor receives sensor input generated by the vehicle model running in Simulink Real-Time. Telemetry data captured during the simulations is logged and analyzed offline in MATLAB for verification and validation. One of the many benefits of HIL testing is that we catch bugs due to incompatibilities with hardware prior to actual flight.
Following HIL tests, the autopilot hardware running the flight control software can simply be unplugged from the HIL test setup on the desktop and plugged into the RD-100 air frame for real-world flight tests. During flight tests, the flight software receives input directly from the onboard sensors and sends commands directly to the motors.
Advantages of Model-Based Design
One of the principal advantages of Model-Based Design is that it enables small teams to tackle projects that typically require a much larger group to complete. That holds true for our development team at IntelinAir and for the numerous academic groups already using the RD-100 in their research (see sidebar). Because no coding expertise is required, controls engineers and researchers can test novel control ideas without involving an embedded software engineer. New algorithms can be tested and debugged on the desktop and in real time. As a result, the engineer can be certain that the small unmanned aircraft system will work.
Example Research Project: Precision Agriculture
IntelinAir and Dr. Wang are partnering to push the envelope in remote sensing for precision agriculture. The impetus for Dr. Wang’s research is the idea that drones will one day be as ubiquitous and commonplace as smartphones.
Today, thanks to the Internet of Things, we have access to vast amounts of useful data. We train computer programs to make decisions based on this data, but we still rely on humans to act on those decisions—for example, in agriculture we often rely on human crop advisors to scout fields where they can only cover a small percentage of the total acreage. Aerial robots will automate this final step, completing a feedback loop that will include Internet-connected devices, decision-making software, and autonomous drones.
The most promising applications for drone technology exist in industries where vast geographies, redundant tasks, and complicated data analysis obstruct efficiency. One such industry is agriculture, where drone technologies offer significant opportunities to improve efficiency and productivity.
Dr. Wang’s team is working with IntelinAir to explore agricultural applications of drones equipped with miniature soil moisture sensors and high-resolution multispectral cameras. Though not widely used in agriculture today, this technology has the potential to increase productivity and lower the costs associated with labor, nutrients, and irrigation. New sensor technology offers highly accurate measurements for humidity and nutrients. This data can be used to detect yield-robbing anomalies in the field in the middle of the growing season, when there’s still time to intervene.
Once data is captured, it is synthesized by a well-trained convolutional neural network using IntelinAir’s proprietary algorithms and transmitted to the farmer, who then has a detailed overview of crop health to guide decision-making.
This research will encompass farms in Illinois, California, and South Carolina, with the ultimate goal of developing a sensor-equipped unmanned aircraft system that is affordable and convenient for farmers.
Dr. Wang’s team of three Ph.D. students, one master’s student, and three undergraduates develops flight software using Model-Based Design and the RD-100 drone. In the past, when the team used other drones, students had to write C or C++ manually. With the Simulink control models provided with the RD-100, students don’t waste time programming or debugging C code. Instead, they can implement their designs and ideas by simply modifying the models. They can run simulations and HIL tests on the desktop to verify the designs, and then move directly to flight tests on the RD-100.