Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Customer Solutions

ITK Engineering Converts Car Suspension Models Developed in the The MathWorks, Inc. Simulink® Software Environment Using the NI LabVIEW Simulation Module

Author(s):

Helmuth Stahl, ITK Engineering

Industry:

Automotive

Product:

LabVIEW, LabVIEW Simulation Module

The Challenge:

Translating models developed in The MathWorks, Inc. Simulink® Software Environment from a car suspension system to the National Instruments LabVIEW Simulation Module.

The Solution:

Using the Simulation Translator and powerful NI LabVIEW visualization capabilities as part of the model-structure conversion process.


image
Car Suspension Schematic

The Need for LabVIEW Integration

Many end-users have built their simulation models within the Simulink simulation environment. However, engineers using LabVIEW for development tasks they created in the past increasingly require paths to integrate models developed in the Simulink environment into their LabVIEW environments. Using the Simulation Translator, engineers can convert such models into the LabVIEW Simulation Module. To explain the relevant steps in more detail, we used a car suspension model as an example of this procedure.

The motion equations for this quarter vehicle have been described by a set of coupled differential equations. For the wheel/tire- and chassis-related forces, linear and nonlinear (cubic) dependencies were taken. Within the next steps, these equations got modeled in the Simulink environment.

The model contains standard Simulink blocks that we arranged at two hierarchy levels. We implemented the differential equations mentioned above inside two chassis element subsystems. We used fixed values for the suspension system characteristic values, such as masses and spring constants. Based on the actual parameterization, the simulation showed the suspension dynamics when the chassis was impacted at the top by a constant force for a user-defined period of time. The simulation results depicted the behavior over time of the chassis and wheel/tire positions and the corresponding vertical velocities. Due to the parameters we chose, damped oscillating transitions occurred right after the start and end of the force impact.

Simulation Model Conversion

We found it beneficial to deactivate the Simulink subsytem library links before starting the conversion process. As a result, all subsystems were directly located in the main model. This avoided potential path and access problems right from the beginning. Then we activated the Simulation Translator, which is integrated in the LabVIEW Simulation Module.

After we pressed the translate button, the system automatically processed the conversion and generated the corresponding LabVIEW model. During the conversion process, the system built a warning list. It provided hints about blocks or subsystems that required some postprocessing. Using the suspension model described above as an example, some typical postprocessing steps resulting from the Simulation Translator Version 1.0 follow:

  1. Subsystem treatment -- In this context, it was possible that scalar and vector signals going into or coming from the subsystem were not correctly dimensioned. LabVIEW detected this inconsistency and provided appropriate notification. As a workaround, we had to manually adapt the dimensions.
  2. Different syntax of some block parameters -- In the model above, we used product blocks to realize the division of two signals (teh Simulink software supports multiplication and division at the same time). The Simulation Translator defaulted all inputs to multiply and provided a warning message. We had to manually perform the appropriate modification.
  3. Simulink integrator blocks -- When using Simulink integrator blocks and setting the lower and upper boundary values to “-inf” or “inf,” respectively, the Simulation Translator provided warnings and preset these values to 0. We also had to manually modify this.

In general, we had to do some postprocessing when the blocks in the Simulation model used specific The MathWorks, Inc. MATLAB® constants, such as “inf” or “auto”. The Simulation Translator generated corresponding warning messages, and we had to check the values inserted by the translator.

LabVIEW Ease of Use

The Simulation Translator offered an easy-to-use method for automatically converting existing simulation models to LabVIEW VIs. However, engineers must account for the postprocessing and verification work, which varied depending on the size and the structure of the Simulink model. Future Simulation Translator versions probably will reduce the postprocessing work.

As part of the model structure conversion process, it was also important that the LabVIEW model produced the same simulation results. Beyond that, using the powerful visualization and hardware access capabilities of LabVIEW, we connected the simulation and real hardware with little additional effort.

MATLAB® and Simulink® are registered trademarks of The MathWorks, Inc.

For more information, contact:

Dr. Helmuth Stahl

CTO

ITK Engineering

Lochhamer Strasse 13

82152 Martinsried / Munich, Germany 

Phone: +49 89 8208 5980

Fax: +49 89 8208 59811

E-mail: helmuth.stahl@itk-engineering.com