User Stories

TAFE Expedites Development of Embedded Control Software for Agricultural Tractors Using Model-Based Design


Reduce development time for agricultural equipment control software


Use Model-Based Design to develop controller and plant models, verify the control design with SIL and HIL simulations, and generate production C code


  • Project delivery time shortened by more than 50%
  • Multidomain simulation enabled
  • Field testing effort reduced by months

“Model-Based Design is a fundamental requirement for teams that need to take on larger projects of increasing complexity. At TAFE, it reduced the effort required at virtually every stage of the project, including plant modeling, software development, and all phases of testing.”

Suchin Karthik, Tractors and Farm Equipment Limited

Tractor plowing operation using hydraulic controls.

Tractors and Farm Equipment Limited (TAFE) is India’s second-largest tractor manufacturer, designing and building tractors for customers in more than 100 countries. The company’s R&D facility at Chennai has a state-of-the-art center of excellence in farm machinery design and development. To implement new capabilities and enhance the durability, fuel efficiency, safety, and maneuverability of TAFE products, engineers at the facility often work in small, project-focused teams.

These teams use Model-Based Design with MATLAB® and Simulink® to complete much larger and more complex projects than would be possible with a traditional development approach.

“Model-Based Design enabled us to expand the scope of our projects, because we can now handle increased complexity and evolving requirements,” says Suchin Karthik, senior member of the R&D team at TAFE. “At the same time, we’ve reduced the load on individual engineers through automation and the reuse of models and test cases.”


Before adopting Model-Based Design, TAFE engineers used a traditional approach in which embedded control software was handwritten. While this approach worked for small projects, on larger projects involving multiple engineering domains, it proved too slow.

In one case, TAFE engineers estimated that a project to design an embedded control system for an agricultural tractor would overshoot its scheduled completion date by 28%. One cause for the delay was requirements changes that involved extensive modifications to the handwritten code.

TAFE wanted to establish a design and development approach that would enable them to complete the project as quickly as possible and would let small workgroups complete future projects of similar or greater complexity, even when requirements shifted mid-project.

Hardware-in-the-loop test rig.


The TAFE team rewrote the embedded control software using Model-Based Design and reduced model development time by 36%. They also assembled a library of component models and tests for reuse on other projects.

To shorten the time it would take to learn the tools, the team attended sessions on simulation, physical modeling, and code generation led by MathWorks Training Services.

They constructed a Simulink plant model by importing the mechanical design for a three-point hitch assembly from their CAD software using Simscape Multibody™. They added hydraulic components, including pumps, valves, and actuators, from Simscape Fluids™.

Working in Simulink, the team then modeled the MIMO control system, including separate PID control loops for the system’s position and draft sensors, as well as 15 state machines, built with Stateflow®, to represent the system’s operational modes.

The engineers used Simulink Control Design™ to tune the PID control loops and Signal Processing Toolbox™ to design a bandpass filter that isolates a specific frequency band from the signals produced by the draft sensor.

As they developed the control model, the team took steps to enforce modeling standards by regularly verifying that their model complied with MathWorks Automotive Advisory Board (MAAB) modeling guidelines using Simulink Check™. They established requirements traceability using Simulink Requirements™ to link system requirements to the model elements that implemented them.

To verify the functional design, the team ran simulations of the controller and plant models.

In preparation for code generation, they converted their design from floating point to fixed point with Fixed-Point Designer™. They then generated MISRA®-compliant C code from the control model with Embedded Coder®, and implemented the code on a 16-bit Freescale™ microcontroller for software-in-the-loop (SIL) tests.

To automate SIL execution, the engineers created a test suite and test sequences using Simulink Test™.

During the SIL tests, they measured code coverage with Simulink Coverage™. Based on the initial coverage results, they added to and refined the SIL tests to achieve 100% condition, decision, and MC/DC coverage. The team wrapped up the project following a series of successful hardware-in-the-loop (HIL) tests and field tests of the generated code.

TAFE engineers have already replicated their initial accomplishments with Model-Based Design on a second project, in which they used Simscape Driveline™ to model a tractor transmission. The group now uses Simulink Real-Time™ and Speedgoat target hardware for HIL testing on all projects completed with Model-Based Design because this approach supports faster running of their physical models and provides tight integration of hardware and software.


  • Project delivery time shortened by more than 50%. “It was Model-Based Design that enabled us to reduce the project timespan by 56%,” says Karthik. “We were able to automate many tasks, including code generation; reuse test cases; and use a single, integrated environment throughout design and development.”
  • Multidomain simulation enabled. “With Simulink, Simscape Multibody, and Simscape Fluids, we reduced the time needed to develop physical models by 50%,” Karthik says. “The ability to import CAD models of our mechanical design and then integrate hydraulic components to create a multidomain model made it easy for us to derive key metrics, such as the hydraulic pressure required to lift the mechanical setup.”
  • Field testing effort reduced by months. “Model-Based Design eliminated more than 20 weeks of effort in field testing compared with our conventional development approach,” says Karthik. “About 80% of the tests we used to conduct in the field were covered in simulations, enabling us to focus our valuable field testing time on the remaining cases.”