At the recent Vehicle Dynamics Expo in Stuttgart, I presented an example that demonstrates the speed with which you can perform the complete model-development-to-HIL process for a vehicle stability controller using MapleSim.

Figure 1 Vehicle Stability Simulator Schematic

The process begins with the development of a full-chassis vehicle model in MapleSim. This is a detailed model that includes the geometries for a double-wishbone suspension at the front and semi-trailing arms at the rear, with Fiala models for the tires.

Figure 2 Vehicle Chassis Model in MapleSim

The stability controller, or Electronic Stability Program (ESP), is a predictive model based on a simplified vehicle model (referred to as the “bicycle model” since it only uses one wheel at the front and rear). When activated, the controller estimates what the desired yaw rate should be from the simple model, compares this with the actual yaw rate, and applies a braking force proportional to the difference to the appropriate front tire.

 

Figure 3 Equations for Bicycle Model

The target real-time system is a National Instruments PXI platform running LabVIEW/Real Time that is controlled by a Host PC running LabVIEW. The prototype controller is implemented on a MotoTron controller, connected to the PXI system via a CAN interface.

Once the vehicle model was developed, we could then use the Connectivity Toolbox for MapleSim to automatically convert the model to ANSI C code for implementation in LabVIEW.

Figure 4 Code-Generation template in Maple and Code Block in LabVIEW

The code for the ESP was also added as a code block in LabVIEW. Within LabVIEW, we were then able to assign the vehicle model to run on the PXI system and the ESP code to run on the MotoTron controller.

On the host system, we can control the simulation and observe the results from the model in real time. For the purpose of the demonstration, we can switch the controller off and on and then observe the difference in response to an aggressive steering maneuver by using real-time animations on the host screen.

Figure 5 Response without stability control

 

Figure 6 With stability control

MapleSim produces very concise models by applying the symbolic power of Maple to generate the equations of motion of very complex engineering systems. By simplifying these down to the essential set of equations that represent the behavior of the system, MapleSim produces models that can simulate in a fraction of the time it would take with tools that use purely iterative numeric approaches.

Reference

This demonstration is based on the work of PhD candidate, Tom Uchida in the Motion Research Group at the University of Waterloo, Ontario. Visit http://real.uwaterloo.ca/~morg/index.htm for more information.

Contact Tom Uchida: tkuchida@engmail.uwaterloo.ca

Contact John McPhee, Supervisor and Professor, Systems Design Engineering,
University of Waterloo:
mcphee@real.uwaterloo.ca

Please Wait...