How to Get the Best from Model-Based Design

The Importance of Model-Based Design for Interdisciplinary Systems

Interdisciplinary system V-model. Image courtesy of University of Kaiserslautern.

As products become more complex, it is becoming more important that multidisciplinary simulations and systems level testing occur earlier in the design cycle.

Take an automotive HVAC system. Analysis of such a system has to consider heat transfer, fluid dynamics, mechanics and electronic controls. Development teams must ensure these interconnected systems will work before too much of the design is finalized. Otherwise, finding errors late in the development cycle will lead to delayed times to market and expensive redesigns.

Model-based design (MBD) tools, like Altair’s VisSim, employ systems modeling methods engineers can use to integrate and keep track of all of the aforementioned multidisciplinary models and simulations. They allow the system to be continuously optimized for performance, cost, weight and other criteria throughout the development cycle.

“In order to realize model based design, system models need to be created and validated. These models are then used to link requirements to system configuration and component realization,” explained Michael Hoffman, senior vice president for math and systems at Altair. “VisSim supports system modeling in various ways, be it a math based, signal based or physical based approach. In addition, VisSim allows design and optimization of control systems.”

How MBD Works: 1D and 3D Simulations

HVAC system model tree. Image courtesy of Altair.

In the initial stages, your MBD simulations will be little more than conceptual models. Design teams will not have enough data at this time to make them too complex.

This early stage analysis, often little more than basic equations, diagrams and constants, is known as 1D analysis. By their nature, these 1D models are quite abstract.

The purpose of these models is to give the design team direction, flexibility and the ability to quickly assess the design space.

As the design team learns more about its product, it is able to start creating more complex 3D simulations to assess the product. These detailed simulations typically look into subsystems or single parts. They look into the geometry of the parts, provide more quantitative information and take a substantially longer time to compute.

The idea behind MBD is to link these simulations in a model tree, like the one seen above for an automotive HVAC system. The machine interface is at the top of the model tree. This interface connects to the HVAC system and all of its subsystems: the blower, evaporator, heater and controller. On the other side, the tree includes 1D models of the cabin, calculating the thermal and water loads of the system.

Integrating 1D and 3D simulations. Image courtesy of Altair.

“1D simulation models usually possess a higher degree of abstraction and require a small amount of input data (compared to 3D models),” said Hoffmann. “Thus they are ideally suited for system investigation in the concept phase. However, due to the higher degree of abstraction, they may lack some accuracy [that] is required in the detailed design phase; that’s where people use more 3D models. The challenge is how to synchronize these models and how to realize a seamless transition from 1D to 3D.”

How Altair Links your 1D and 3D Simulations

Altair’s MBD solution. Image courtesy of Altair.

Hoffmann explains this is where Altair’s simulation portfolio comes into play. 

Once the design team has started to model various subsystems with 3D simulations, using e.g. AcuSolve for CFD analysis, HyperStudy can drive design of experiments algorithms to create reduced order models suitable for 1D simulations.

This technique ensures that the 1D and 3D simulation models are based on the same data sets.

“It is Altair’s experience in 1D and 3D modeling and running multi-physics simulations [that] makes the combination of 1D and 3D simulations easier,” said Hoffmann.

Additionally, Altair has created a co-simulation environment that replaces 1D simulations with 3D computational fluid dynamics (CFD) models created in AcuSolve. “In the HVAC example, VisSim simulates the HVAC system and AcuSolve the flow behavior of the cabin where the temperature in the cabin is then fed back to the VisSim model,” explained Hoffmann.

These techniques allow for seamless integration between 1D and 3D models and allow the engineer to focus on how to control the system. VisSim can then use this control logic to automatically generate code that is compatible with various microcontrollers.

How to Set Up Your MBD in VisSim

Hoffmann explained that creating your VisSim model is typically done in three parts: plant modeling, control design and simulation, and then implementation and validation.

During the plant modeling stage, engineers build the mathematical model of each system. This model is first simulated using 1D models and can then be updated with 3D models.

Next, the engineer uses the plant model to develop the systems control. Hoffman said, “The control system is designed and simulated together with the plant model to validate the design on a simulation level.  VisSim supports these tasks with its control design toolbox and a rich set of modeling elements for digital control systems.”

This control algorithm, designed in VisSim, is the same control algorithm that will be used by the system’s microprocessor. Traditionally, this control logic is programmed by software engineers. However, Hoffmann noted that “VisSim simplifies this step by automatically turning the block diagram description into executable code and taking into account real-time requirements and possible word size restrictions of the microprocessor.”

This code generation ability allows engineers to quickly update the code in the real world system based on their digital simulations. And since the automatic code generator has been rigorously tested by years of use, the quality of the code doesn’t depend on human error.

Unfortunately, Hoffmann notes that generated code can become a memory hog. This can eventually lead to slower executable code. And since the code is hard to read, it can take a computer engineer some time to work out these kinks.

However, Hoffmann assures users that VisSim code is “as fast as hand-written code, well structured, readable and memory efficient.” Maybe it is worth a test run for your next systems level design. However, it’s still a good idea to have your software engineer review the generated code.

To find out more about VisSim, follow this link.

Altair has sponsored this post. They have no editorial input. All opinions are mine. —Shawn Wasserman.