Vintecc Develops PLC System for Multi-Axle Harvesting Machine Using Model-Based Design
- 90% of design verified before hardware was available
- Development schedule shortened by months
- New features implemented within days
“Model-Based Design sped development enormously, made it possible to offer additional features with little additional work, and gave us a high level of confidence in the software we delivered. Without modeling and simulation, we might still be struggling to get the system up and running.”Vincent Theunynck, Vintecc
A key client of the Belgian consulting firm Vintecc recently redesigned and built a harvesting machine with a highly customized architecture. With a 780hp engine driving three independent rear axles and two independent wheels on the front axle, the harvester is capable of collecting and hauling 100 tons of produce in a single load.
Vintecc designed and implemented the control system for the entire harvester, including the powertrain, collector, and all other mechanical and hydraulic components, using Simulink® and Model-Based Design.
“With any huge machine, safety and reliability are critical,” says Vincent Theunynck, founder and principal engineer at Vintecc. “By modeling and simulating the control software as well as the powertrain and other core components in Simulink, we could see how it all worked. We verified that the software performed as intended—first in model-in-the-loop simulations, then in hardware-in-the-loop simulations—before testing on the actual machine.”
The previous version of the harvester was smaller and easier to control, requiring only simple electronic controls and no software. The new harvester, with a lot more functionality and a much greater capacity, required a significantly more complex control system. Theunynck needed to accurately model the harvester’s powertrain and hydraulic components to enable simulation-based debugging and verification of the controllers before hardware was available.
Although Theunynck had experience developing controllers in C, he had little previous experience with Structured Text (ST). To help ensure that the overall system would behave as expected, Theunynck wanted to avoid hand-coding the PLCs and debugging the control code on the actual machine. Instead, he wanted to debug and verify his design through simulation and then automatically generate IEC 61131-3 ST source code for the PLC systems.
Vintecc modeled, simulated, and implemented the complete harvester control system using Model-Based Design with MATLAB®, Simulink, and Simscape™.
Theunynck partitioned the overall control system design into three major application programs, each implemented on a separate PLC and communicating with one another over a CAN network.
Vintecc created a model for each controller that included Stateflow® charts to manage execution modes and Simulink elements such as PID Controller blocks to control the harvester’s hydraulic and mechanical systems.
Using Simscape, Vintecc developed plant models that included tire and vehicle body elements; hydraulic pumps, motors, and cylinders; powertrain components; and mechanical linkages.
To verify the traction control, automatic axle alignment, cruise control, auto-reverse, and other functions of his control design, Theunynck ran model-in-the-loop (MIL) simulations of the controller and plant models in Simulink.
After generating CODESYS® compliant ST from the controller models with Simulink PLC Coder™, he compiled the application in the CODESYS environment and deployed his control designs to three PLCs from the IFM EcoMat Mobile product family.
Using Vehicle Network Toolbox™, Theunynck implemented a CAN interface on the plant models, enabling the models to send and receive messages via a CAN bus. He conducted hardware-in-the-loop (HIL) simulations in which the PLC controllers communicated via CAN messages with the Simulink plant models, which he ran in real time with Simulink Desktop Real-Time™.
Throughout development, Theunynck used MATLAB to postprocess and visualize simulation results.
Having verified and validated 90% of the software via simulation, the only remaining step was to test the PLC control system on the actual hardware to ensure correct parameter tuning before the completed system was delivered to the client.
90% of design verified before hardware was available. “These machines are deployed in a very short timeframe, so they have to be extremely reliable,” says Theunynck. “Our rigorous verification and validation process reduced the number of potential errors to an absolute minimum, ensuring that the machine will remain fully operational, with no downtime or disruption of the client’s business.”
Development schedule shortened by months. “Model-Based Design shortened development by two to three months because it enabled us to automatically generate production software and verify functional behavior through simulation,” Theunynck says. “As a result we were able to develop more automatic features than we had initially intended, giving the client a greater return on his software investment.”
New features implemented within days. “Well into the project, the client asked for two new features: cruise control and auto-reverse,” says Theunynck. “With a conventional hand-coding approach, the changes would have taken at least 10 days to implement. With Model-Based Design, I implemented and tested both features in just two days.”