Automatic Motor Control Tests Reduce Costs and Minimize Risk

Author:
Tommy Jacob, MOTEON GmbH

Date
05/20/2024

 PDF
Motor control applications need early-stage testing of motors and electronics to detect and eliminate any bugs, while verifying the proper functionality of the device

Click image to enlarge

Figure 1: Applied Software Measurement: Global Analysis of Productivity and Quality, Casper Jones, 2008

­Quality assurance stands as a pivotal aspect of software and hardware development, especially when it comes to embedded motor control applications. However, testing to ensure automotive quality tends to be labor-intensive and time-consuming, frequently sidelined in practice. As a result, critical errors are often only discovered during system testing or at the end of the development project. This not only poses risks but can also lead to enormous costs for troubleshooting. With the mobile Motor Test Bench (mMTB), MOTEON addresses these challenges and makes life much easier for developers.

The conventional approach to software development for motor control applications heavily relies on manual testing of the software and system. Unfortunately, this method is time-consuming and also prone to human error. It typically takes two engineers up to two weeks to complete one test cycle. And yet, the risk of critical errors remaining undetected remains high as manual tests can only cover a fraction of test cases. It is simply too expensive and time-consuming for companies to carry out these manual tests frequently, especially as products must be brought to market faster and faster these days. The tendency is therefore to perform these tests only when necessary. Consequently, errors are often only discovered late in the development cycle, during system tests and at the end of the development project. Besides escalating project risks, this also significantly inflates costs: the expense of fixing bugs is 40 times higher during system testing and still four times higher during unit testing compared to debugging at the coding stage (Fig. 1).

To support software developers and streamline their workflow, MOTEON has introduced the mobile Motor Test Bench (mMTB) specifically designed for automated software and system testing of motor control applications. This compact test device allows engineers to conduct tests during programming, eliminating the need for manual testing. Furthermore, the integrated TraceBox enables real-time data acquisition and tracing, which improves the accuracy of test results. Its compact design and safety features allow the mMTB to be seamlessly integrated in standard developer setups, thereby cutting development expenses, and minimizing project risks. Thus, it become a major artefact in an efficient continuous integration setup.

Testing During Coding

In contrast to conventional time-consuming manual test methods, MOTEON's mMTB provides a test environment that can be used continuously and effortlessly for the rapid testing of motor control algorithms and signal analysis during the development phase of the project. Its flexible data management ensures and accelerates result-oriented analysis. The controller-internal data is being recorded and time-stamped to process synchronously with high real time capability.

The mMTB also enables efficient parameterization, eliminating the need for tedious trial and error. Additionally, it allows software adaptations to be validated within hours. The final goal is to automate testing and ultimately reduce the testing effort by up to 60 percent. This allows developers to create high-quality software code from the start, mitigating the risk of errors associated with sporadic or late-stage testing. With the test bench, each development branch or change can undergo immediate testing to verify proper functionality. At the same time, developers can stream data from the microcontroller to detect errors as soon as they occur. This approach significantly reduces project risks and time-to-market.

Designed for Everyday Use

To further simplify the work of developers, the mMTB is specially designed with safety mechanisms for everyday use in office environments. For this, the mobile test bench not only meets the required safety standards, but is also designed to be compact and robust, making it suitable for use in any workplace (Fig 2). This also saves costs, as no additional room is required to set up the test bench. As a result, developers can use the mMTB directly at their workstation, providing them with constant feedback on their modifications and improvements. They can therefore keep a close eye on their coding progress and identify and fix bugs immediately.

Click image to enlarge

Figure 2: The mMTB can be safely used in an office environment

 

The test bench can be used to test the device under test (DUT), consisting of the electronics and the motor. For this purpose, the load motor emulates the typical load in the application and its behavior. With its mechanical modules and various load profiles, the mMTB enables the rapid setup and development of customer-specific motor applications for different motor types. Furthermore, the mMTB supports power supply with voltages of up to 60 VDC and currents of up to 50 A. Device under test with a maximum power consumption of 1000 W are supported. In addition, the test bench delivers up to 768 W continuous power for the load motor. The functions of the mMTB are further enhanced by integrating the TraceBox. This enables, for example, time synchronization via EtherCAT as well as the identification and analysis of software errors and system behavior.

Validation of motor control software with TraceBox

The TraceBox (Fig. 3) is a data acquisition and communication tool for the development and validation of motor control software that can be used in conjunction with real target hardware. The device is connected between the customer application and the developer’s computer inside the mMTB and establishes the desired interface via plug-and-play. As a standalone device, the TraceBox can be operated with a user-friendly PC tool, ensuring straightforward handling.

Click image to enlarge

Figure 3: TraceBox simplifies the validation of motor control software

 

The high connectivity with various application protocols and interfaces such as LIN, CAN FD, or EtherCat allows the device to be used standalone as part of an on-desk developer setup or embedded in a test bench environment, including in combination with the mMTB. The public API of the mMTB and the TraceBox is modeled after ASAM XIL, where applicable. XIL is an established standard for automation and calibration tools in the automotive industry. It defines many terms and concepts that are very similar to what is needed for our devices (variables, captures, triggers, stimulation, bus access, …), allowing us to be consistent in the API itself and with industry terms. Automated tests on MOTEON test benches are mainly carried out with ECU TEST. This is a proprietary test automation platform for the automotive market that supports the ASAM XIL standard. Furthermore, MOTEON also supports an open Python interface for the test benches.

 

The TraceBox enables in-depth analysis of the functionality of software adaptations throughout the entire development phase. Thanks to the integrated XMC Link, the DUT can always remain connected without having to be constantly disconnected and reconnected. This simplifies the flashing and debugging of motor control software and significantly reduces working time. In addition, data streaming via SPI/UART is possible, which is optimized for low-cost microcontrollers without an own tracing module. This allows motor control algorithms to be checked by tracking the microcontroller's internal data while the motor is running. All these features make the TraceBox an excellent extension to the mMTB.

Summary

Especially in embedded motor control applications, ensuring the proper functionality of the software and system is imperative. The time-consuming and costly tests are often postponed, leading to various risks. MOTEON's mMTB relieves developers of motor control software from manual testing and helps them to reduce the costs and time required for software and hardware testing. They can test their software throughout the entire development process, allowing bugs to be fixed at an early stage, and ensure the hardware is fully functional.

 

MOTEON

RELATED