+ Reply to Thread
Results 1 to 5 of 5

Thread: Suspension system modeling as a multi-body system using python

  1. #1

    Suspension system modeling as a multi-body system using python

    Hello all.
    I am Khaled Ghobashy form ASU Racing Team - Cairo - Egypt.
    We have been participating in FSUK since 2012 and I have been an active member since 2015. This year I was a member in the vehicle handling and dynamics team.

    The motive behind this post is to share some of our progress and plans so we could gain some feedback and constructive criticism so we may get a better vision and plan.
    Before diving into the core of the post, I want to emphasize some fundamental aspects that represent the base of my view of engineering – and life – at some point.
    In general, we seek control. We wish we are in control of every aspect of our life, and this is just impossible. So we aim for a more realistic level, which is prediction. This means if we cannot control it, we try to understand it and make it predictable.
    These predictions can only be good if we understand the physical systems well enough in order to model them correctly. This is the core of Engineering Modeling and Simulation. It’s all about understanding the core concepts of your physical system, abstracting these physical parameters using appropriate techniques, using computational power to run different simulations to better understand and predict the behavior of the system. A shallow knowledge about the physical system and the assumptions made in the abstraction process usually leads to a ‘garbage in, garbage out’ process or, worse, a ‘plausible but wrong’ solution.

    Back to the suspension system. Suspension system modeling is a very important task that requires different approaches to cover the different aspects of the system physics.
    This includes treating the suspension as a multi-body system "MBS" consisting of interconnected rigid and/or deformable bodies, each of which may undergo large transnational and rotational displacements.
    Several commercial computer packages, such as MSC.ADAMS/Car, DADS, SIMPACK, etc., provide the tools required for the modeling process of the vehicle as an integrated system that captures the individual effects of the different sub-systems. It allows the user to model each sub-system individually with the ability to run a system-based simulation as well as a full vehicle simulation. These packages are based on the subject of computational dynamics that deals with the kinematics and dynamics of rigid/flexible bodies systems.
    In order to upgrade our mentality from being “standard” users of the tool to an “expert” user who actually knows what he is doing, we - the VHD subsystem - started studying the underlying theories used in Multi-Body Systems software packages such as MSC.ADAMS, which opened our eyes to a totally new world of scientific fields and showed me how shallow my knowledge is. As a strong believer in "learning by doing" I started implementing what I learn using python aiming to create a small python package that can be used to model various suspension systems and produce reliable results.
    The motive behind this is to create a free open-source general MBS python package that can be used by our team - and other teams may be - to encourage deeper understanding of the modeling process and the underlying theories as well as further development of the tool itself.

    What have we done so far?
    A fairly generic code is written following Object Oriented Programming paradigm making use of SciPy which is a Python-based ecosystem of open-source software for mathematics, science, and engineering. The code is divided into four major parts:

    a) Base module defining the fundamental components used in spatial dynamics such as reference frame and vectors as well as spatial operations such as rotations and transformations.
    b) Multi-Body Systems components module which define the components used to build MBS models such as bodies and joints.
    c) Kinematically-Driven Systems Solver module. This module uses the scipy non-linear solver making use of the hybr method that uses a modification of the Powell hybrid method as implemented in MINPACK which is a library of FORTRAN subroutines for the solving of systems of nonlinear equations.
    d) Post-Processing module that provide a suspension specific calculations extracted from the numerical output of the solution such as roll-center height, camber change, motion ratio, etc.
    The package also provides a simple mean to visualize the system motion making use of Jupyter/IPython and Vpython.

    The present features of the package:

    a) The tool can be used either by building any model from scratch using the python scripting language or using predefined models that are easily edited using excel sheets and interfaced using Jupyter on any web-browser.
    b) Providing pre-defined simulation subroutines such as parallel and opposite wheel travel as well as steering simulation.
    c) Providing pre-defined post-processing subroutines producing most common suspension characteristics such as motion ratio, (camber, caster, steer and kingpin-inclination) angles, roll-center height, front-view-swing-arm length and angle, etc.
    d) Easily storing simulation output data in excel files and easily read it back using pandas’ data-frames.
    e) Providing system visualization and animation through Jupyter.


    a) Not fast enough.
    b) Orientation singularities makes the solver unpredictable and fails to converge in case of excessive body rotations even by avoiding the famous Euler-angles and their singularity problems.
    c) Code optimization is badly needed. I suffer a great headache when taking any decision regarding the code organization, what data-type to use, sub-classing an existing class or build a new one, avoiding nested for loops to reduce the computational complexity, etc.

    This is a brief of what I wish to accomplish in the near future:

    a) Migrate the heavy numerical operations into C/C++ using Cython in order to enhance the computational speed.
    b) Introducing System Kinetics and Dynamically driven systems.
    c) Integrating VTK for better visualization.
    d) Introducing simple GUI using Qt or Tkinter or any GUI python tool.
    e) Exploiting efficient numerical techniques to produce faster and more efficient solvers.
    f) Introduction of tire models.
    g) Introduction of flexible bodies.
    h) Introduction of full-vehicle dynamic simulations subroutines.
    i) Incorporate/Build a Design of Experiments (DOE) library to study the vehicle performance aspects and their variation with certain design parameters.
    j) Incorporate/Build a Control Systems library to integrate the study of active systems in the vehicle

    This was a 10 months of parallel studying and working from scratch literally. We did not have any programming skills, nor any knowledge about computational science and engineering and it was a great and rewarding learning process.
    One of our plans is to publish the source code once it is in an acceptable level of reliability so anyone can use it or more importantly help in the development process of the package. I think the Formula Student community would serve as a good supporting community for such ideas and learning opportunities.

    If anyone is interested in any aspect of this post, please share your thoughts or questions. Is it a good idea or it worth nothing, a genuine one or just another not-good enough one.

    The video attached shows an overview of Jupyter interface to a predefined model.
    Also some data-plots samples here

    negative camber : top of the wheel leans inward
    positive toe : toe out
    positive wheel travel : compression/ jounce

    Attached Images
    Last edited by 5aled3li; 08-02-2017 at 03:01 PM.

  2. #2
    Senior Member
    Join Date
    Mar 2008
    Brighton, MI

    Nice !

    What does your software predict for this layout ? Then we can compare ! (Let me know when you have a solution).
    This is a kinematic AND elastic formulation (as in reality). Get these close and you get a gold star !

    Specific outputs:
    Steer by Lateral force (parallel)
    Steer by Aligning moment (parallel and opposed)
    Steer by Roll
    Camber by Steer (parallel)
    Camber by Roll

    Sign tradition is (+) for understeer effect, (-) for oversteer effect. Toe(in) (+), too.

    Symmetric SLA Front Suspension - Spring On Lower Control Arm:
    Parts are:
    upper control arm
    lower control arm
    knuckle / "upright"
    steering rack
    control arm bushings.

    Spring end, bushings and rack housing are mounted to a frame (ground).

    Add more reality with wheel bearings (coning) and rack mount (lateral) spring rate.
    Save a lot of time by reflection or mirroring as it applies to a symmetric assembly.

    Global Location --------------Lateral-------Fore&Aft-------Vertical-----------------
    Wheel Center < 1> 800.00 < 2> 1400.00 < 3> 500.00
    Spindle at KPA < 4> 736.00 < 5> 1400.00 < 6> 500.00
    Spring/Upr/Frame < 7> 575.00 < 8> 1410.00 < 9> 545.00
    Spring/LCA <10> 620.00 <11> 1395.00 <12> 400.00
    U.C.A. Ball <13> 740.00 <14> 1410.00 <15> 650.00
    U.C.A./Bush. Front <16> 480.00 <17> 1300.00 <18> 615.00
    U.C.A./Bush. Rear <19> 480.00 <20> 1520.00 <21> 630.00
    L.C.A. Ball <22> 774.00 <23> 1395.00 <24> 400.00
    L.C.A./Bush. Front <25> 400.00 <26> 1245.00 <27> 390.00
    L.C.A./Bush. Rear <28> 400.00 <29> 1545.00 <30> 410.00
    Steer Arm Ball <31> 780.00 <32> 1555.00 <33> 455.00
    Tie Rod/Rack <34> 440.00 <35> 1575.00 <36> 448.00
    Rack Centerline <37> .00 <38> 1575.00 <39> 448.00

    N/mm N/mm N-mm/radians N-mm/radians
    Elastic Properties---------Axial---------Radial------Torsional---------Coning--
    UCA Bush Rt Front <44> 500.00 <45> 2000.00 <46> 7000.00 <47> 30000.00
    UCA Bush Rt Rear <48> 500.00 <49> 2000.00 <50> 7000.00 <51> 30000.00
    LCA Bush Rt Front <52> 500.00 <53> 2000.00 <54> 7000.00 <55> 30000.00
    LCA Bush Rt Rear <56> 500.00 <57> 2000.00 <58> 7000.00 <59> 30000.00

    mm N/mm
    Ride Spring <60> 310.00 <61> 55.00

    mm to grnd mm mm N/mm Front
    ------------------------CG-Height------Wheelbase-------Tire-SLR------Tire-Rate-- BrakeRat.
    Vehicle Param. <63> 525.00 <64> 3285.00 <65> 305.00 <66> 175.00 <67> .70

    N N Front
    Vehicle Param. <68> 9000.00 <69> 5000.00 <70> .00

    Wheel at Design <71> 500.00

    Travel Range (mm) --------------------------------------------------------------
    Rebound/Design <72> 90.00
    Design/Jounce <73> 90.00
    Rack Left <74> 50.00
    Rack Right <75> 50.00
    Rack Initial <76> .00
    toe adjust <80> .00

  3. #3
    Thank you sir for proposing such a challenge.
    It will take time to give you a reliable solution but I will do eventually isa.

    I want to emphasize that the package is limited for kinematically driven systems for now, so it only accepts motion inputs and cannot deal with force inputs; but it is built with that in mind and this is our next step.
    This means also that the connection between the system bodies should be rigid mechanical joints with specified degrees-of-freedom; therefore I cannot use bushes -for now-.

    I have modeled the system for kinematic analysis and made some abstractions on the given actual model. This is illustrated using a graph where the vertices are the bodies and the edges are the connection type.
    This makes it easier to visualize the kinematic loops and determine redundancy in any loop.

    Actually the model you proposed indicated some unreliable behavior of the solver that I will work on; but I managed to produce some kinematic data from the model.
    Jounce and Rebound


    Note 1: Usually I model the same system in ADAMS/Car in order to verify my data as I am still in an early testing phase; but for time issues I could not do so this time.
    Note 2: The Roll-Center is calculated geometrically assuming the wheel ZY-plane is always parallel to the global ZY-plane - which is not true - . Therefore the values are note the same as ADAMS as it uses the system compliance matrix -which I have no idea what is this yet-.

    And thank you again for the challenge.

  4. #4
    Senior Member
    Join Date
    Mar 2008
    Brighton, MI

    May I have the Envelope, Please....

    The accepted answers for a well documented, K&C verified, displayed, filleted, and dismayed common production front suspension.
    Attached Images

  5. #5
    Senior Member
    Join Date
    Mar 2008
    Brighton, MI

    2nd Verse, same as the First.

    BTW, My preference is for the independent variable to be on a geometric axis, so wheel travel is up and down, etc...

    There are quite a few more suspension parameters that are usually specified as part of a suspension synthesis but this is a good start. Compliance factors are a must to have, otherwise this is just sandbox analysis.

    Let me know when you want to try a rear twist axle !
    Attached Images

+ Reply to Thread

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts