Customer Stories

Ponsse Cuts Development Time for Harvester Control Software by at Least a Year with Model-Based Design


Reduce development time for a new wood harvester


Use Model-Based Design to model and simulate the control system, build a real-time prototype for hardware testing, and generate production C code


  • Development time reduced by one year or more
  • Coding errors eliminated
  • 80% model reuse achieved

“The ability to generate error-free code from our Simulink models made it possible for our control engineers to focus on algorithm design and our software engineers to focus on programming the firmware layer. The result was faster development, better quality, and lower costs.”

Ponsse’s Scorpion wood harvester.

Ponsse’s Scorpion wood harvester.

The Ponsse Scorpion is an eight-wheeled wood harvester designed to work in rugged forest terrain. The machine’s distinctive frame consists of three segments linked by joints that rotate by as much as 12%. This frame enables the cabin on the center segment to remain level while the wheeled front and rear segments adjust to changes in the terrain. Hydraulic leveling controls keep the center segment stable even on uneven ground.

By developing the harvester’s control software using Model-Based Design with MATLAB® and Simulink®, Ponsse engineers halved their development time and improved code quality.

“Rapid prototyping with Model-Based Design sped up our design process, leading to shorter development times and reduced development costs,” says Juha Inberg, director, technology and R&D at Ponsse. “The embedded code we generated from our Simulink model is quite reliable, and it is free of the programming errors that we used to encounter when we wrote the C code by hand.”


Because the frame structure of the Scorpion was completely different from Ponsse’s other harvester models, the project required new mechanical, electrical, and control systems. With so much new development and so many unknowns, the engineering team wanted to run numerous simulations to verify design choices before committing to an implementation. Further, they wanted to create a real-time prototype and refine it through multiple iterations before deploying it to a production ECU.

On previous projects, Ponsse control engineers developed and debugged algorithms in MATLAB, and software engineers translated the algorithms manually into C. As the complexity of the control algorithms increased from project to project, this approach became difficult to sustain. The risk of introducing human errors into the C code grew, and there was a lengthy interval between the initial design of the algorithm and its verification on hardware. Ponsse wanted to shorten this interval, minimize coding errors, and reduce overall development time.


Ponsse engineers adopted Model-Based Design with MATLAB and Simulink to complete the Scorpion leveling system. They acquired proficiency in the tools with nine days of onsite training conducted by MathWorks engineers. The curriculum covered MATLAB, Simulink, and Stateflow® for system-level design, as well as advanced topics on model architecture, including verification and validation.

Working in Simulink, the engineers developed a control model that processes input from accelerometers and gyroscopes and actuates hydraulic valves to keep the Scorpion’s center frame level. To remove noise from sensor signals, the team used filters designed using Signal Processing Toolbox™ and Control System Toolbox™.

They modeled the Scorpion’s various operating modes with a state machine created in Stateflow.

After verifying the control model’s functionality via open-loop simulations, the engineers built a prototype controller, using Simulink Coder™ and Simulink Real-Time™ to generate a real-time application from their model and deploy it to Speedgoat target computer hardware.

The team used this real-time prototype to conduct tests on the actual Scorpion hardware. Based on the results, they made minor changes to the control model before regenerating and retesting an updated prototype.

They then generated C code from their model for the Scorpion’s ECU (an ARM® Cortex® processor) with Embedded Coder®.

They integrated the generated code with firmware and other low-level interface code for the ECU, and tested it, first in a third-party simulator and later on the actual Scorpion harvester.    

Since their successful completion of the Scorpion project, Ponsse engineers have used Model-Based Design to develop embedded controllers for other harvesters in the Ponsse product line, reusing filters and model components from the Scorpion control design.


  • Development time reduced by one year or more. “Model-Based Design enabled us to complete initial development of the Scorpion controller in one year,” says Inberg. “It would have taken us two years at least to complete the project using our traditional development process.”
  • Coding errors eliminated. “There were no programming errors in the code we generated with Embedded Coder,” Inberg says. “As a result, we could focus all our debugging efforts on the model.”
  • 80% model reuse achieved. “After our first project with Model-Based Design, we started work on a leveling controller for another machine,” Inberg reports. “We were able to reuse about 80% of our design from the Scorpion project, which saved us a substantial amount of time.”