Model-based design test tools hasten development
Greg Reed, Contributing Editor -- Test & Measurement World, 6/11/2007 8:26:00 AM
Testing powertrain technologies for automotive and aerospace applications obviously requires specialized test tools, but general tools that offer simple customization can also be employed in these applications. One such tool is model-based design software, which enables engineers to simulate and "test" a product before sending it to production.To get a better understanding of model-based design and to learn more about the testing of powertrain technologies, I interviewed Paul Smith, senior manager of North American consulting services at The MathWorks.
Q: What common tools can engineers use to test powertrain technologies?
A: I think it is important to define what we mean by "test," since that term encompasses any activity that verifies that a design produces an expected result. Testing can be done in simulation, in the laboratory, or in the field (real world).
Testing is an integral part of the design process, and model-based design makes finding and correcting errors early in the design process much easier. Engineers develop designs with a combination of upfront mathematical analysis and experimentation.
Engineering management has historically discouraged experimentation because it was hardware-based and expensive. Model-based design creates a safe haven for rapidly trying out, evaluating, and comparing competing design ideas through simulation. This allows users to "get it right" before building expensive prototypes. Engineering managers working with model-based design encourage experimentation because it is simulation-based and relatively inexpensive.
Q: How does model-based design help engineers?
A: First, model-based design software includes tools that allow the engineer to build mathematical models of the systems under test. The integration of tools for controls and physical systems in one environment provides a very powerful tool suite for design, analysis, and testing of complex systems.
Model-based design also helps engineers fully test the system in simulation, which will save time later. They can validate requirements and perform early verification of their designs based on test scenarios they develop to demonstrate that the design requirements are met. Tools that support full parameter sweeps, or Monte Carlo testing, work best.
Engineers can also repeat the tests run in simulation in the lab. Tools should facilitate hardware connectivity and the measurement of physical quantities for testing in a laboratory environment. Tools must provide connectivity to different types of devices, sensors, and hardware boards for acquiring the data an engineer needs.
Model-based design tools can also run tests in real time, using hardware-in-the-loop (HIL) prior to testing in the field, and they help engineers analyze and visualize the data that has been acquired to distill and derive meaning from the results.
Q: How do automotive and aerospace test needs differ?
A: It is obvious that before the first flight of a new airplane, the aerospace engineers must have logged a lot of time testing their designs and the hardware realization in simulators. Every nook and cranny of the design must be checked and double checked. This places a burden on the aerospace engineers in the amount of testing that must be done to ensure safe operation that can be certified to the required standards.
Automotive engineers do very similar kinds of testing and have similar tooling requirements to support this testing, but the volume of testing required may be less. At the end of the day, the processes used to develop automobiles, trains, airplanes or consumer electronics place very similar demands on the tooling suppliers.
Historically, there has been additional and very stringent levels of testing required by the aerospace industry, but with the advent of x-by-wire technologies and safety systems that interact with or constrain the operation of the powertrain systems, there is a convergence in the work processes between the two.
Q: How do manufacturers use simulation software for testing powertrain components?
A: Simulation is used to test production electronic control units (ECUs) and to test prototype control or diagnostic algorithms. The former is referred to in most literature as HIL testing. The latter is commonly referred to as rapid prototyping (RP).
It is common for powertrain engineers to develop control and onboard diagnostics algorithms in parallel with the physical powertrain components. The software realization of those algorithms takes a long time and must be started very early in the design cycle so both the hardware and software arrive at the end of the assembly line functioning properly. To perform verification of the algorithms prior to having production hardware, HIL testing is employed. This kind of testing requires models of the physical components to a level of fidelity sufficient to test the various execution paths within the software.
Simulation of the algorithms, using real (production or prototype) powertrain components and an RP tool allows the control design engineer to build and test models of their algorithms. They first test the algorithms on their desktop computer under simulation. Once everything is validated against the performance specifications, they automatically generate prototyping code that can be run on a PC with special input/output devices or an ECU and connected to the powertrain hardware components.
When model-based design was first being contemplated by the powertrain development research organizations, the ECUs used in production were anemic 8-bit microprocessors with extremely constrained memory programmed in assembly code. Many had custom-built support tools like the assembler (assemble code equivalent of a compiler).
RP in those days required an assembly-language programmer to make a special build of the production code to install bypass "hooks" to allow the external RP computer running the new control algorithm to inject a signal into the ECU. This was an effective, but fragile way to test new algorithms.
Many of the ECUs (or "targets") used to control modern powertrains are powerful machines with commercial-off-the-shelf (COTS) high-level language support and plenty of memory. The intermediate step of RP on specialized hardware (and the associated costs and learning curve) is being bypassed in favor of testing and development directly on the production hardware, using the production tools and processes familiar to the control developer.
Q: Does HIL replace the need for road testing?
A: Would you drive in a car that had never been tested on the road? Probably not. HIL and other simulation-based testing merely enable engineers to experiment more rapidly and more thoroughly before heading to the track or the road. Simulation also allows testing in conditions that would be destructive or cost-prohibitive to run on the road.
For example, if a roll-stability control system does not work correctly the first time it is tested in the field, costly vehicle prototypes could be damaged or destroyed. A thorough set of simulation and HIL-based test scenarios reduces these risks. Another example where HIL testing can prevent expensive destructive testing is in air-bag deployment. High-speed HIL-based verification of the ECUs responsible for air-bag deployment can fully test the ECU hardware and software prior to crash testing.
The cost to fix a design flaw is far cheaper if found in simulation early in the design process than if the flaw is only discovered after selling the vehicle to a customer and a recall is needed to make repairs or "reflash" the ECU memory. Of course, the mature model-based engineering organization knows the ultimate plant model is the plant itself. They thoroughly leverage the simulation tools to get it right the first time and then they do a thorough verification in the lab or on the track and the road once all the physical components are available.
Q: Do you have tips for integrating several automotive subsystems, such as ECUs, into a single HIL test setup?
A: When integrating several subsystems, it is important to have a thorough understanding of the requirements of each system and component. It is important to have constructed test scenarios for each of these requirements up front in the design and have validated the simulation models against these test scenarios.
The power of model-based engineering comes when these same test scenarios can be used for component and subsystem level validation testing after the production components and software are built. It is also important to make continuous testing and validation a part of the design process. Build something, test it. Integrate it with a larger system, and test it again. This way, defects in the interface between components or subsystems are discovered as early as possible.
Q: Are there special challenges for gathering and analyzing test data and images for automotive applications?
A: The automotive industry has developed some incredible expertise in measuring what goes on inside the internal combustion engine. Everything from temperature sensors embedded in cylinder walls, pressure sensors in spark-plug washers, wireless transmitters hidden away in rotating equipment--the ingenuity of the auto engineer is legendary.
New automotive systems using radar, lasers, wireless communications, and vision systems are providing new design challenges to the automotive industry. Fortunately, many of these challenges have already been addressed by the aerospace and defense industrie,s and the automotive industry is rapidly applying lessons learned from these industries to its applications.
Q: How will test technologies keep pace with powertrain requirements and continue to justify test cost?
A: Model-based design supports continuous test and verification, which enables finding errors early in the design process, when they are cheapest and fastest to fix. Testing in simulation also reduces the dependence on expensive prototype hardware.
The level of sophistication to which mathematical models can simulate and predict real-world performance is ever increasing. These simulation models and associated support tools for data acquisition, analysis, instrumentation control, HIL, and RP provide a real return on investment when compared with the alternative design approach--build and fix. When faced with the demands of improved performance and faster time to market with fewer people, advanced mathematical tools are the best solution.

















