5aled3li
08-02-2017, 02:20 PM
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.
Challenges/Drawbacks:
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
1200
1201
1202
1203
negative camber : top of the wheel leans inward
positive toe : toe out
positive wheel travel : compression/ jounce
https://youtu.be/IUaITwfm3cc
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.
Challenges/Drawbacks:
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
1200
1201
1202
1203
negative camber : top of the wheel leans inward
positive toe : toe out
positive wheel travel : compression/ jounce
https://youtu.be/IUaITwfm3cc