0% found this document useful (0 votes)
160 views4 pages

7B99659

The document discusses a hardware-in-the-loop (HIL) evaluation of vehicle components using LabVIEW Real-Time and CarSim/TruckSim software. The application evaluates an anti-lock braking system (ABS) electronic control unit (ECU) by interfacing it with simulated vehicle dynamics and brake models. CarSim is used to simulate the vehicle dynamics while LabVIEW implements the brake actuator model. Signals are passed between the ABS ECU, simulations, and data is logged to evaluate the ABS controller's performance.

Uploaded by

TYu4443
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
160 views4 pages

7B99659

The document discusses a hardware-in-the-loop (HIL) evaluation of vehicle components using LabVIEW Real-Time and CarSim/TruckSim software. The application evaluates an anti-lock braking system (ABS) electronic control unit (ECU) by interfacing it with simulated vehicle dynamics and brake models. CarSim is used to simulate the vehicle dynamics while LabVIEW implements the brake actuator model. Signals are passed between the ABS ECU, simulations, and data is logged to evaluate the ABS controller's performance.

Uploaded by

TYu4443
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

HIL (Hardware-in-the-Loop) Evaluation of Vehicle Components with LabVIEW Real-Time and CarSim/TruckSim

Publish Date: Jul 01, 2008

Overview
Hardware-in-the-Loop (HIL) applications are used by design and test engineers to evaluate and validate vehicle components during development of new systems, assemblies and vehicles. Rather than testing these components in complete system setups, HIL allows the testing of new components and prototypes while communicating with software models that simulate the rest of the vehicle and system. Replacing the rest of the vehicle with computers running software simulations greatly reduces the size and complexity of applications and increases the flexibility and rate of running many different tests and test scenarios. The physical components being tested respond to the simulated signals as though they were operating in a real vehicle as they cannot distinguish between the signals sent by other physical components and signals provided by software models running on a computer. In many cases new components that are being developed are modeled in software first. The designer will run simulations of the new component in conjunction with models of the rest of the vehicle to study the behavior of the overall system and to optimize the algorithms and routines used in a new component before building any prototypes. This type of application is commonly referred to as a co-simulation, as all parts of the system are being simulated in software. The resulting prototypes are then validated in a HIL application that includes the effects of the hardware-vehicle interaction (sampling, time lags, etc.). Additionally, HIL systems are commonly used for fault tolerant studies (shorted or open signals, etc.) and reliability (endurance) tests of new components. For the application described in this article we are using National Instruments LabVIEW and Mechanical Simulation Corporation CarSim to develop a HIL application to evaluate the performance of an ABS electronic control unit (ECU). This application is typical of systems to test a wide range of ECUs used through out cars, airplanes, trains and other forms of transportation. CarSim is used in the application to run the vehicle dynamics models to provide the vehicle response to the ABS control unit.

Table of Contents
1. Application Architecture 2. CarSim and TruckSim 3. CarSim Math Model 4. LabVIEW Real-Time 5. Integrating the CarSim Engine with LabVIEW Real-Time 6. Application Results

1. Application Architecture
This application evaluates the performance of the ABS ECU by interfacing the ECU to software models of the vehicle and brake actuator and running the system through a variety of brake scenarios. The performance of the ABS controller, as well as the software model, is monitored by logging and plotting the system variables passed between the different components. The system parameters include the solenoid outputs of the ABS controller, the force and torques from the brake actuator, the vehicle motions, and dynamics of the vehicle model.

Figure 1: Application architecture showing the logical flow between the system components

The brake actuator model and vehicle dynamics are running in software on a PXI controller. The application framework of the software running on the PXI system is developed using LabVIEW and the LabVIEW Real-Time module. The brake actuator model is also implemented in LabVIEW code, while the vehicle dynamics are modeled and running in the CarSim software, which is integrated into the LabVIEW application. The communication and signal interface between the PXI system and the physical ECU controller is implemented using National Instruments measurement hardware, specifically the PXI-7831R reconfigurable I/O (RIO) card. The RIO hardware with its onboard FPGA can be configured to use a wide range of signal and communication interfaces such as PCM, PWM, and frequency signals commonly used with ECUs. The RIO card is configured using LabVIEW and the LabVIEW FPGA module. Based on the vehicle dynamics information from CarSim, the ECU generates the brake solenoid signals (rise, hold, or fall) which are passed back to the brake actuator model. The actuator model calculates the brake pressure and brake torques to feed to the CarSim vehicle dynamics to close the loop. These processes are performed in real-time in the LabVIEW application framework, which controls the sequence and synchronization of the individual components. The arrangement of the software and hardware components is shown in the following diagram.

1/4

www.ni.com

Figure 2: Signal routing between ABS ECU and software models on the computer

2. CarSim and TruckSim


CarSim and TruckSim from Mechanical Simulation Corporation are setting the standard for system level models for vehicle dynamics simulations for both hardware-in-the-loop and co-simulation applications on real-time PC platforms. They are used for simulating and analyzing the dynamic behavior of cars, light trucks, and sport utility vehicles, both with and without trailers, responding to driver controls on 3D road surfaces. As such they are employed both in rapid-prototyping, as well as, validation and verification of automotive controllers. As the name implies, TruckSim is a specialized version of CarSim used to model the dynamics of trucks, buses, and articulated vehicles. CarSim is built on decades of research in characterizing vehicles and reproducing their behavior with mathematical models and has been validated numerous times with real world results. It is easy to use because all aspects of the application environment have a point-and-click graphical user interface. Within CarSim the vehicle and its properties are defined by an extensive set of parameters and tables used in the systems-level model. On current real-time PC hardware the simulation runs faster than real-time allowing for savings in time during off-line simulations. CarSim consists of a central modeling engine that performs all of the mathematical processing of the vehicle dynamics, properties, input and output parameters. Around the core components an application environment is used to interact with the math model in a stand-alone application. The application environment is used to configure new vehicles and modeling sequences. It is also used to execute and analyze individual modeling runs. The environment includes a large number of database editors, configurators, and visualization tools to simplify working with the vehicle dynamics models. The CarSim modeling engine can also be used by itself to integrate its simulation capabilities with other software, such as the LabVIEW application described here. In this configuration only the simulation and modeling functionality is exported and integrated with the user interface and application environment of a different software package. All vehicle properties are supplied to the model in a set of configuration files, while the model dynamic inputs and outputs are exchanged with the host application.

3. CarSim Math Model


The following figure shows one of the models (four wheel independent suspension) used within CarSim to calculate the dynamic behavior of a vehicle. The figure shows the different bodies and forces, which are used to track the motion of the individual vehicle components and the overall frame. Individual forces such as brake pressure, acceleration, and friction with the road surface, tracked and calculated for each wheel individually, determine the overall behavior of the vehicle. In all several hundred parameters and tables are used to configure the static vehicle, while any of 139 input parameters are used to specify the dynamic influence on the model. Any of 474 output parameters can be exported from the model to pass to other components, to monitor or to display in real-time. Based on these parameters the CarSim application environment includes real-time animation to visualize the vehicle.

Figure 3: Body and force diagram of the mathematical model used in CarSim for vehicle dynamics simulation

CarSim includes models of all vehicle component forces (ABS, suspension, steering, driveline, and aerodynamics) and all of them can easily be modified or replaced by the user. For the ABS brake application, the software ABS model in CarSim is replaced with the external ABS ECU and a separate model of the brake actuator implemented in LabVIEW.

4. LabVIEW Real-Time

2/4

www.ni.com

LabVIEW and the LabVIEW Real-Time module provide an ideal platform for HIL test and evaluation applications with its deterministic run-time environment and graphical application development tools. The LabVIEW graphical programming environment is used to build highly customized and flexible applications or application frameworks for a wide range of prototyping, validation, and test applications, and the Real-Time module enables these applications to run deterministically in a real-time environment on high performance PXI controllers. Integration on the PXI platform with a wide range of I/O options including data acquisition and CAN provide all the necessary communication and data interfaces required by a variety of applications. Additional communication and data acquisition interfaces can be developed using the National Instruments reconfigurable I/O (RIO) hardware and the LabVIEW FPGA module. This tool enables you to configure your own hardware for your application, implementing custom timing and triggering routines, communication protocols, and closed-loop control routines. For the ABS brake application we developed the application framework in LabVIEW and integrated the CarSim modeling engine to provide the vehicle dynamics to the application. The figure below shows the top-level application diagram. The main portion of the application consists of a loop that runs through the three components of our HIL application; the interface to the external ABS controller, the brake actuator implemented in LabVIEW, and the vehicle dynamics in CarSim (CS Step.vi). Each of these components is called by one the three VIs (functions blocks) in the main loop of the diagram. Dynamic parameters are returned from each of these components and passed to the next component. Before the main application loop is started, the CarSim modeling engine is initialized and the static properties of the simulated vehicle are loaded (CS Init.vi).

Figure 4: Main LabVIEW diagram of the ABS brake evaluation application

5. Integrating the CarSim Engine with LabVIEW Real-Time


In the ABS ECU evaluation application, the CarSim vehicle model is integrated with LabVIEW Real-Time by compiling the CarSim engine into a DLL and calling it from the LabVIEW diagram using the Call Library Node. The configuration of the CarSim model is stored in a set of configuration files, which are loaded by the CarSim engine when the application is initialized. To compile the CarSim engine into a DLL, the core of the engine, contained in a pre-compiled object file, is accessed from a thin C wrapper that is developed in Visual C++ and compiled into a generic DLL. This thin wrapper handles the passing of dynamic data to and from the engine and provides the interface to LabVIEW. It can also be used to handle any application specific tasks on the dynamic data if necessary such as formatting, unit conversion, etc. This wrapper also determines which parameters are exported from the simulation engine and passed to the engine. For our application the interface to CarSim consists of three simple functions; Init, Step, and Terminate. The Step function (CS Step.vi) passes the input parameters to the engine, commands the engine to proceed with the next time step in the simulation, and then returns the output parameters. It passes both sets of parameters as LabVIEW clusters (analogous to a C structure) into and out of the function.

6. Application Results
The purpose of this application is to simulate a wide variety of braking maneuvers of a vehicle using the ABS ECU being evaluated to activate the brakes. By running through these different scenarios, varying such parameters as the starting velocity, amount of pressure applied to the brake pedal, and road surface coefficient of friction, the behavior of the ABS system can be characterized. This will verify both the theoretical model used to build the ABS ECU and the implementation of the model in the ECU. The results of the application are time plots of the vehicle kinematics, wheel velocities, and brake pressures. With the graphical user interface it is easy to run, visualize and quickly evaluate different braking maneuvers. This data is also logged and can be stored for more detailed evaluation and documentation. The following graph from the application shows a typical plot of the vehicle and wheel speeds during a straight-line braking maneuver in a split-mu scenario (variable coefficients of road friction between the left and right side). The second graph shows the corresponding brake pressures applied to each of the wheels by the ABS/brake actuator. Notice the typical spikes in the brake pressure as the ABS engages and releases the brakes to allow steering of the vehicle.

Figure 6: Plots of the vehicle velocities and brake pressures as simulated in the ABS ECU test application Related Links: Shorten Product Development Time by Integrating LabVIEW with your Design Software

3/4

www.ni.com

4/4

www.ni.com

You might also like