“With Model-Based Design we spent most of our time developing and optimizing the system. Almost no time was spent implementing it in C or debugging code. There’s no difference in performance between the Simulink model running on a laptop and production code.”
Karel Viaene, CNH
New Holland’s massive FR9000 series forage harvesters are capable of harvesting corn, grass, and other crops at throughputs of more than 300 tons per hour while cutting the crop in pieces as short as 4mm. In addition to steering and maintaining an optimal speed, harvester operators must direct the crop flow into a trailer and monitor its fill level. The need to focus on driving and filling tasks simultaneously makes a complex job even more difficult.
To address this challenge, CNH developed an automatic trailer filling system that employs a 3D camera to guide the flow of crops into the trailer. Developed using Model-Based Design, the New Holland IntelliFill™ system enables operators to drive the harvester while filling a trailer accurately— even when visibility is limited.
“Model-Based Design was essential on this project, and enabled us to meet a tight deadline,” says Karel Viaene, system engineer in the innovation competence center at CNH. “Simulink enabled us to debug and optimize our algorithms in the harvester’s cab and to generate embedded code that worked the first time.”
Filling system prototypes based on standard video cameras proved ineffective because they could not accurately measure distances, detect different trailer shapes and sizes, or handle environmental conditions such as dust, bright sunlight, and darkness. Although 3D near-infrared cameras improved distance measurements, the need to test and debug under real-world conditions required much of the development work to be done on the harvester. As a result, the ability to rapidly make changes and then retest the design with the actual hardware was critical.
To make the most of limited testing time, the engineering team needed a development environment that supported direct connections to the 3D camera and the harvester’s CAN bus. They could then rapidly implement the verified design on one of the harvester’s embedded processors.
CNH used Model-Based Design to accelerate the development and implementation of the New Holland IntelliFill™ system
The team collected data from the 3D camera mounted on a harvester spout. Using MATLAB® they analyzed these point clouds and evaluated 3D processing techniques.
Candidate algorithms were implemented as components of a Simulink® controller model. The controller receives 3D data from the camera and produces signals to control the lateral movement of the spout, the direction of flow leaving the spout, and the angle of the camera, as well as visual and audible alerts to the driver.
The system’s data processing module was developed using Simulink and DSP System Toolbox™. Computer Vision System Toolbox™ enabled them to annotate the 3D video stream for debugging.
The team used Stateflow® to define controller states, which manage the system’s architecture and direct the control flow from input data to output signals.
After developing a basic plant model in Simulink, they conducted closed-loop simulations of the trailer filling process.
To prepare for in-vehicle testing, the team developed a CAN bus interface for the controller model using Vehicle Network Toolbox™, and an Ethernet interface to the 3D camera using Instrument Control Toolbox™.
During field tests, the Simulink controller model, running on a laptop inside the harvester’s cab, processed 20 images per second from the camera, and dispatched commands via the CAN bus to the machine controllers.
The team fine-tuned the Simulink model in the field to improve and optimize the control algorithm.
Using Embedded Coder®, they generated production C code from the controller model and deployed it to an ARM®9 processor, which runs the harvester’s display panel software.
The New Holland IntelliFill™ system is in production on FR9000 series forage harvesters. CNH is using Model-Based Design to develop new functionality for its agricultural equipment.
Simplify the operation of forage harvesters by automating the process of filling trailers with corn, grass, and other crops
Use Model-Based Design to develop, test, and implement an automated control system that uses 3D camera data to position the filler spout