parameterization and real time simulation of an …

103
LAPPEENRANTA UNIVERSITY OF TECHNOLOGY LUT School of Energy Systems LUT Mechanical Engineering PARAMETERIZATION AND REAL TIME SIMULATION OF AN EXCAVATOR Examiners: Professor Aki Mikkola D. Sc. (Tech.) Kimmo Kerkkänen

Upload: others

Post on 16-Apr-2022

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

LAPPEENRANTA UNIVERSITY OF TECHNOLOGY

LUT School of Energy Systems

LUT Mechanical Engineering

PARAMETERIZATION AND REAL TIME SIMULATION OF AN EXCAVATOR

Examiners: Professor Aki Mikkola

D. Sc. (Tech.) Kimmo Kerkkänen

Page 2: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

ABSTRACT

Lappeenranta University of Technology

LUT School of Energy System

LUT Mechanical Engineering

Manouchehr Mohammadi

Master’s thesis

2017

79 pages, 59 figures, 5 tables and 8 appendices

Examiners: Professor Aki Mikkola

D. Sc. (Tech.) Kimmo Kerkkänen

Keywords: Real-time Simulation, Excavator model, SIM platform, Multibody system,

Model parameterization.

This master’s thesis has been done for simulation, Companies working with real-time

simulation concept, and training target in a way that a vehicle, an excavator, is developed by

parameterization method which obtains a new solution to have a simulated model with a

number of customizable parts, values, and bodies. In other meaning, a user can opt her/his

favorite part/body based on her/his aim.

From the beginning of this project MeVEA software selected as the real-time simulation

software in which all cooperative software should be along MeVEA. The project goal was

create a user-friendly way to present a simulation model with ability of being customized. A

customized model prepares an opportunity for Companies in this field to analyze new models

with a significant spent budget reduction in comparison of previous solutions.

Parameterized simulated model, in this project an excavator, can be used to create a desired

model and simulate it, then its results can be analyzable in order to figure out the optimum

options of the simulated model for each mission and function. At first, it was decided to

create only one way to have a customizable model which was creating an excel file as an

interface that the user could select her/his options among all options, then using a python

code as a bridge between the excel file and MeVEA, however, in the following one other

file created as well.

Page 3: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

ACKNOLEDGEMENTS

This thesis has been done at the Laboratory of Machine Design, Department of Mechanical

Engineering at Lappeenranta University of Technology (LUT).

I would like to express my sincere gratitude to my Professor Aki Mikkola for his valuable

guidance, advice and high level of patience. His comprehensive knowledge about the project

in all aspects could help and inspire me to figure out concepts in a best way and overcome

difficulties during this master’s thesis. I had a great opportunity to work with him because

of his permanent presence with extra-ordinary responsibility in every step of this work.

I want to thank my supervisor Kimmo Kerkkänen, as the second supervisor, about the subject

of thesis, appreciable support and constructive feedback which could guide me during my

master’s thesis. I also appreciate help which I had from my colleagues in CoSIM project in

Machine Design Laboratory. Thanks to MeVEA staff cooperation in format of a number of

workshop.

Finally, especial thanks to my dear family who supports me during my life.

Manouchehr Mohammadi

Lappeenranta, June 30, 2017

Page 4: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

4

TABLE OF CONTENT

ABSTRACT

ACKNOWLEDGEMENTS

TABLE OF CONTENT

ABBREVIATION AND SYMBOL LIST

1 INTRODUCTION ..................................................................................................... 10

1.1 SIM Platform – A Glance description ................................................................. 10

1.2 Research Questions .............................................................................................. 12

1.3 Aims and objectives ............................................................................................. 12

1.4 Research Methods ................................................................................................ 13

2 METHODS AND METHODOLOGIES .................................................................. 15

2.1 Literature Review ................................................................................................ 15

2.1.1 Simulation in researches .................................................................................. 15

2.2 Principles of a multibody system and its equations ............................................. 21

2.2.1 Global and local coordinates ............................................................................ 23

2.2.2 Rotational coordinates – Kinematic Constraint Equations .............................. 23

2.2.3 Kinematic Joints Constraints ........................................................................... 24

2.2.4 Equations of Motion ........................................................................................ 26

2.2.5 Integration Methods in Dynamic Analysis ...................................................... 28

2.3 Simulation in practice .......................................................................................... 34

2.3.1 Simulation ........................................................................................................ 34

2.3.2 Simulators ........................................................................................................ 34

2.3.3 Marketing ......................................................................................................... 35

2.3.4 Customizable Model ........................................................................................ 36

2.3.5 Employed Software .......................................................................................... 37

2.3.6 MeVEA ............................................................................................................ 37

Page 5: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

5

2.3.7 CAD Software – SolidWorks .......................................................................... 39

2.3.8 Blender ............................................................................................................. 39

2.3.9 Python and Excel ............................................................................................. 40

2.4 Four-bar Mechanism ............................................................................................ 41

3 CASE STUDY- THE EXCAVATOR ....................................................................... 46

3.1 Principles of Excavator ........................................................................................ 47

3.2 Simulated industrial vehicle ................................................................................. 48

3.3 Editable Parameters ............................................................................................. 48

3.3.1 Bucket and lifting system ................................................................................ 49

3.3.2 Hydraulic circuit system .................................................................................. 51

3.4 Data Selection ...................................................................................................... 54

3.4.1 Assembly files approach .................................................................................. 54

3.4.2 Coding files approach – User interface ............................................................ 57

3.5 Method – A coupler between Excel and MeVEA Modeller ................................ 58

3.6 Model in MeVEA – Working and Dynamic Simulation Interface ...................... 59

3.7 Results .................................................................................................................. 60

3.7.1 Customization for the Bucket – combination and comparison ........................ 60

3.7.2 Customization for the Hydraulic Circuits – Combination and Comparison .... 63

4 ANALYSIS ................................................................................................................. 67

4.1 Analysis for employment of different Buckets .................................................... 67

4.2 Analysis for employment of different hydraulic circuits ..................................... 71

4.3 Future work .......................................................................................................... 75

4.3.1 Using Software and their connections ............................................................. 76

4.3.2 User-friendlier interface - Gamification .......................................................... 76

4.3.3 Further customizations - Analyze section ........................................................ 77

4.3.4 Visualization of models and environments - Environment customization ...... 77

5 CONCLUSION .......................................................................................................... 78

Page 6: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

6

LIST OF REFERENCES .................................................................................................. 80

APPENDIX

Appendix 1: Concept of the global coordinate system.

Appendix 2: Rotational coordinates in spatial MBS.

Appendix 3: The revolute joints among bodies and their equations.

Appendix 4: The equation of motion for a constrained system.

Appendix 5: The equations related to a four-bar mechanism.

Appendix 6: Detailed data of Volvo excavators.

Appendix 7: The python script code for making the model customized.

Appendix 8: Results for the medium and big bucket and medium and big cylinder-piston

Page 7: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

7

SYMBOL AND ABBREVIATION LIST

a - Position vector on a body

A - Rotational transformational matrix

𝐀′- Final rotational matrix

b - Position vector on a body

B - The element of the final rotational transformational matrix

C - Constraint Equations

Cq - Jacobian matrix of the four-bar mechanism

𝐂𝑡 - Velocity matrix of the four-bar mechanism

D - Jacobian matrix

e - Euler parameter

e - Euler vector

E - The element of the final rotational transformational matrix

f - Function

f - Force vector

g - Generalized force

g - Ground acceleration

h - The integration step size

i - Name of a body

𝑖1 - A name of a particle

I - Unit vector

I - Inertia

j - Name of a body

J - Global inertia tensor

l - Length

m - Mass

M - Mass matrix

M1 – Torque applied on a four-bar mechanism

n - Number of coordinates

n1 - Order of a differential equation

𝑛𝑚 - Moments which a body is affected by a force

Page 8: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

8

O - The element of the final rotational transformational matrix

P - Name of a point on a body

𝑃′- Order of the error equation

pi - Euler parameters in a matrix

p - Euler parameter’s matrix

q - A generalized coordinate vector

r - Vector of position

�̇� - Vector of velocity

�̈� - Vector of acceleration

R - Position

S - Function name

s - Position vector from bodies to their connecting joint

𝐬′- Constant Vector

�̇� - Velocity vector from bodies to their connecting joint

t - Time

T - Kinetic energy

𝐯 – Velocity vector

�̇� - Acceleration vector

V - Potential energy

y - Variable to be integrated

ω - Angular velocity

�̇� - Angular acceleration

𝜑 – Angular variable

ξ - The body-fixed vectors

Φ - Function for kinematic constraints

�̇� - Constraint of the velocity

�̈� - Constraint function of the acceleration

ɣ - Multiplication of Jacobian matrix and acceleration

𝜆 - Lagrange multipliers

α - Positive constant

β - Positive constant

𝜎 - Angular Variable name in a rotational matrix

𝜑 - Angular Variable name

Page 9: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

9

𝛹 - Angular Variable name in a rotational matrix

θ - Angular Variable name

𝛼′- Angular position for a four-bar mechanism

𝜃′- Angular position for a four-bar mechanism

𝜑′- Angular position for a four-bar mechanism

�̇�′- Angular velocity for a four-bar mechanism

�̇�′- Angular velocity for a four-bar mechanism

�̇�′- Angular velocity for a four-bar mechanism

𝜏 - Torque

ɛ - Truncation error

ɛ𝑔1- Global or total error

ζ - The body-fixed vectors

η - The body-fixed vectors

BEV - Battery electric vehicles

CAD - Computer-aided design

DAE - Differential Algebraic Equations

DES - Discrete event simulation

FEM - Finite Element Method

MBS - Multibody System

MSD - Multibody System Dynamics

LUT - Lappeenranta University of Technology

ODE - Ordinary Differential Equation

RLV - Reusable Launch Vehicles

SD - System Dynamics

SIM - Sustainable product processes through simulation

XML - Extensible Markup Language

3D - Three dimensions

s - Spherical

Page 10: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

10

1 INTRODUCTION

Simulation can be helpful to create or improve many models which are so expensive to

produce them in reality. In fact simulation is a definition of movements and processes of a

body or bodies through the time. In many cases, modifying and changing in a model is not

cost-effective, however a precise simulation model can catch a set of data for parameters and

gives analysis and results in details. These results can clear that is changing/modifying in

any values in the simulation model leads to improvement of its performance or not.

Moreover, simulation has a couple of economic trends. For instance: (Bangsow, 2010, p. 18)

The variation of a product under simulation will increase.

Because of easy-modifying, the demand to upgrade in quality will increase which

consequences high quality based on customers’ requirements.

Customization and high flexibility in a model can be impressive to increase the

demand of bazaar in order to obtain this approach.

Two striking consequences; life cycle time and also man power will decrease

tremendously.

In manufacturing and design methodologies points of view, using simulation in real job have

many benefits such as shorter lead time, decreasing man power, decreasing in production’s

steps and etcetera. With three major phases, in every simulation model, the questions which

arising for the model can be responded; Planning Phase, the first phase, is a phase to make a

plan to find out all the possibilities and potentials of a model. Implementation phase, the

second one, assists to test the performance and problems of the model during simulation.

Also, the future requirements and limitations of a simulated model can be found in this phase.

Finally, the operational phase which collaborates to test for controlling the alternatives of a

model. Moreover, the level of the model’s quality can somehow be traced. (Bangsow, 2010,

p. 18)

1.1 SIM Platform – A Glance description

To implement the simulation model, after modelling, a platform is needed to test the

capability and movements in a real situation. SIM platform is a capability with a number of

Page 11: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

11

powerful simulators at Lappeenranta University of Technology (LUT). The concept of the

SIM Platform is to avoid the outdated and time consuming approaches to obtain the results

and trends to the new and practical ways getting aims.

SIM platform has an approach to have a real-time simulation obtaining energy efficient

solutions and Also it looks to extend a design simulation ‘’from a single machine to entire

production systems’’ which leads to a comprehensive analysis about machines performance

in a machines’ complex (LUT, 2016).

Simulators are tools obtaining information from the simulation models. A simulator consists

of two parts which are working together; the hardware part which gives a realistic feedback

with aim of sound and force feedback simultaneously. The second part is the software parts

which for this thesis is the MeVEA software which is a Finnish-based software in

Lappeenranta city (About Mevea, 2017) . Also, there are some simulators at LUT

(Lappeenranta University of Technology) in the electrical and intelligent machine’s

laboratories (Design Laboratory, 2017). Figure 1.1 depicts simulators which are used for

this dissertation work.

Figure 1.1. Simulators at the Lappeenranta University of Technology.

One of the striking aspect of the simulation is being used in many fields. Some of them are

human-centered simulation process and some of them are free of human (Byrski, 2012). A

Page 12: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

12

simulation is applicable in energy consumption, help to simulate traffic contains BEV

(Battery Electric Vehicles) vehicles and also other kinds of vehicles and roads (Pina, 2013,

p. 13). In addition, the simulation is using in physics and automotive industry to have a great

and new kinds of power transmission for vehicles especially hybrid vehicles (M.Dede, 2014,

pp. 4-21). Game industry uses simulation to increase the quality of its game, graphics and

reality feeling for its users. With using real graphics, many sensors, and feedbacks such as

force feedback, this industry is improving many aspects such as customer’s satisfaction and

its market, as the main goal.

1.2 Research Questions

Research questions frequently appear after encountering with a research problem or issue.

The main problem about this project is: An adjustable customization for a simulation model

always is time consuming and not cost effective. The MeVEA software uses a readable text

file which has all data about a model in it to run a model in its interfaces. There are some

options to have a customizable model such as making some alters in its interface, making

some changes in mentioned readable text file and etcetera. The following questions are the

research questions which come to the mind:

- How can it be possible to get access to all data of the model in a way that it could be

changeable and easy to save?

- What is the suitable method to find out desirable data and select among them and

make a ready model to run?

- Is it possible to have a customized model that a user could select a wide range of

data, instead of only few options, among the sub-assemblies and assemblies and

MeVEA software collects them and makes the model without any concerning about

their adjustment?

- Is the selected configuration made by the user practicable or reasonable?

- Is there any demand to have a wide range of options for model’s parts?

- Which Parameters or parts in the model can be changeable?

1.3 Aims and objectives

In this dissertation work a simulation model in MeVEA software will be developed to be

customizable. At the moment, in simulation point of view, a model has a set of constant

parameters to simulate it and extracts the desirable results and analyzes them. Changing

Page 13: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

13

adjustable parameters for a model with old ways is time-consuming, thus it is extremely

convenient acquiring a way to create a model which have a capability to change its data or

parameters precisely and quickly.

The main objective of this thesis is to make an adjustable simulation model with user’s

selections. In the other words, there is a simulation model in MeVEA software which collects

data from a user and makes a model, in this case an excavator, according to given data. The

point is, data are coming from some assemblies and sub-assemblies and will use to make the

model and all these assemblies must be well-matched to each other that the user could feel

the effects of her/his selections.

For this dissertation work, the alterable attributes for a simulated excavator model are:

Dimensions of the bucket in visual and collision modes and its mass accordingly.

Dimension of the cylinder and piston for the dipper arm.

The amount of the nominal flow rate going into the dipper arm cylinder.

The parameters which a user will select can cause a simulation model with a capability to do

a task fast in comparison of a normal real model, however with high fuel consumption. On

the contrary, it can be a model with less fuel consumption but slower than before. All

graphics for the environment, customizable parts of the model are adjusted with other fixed

parts.

Future aims is to have more customizations parameters and parts of a model, like the

excavator, with a way to analyze them based on some practical parameters. In the other

words, it will be a model and a way to analyze which model is cost-effective, based on fuel

consumption and working hour time, or which one is more reliable based on wearing,

depreciation, maintenance and easy to work. Future aims will be discussed at the end of this

dissertation work in detail.

1.4 Research Methods

Tools which are used in this dissertation work are the MeVEA software as a real-time

simulation to create a simulation model with other software as its assistants. It should be

Page 14: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

14

noticed that during creation, other software such as SolidWorks, Blender, Python and Excel

are involved. Afterwards, the simulation model can be run.

In the design section, MeVEA creates an XML file for data of the model and there are some

ways to edit that file in order to have changing capability of the model, however, creating an

XML code with some assemblies in it, (which will be explained in next chapters), and also

writing a python code and run it with a excel code are the most feasible ways to reach to the

bottom line of this dissertation work.

As the Procedure of this thesis, there is a simulation model which has fixed parts and

parameters, and modifiable ones. With the ways noted in design section, the model will be

editable. Simultaneously, the visualization and collision graphics will adapt with assist of

SolidWorks and Blender software and finally the whole model can be run in the MeVEA

platform. Figure 1.2 demonstrates the story line and procedure of this research.

Figure 1.2. The procedure of building and running a simulation model.

As in figure 1.2 has shown, there is an editable model which collects data from the user side

and has interaction with the graphics part and uses appropriate graphics and creates the ready

model. In this dissertation work there are three options for the bucket and also three options

for the hydraulic circuit system.

Gathering

Data / Editing

Tools

Editable

Model

Graphics

Simulate Concluded

Model

Page 15: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

15

2 METHODS AND METHODOLOGIES

The first part of this chapter is literature review which is about previous researches in real-

time simulation field in order to have a new concept or new idea about customization. Then

principles of a MBS will be discussed. Moreover, simulations and simulators will be under

consideration in being practical point of view. Finally, a four-bar mechanism and its equation

will be explained.

2.1 Literature Review

When a new project and idea comes in mind, it is always logical to have a look and review

to previous researches beforehand to see what researches have already done and what are

their approach to solve a problem. With a literature review previous researches’ results,

analysis can be found and it is possible to have a comparison among them and figure out

their overlapping at work, their idea about the project and title which is under consideration.

Moreover, by a careful literature review it can be possible to find barriers and limitations in

front of previous researches.

In this chapter, previous works in the field of simulation, real-time simulation and earlier

efforts can be discussed, however, because the simulation are very practical in a tremendous

amount of fields, it is rational to have a review in real-time simulation about industrial and

widely-used vehicles, especially in past efforts about parameterization.

2.1.1 Simulation in researches

For the review in previous researches, a practical database have been used which is LUT

FINNA – Wilma. It has covered enormous amount of articles, conferences and books and

has reviewed most scientific databases and journals such as publications in Lappeenranta

University of Technology, Springer, and so on. One of the effort to have done by Steffen

Bangsow in which to aim to the simulation solution, he suggested that steps formulation of

problems and targets, data collection, modelling and running the model, and analyze the

results is a rational chart to solve the simulation problem. (Bangsow, 2010, p. 2). Figure 2.1

shows the steps of Steffen Bangsow, however in his research it did not mentioned a way to

figure out the customization of a simulated model.

Page 16: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

16

Figure 2.1. Phases of a simulation problem based on Steffen Bangsow research.

Edward Robert Comer and his colleagues have patented an approach in real-time simulation

in training part which all of their system’s parts have interconnection together. As figure 2.2

has demonstrated, there is a data-driven simulation kernel including some sections. In fact

this patent is invented ’’ for training technical skills on equipment, machinery, and software-

based systems’’. In this creation they tried to have a training environment with help of

simulation which is realistic and reliable. (Comer, 2005)

Figure 2.2. Patented application for training with help of simulation (Comer, 2005).

Comer has tried to make connections between the core of simulation training model, such as

XML interface and simulation data, and a simulation client. This aspect which can get access

to some important parts of a model is valuable however the drawback of its system is having

Page 17: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

17

limitation in order to work with it. In the other words, it cannot emerge from training part

and extend to other parts which can be useable for not-trained user.

Based on previous researches, there are two simulation approaches, discrete-event

simulation and system dynamics, which are called DES and SD simultaneously. Discrete-

event simulation and also system dynamics approaches are based on development

performance of a simulated vehicle through time. Furthermore, they can identify some

improvement for models which can be done in the future of a model. System dynamics

approach is created based on differential equations. (Tako , 2010, p. 784)

J A Ninan has tried to have a customizable model with help of internet. Figure 2.3 illustrates

a chart to obtain a feasible and practical model. In this method data gathers from a user and

creates the CAD model. In this implementation method, it considers two steps to check

feasibility of the model, one of them is after building FE model and analyze it which if it

was feasible it can generate CAD model and extract results. The other consideration is after

creating FEA model and analyze its practicality that if it was not functional, it should be

terminated.

Figure 2.3. Implementation to finalize a CAD model ready to analyze (Ninan, 2006, p. 533).

Page 18: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

18

A practical attempt to consider customer as an effective option during design is working on

the internet-based framework by J A Ninan. With help of computer-aided design (CAD) and

finite element method (FEM), he tried to allow to customers doing some customization via

internet. (Ninan, 2006, p. 529) He also mentioned that before his research there were some

researchers such as Gilmore and Pine who they have researched about mass customization

and they provided four approaches to make a customizable model; collaborative, adaptive,

cosmetic, and transparent approaches. The research of J A Ninan has some drawbacks such

as being time-consuming in order to analyze in finite element model, though is a kind of

inspiring research about making a model customizable. As figure 2.4 has showed, he have

tried to use FE Analysis and other optimization tools with interaction via internet with

customers to create more appropriate and reliable results which can be modified based on

feedbacks from customers and design sections. (Ninan, 2006, p. 531)

Figure 2.4. Phases in Mass Customization model of Ninan (Ninan, 2006, p. 531).

Having an opportunity to work with a model in a way that more users can have accessibility

to demonstrate their favorite options and specifications is one of the imperative aims for

many kinds of customization and simulation. For instance, Scott Fortmann-Roe have tried

to explain a kind of access to users to present its idea and model, to a client which can display

and simulate the model as well.

Page 19: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

19

Figure 2.5 depicts this idea schematically. (Fortmann-Roe, 2014, p. 32) Despite of not

exactly customization in simulation model, the aim of this effort could lead a kind of remote

control via internet and share the results of each simulated model.

Figure 2.5. Presence of a client which can simulate and display results based on users model

(Fortmann-Roe, 2014, p. 32)

Moreover other researchers have worked on parameterization issue; Schwarz Bachinger

prepaid and demonstrated a unique way to parameterize ‘’all types of gear transmission

topologies’’ (Schwarz, 2015, p. 1). They have tried to provide a customizable model for a

drivetrain model in its friction elements, clutches, figure 2.6.

Figure 2.6. A block diagram of inputs and outputs of a drivetrain model to parameterize the

friction elements (Schwarz, 2015, p. 1).

Page 20: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

20

For model shown in figure 2.6, the parameterization is just considered slipping and open

modes for clutches and they have written a Java script as the environment, which means all

specifications needed to model a drivetrain. (Schwarz, 2015, pp. 1-2)

A Kaylani and his colleagues have introduced a NASA approach in producing generic

model. In order to cut cost, NASA has worked on a project named RLV, Reusable Launch

Vehicles, which provides an opportunity to launch more flights per year for shuttles. With

help of a kind of simulation method named DES, discrete event simulation, the functional

performance of a launch vehicle can be analyzed and moreover, it can assess that is a

parameterized parts in a launch vehicle effective to decrease the amount of budget of a flight

or not? After discussion and consideration of model fidelity, generalization in model, and

function ability of the model (means that the model should be easy to customize and

configure), they have shown a story line to attain a generic model in figure 2.7. (Kaylani,

2007)

Figure 2.7. Steps to attain to a generic model in RLV approach (Kaylani, 2007, p. 4)

Ren, Q and D.A.; Morris, worked on design for an EV, electric vehicle, to figure out the

effect of variety kinds of transmission on an electric vehicle performance. At first they tested

an EV with a generic motor with the power of 40 kW in some kinds of power transmission;

single transmission ration, continuously variable gearing mode, and a multispeed gearbox.

They have changed crucial parameters such as total vehicle mass, wheel diameter, rolling

Page 21: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

21

resistance coefficient et cetera to analyze the effect of these changing in an EV. Employment

of any kinds of power transmission for an electric vehicles has some advantages and

disadvantages in fuel consumption. Figure 2.8 demonstrates a comparison among three kinds

of power transmission in separate driving cycle. It should be noticed that, at this level,

discussing about kinds of driving cycles and their differences is not requirements of this

dissertation work.

Figure 2.8. A comparison among three kinds of power transmission used in an electric

vehicle (Ren, 2016, p. 1264).

Figure 2.8 illustrates comparison among mentioned power transmissions and it shows using

any of power transmission has its benefits. At the moment using a customizable simulation

model with a capability of easy to switch among different kinds of power transmission with

accurate analyze is needed to depict the advantages and drawbacks of usage of each power

transmission.

After a couple of reviewing in other researchers about real-simulation and editable models,

there is a lack of a comprehensive approach to satisfy all vital issues was felt. An approach

which can take care of some major issue such as not being time-consume, easy to use, high

feasibility, and easy to save. Using MeVEA software as a real-time simulation software

interacting with other software creates a customizable model which is reliable and cost-

effective and can be helpful for any companies in design, manufacturing and test sections.

2.2 Principles of a multibody system and its equations

This chapter presents a general point of view of the concepts of multibody System Dynamics

(MSD), global and local coordinates, kinematic constraint equations and equations of

Page 22: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

22

motion. Many signs from the history of the mechanical engineering root illustrate that

knowledge multibody system dynamics is founded on classic mechanical mechanism,

satellites and robots. ‘’Multibody system dynamics is characterized by algorithms or

formalism, respectively, ready for computer implementation.’’ Precise and practical

interaction with CAD software, parameterization, real-time simulation, joints and

connection among the components, control mechatronic systems and the analysis of the

whole multibody are the main perspectives and concepts of Multibody System Dynamics

(MSD). Moreover, in analysis of MSD’s treatment, there is an interest in using reduction

methods to have a too far precise results of integration codes for ODE, Ordinary Differential

Equations, and DAE, Differential-algebraically equations. (Schiehlen, 1997, p. 149)

The equations which explain a motion for multibody systems are known as Newton-Euler

equations. The principle of equation of motion for MSD will be explained later in this report.

In 1788, Lagrange presented an analysis of the system of mechanical constraints. DAE and

ODE are Lagrange’s equations which explain the total kinetic and potential energy of the

system. In this system, the constraints and generalized coordinates should be taken into

account. (Schiehlen, 1997, pp. 1-2) In a clear way, a multibody system (MBS) has

connections with two groups of vital characters; first, mechanical components which can

illustrate displacements and the second is relations among bodies, constraints, with the

kinematic joints. ‘’ In the other words, a multibody system encompasses a collection of rigid

and/or flexible bodies interconnected by kinematic joints and possibly some force

elements’’. Based on the demands of a MBS, the body for a multibody system can be

described as a rigid or flexible body. With using six generalized coordinates with six degrees

of freedom, DOF, the motion of any rigid body can be demonstrated while 3D space has

defined. (Flores, 2015, p. 1)

After definition and consideration of joints among parts in a MBS system, in a spatial case,

the number of the degree of freedom will reduce. (Flores, 2015, p. 5) Figure 2.9 illustrates

types of coordinates which are common explaining the MBS. (Flores, 2015, p. 7)

Page 23: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

23

Figure 2.9. Frequently used coordinates in MBS (Flores, 2015, p. 7).

2.2.1 Global and local coordinates

Three variables which are independent from each other can describe the displacement of a

free moving particle ‘’i1’’ in 3D space and the vector ‘’r’’, vector of position, is (Flores,

2015, p. 11):

𝐫𝑖1 = {𝑥𝑖1 𝑦𝑖1 𝑧𝑖1}𝑇 (2.1)

With the same way, above definition can be used for a rigid body and its location. Also its

orientation can be explained with respect of a reference system. (Flores, 2015, p. 12) In

appendix 1, the concept of global coordinate system can be found.

2.2.2 Rotational coordinates – Kinematic Constraint Equations

There are some approaches to explain rotational coordinates in 3D MBS which are Euler

Angles, Bryant Angles and Euler Parameters. With aid of six coordinates, three translational

and three rotational ones, the location of any rigid body can be discovered. In appendix 2,

all the steps for rotational coordinates in spatial MBS can be found.

A constraint always embeds a kind of limitation or restriction in the degree of freedom for

one or more bodies. With assistance of the concept of generalized coordinates, the location

and orientation of bodies can be defined and now it will be known with a vector,𝐪 =

{𝐪1, 𝐪2, 𝐪3, … , 𝐪𝑛}𝑇 that n is the number of coordinates. In this report, Φ depicts the

constraint with a denoted parameter and a number. The parameter illustrates the type of

Page 24: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

24

constraint and the number is the number of equation. For instance, 𝚽(s,2) shows that there is

a spherical constraint with two equations. (Flores, 2015, p. 31) The kinematic equation based

on the vector of body-coordinates can be shown as (Flores, 2015, p. 33)

𝚽 ≡ 𝚽(𝐪) = 0 (2.2)

Where q shows the vector 𝐪𝑖 = {𝐫𝑖 𝐩𝑖}𝑇 which has ri, which includes three translational

coordinates,𝐫𝑖 = {𝑥𝑖 𝑦𝑖 𝑧𝑖}𝑇, pi is Euler parameters, and i is a body name. With a derivation

of Φ, the velocity constraints will appear (Flores, 2015, p. 33)

𝚽 = 𝐃𝐯 = 0̇ (2.3)

D is the Jacobian matrix. v is the below equation (Flores, 2015, p. 28)

𝐯𝑖 = {𝐫�̇�

𝛚𝑖} (2.4)

While the omega is the angular velocities vector (Flores, 2015, p. 28)

𝛚𝑖 = {𝛚𝑥 𝛚𝑦 𝛚𝑧}𝑖𝑇 (2.5)

The second derivative of Φ is (Flores, 2015, p. 33)

�̈� ≡ 𝐃�̇�+�̇�𝐯=0 (2.6)

Derivative of the velocity is the derivative of the equation a2.1 in appendix 2. Term 𝐃�̇� is

denoted as ɣ. (Flores, 2015, p. 33)

2.2.3 Kinematic Joints Constraints

With three kinematic joints, the spherical, revolute and spherical-spherical joints, a

tremendous amount of 3D MBS can be studied in real simulation point of view. For a

spherical joint, figure 2.10, it allows three relative rotations. ‘’Therefore, the center of the

spherical joints has constant coordinates with respect to any of the local coordinates systems

Page 25: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

25

of the connected bodies, i.e., a spherical joint is defined by the condition that the point Pi on

body i coincides with the point Pj on body j. This condition is simply the spherical constraint,

which can be written in a scalar form as”: (Flores, 2015, p. 43)

𝚽(s,3) ≡ 𝐫𝑗𝑃 − 𝐫𝑖

𝑃 = 𝐫𝑗 + 𝐬𝑗𝑃 − 𝐫𝑖 − 𝐬𝑖

𝑃 = 0 (2.7)

Figure 2.10. Spherical joint between two bodies, i and j (Flores, 2015, p. 44).

The first derivative of the Eq. 2.7 describes the equation of the velocity constraint (Flores,

2015, p. 44):

�̇�(s,3) = �̇�𝑗 + �̇�𝑗𝑃 − �̇�𝑖 − �̇�𝑖

𝑃 = 0 (2.8)

The second derivative of the Eq. 2.7 illustrates the equation of the acceleration constraint

(Flores, 2015, p. 44):

�⃗⃗⃗� ̈(s,3) = �̈�𝑗 − �̃̇�𝑗𝑃𝛚𝑗 − �̃̇�𝑗

𝑃�̇�𝑗 − �̈�𝑖 + �̃̇�𝑖𝑃𝛚𝑖 + �̃�𝑖

𝑃�̇�𝑖 = 0 (2.9)

The revolute joints between two bodies and their equations, can be found in appendix 3.

Page 26: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

26

2.2.4 Equations of Motion

Before the inception of this section it should be mentioned that in appendix 4, the equation

of motion for constrained system can be found. In this part, a main process for dynamic

analysis of MBS will explain. This process is based on the standard Lagrange multipliers

method. At first, the equation of motion for a constrained MBS based on Newton-Euler

concepts are written as below which g is the generalized force vector. (Flores, 2015, p. 61)

𝐌�̇� − 𝐃𝑇𝜆 = 𝐠 (2.10)

With consideration of constraint equations at the acceleration level with the differential

equations at the same time, the dynamic analysis can be accomplished. Hence, 𝐃�̇� can be

written as (Flores, 2015, p. 61)

𝐃�̇� = ɣ (2.11)

‘’ Equation 2.10 can be appended to Eq. 2.11, yielding a system of differential algebraic

equation (DAE). This system of equations is solved for accelerations vector,�̇� and Lagrange

multipliers, λ. Then, in each integration time step, the accelerations vector,�̇�, together with

velocity is integrated in order to obtain the system velocities and positions for the next time

step.’’ (Flores, 2015, p. 61) For launching any dynamic simulation a set of initial conditions,

such as velocity or position is needed. Equations 2.10 and 2.11 can be written such below in

a matrix form (Flores, 2015, p. 62);

[𝐌 𝐃𝑇

𝐃 0] {

�̇�𝜆} = {

𝐠𝜆} (2.12)

For this level, the equation of motions can be analytically considered and solved. In order to

do that, the equations 2.10 can be written as below in which the acceleration vector is put

(Flores, 2015, p. 62).

�̇� = 𝐌−1(𝐠 + 𝐃𝑇𝜆) (2.13)

Page 27: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

27

In order to have the inverse matrix for M, it is supposed that there is no null inertia (or mass)

in the MBS matrix (Flores, 2015, p. 62).

𝜆 = [𝐃𝐌−1𝐃𝑇]−1(ɣ − 𝐃𝐌−1𝐠) (2.14)

If equation 2.14 is used in the equation 2.13, then the below equation can be obtained (Flores,

2015, p. 62):

�̇� = 𝐌−1𝐠 + 𝐌−1𝐃𝑇{[𝐃𝐌−1𝐃𝑇]−1(ɣ − 𝐃𝐌−1𝐠)} (2.15)

Figure 2.11 illustrates a flowchart which obtains the algorithm of a standard solution of the

equation of motion. The following steps explain the algorithm:

- 𝑡0, 𝐪0 𝑎𝑛𝑑 𝐯0 are initial values.

- The mass matrix, M, should be assembled. The Jacobian matrix should be evaluated.

The constraint equations should be constructed. Ɣ, the right-hand side of the

accelerations, should be determined and the force vector g, should be calculated.

- To obtain values for 𝐯 ̇ and λ, the linear set of equations of motion for a constrained

MBS should be solved.

Figure 2.11. The flowchart for dynamic analysis of MBS base on the standard Lagrange

multipliers method (Flores, 2015, p. 63).

Page 28: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

28

In simulations, the main equations of the constraint begin to be broken because of integration

process. In order to solve this problem and keep the constraint break under control, a method

called the Baumgarte stabilization method can be helpful. The main goal of this method is

substitute differential equations which have been used up to now with following equation.

Figure 2.9 illustrates open and close loop of control systems (Flores, 2015, p. 64).

Figure 2.9. Open and closed loop for control systems (Flores, 2015, p. 64).

�̈� + 2𝛼�̇� + 𝛽2𝛗 = 0 (1.61)

Alpha and Beta are constant, positive constant. ‘’ The principle of the method is based on

the damping of acceleration of constraint violation by feeding back the position and velocity

of constraint violations, as illustrated in figure 12’’. (Flores, 2015, p. 64) In close loop

system, φ and its differential do not move toward zero, it means that the system is not stable.

By using the Baumgarte method (Flores, 2015, p. 64):

[𝐌 𝐃𝑇

𝐃 0] {

�̇�𝜆} = {

𝐠

ɣ − 2𝛼�̇� − 𝛽2𝛗} (1.62)

2.2.5 Integration Methods in Dynamic Analysis

This section explains the utilization of some practical integration algorithms in the resolving

in the equation of motion. ‘’ Particular emphasis is paid to the Euler method, Runge-Kutta

approach and Adam Predictor-corrector method that allows for the use of variable time steps

Page 29: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

29

during the integration process.’’ (Flores, 2015, p. 67). In regular, the equations of motion for

MBS is based on two main methods which are Newton-Euler method and the augmentation

one. Translational and rotational motions are interpreted by Newton-Euler method, while to

link the constraint equation of MBS, the augmentation method have been used. Using

numerical integration algorithms is considerably beneficial to solve ODE, hence, in this

dissertation work the DAE are changed to ODE. The number of n1 second-order differential

equations can be converted to 2n1 first-order equations can be seen as below (Flores, 2015,

p. 68):

�̈�1 = 𝑓(𝑦1, �̇�1, 𝑡) (2.16)

�̇�1 = 𝑦2 (2.17)

�̇�2 = 𝑓(𝑦1, 𝑦2, 𝑡) (2.18)

Methods Euler, Rung-Kutta and Adams predictor-corrector are mostly used numerical

integration methods. Although these methods have been used for many years, more than 100

years about Rung-Kutta, availability of computers helped enormously to understand a

tremendous amount of ways to utilize them. ‘’ The discrete points may have either constant

or variable spacing as ℎ𝑖1 = 𝑡𝑖1+1 − 𝑡𝑖1, where ℎ𝑖1 is ‘’the integration step size’’ for any

discrete 𝑡𝑖1 . At each 𝑡𝑖1 , the solution y (𝑡𝑖1) is approximated by a number 𝑦𝑖1 . Since no

numerical method is capable of finding y (𝑡𝑖1) exactly, the below quantity, Eq. (2.19),

represents the global or total error at t=𝑡𝑖1’’. (Flores, 2015, p. 68)

ɛ𝑔1

𝑖1 = |𝑦(𝑡𝑖1) − 𝑦𝑖1| (2.19)

The occurred errors has two different components, first one is a kind of truncation error and

other one is the round-off error. The truncation error which is a kind of inherent error,

happens because this error is related to nature of numerical algorithms while analyzing 𝑦𝑖1.

Finite word length in a computer can cause the round-off error. There is a method called

single step methods which is a type of method for progressing to solve an equation of motion

for a MBS which needs data from problem to solve it. For this dissertation work, in this

Page 30: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

30

thesis, the solution method for the equation of motion is Runge-Kutta method which is a

single step method. The algorithm for the single step methods, called multistep methods

which is Adams predictor-corrector method. A crucial point about the numerical integration

method is it require some function evaluation. For instance, for 4-order Runge-Kutta method,

4 function evaluation are needed. The numerical task has a relation with an initial value’s

integration which can be seen as below equation (Flores, 2015, p. 68):

�̇�1 = 𝑓(𝑦, 𝑡) (2.20)

Initial condition for the Eq. 2.20 is: 𝑦(𝑡0) = 𝑦0 where ‘’y is the variable to be integrated and

function f (t, y) is defined by the computational sequence of the selected algorithm’’. (Flores,

2015, p. 69)

Euler approach is one of the best and also simple approach integrators. Euler method can

solve the differential equations in one single step (Flores, 2015, p. 69):

𝑦𝑖1+1 = 𝑦𝑖1 + ℎ𝑓(𝑦𝑖1 , 𝑡) (2.21)

‘’ Where variable h is the integration step size h=𝑡𝑖1+1 − 𝑡𝑖1, for i which is a non-negative

integer.’’ (Flores, 2015, p. 69). Figure 2.12 illustrates the Euler method in a basic type. Curve

y=y (t) is the solution of the Eq. (2.20) which can be seen that it passes through the point P.

The height RQ, value of y1=y0+Δy should be found. There is no data or information about

the curve’s points, however the slope of the curve is equal to f (t,y) and it means the

differential equation based on the geometric interpretation. So the equation �̇�0 = 𝑓(𝑡0, 𝑦0)

is the slope of the tangent at point P. Length PS does not have a big deviation from the curve

PQ if h is not big. So, 𝑅𝑆 ≅ 𝑅𝑄. RS is equal to ℎ�̇�0.

Page 31: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

31

Figure 2.12. ‘’Geometric interpretation of the Euler integration method’’ (Flores, 2015, p.

70).

With help of the Taylor series about t=𝑡𝑖1, y (t) can be expanded at t=𝑡𝑖1+1 (Flores, 2015, p.

70).

𝑦(𝑡𝑖1+1) = 𝑦(𝑡𝑖1) + ℎ𝑓(𝑡𝑖1 , 𝑦𝑖1) + 𝑂(ℎ2) (2.22)

The truncation error is in this equation is given by (Flores, 2015, p. 70)

ɛ𝑙 = 𝑂(ℎ2) (2.23)

The accuracy of the method is related to the order of that method and can explain the

truncation error. So in a scalar equation (Flores, 2015, p. 70):

ɛ𝑙 = 𝑂(ℎ𝑃′+1) (2.24)

The order for this equation is 𝑃′th order. The Euler method is a first order method. If h is too

big, the accuracy while computing will decrease and in order to very high amount of

oscillation in motion, there will be very fast changes in the derivatives of the function.

(Flores, 2015, p. 70)

Page 32: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

32

The difference between y (𝑡𝑖1) and 𝑦𝑖1 can assist to find the whole (global) truncation error.

It should be noticed that this calculation is in the absence of other error, round-off error

(Flores, 2015, p. 70).

ɛ𝑔1

𝑖1 = |𝑦(𝑡𝑖1) − 𝑦𝑖1| (2.25)

If the precise express is needed, then the Runge-Kutta method, which is a second-order

algorithm, can help (Flores, 2015, p. 70),

𝑦𝑖1+1 = 𝑦𝑖1 +ℎ

2(𝑓1 + 𝑓2) (2.26)

The function, 𝑓1 , (Flores, 2015, p. 70)

𝑓1 = 𝑓(𝑡𝑖1 + 𝑦𝑖1) (2.27)

𝑓2 = 𝑓(𝑡𝑖1 + ℎ, 𝑦𝑖1 + ℎ𝑓1) (2.28)

For this approach, in any time step, two function evaluations are needed. The Rung-Kutta

method can be interpreted as figure 2.13 geometrically.

Figure 2.13. Runge-Kutta method in geometric interpretation (Flores, 2015, p. 71).

Page 33: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

33

𝑓1 does not depend on 𝑓2 and on 𝑦𝑖1+1. It should be noticed that for more accuracy in bigger

time steps, the fourth-order of Runge-Kutta method can be used. (Flores, 2015, p. 71)

𝑦𝑖1+1 = 𝑦𝑖1 + ℎ𝑓5 (2.29)

Where

𝑓5 =1

6(𝑓1 + 2𝑓2 + 2𝑓3 + 𝑓4) (2.30)

𝑓1 = 𝑓(𝑡𝑖1 , 𝑦𝑖1) (2.31)

𝑓2 = 𝑓(𝑡𝑖1 +ℎ

2, 𝑦𝑖1 +

2𝑓1) (2.32)

𝑓3 = 𝑓(𝑡𝑖1 +ℎ

2, 𝑦𝑖1 +

2𝑓2) (2.33)

𝑓4 = 𝑓(𝑡𝑖1 + ℎ, 𝑦𝑖1 + ℎ𝑓3) (2.34)

Figure 2.14 illustrates the interpretation of fourth-order Runge-Kutta method geometrically.

‘’ The local error of this method is of order ℎ5, which is relatively small even for larger time

steps. The major disadvantage of this method is that the function f (t, y) needs to be evaluated

four time at each time step.’’ (Flores, 2015, p. 72)

Figure 2.14. ‘’Geometric interpretation of the fourth-order Runge-Kutta method’’ (Flores,

2015, p. 72).

Page 34: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

34

2.3 Simulation in practice

In addition of scientific targets, simulation has to be functional in other areas such as

marketing. To reach to this objective, a comprehensive simulated model is required which

can satisfy requested expectations. This chapter introduces simulation and simulators, then

simulation will be discussed from marketing aspect. Then, customizable models and

employed software will be discussed. Finally, design and results for a four-bar mechanism

will be presented.

2.3.1 Simulation

Real time simulation is a functional tool which prepares a vast angle about behaviors of

variety vehicles and responses of their parts in diverse situations. Based on real inputs and

data for all components, with a detailed and correct design in simulation, real output can be

achievable and useable. Another striking benefit of real-time simulation is being cost

effective. To design and build a real machine for obtaining results, a significant amount of

budgets have to be costed, however, with real simulation, this aim can be achievable.

Moreover, there is a considerable chance to modify and make parameterization for a

simulated vehicle.

A drawback of simulation is that for some parameters and situations there are always some

estimation data which can distance from obtaining real results. The number of assumptions

and simplifications should be minimal in order to decrease the errors in result data.

2.3.2 Simulators

Simulators play a crucial role to provide real feeling to user (customer) while using them.

With help of accurate software and hardware which are working simultaneously, simulator’s

output is enough accurate. For this master’s thesis a kind of simulator, illustrated in figure

2.15, have been used. The software installed on it is MeVEA. Moreover, with a motion

platform which has employed four hydraulic cylinder-pistons, the feeling of movement can

be transferred to the user.

Page 35: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

35

Figure 2.15. SIM STUDIO with motion platform in order to obtain real feeling to users.

This motion platform has two joysticks and also a steering wheel, which obtains real feeling

about moving, lifting sands, et cetera. Also, this simulator has sound effect beside real

movements.

2.3.3 Marketing

Simulations and simulators have a tremendous amount of possibilities in markets. There are

considerable number of companies which can utilize simulators and achieve its benefits. In

order to decrease testing budget, a company can use a simulator which is appropriate to its

research and extract results without spending significant amount of money. One of the most

remarkable point of simulation for marketing is parameterization. It means the amount of

spending money can be raised if the company wants to change some parts of a machine and

figures out new results. With a parameterized simulation model, any type of changing are

unchallenging. Not only simulating of a machine in simulator is cheaper than manufacture

it, but also substituting some parts in simulation has no more charge. That is why more and

more companies are figuring on the advantages of simulations and simulators.

Page 36: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

36

2.3.4 Customizable Model

Preventing of wasting time and budget are the main purposes of producing a generic model

in simulation. There are noticeable number of possibilities for a user, based on the concept

of parameterization, to build a simulation model and extract it results. Suppose a simulation

model with many assemblies such as engine assembly, hydraulic assembly, power

transmission assembly, et cetera, which can be selected by a user. Each of these assemblies

has their own sub-assemblies. Based on user’s options, there are a large number of

combinations for assemblies and sub-assemblies which will present different results and

analysis. Figure 2.16 depicts a schematic of a simulation model with its assemblies and sub-

assemblies. As the figure 2.16 shows, there are many options and combinations for building

one model which every single changing in sub-assemblies will affect to other parts and data,

so when a user finishes his/her selections, a new model is created which are totally different

from other models.

Figure 2.16. Simulation model made by assemblies and sub-assemblies

Each sub-assembly has its own code, based on a software which has been used to write the

code. Then, all assemblies will gather and the real-simulation model will be ready to run.

Page 37: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

37

2.3.5 Employed Software

In this dissertation work as it mentioned before, all real-time simulation issues is handled

in MeVEA software. In addition, for other aspects, such as graphics, other software are

used. Blender, Python, SolidWorks, and Excel. The duty of each software will be

explained in next chapters.

2.3.6 MeVEA

MeVEA does the real-time simulation task with some rational simplifications. There is no

graphics while modelling in MeVEA. Objects in MeVEA do not have any shape so their

collision graphics and graphics, connections and environments must be defined in other

software. In order to reach faster and easier analysis during simulation, these simplifications

are very important. MeVEA has two interfaces, one is to create a simulation model and other

one is to run the model and get all results. Figures 2.17 and 2.18 show the work interface

and dynamic simulation one, respectively.

Figure 2.17. Working interface in MeVEA software to create a model, like excavator.

Page 38: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

38

Figure 2.18. Dynamic simulation interface in MeVEA software.

As it is shown in figure 2.17 in MeVEA, the bodies, constraints among them, all graphics of

bodies and environment, data related to movements, hydraulic model, inputs and outputs,

virtual sensors, and other data can be modeled and implemented.

In dynamic simulation interface, a user can run the simulation model and see does it work

properly or not and extract desired results and plots. Because of simplification, graphics in

working interface do not have all details, on the other hand in dynamic simulation interface,

graphics are different and with details.

User can run the model and control it with joysticks and a steering wheel, if needed, or with

keyboard, figure 2.19. As figure below depicts, user can have plotting diagrams while

simulating. These plots demonstrate behavior of each element during running a simulation

model. In the other words, plots are the main section of final results in MeVEA. In plot tab

in the dynamic simulation interface, user can opt specifications which she/he wants to see

its behavior at the end of simulation.

Page 39: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

39

Figure 2.19. Running situation with the keyboard control and a plot.

2.3.7 CAD Software – SolidWorks

To model some parts of the graphics in my case study, an excavator, SolidWorks played a

crucial role because of its precision in 3D assemblies. With a user-friendly environment,

SolidWorks is the first option for designing. In graphics point of view, MeVEA can read .stl

files format, however 3ds file format is more compatible with MeVEA. So beside

SolidWorks, presence of another software for other graphics is needed.

2.3.8 Blender

With blender all environment graphics, collision graphics and some vehicle’s parts can be

modeled and it is a strong software for making visualization extremely professional.

Moreover, Blender is an open-source software which can be utilized easily and has some

striking features such as fast modeling, photorealistic rendering, and preparing real feeling

about materials (Blender, 2017). The output file of the Blender can be 3ds format which is

readable in MeVEA software. In MeVEA two types of graphics are needed, one of them is

visualization graphic and the other one is collision graphic. File format for Collision graphics

in MeVEA is only .3ds (Mevea, 2017). Clearly, visualization graphic is to see the model and

the environment and the collision graphic is for parts of a model which must have collision

with other parts of body and also environment. For instance, in the excavator model, the

Page 40: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

40

bucket should dig the sand, so it must have collision graphics beside its visualization one. In

blender the collision and visualization graphics can be seen and modified simultaneously in

order to have a realistic actions during running a simulation model.

Figure 2.20-a, illustrates a visualization graphic of a bucket and in figure 2.20-b the

visualization and collision graphics can be seen simultaneously. Moreover, scales, colors

and textures can be set and manipulated in blender.

Figure 2.20. a) Visualization graphic, b) Visualization and collision graphics in blender.

2.3.9 Python and Excel

With Python and excel software, parameterization target can be reachable. Python is a coding

software which can be used as an open-source software with a practical database (Python,

2017).

With an Excel file as an interface file, a user can choose an option among available options

for a model for instance, and can create the vehicle based on his/her customization.

To implement this customization, a code-based software is needed to play as a bridge. With

writing a script in Python software, all selected options can be readable in MeVEA and after

running the simulated vehicle, the desired options in the vehicle can be seen in the MeVEA

environment. Creating Python code and excel file will be explained in the case study chapter.

Page 41: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

41

2.4 Four-bar Mechanism

To evaluate and figure out the real-simulation mechanism, there is a four-linked model is

considered, figure 2.21. In order to find out behavior of a mechanism, position analysis, the

velocity analysis, the Lagrangian formulation and the equation of motion will be explained.

Figure 2.21. Four-Bar Mechanism

For the four-bar mechanism, position analysis, equations of the close loop for the

mechanism’s dimensions, figure 2.22, can be written as below.

Figure 2.22. 4-bar mechanism for analysis

Page 42: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

42

Table 2.1 demonstrates the dimensions for 4-bar mechanism, shown in figure 2.22. It should

be noticed that values in the table are considered in center to center way.

Table 2.1. Values for parameters shown in figure 2.22.

Parameter 𝑙0 𝑙1 𝑙2 𝑙3 𝜃0′ 𝛼0

′ 𝜑0′ 𝑚1 𝑚2 𝑚3

Value

(unit)

117.9

cm

50

cm

100

cm

80

cm

90°

15.68°

106.1°

5

kg

10

kg

8

kg

−𝑙1 cos 𝜃′ − 𝑙2 cos 𝛼′ + 𝑙0 + 𝑙3 cos𝜑′ = 0 (3.1)

−𝑙1 sin 𝜃′ − 𝑙2 sin 𝛼′ + 𝑙3 sin 𝜑′ = 0 (3.2)

The final equation for position:

𝛼′(𝜃′, 𝜑′) = 𝑡𝑎𝑛−12(−𝑙1 sin 𝜃′ + 𝑙3 sin 𝜃′ , 𝑙0 − 𝑙1 cos 𝜃′ + 𝑙3 cos 𝜑′) (3.6)

The equation of the velocity,

[�̇�′

�̇�′] = [𝑆1(𝜃

′, 𝛼′, 𝜑′)

𝑆2(𝜃′, 𝛼′, 𝜑′)

] �̇�′ (3.10)

Kinetic energy:

𝑇 =1

2(𝑚1𝑙𝑐1

2 (�̇�′)2 + 𝐼1(�̇�′)2) +

1

2(𝑚2𝑙1

2(�̇�′)2 + 𝑙𝑐22 (�̇�′)2 + 2𝑙1𝑙𝑐2 cos(𝜃′ − 𝛼′) �̇�′�̇�′ +

𝐼2(�̇�′)2) +

1

2(𝑚3𝑙𝑐3

2 (�̇�′)2 + 𝐼3(�̇�′)2) (3.11)

Where T is the kinematic energy, m is the mass, I is inertia and 𝑙𝑐 is l/2.

Potential energy:

V𝑚1𝑔𝑙𝑐1 sin 𝜃′ + 𝑚2𝑔𝑙1 sin 𝜃′ + 𝑙𝑐2 sin 𝛼′ + 𝑚3𝑔𝑙𝑐3 sin𝜑′ (3.12)

Page 43: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

43

V is the potential energy and g is the ground acceleration.

The final equation of motion:

𝐌(𝜃′)(�̈�′)2 + 𝑉(𝜃′, �̇�′) = 𝜏𝜃 (3.21)

The constraint equations, Jacobian matrix, Newton difference for position analysis and

velocity analysis for the four-bar mechanism can be found in appendix 5.

Results of 4-bar-mechanis:

After modelling in MeVEA, figure 2.23, the result of simulation can be found below;

Figure 2.23. Dynamic simulation for 4-bar mechanism

Figure 2.24 depicts the total torque versus time in this mechanism while there is a torque on

the revolute joint between stand1 and left. Link.

Page 44: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

44

Figure 2.24. Total torque for 4-bar-mechanism.

Clearly, figure 2.24 shows the torque is increased through the time with a fluctuation.

Figure 2.25 illustrates the angular velocity in y and z direction for the middle link in x while

simulating.

Figure 2.25. The angular velocity in y and z direction for the Middle-link.

Page 45: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

45

As figure 2.25 illustrates, the angular velocity in z direction is 1.03e3 deg/s in its maximum

position while in y direction is 1.03e-11 simultaneously and they are repeating these data

through the time because of the constant torque applying to the system. In figure 2.26, the

local joint force for the left-link body on the constraint between left-link and the middle-link

is shown. In this figure, the Fxl force is increasing through the time, however, the Fyl force

is almost is repeated.

Figure 2.26. The local joint force in joint between the left-link and the middle-link.

Page 46: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

46

3 CASE STUDY- THE EXCAVATOR

With assistance of parameterization, implementing some feasible alternatives in the

excavator model, figure 3.1, can be done. The excavator model can have some modification

in some parts such as hydraulic circuit and bucket.

Figure 3.1. The excavator model with one of its pair of customizations.

The excavators employ to dig and lift up any kind of particles which usually are sand,

construction waste et cetera. The driver uses six main cylinder-pistons to move the main-

boom, dipper-arm (shown in figure 3.1), bucket. Due to the working principle of the many

kinds of excavators, there is no need to move and drive very fast with high acceleration. So

there in no gear index in this specific excavator and with customization in hydraulic circuits,

some variable speeds in order to lift the main-boom or the dipper-arm are achievable.

Page 47: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

47

In this thesis, the focus is worked to customize in two main parts, the bucket and the

hydraulic circuit. For this moment there are three kinds of buckets and three kinds of

cylinder-piston moving the dipper-arm.

3.1 Principles of Excavator

Excavators, as an industrial and heavy work vehicle, are employed to work in rough terrains

and sometimes in dire situations. They do not need to have fast speed, because they are

always transport particles, sand, soil, construction wastes to another movable vehicle like

camion, however there are some models of excavators which have the on-road travel speed

up to 35 km/h and off-road travel speed up to 8.9 km/h (Volvo, 2012). Caterpillar, Komatsu,

Volvo, Hitachi and Liebherr are some of the prominent companies which are producing

construction equipment including excavator. Moreover, excavators can carry out a variety

tasks; digging, ripper application, foundation drilling, material handling, high demolition,

long reach, and et cetera (Volvo, 2012), figure 3.2. Also, there is a company, named Sandvik,

which is also produces various products and equipment, such as mining products,

exploration drill rigs, et cetera which the simulation model of this project has the same

principle with products of Sandvik (Sandvik, 2017)

Manufacturers of excavators are always attempting to improve their products considering

some parameters which in many cases are intertwined. Power of engine, weight, swing

mechanism, drive’s options, hydraulic system, electrical system, brake system, travel speed,

digging reach, the amount of dug particles, et cetera are some of substantial parameters in

design point of view. (Caterpillar, 2017) In this dissertation work size of bucket which is

directly related to the amount of dug particles in each time and also the hydraulic system are

discussed. Also, in appendix 6, some data and information about excavators which are

producing in a pioneer company, Volvo Company, can be seen. In order to have an excavator

with high maneuver speed in its booms, the amount of oil going into the cylinders and the

flow rate should increase. Simultaneously, if the size of the bucket is big, it can be expected

a reduction in work cycle time significantly. However, two important points should be

considered; First, in fuel-consumption point of view, this situation can boost fuel

consumption as well. Secondly, with utilizing a more powerful valve in a part of hydraulic

circuit, and/or employment a big bucket, another parameters in hydraulic circuits, should be

considered. Put differently, because selected parameters for a vehicle in most cases are

Page 48: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

48

intertwined together, by changing a parameter, other parameters have to be changed or at

least checked.

Figure 3.2. Typical types of the excavator’s applications (Caterpillar, 2017).

3.2 Simulated industrial vehicle

A customized model largely uses to indicate the capability of an especial vehicle in different

situations. It means that with a customizable simulation model the ability of a vehicle can be

figured out. Moreover, it allows to make a practical comparison among a model with

different options, data and parts and prepares an outlook to find optimize options of the

model for each specific situation.

This concept obtains a giant opportunity in marketing point of view such that a customer can

have many options in front of herself/himself and select the best kind of assembly which is

appropriate for her/his target.

3.3 Editable Parameters

MeVEA creates four XML (Extensible Markup Language) format files while saving which

the executable file, MVS file, reads them to run a model. One of the created XML is a file

Page 49: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

49

which has the main data about the model in it. Another XML files are material library file,

commentary file and world file. For instance in world file, settings about lights and cameras

save. In order to have an editable simulation model, at first of all parts and parameters of the

excavator should be recognized. Each part of the excavator has its own specification which

have to be considered carefully. There are some classifications to put all parts of a vehicle

to attain an absolute model. As an example for a classification, parts of a vehicle can be

considered as a classification. In this case, parts of the excavator are under carriage, upper

carriage, main boom, dipper arm, bucket and its attachments.

Another classification for a vehicle can be its systems and interactions. For example, in the

excavator, there are some systems such as the hydraulic system, engine and force system

and parts system. Each system has its own sub-systems and all of them are interacting

together. In this dissertation work, two main parts and systems have considered to be

customizable to select and operate for a user. As figure 3.2 has shown, the head of the

excavator demonstrates its main function and one of them is digging. Another momentous

system is hydraulic system which is acting through the excavator and it is the source of

power for any movement of the excavator. Making a whole hydraulic system customizable,

is a tough function and in some cases is not so feasible and reliable, however, some parts of

it can be editable and allows to have a model with diverse options in the movement velocity,

potent arms to lift or dig. In next chapters these two systems will study.

3.3.1 Bucket and lifting system

Clearly the main aim for an excavator in its bucket type, is to dig and transfer any particles.

In some cases of an excavator working time, the most serious aim is to save time, or working

in a place which has many narrow spots, therefore having an opportunity to utilize a few

kinds of buckets seems practical and convenient. In this case there are three kinds of buckets

with variety dimensions and weights, figure 3.3.

Page 50: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

50

Figure 3.3. Types of the bucket which are used for the customization.

In MEVEA Modeller the bucket has in bodies’ sub-tree which has some parameters to set it.

Each part has Visualization Graphics, Collision Graphics which have interaction with

bodies’ graphics in Graphics sub-tree. Moreover, each part has some parameters such as

position or mass that have to be defined. Figure 3.4 depicts the MeVEA Modeller interface

which includes Model Tree, Objective View, Body Preview Window and Preview Window.

Figure 3.4. Sections of the MeVEA Modeller interface.

Model Tree

Objective View

Preview Window

Body Preview

Window

Page 51: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

51

As it mentioned, each body and particle have two kinds of graphics. Visualization Graphic

is to show the body to the user and Collision Graphics are for any collision among the parts

and the environment. For instance, according to MeVEA definitions for collisions of

particles (such as sands or gravel) and collisions of the bucket, the function digging happens.

Table 3.1 depicts parameters which have to change to obtain a customizable bucket. It should

be noticed data about the bucket is set in Objective View window, shown in figure 3.4, and

its graphics are selected based on existing graphics in the Graphics sub-tree which should be

designed and defined beforehand.

Table 3.1. Parameters which have to define for each three types of the bucket.

The BUCKET of the EXCAVATOR

Parameters (unit)

Visualization Graphics -

Collision Graphics -

Position m

Orientation rad

Mass kg

Moments and products of inertia kg.m2

Centre of Mass m

All parameters define in an XML file which usually has the same name of the executable

file. To have an appropriate visualization and collision graphics, the modelling configurator

changes parameters in table 3.1 through accessing in sub-trees ‘bodies’ and ‘graphics’.

3.3.2 Hydraulic circuit system

To have a reliable precise excavator, working in different situations, hydraulic part plays a

vital role to preserve a vehicle powerful and sustainable. There are six main cylinders and

pistons in the studied excavator, which do the hydraulic functions. Figure 3.5 shows the

hydraulic schematic of the excavator in details.

Page 52: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

52

Figure 3.5. A comprehensive hydraulic schematic of the excavator.

Page 53: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

53

Table 3.2 demonstrates the explanation of each number that mentioned in figure 3.5.

Table 3.2. Explanations of numbers of hydraulic circuits mentioned in figure 3.5.

No Name of the part No Name of the part No Name of the part

1 Volume_DriveLeftA 14 DV63_MainBoom2 27 PRV_BuckRot_B

2 PRV_DriveLeft_AB 15 CBV_LiftCylinderA 28 Vol_BuckRot_B

3 Volume_DriveLeftB 16 Vol_BoomLiftCylA 29 Vol_BuckRot_A

4 PRV_DriveLeft_BA 17 CBV_LiftCyl_B 30 PRV_BuckRot_A

5 Volume_CabinSlewA 18 Vol_BoomLiftCylB 31 DV63_TravelRight

6 PRV_CabinSlew_AB 19 DV63_BucketTilt 32 Vol_DriveRight_B

7 Volume_CabineSlewB 20 PRV_BucketTiltB 33 PRV_DriveRightAB

8 PRV_CabinSlew_BA 21 PRV_BucketTiltA 34 Vol_DriveRight_A

9 Throttle_PumpCtrl2Tank 22 Vol_BucketLiftCylB 35 PRV_DriveRightBA

10 PRV_Branch2 23 Vol_BucketLiftCylA 36 Vol.i.BuckTi.Bo.Li

11 Pump_Main 24 DV63_BucketBank 37 Vol.i.BuckRo.BuBa

12 Pump_Idle 25 Vol_BucketTiltCylA 38 Vol.i.BuRo.BuBank

13 Voume_Pump 26 DV_63BucketRotator 39 Vol.i.Dri.R_BuRo

In this project, the hydraulic cylinder-piston which has the responsibility to carry out

movement and velocity of the Dipper Arm is selected to be customized. The reason behind

this choiceness is the velocity and reaction of the Dipper Arm have significant effects on the

working cycle time and final working time. To do so, some specifications in this part of the

hydraulic circuits have to be editable. These changing will occur in the flow rate going in to

a directional valve and a cylinder. It should be noticed that in the definition of the MeVEA

Modeller the design of some specification such as a cylinder or behavior of a valve is based

on interpretation of splines. Table 3.2 depicts the parameters have to be modified in the

hydraulic circuit.

With setting mentioned in the table 3.3, an arbitrary section in the hydraulic circuit can be

created, however, it is not feasible to have a tremendous amount of changing in a vast area.

Otherwise stated, to have plenty of options for the hydraulic circuit system, numerous revises

and modifications in other parts of hydraulic circuit systems and also other parts of designed

model is needed simultaneously which is not the target of this dissertation work.

Page 54: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

54

Table 3.3. Specifications of hydraulic circuits to have a customizable cylinder-piston for the

Dipper Arm.

The HYDRAULIC CIRCUITS for the DIPPER ARM

Parameters

(unit)

Cylinder piston diameter m

Cylinder piston rod diameter m

Nominal flow rate l/min

Collision Graphics -

Position for cylinder-piston m

Splines – for the valve and friction of the dipper arm cylinder -

Visualization Graphics -

3.4 Data Selection

There are three approaches to get access to the options for the selectable data which one of

them is in its beta version. The first way is making MVA and XML files for existing options

and using them in MeVEA Modeller and the second one is designing an excel file which

gives the access to the user in order to select her/his favorite option for each customizable

part. It should be noticed that because of simplicity and using a kind of interface, the second

approach, using an excel file, is employed as the user interface.

Third approaches is to employ the MeVEA launcher which is compatible with MeVEA

software, however at the moment it is in its testing mode. In following sections, mentioned

approaches will discuss.

3.4.1 Assembly files approach

Based on number of options (at the moment three), a certain MVA and XML files should be

created for each option. On the other hand, in the main XML file (an XML file with the same

name with the executable file) some assembly folders must be created due to reading those

MVA files. MVA files are a type of readable files which are used to have separated options.

For this level, six MVA files and three more XML file must be created; three MVA files for

three options of buckets, three MVA files for three options for hydraulic circuits, three XML

files for the interaction between particles and the bucket. Collision between particles (sands)

and the bucket in any type of options is different, that is why three more XML files are

Page 55: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

55

needed. Figure 3.6(a) depicts created all XML, MVA and MVS files and figure 3.6(b)

represents the main XML files and assembly folders inside it.

Figure 3.6. (a) Created MVS, XML and MVA files for the excavator. (b) Expanded main

XML file, excavator.xml.

As figure 3.6(b) shows, in each time which a user intends to create a model, she/he should

select three files among the files which is showed in figure 3.6(a), two MVA files for the

bucket and hydraulic circuit and one XML file as particle file. A point should be considered

that the selected XML file, for particles, must be according to selection of the bucket,

because these two files are intertwined together and choosing different files for the bucket

and particles causes an impractical simulation model. With XML editor, all kinds of editing

purposes can be done in an easy way. (XML editor, 2017)

It is important to mention that MeVEA has a launcher which can use assembly approach in

a more attractive way. In SIM platform (SIM STUDIO), there is another kind of interface

(launcher) which has an ability to collects data from user and use it. The difference between

this approach and assembly approach is that in assembly approach, user have to select three

files from mentioned file and write their names in the main XML file, however, while using

launcher the user just should select favorite options in a simplest form by clicking on their

images. As it mentioned already, this approach is at its beta version, so despite of being easy

Page 56: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

56

to select specifications, it could not be the first option to be a user-interface. Figure 3.7 and

3.8 demonstrate the environments of the MeVEA launcher.

Figure 3.7. a. the first page of the MeVEA launcher, course selection. b. The number of

available users. c. The number of available vehicles.

Figure 3.8a demonstrates the first page in launcher which shows the available courses for

the specific number of defined users. In figure 3.8b, the number of users which have defined

to work with simulated machines have shown. Each user has their own username and

password. Figure 3.8c shows prepared available simulated vehicles which the user can opt

one of them and work with it.

Afterwards, in the next page of the launcher, the user should select an organized exercise

among defined exercises, at the moment one exercise is available, figure 3.8a. Then she/he

can select her/his favorite specification among present specifications in an easiest way.

Figures 3.8b and 3.8c demonstrate available options for the bucket and the hydraulic circuit

of the excavator respectively.

Page 57: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

57

Figure 3.8. a. The available exercise for selected vehicle to run. b. Selection page for an

option among options, here are buckets of the excavator. c. Selection page for an option

among options, here are hydraulic circuits of the excavator.

3.4.2 Coding files approach – User interface

In order to provide an access for users to pick out among the options, there is an excel file is

designed, figure 3.9. In this excel file a user has three options to pick one of them out for

each part or definition and then save it. Next, the MeVEA software, with help of a Python

code, can collect and place all data together and make the simulation model ready.

Figure 3.9. The interface which a user can select her/his favorite value for each part.

Page 58: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

58

As figure 3.9 illustrates all values have three options which by clicking on their cells, the

options can be viewed. It should be noticed that options for the main motor can be a part of

future work. After selecting data by user, the story and issue is a way to make a connection

between selected data in the excel file and reading them in the MeVEA software. In MeVEA

software, each part has its own branch, for instance body or dummy branch, which is written

in the main XML file (Reference of Mevea, 2017). Next chapter will explain about the

method to create mentioned connection.

3.5 Method – A coupler between Excel and MeVEA Modeller

To implement user desired data from the excel file to the MeVEA Modeller, a code written

in Python language software is in charge. Figure 3.10 depicts a part of the used python code.

The python code collects selected data and options from the excel sheet, then it exports them

into the MeVEA Modeller in a way that it gets data from the excel file and substitutes them

in the XMLs files in their right places. The python script code can be found in appendix 7.

To use of this script code, after selecting and saving the desired data in the excel file by user,

she/he just needs to run the script file.

Figure 3.10. A part of the python script code as a bridge between the excel file and the

excavator model in MeVEA Modeller.

Page 59: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

59

3.6 Model in MeVEA – Working and Dynamic Simulation Interface

As it has already explained in MeVEA section, MeVEA has two user interfaces which in

working user interface all data can be seen. After modelling, the model can be run in the

dynamic simulation interface. In the dynamic simulation interface (simulator), each model

has some inputs and outputs which all inputs can control either with keyboard or joysticks.

(Mevea, 2016, p. 7). Figure 3.11(a) depicts joysticks and keyboard control which has

eighteen inputs for the excavator such as slew input, or boom tilt input to move and rotate

the main boom and et cetera.

As figure 3.11(b) illustrates, this user interface includes three main parts; menu bar, toolbar

and simulation control (Mevea, 2016, p. 13). In part simulation controls, the model can be

started to run, stop running and based on number of defined cameras, the main camera can

be selected. Moreover, based on the type of running model, the number of gear and the

situation of the model in what gear is using in a certain time and also time and time steps

can be viewed. It should be noted that when the keyboard control has run, the joysticks will

not work.

Figure 3.11. a. Dynamic simulation interface with two kinds of controller, keyboard controls

and joysticks. b. parts of the dynamic simulation interface.

Page 60: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

60

3.7 Results

After customization for the excavator model, it can run in the dynamic simulation interface

and it is prepared to a comparison among types of customized models. A user may select

her/his favorite parameters and start to run. The process to run the model is as below;

At first, based on coding file approach for instance, the user selects her/his favorite bucket

and hydraulic circuits in the excel file and then save them. Afterwards, the python code, as

the connection bridge between the excel file and MeVEA, have to be run. Then, in the

dynamic simulation interface the model can be run and extract results by plotting. In

following chapters, plots and results of choices of buckets and also the selections of

hydraulic circuits will be discussed. The excavator has an initial model with a bucket and a

hydraulic circuits which are designed together, however, in this research it is attempted to

generate other combinations to see results during these changings and figure out how a

simulated model can be a more optimized.

3.7.1 Customization for the Bucket – combination and comparison

There are three kinds of buckets with three sets of parameters which have been under tests.

The volume of the bucket and its weight effect of its functions, working cycle time and fuel

consumption. Specifications of buckets are shown in table 3.4.

Table 3.4. Specifications of buckets.

Parameters / unit Small Bucket Medium Bucket Big Bucket

Position / m (-0.31,-0.13.0) (-0.3,-0.13,0) (-0.3.-0.13,0)

Orientation / rad 0,0,0 (0,0,0) (0,0,0)

Mass / kg 315 450 750

Moments and products of

inertia (Ixx,Iyy,Izz) / kg.m2 (185,228.1,168,1) (187,228.1,168.1) (180,221,165.1)

Centre of Mass / m (0.2,-0.7,0) (0.2,-0.7,0) (0.2,-0.7,0)

Volume / 𝑚3 0.318 0.512 22.55

In following figures the most remarkable specifications during customization of buckets will

be shown and discussed. Four specifications will be measured and discussed when the

Page 61: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

61

changing of buckets are the main aim. A same test is repeated for three times for three

different buckets and the results and plots will discuss in following paragraphs.

The first item under consideration is the total cycle time and global Y Position for all three

buckets. Figure 3.12 demonstrates the result for the small bucket. It should be mentioned

that all result graphs for the medium bucket and also big bucket can be found in appendix 8.

Figure 3.12. Total time and positions of the small bucket in global y direction.

As it is clear in figure 3.12, for the small bucket, total time to accomplish the test is 17.36

seconds. Next specification is the angular velocity in global y direction for the dipper arm

cylinder during the test. As figure 3.13 shows, the amount of the angular velocity for the

small bucket has a small-scale of oscillation around a certain value.

Page 62: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

62

Figure 3.13. The angular velocity in global y direction for the dipper arm cylinder using the

small bucket.

Power transmission of the main motor of the excavator is the next specification which is

traced during the test. Figure 3.14 depicts results while using the small bucket. The

maximum value of power is 1.124e2 kW at 1.21s.

Figure 3.14. Power for the main motor of the excavator using small bucket.

Page 63: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

63

Finally, one of the most crucial factor, fuel consumption, has been traced during the test.

Figure 3.15 illustrates the graph of fuel consumption while using the small bucket for the

excavator. As it is clear, the final value as the most crucial specification for the fuel

consumption, is 4.86e-2.

Figure 3.15. Fuel consumption for the excavator using the small bucket.

3.7.2 Customization for the Hydraulic Circuits – Combination and Comparison

In this chapter, results for three kinds of hydraulic circuits for a same test can be seen. There

are too many options and specifications can be traced during this test, however, some of

them have selected which are effected during hydraulic circuit changing. The results for total

time for each test, the angular velocity for the dipper arm cylinder, the amount of force

implemented to employ the dipper arm cylinder, velocity of the dipper arm cylinder, and

finally the fuel consumption has been studied. Figures below will demonstrate result graphs

while using small hydraulic circuit. It should be noticed that graphs demonstrating results

for the medium and big buckets can be seen in appendix 8. Specifications of different

cylinder-piston of the dipper arm are shown in table 3.5.

Page 64: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

64

Table 3.5. Specifications of cylinder-piston of the dipper arm.

Parameters / unit Small type Medium type Big type

Mass / kg 8 10 12

Cylinder piston diameter/mm 120 140 160

Piston rod length/ mm 1630 1650 1670

Figure 3.16 demonstrates angular velocity and total time for the cylinder of the dipper arm.

Figure 3.16. Angular velocity values for the dipper arm cylinder in the global Y direction

and also total working cycle time while employing the small hydraulic circuits.

The amount of torque generated by the dipper arm cylinder-piston while using the small

hydraulic circuit is shown in figure 3.17. According to figure 3.17, the mean value of the

torque is 3479.5 Nm in lifting function and 3674 in lowering function.

Page 65: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

65

Figure 3.17. Torque values for the dipper arm cylinder-piston using small hydraulic circuit.

Figure 3.18 depicts values for velocity of dipper arm cylinder for the small hydraulic circuit.

Figure 3.18. Velocity of the cylinder-piston for the small hydraulic circuits.

Page 66: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

66

Figure 3.19 shows fuel consumption behavior for the excavator when it has used the small

hydraulic circuits. As it is shown, the rate of the fuel consumption for all functions, lifting,

swinging and lowering is almost the same and its final value is 4.89e-2.

Figure 3.19. The amount of fuel consumption for the excavator while using the small

hydraulic circuit.

There are many other factors of the excavator can be traced during the test, however in this

dissertation work a few of them, which were highly important, have been under

consideration. In the next chapter, mentioned results specifications which have been shown

in this section and appendix 8 will analyze.

Page 67: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

67

4 ANALYSIS

In this chapter results which are collected in the previous chapter will be analyzed.

Afterward, from future-work aspect, the parameterization project and its concepts will be

discussed.

4.1 Analysis for employment of different Buckets

In this section, the extracted results from tests with three types of bucket for the excavator

will be analyzed. In some situations, working cycle time is one of the most critical aspect

which manufacturing companies and their customers pay attention about it. Figure 4.1

illustrates a comparison among three kinds of bucket when they have been used in the similar

tests which has been mentioned in chapter three.

Figure 4.1. Graphs for employing three kinds of bucket in a same test.

In figure 4.1, final time to accomplish the test is shown for small, medium and big buckets.

During using medium bucket, the excavators needs time more 11.5 percent than using small

Page 68: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

68

bucket. Moreover, to employ big bucket, the excavator needs time more 40 percent than

using medium bucket.

When the bucket size changes, the amount of forces apply on the dipper arm will change, so

the specification ‘angular velocity’ can be able to demonstrate that are these effects

noticeable or not. Figure 4.2 depicts plots for three types of bucket and the angular velocity

has not changed during bucket substitutions significantly.

Figure 4.2. Plots for the angular velocity for dipper arm.

The behavior of the main motor is the next specification which should be under consideration

during bucket changing. Figure 4.3 demonstrates a comparison for the main motor function

of the excavator among three types of bucket. As it shows, in the first maximum spot, there

is no difference among using different buckets because the maximum number is 112.5 kW

for all of them. However, the maximum spot in the next steps for each type of bucket is

different. On the other hand, there is no big discrepancy between employing small bucket

and medium bucket on their maximum amount of power in each cycle. Furthermore when

the big bucket is used, the second crucial local maximum for it is 113.2 kW which is around

13-15 percent more than analogous spot for small and medium bucket.

Page 69: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

69

Figure 4.3. Motor power of the excavator when three buckets have been used one by one.

Finally, the last but not the least, fuel consumption is the factor which have been analyzed.

As figure 4.4 displays, the final value of fuel consumption for the medium bucket is 5.52e-

2 which is 13 percent more than this value for the small bucket. On the other hand, fuel

consumption for the big bucket is 7.77 that is 40.7 percent more than the value for the

medium bucket.

Figure 4.4. Fuel consumption for three tests with three types of bucket.

Page 70: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

70

In comparison point of view in a glimpse, utilizing big bucket provides an opportunity to lift

up particles in each cycle more than employing medium and small buckets for the excavator.

The volume of the big bucket is 4.4 times bigger than the medium bucket and 7 times bigger

than the small bucket. Figure 4.5 illustrates three factors, total cycles time, the maximum

amount of particles which can be lifted in each attempt, and the fuel consumption, for three

bucket types.

Figure 4.5. Comparison three specifications for three kinds of buckets of an excavator.

According to figure 4.5, although using big bucket preparers a chance to transfer more

particles, total cycle time and fuel consumption value will increase considerably as well. On

the other hand, capacity of the medium bucket is around 59 percent more than the small

bucket and fuel consumption while using it is just 13 percent more than utilizing the small

bucket. Moreover, total time to accomplish the mission for the medium bucket is 11 percent

greater than the small one. It should be noticed that opting among buckets for the excavator

is highly depend on customers’ demands. For instance, in some condition when the amount

of transferring particles are notably important, employing the big bucket can be feasibly

practical.

17.36

3.24.86

19.35

5.1 5.52

27.24

22.5

7.72

0

5

10

15

20

25

30

Total Cycle Time (S) Capacity (m3e2) Fuel Consumption

Small Bucket Medium Bucket Big Bucket

Page 71: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

71

4.2 Analysis for employment of different hydraulic circuits

In this chapter four major specifications about the excavator will be analyzed in order to

figure out the behavior of the vehicle while employing each type of the hydraulic circuit.

Figure 4.6 illustrates angular velocities of the dipper arm piston for three types of cylinder-

piston. Also consumed time for each test can be viewed.

Figure 4.6. Angular velocity for three types of cylinder-piston for the excavator.

As figure 4.6 shows, as expected, spent time for test when the medium cylinder-piston have

been used is almost 27 percent more than using the small one. Also, to accomplish the test

with the big cylinder-piston, the excavator needs 23 percent time more than with the medium

one. As it is obvious, angular velocity for the small cylinder-piston is more than the medium

one, 24 percent, and also big one, 69 percent in its maximum spot. The average value for the

small cylinder-piston is 0.2137 deg/s which is 27 percent bigger than the angular velocity of

the medium cylinder-piston and 77 percent more than the big one. The average velocity for

medium and big cylinder pistons are 0.1671 deg/s and 0.1204 deg/s respectively.

Page 72: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

72

Next factor is torque generated by the hydro-motor of the excavator. Figure 4.7 depicts

torque values for three types of cylinder-piston for the dipper arm.

Figure 4.7. Torque generated by dipper arm cylinder-piston with its three types.

With help of MATLAB software it can be found that the average value of the needed torque

for the small cylinder-piston is 31 percent more than the medium bucket and 57 percent more

than the big cylinder-piston. Moreover, the maximum value for the small cylinder-piston is

13 percent in lifting function more than the medium bucket.

Along substitution cylinder-pistons of the dipper arm, the actuator velocity will change,

therefore the working time in each cycle and also the generated force will change

accordingly. Figure 4.8 illustrates actuator velocities for the dipper arm in three types of

cylinder-piston of dipper arm. Maximum values, local maximum values in both cycle sides

confirm that the actuator velocity for small cylinder-piston is more than others.

Page 73: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

73

Figure 4.8. The actuator velocity of the dipper arm cylinder-piston for three types of it.

The cylinder diameter of the dipper arm in the small case is 16 percent lower than the

medium case and the local maximum value of the actuator velocity in the small case is 18

percent more than the medium case. Furthermore, with the value 0.24 m/s as the local

maximum spot of the actuator velocity in case of small cylinder-piston, it is around 56

percent bigger than its big cylinder-piston case. This difference is happened while the

diameter in the big case is 33 percent bigger than the small case.

Another crucial specification is the generated force by the cylinder-piston in three types of

it. As figure below, figure 4.9, shows the maximum and maximum local values for the big

cylinder-piston is bigger than the medium and small cases. For instance the maximum value

for the big cylinder-piston is 26.7 percent more than the medium cylinder-piston and 51.8

percent more than the small case.

Page 74: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

74

Figure 4.9. Generated force by three types of cylinder-piston of the dipper arm.

As same as the previous section, section 4.3, the last specification is fuel consumption.

Figure 4.10 demonstrates a comparison among three kinds of cylinder-piston.

Figure 4.10. Fuel consumption for three types of cylinder-piston of the dipper arm.

According to figure 4.10, fuel consumption in big cylinder-piston case is 6.1 percent more

than the medium cylinder-piston and 8.4 percent more than the small case. Unlike changing

Page 75: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

75

buckets caused a significant differences in fuel consumption, changing cylinder-piston size

does not have a noticeable difference in theirs fuel consumption.

To end up analysis for different hydraulic circuit of the excavator, figure 4.11 can provide a

convenient summary. This figure includes total time which each of the hydraulic circuit

required to carry out the test, the average value of needed torque, the volume of each type of

cylinder, maximum generated force, and finally fuel consumption.

Figure 4.11. A comparison among crucial specifications during tests utilizing three types of

cylinder-piston for the dipper arm of the excavator.

There are a tremendous amount of factors for each part of the excavator which could consider

and analyze, therefore in the next section, one of the discussed option that can be

accomplished in future is plot for parameterized vehicles. By the way, results and plots for

each vehicles and each function are entirely different with another vehicle or function of that

vehicle.

4.3 Future work

In many researches and projects, there is always a point of view about the future and what

will improve, change, and modify in next steps. The improvement for this research, from

some angles can be considered which are feasible. Modification in software and interactions

among them, involving other software, producing a real model based on the simulation as

12.71

36.3

7.1

2.34.8

16.14

27.63

9.67

2.844.9

19.92

23.65

12.6

3.65.2

0

5

10

15

20

25

30

35

40

Total Time (S) Needed Torque(Nme2)

Volume ofCylinder(m3e2)

Maximum Force(Ne5)

Fuel Consumption

Small Cylinder-Piston Medium Cylinder-Piston Big Cylinder-Piston

Page 76: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

76

marketing point of view, etcetera. In this chapter some of the most feasible future work will

be discussed.

4.3.1 Using Software and their connections

To design a simulation model, in this case, some software such as SolidWorks, MeVEA,

Blender, and Python have been used. To create visualization graphics, two software, Blender

and SolidWorks have been used, however, sometimes communications between them and

MeVEA have some problems. Undoubtedly, SolidWorks is helpful to design bodies in

details and their assemblies in a proper way. On the other hand, Blender is a strong software

to create real graphics especially for the environment. The drawback to use both software is

a lack of an appropriate united file format to save created files and implement them in

MeVEA. MeVEA can read 3ds and Osgt file formats and SolidWorks cannot create them.

Also Blender is not be able to create Osgt file format. Moreover, all parts create in

SolidWorks should be colorless because Blender cannot recognize colors coming from

SolidWorks.

At the moment the optimized way to create graphics is to generate bodies in SolidWorks and

export them to Blender and produce them ready and add the environment graphics and apply

them in MeVEA. This steps takes time and sometimes it is not without adversity. Two

solutions may come to mind; one of them is to design bodies in a third software which can

do all graphics in itself, and second solution is to write a code such as a Python or a Matlab

code to act as a bridge between three software and create a unique file format which is

readable in MeVEA with all details.

4.3.2 User-friendlier interface - Gamification

At the moment there are three kinds of interfaces which users can customized their model

before running. As in chapter 3.4 is explained, a user can either use assembly file approach

or coding files approach. Moreover there is a third way to have an eye-catching interface

and it is using MeVEA launcher. In this very way some gamification aspects can be added

too. This means that in a launcher, a simple mission also can be considered with some meters

such as fuel-meter, velocity-meter et cetera. With using MeVEA launcher, the interface will

be friendlier than before. A kind of user-interface with outstanding graphics can be designed

that user can run a simulation model in format of a game and also she/he can trace the

Page 77: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

77

progress of simulating model in a way that for instance how much pressure is applying to

the motor or other specified parts, how much time is spent, how much fuel is consumed et

cetera. In addition, in gamification point of view, a competition can be designed in order to

rank users based on their performances. Another striking idea is to have a model in variety

environments to create more games and test the model.

4.3.3 Further customizations - Analyze section

With assistance of coding and assembly approaches many other feasible and reasonable

parameterizations can be done to figure out the optimum combinations. This idea provides

a right set of circumstances to customers in order to analyze some important specifications

of a vehicle. It means that this circumstances will be able to answer to some major questions

such as, what will happen about abrasion of bodies of the vehicle, fuel consumption, forces

and torques applied to the vehicle, the amount of time needed to do a mission and so on.

Furthermore, a company can classified its products based on market and customer’s

demands. For instance, in some situation, time is the most important factor, however in other

situation the most serious factor can be fuel consumption, or life-time of the vehicle, so the

company can provide and offer wider range of its products to market.

Moreover, a simulation model can possesses three sections. A user customizes a model based

on her/his needs. Afterwards, she/he runs it in the simulation environment and can have

gamification and see options explained in section 5.2. Finally, she/he can see some diagrams,

plots, and comparison tables to figure out her/his performance and also the performance of

the vehicle as well. It should be noticed that this diagrams and plots also can be customized

in which the user select them among other diagrams and tables before simulation.

4.3.4 Visualization of models and environments - Environment customization

The concept of improvement of visualization is to have different graphics for different parts

while customization. For instance, for a bucket of the excavator, some visualization graphics

can be set for each type of the bucket. Also an idea is to have a customization for

environment, not only in gamification point of view but also to test and extract results of a

simulation model in some different environment which have their situations and figure out

how a vehicle, for example an excavator, will represent its performance and reliability in

various environments.

Page 78: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

78

5 CONCLUSION

The main objective for this master’s thesis is to create and design innovative ways to obtain

a real-time simulation model which can be customized. This target can be achievable with

help of MeVEA software, Python, SolidWorks, and Blender software. MeVEA software is

selected as the real-time simulation software.

With a Python code all desirable parameters for a simulation model can be customized. All

collision and visualization graphics for a vehicle and the environment are done with

SolidWorks and Blender. Development idea and process commenced from studying on

previous attempts and researches about real-time simulation models and efforts to customize

them. In this observations and after a comprehensive study on simulation concepts and steps

(literature review), a lack of a practical model that can be customized in a functional and

simple way felt. Despite of some limitations and difficulties, acquiring to this type of

simulation model has wealthy benefits and this aim can be reachable with a logical and

feasible steps.

To put the issue in a nutshell, the concept is to collect data which are selected with a user

and combine them with other data and make the simulation model ready to run. Then the

model will be run and required information and data can be extracted. At first in a user-

friendly environment, an Excel file, a user selects her/his favorite data. Then with a Python

code, as a bridge between the Excel file and MeVEA software, this data can add to the

generic model in MeVEA and the model is ready to simulate.

With a parameterized model, the amount of time need to change and analyze a simulation

model will decrease tremendously. In addition, these types of modifications is not cost-

effective without parameterized models. A parameterized model can reduce the amount of

money from two aspects; in general it can prevent the amount of budget which should spend

to manufacture a real model. Moreover, it can decrease total number of hours spending to

design some models which cost a significant amount of money and obtains an interesting

interface to change parameters and work with the model in an enjoyable environment and

extract precise analysis.

Page 79: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

79

Parameterized simulated model accomplished all targets and demands which were discussed

as its benefits and functions at the commencement of this master’s thesis. Having a

customized simulation model provides an opportunity to build a model in a noticeable short

time with obtaining accurate analysis in comparison of previous concepts. With a customized

model the speed of creating simulation models and present those to market will increase

significantly and it is a brilliant way to conquer the real-simulation market.

Page 80: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

80

LIST OF REFERENCES

About Mevea, 2017. Mevea. [Referred 12.2.2017]. Available at: http://mevea.com/about/

Bangsow, S., 2010. General Behavior of the Material Flow Objects. In: Manufacturing

Simulation with Plant Simulation and SimTalk. Berlin: Springer. 297 p.

Blender, 2017. Blender. [Referred 13.3.2017]. Available at: https://www.blender.org/feature

s/

Byrski, A., 2012. User-model Dialogue. In: Advanced in Intelligent Modelling and

Simulation. Warsaw: Springer. 364 p.

Caterpillar, 2017. Caterpillar. [Referred 10.4.2017]. Available at: http://www.cat.com/en_U

S/products/new/equipment/excavators.html.

Comrer, E. R., 2005. Methods and systems for providing simulation-based technical training.

Austin, Texas, Patent No. 20050095572A1. p 9.

Design Laboratory, 2017. Lappeenranta University of Technology. [Referred 10.3.2017]

Available at: https://www.lut.fi/web/en/school-of-energy-systems/research/intelligent-mac

hines.

Flores, P., 2015. Definition of Multibody System. In: Concepts and Formulations for Spatial

Multibody Dynamics. s.l.:Springer. 83 p.

Fortmann-Roe, S., 2014. Simulation Modelling Practice and Theory. Elsevier. p45.

Kaylani, A., 2007. A Generic environment for modelling future launch operations- GEM-

FLO: a success story in generic modelling. Journal of the operational research society. 10 p.

Page 81: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

81

LUT, 2016. Lappeenranta University of Technology. [Referred 5.3.2017] Available at:

https://www.lut.fi/web/en/research/platforms/sim.

M.Dede, E., 2014. Governing Equations for Electromechanical Systems. In: Multiphysics

Simulation. Ottawa: Springer. 212 p.

Mevea, 2016. Mevea Solver User manual, Lappeenranta: s.n.

Mevea, 2017. importing graphics. In: Beginner tutorials. Lappeenranta: s.n.

Ninan, J. A., 2006. optimization formulation. In: Internet-based framework to support

integration of the customer in the design of customizable products. Oklahoma: University of

Oklahoma. 10p.

Pina, N., 2013. Simulating Energy Consumption. In: Simulation and Modeling

Methodologies, Technologies and Applications. Warsaw: Springer. 286 p.

Python, 2017. Python. [Referred 1.4.2017]. Available at: https://www.python.org/about/

Reference of Mevea, 2017. Reference Manual for solver library 7.70. In: s.l.:s.n.

Ren, Q., 2016. Effect of drivability. In: Effect of Transmission Design on Electric Vehicle

(EV) Performance. Sunderland: s.n. 1260-1265 pp.

Sandvik, 2017. Sandvik. [Referred 21.3.2017] Available at: https://mining.sandvik.co m/en/

products/equipment

Schiehlen, 1997. In: Multibody System DynamicsRoots and Perspectives. Stutgart: s.n. 149-

188 pp.

Schwarz, C., 2015. Tool-driven Design and Automated Parameterization for Real-time

Generic Drivetrain Models. Graz, EDP Sciences. 6 p.

Page 82: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

82

Tako , A. A., 2010. Model Development in discrete-event simulation and system dynamics.

Elsevier. 784-794 pp.

Volvo, 2012. Volvo. [Referred 05.04.2017] Available at: https://www.volvoce.com/-/media

/volvoce/global/products/excavators/wheeledexcavators/brochures/brochure_ew210d_en_2

2_20030259_f.pdf?v=0RkuPw.

XML editor, 2017. Oxygen XML editor. [Referred 10.3.2017]. Available at: https://www.ox-

ygenxml.com/xml_editor.html

Page 83: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

APPENDICES

Appendix 1

Figure A1.1 shows a spatial body. (Flores, 2015, p. 12)

Figure A1.1. Body i without constraint and its location in 3D (Flores, 2015, p. 12).

𝐫𝑃𝑖 = 𝐫𝑖 + 𝐬𝑃

𝑖 (a1.1)

ξi2ηi2ζi2: the body-fixed coordinate system which is body’s coordinate system.

𝐬𝑖 𝑃 = 𝐀′

𝑖 𝐬𝑖′ 𝑃 (a1.2)

𝐀′𝑖 : Rotation matrix and 𝐬𝑖

′ 𝑝 is a constant vector for the mentioned rigid body.

Appendix 2

Spatial MBS showing its translation and rotation concept, figure A2.1. (Flores, 2015, p. 16)

Page 84: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

Figure A2.1. Translation and rotation (Flores, 2015, p. 16).

Figure A2.2. Rotation vectors without presence of translation (Flores, 2015, p. 16).

The elements of A, rotational transformation matrix:

𝐎 = [cos𝛹 − sin𝛹 0sin𝛹 cos𝛹 0

0 0 1] , 𝐄 = [

1 0 00 cos 𝜃 − sin 𝜃0 sin 𝜃 𝑐𝑜𝑠𝜃

] , 𝐁 = [cos 𝜎 −𝑠𝑖𝑛𝜎 0−𝑠𝑖𝑛𝜎 cos 𝜎 0

0 0 1]

(a2.1)

Then,

𝐀 = [𝑐𝑜𝑠𝛹𝑐𝑜𝑠𝜎 − 𝑠𝑖𝑛𝛹𝑐𝑜𝑠𝜃𝑠𝑖𝑛𝜎 −𝑐𝑜𝑠𝛹𝑠𝑖𝑛𝜎 − 𝑠𝑖𝑛𝛹𝑐𝑜𝑠𝜃𝑐𝑜𝑠𝜎 𝑠𝑖𝑛𝛹𝑠𝑖𝑛𝜃𝑠𝑖𝑛𝛹𝑐𝑜𝑠𝜎 + 𝑐𝑜𝑠𝛹𝑐𝑜𝑠𝜃𝑠𝑖𝑛𝜎 −𝑠𝑖𝑛𝛹𝑠𝑖𝑛𝜎 + 𝑐𝑜𝑠𝛹𝑐𝑜𝑠𝜃𝑐𝑜𝑠𝜎 −𝑐𝑜𝑠𝛹𝑠𝑖𝑛𝜃

𝑠𝑖𝑛𝜃𝑠𝑖𝑛𝜎 𝑠𝑖𝑛𝜃𝑐𝑜𝑠𝜎 𝑐𝑜𝑠𝜃] (a2.2)

Page 85: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

θ=0 then,

𝐀 = [𝑐𝑜𝑠(𝛹 + 𝜎) 𝑠𝑖𝑛(𝛹 + 𝜎) 0𝑠𝑖𝑛(𝛹 + 𝜎) −𝑐𝑜𝑠(𝛹 + 𝜎) 0

0 0 1

] (a2.3)

The Bryant angles can help to overcome to singularity issue. (Flores, 2015, p. 16).

Figure A2.3. Steps of rotation for Bryant angles, a) main global system coordinates; b and

c and d) First, second and third rotation respectively (Flores, 2015, p. 17).

𝐎 = [1 0 00 𝑐𝑜𝑠𝜑1 −𝑠𝑖𝑛𝜑1

0 𝑠𝑖𝑛𝜑1 𝑐𝑜𝑠𝜑1

],𝐄 = [𝑐𝑜𝑠𝜑2 0 𝑠𝑖𝑛𝜑2

0 1 0−𝑠𝑖𝑛𝜑2 0 𝑐𝑜𝑠𝜑2

], 𝐁 = [𝑐𝑜𝑠𝜑3 −𝑠𝑖𝑛𝜑3 0𝑠𝑖𝑛𝜑3 𝑐𝑜𝑠𝜑3 0

0 0 1

]

(a2.4)

The transformation matrix, A is A=O*E*B,

Page 86: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

𝐀

= [𝑐𝑜𝑠𝜑2𝑐𝑜𝑠𝜑3 −𝑐𝑜𝑠𝜑2𝑠𝑖𝑛𝜑3 𝑠𝑖𝑛𝜑2

𝑐𝑜𝑠𝜑1𝑠𝑖𝑛𝜑3 + 𝑠𝑖𝑛𝜑1𝑠𝑖𝑛𝜑2𝑐𝑜𝑠𝜑3 𝑐𝑜𝑠𝜑1𝑐𝑜𝑠𝜑3 − 𝑠𝑖𝑛𝜑1𝑠𝑖𝑛𝜑2𝑠𝑖𝑛𝜑3 −𝑠𝑖𝑛𝜑1𝑐𝑜𝑠𝜑2

𝑠𝑖𝑛𝜑1𝑠𝑖𝑛𝜑3 − 𝑐𝑜𝑠𝜑1𝑠𝑖𝑛𝜑2𝑐𝑜𝑠𝜑3 𝑠𝑖𝑛𝜑1𝑐𝑜𝑠𝜑3 + 𝑐𝑜𝑠𝜑1𝑠𝑖𝑛𝜑2𝑠𝑖𝑛𝜑3 𝑐𝑜𝑠𝜑1𝑐𝑜𝑠𝜑2

]

(a2.5)

The steps of Euler parameters’ utilization:

𝑒0 = 𝑐𝑜𝑠𝜑

2 (a2.6)

𝐞 = {𝑒1 𝑒2 𝑒3}𝑇 = 𝐫 𝑠𝑖𝑛

𝜑

2 (a2.7)

e0, e1, e2 and e3 are Euler parameters.

Figure A2.4. Euler Parameters (Flores, 2015, p. 20)

𝑒02 + 𝑒𝑇𝑒 = 𝑒0

2 + 𝑒12 + 𝑒2

2 + 𝑒32 = 1 (𝑎2.8)

(a2.9)

Page 87: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

𝐩𝑇𝐩 = 1 (a2.10)

𝐀 = 2

[ 𝑒0

2 + 𝑒12 −

1

2𝑒1𝑒2 − 𝑒0𝑒3 𝑒1𝑒3 + 𝑒0𝑒2

𝑒1𝑒2 + 𝑒0𝑒3 𝑒02 + 𝑒2

2 −1

2𝑒2𝑒3 − 𝑒0𝑒1

𝑒1𝑒3 − 𝑒0𝑒2 𝑒2𝑒3 + 𝑒0𝑒1 𝑒02 + 𝑒3

2 −1

2]

(a2.11)

Figure A2.5. Types of orientation of a body-fixed frame which clarify the resolution of the

Euler parameters a ξηζ || xyz; b ξ || x; c η || y; d ζ || z (Flores, 2015, p. 21).

So, if case A6.a

𝐩 = {1 0 0 0}𝑇 (a2.12)

In cases of figure A6.b, figure A6.c, and figure A6.d:

𝐩 = {𝑐𝑜𝑠𝜑

2 𝑠𝑖𝑛

𝜑

2 0 0 }

𝑇

(a2.13)

𝐩 = {𝑐𝑜𝑠𝜑

2 0 𝑠𝑖𝑛

𝜑

2 0 }

𝑇

(a2.14)

Page 88: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

𝐩 = {𝑐𝑜𝑠𝜑

2 0 0 𝑠𝑖𝑛

𝜑

2 }

𝑇

(a2.15)

Appendix 3

In figure A7, vectors aj and bj are perpendicular to each other and to the joint axis.

The constraint equations (Flores, 2015, p. 45)

𝛗(s,3) ≡ {

𝛗(s,3) = 𝐫𝑗 + 𝐬𝑗𝑃 − 𝐫𝑖 − 𝐬𝑖

𝑃 = 0

𝛗(𝑛1,1) ≡ 𝐬𝑖𝑇𝐚𝑗 = 0

𝛗(𝑛1,1) ≡ 𝐬𝑖𝑇𝐛𝑗 = 0

(a3.1)

Figure A3.1. Revolute joint between two bodies, i and j (Flores, 2015, p. 45).

�̇�(𝑛1,1) = 𝐛𝑗𝑇�̇�𝑖 + 𝐬𝑖

𝑇�̇�𝑗 = 0 (a3.2)

�̈�(𝑛1,1) = 𝐬𝑖𝑇�̈�𝑖 + 𝐛𝑗

𝑇�̈�𝑗 + 2�̇�𝑗𝑇�̇�𝑖 = 0 (a3.3)

Page 89: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

Figure A3.2. Body i and j connected with a spherical-spherical joint (Flores, 2015, p. 47).

Appendix 4 (Flores, 2015, pp. 49-52)

Equations of Motion for the Constrained Systems and Translational equations of motion

(without being constrained).

𝑚�̈� = 𝐟 (a4.1)

m is the mass, �̈� is the acceleration of the COM, and f is the force

Rotational equations:

𝐽�̇� + �̃�𝐽𝛚 = 𝑛𝑚 (a4.2)

J is the global inertia tensor, �̇� is the global angular acceleration, ω is the global angular

velocity, and nm is the all moments effecting on the body.

[𝑚𝐈 00 𝐽

] {�̈��̇�

} + {0

�̃�𝐽𝛚} = {

𝐟𝑛𝑚

} (a4.3)

[𝑚𝐈 00 𝐽

] {�̈��̇�

} = {𝐟

𝑛𝑚 − �̃�𝐽𝛚} (a4.4)

Page 90: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

𝐌𝑖 = [𝑚𝐈 00 𝐽

], �̇�𝑖 = {�̈��̇�

}, 𝐠𝑖 = {𝐟

𝑛𝑚 − �̃�𝐽𝛚} (a4.5)

So,

𝐌𝑖�̇�𝑖 = 𝐠𝑖 (a4.6)

𝐌�̇� = 𝐠 + 𝐠(𝑐) (a4.7)

𝐠(𝑐) = 𝐃𝑇𝜆 (a4.8)

The dynamic equations of motion for a constrained multibody system

𝐌�̇� − 𝐃𝑇𝜆 = 𝐠 (a4.9)

Appendix 5

The constraint equations, Jacobian matrix, Newton difference for position analysis and

velocity analysis can be seen as below;

Figure A5.1. 4-bar mechanism for solving the constraint equation

Page 91: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

𝛼′- 𝜃′𝜑′ �̇�′ �̇�′ �̇�′

Joint-p

[𝐫𝑥,𝐴

𝐫𝑦,𝐴] = [

𝑅𝑥,𝐴

𝑅𝑦,𝐴] + [

𝐶𝑜𝑠 𝜃′ −𝑆𝑖𝑛 𝜃′

𝑆𝑖𝑛 𝜃′ 𝐶𝑜𝑠 𝜃′ ] [−(𝑙

2)𝐴

0

] = [00]

𝐂1: 𝑅𝑥,𝐴 − (𝑙

2)𝐴

𝐶𝑜𝑠 𝜃′ = 0

𝐂2: 𝑅𝑦,𝐴 − (𝑙

2)𝐴𝑆𝑖𝑛 𝜃′ = 0

Joint-e

[𝑅𝑥,𝐴

𝑅𝑦,𝐴] + [

𝐶𝑜𝑠 𝜃′ −𝑆𝑖𝑛 𝜃′

𝑆𝑖𝑛 𝜃′ 𝐶𝑜𝑠 𝜃′ ] [(𝑙

2)𝐴

0

] = [𝑅𝑥,𝐵

𝑅𝑦,𝐵] + [

𝐶𝑜𝑠 𝛼′ −𝑆𝑖𝑛 𝛼′

𝑆𝑖𝑛 𝛼′ 𝐶𝑜𝑠 𝛼′ ] [−(𝑙

2)𝐵

0

]

𝐂3: 𝑅𝑥,𝐴 + (𝑙

2)𝐴𝐶𝑜𝑠 𝜃′ − 𝑅𝑥,𝐵 + (

𝑙

2)𝐵

𝐶𝑜𝑠 𝛼′ = 0

𝐂4: 𝑅𝑦,𝐴 + (𝑙

2)𝐴𝑆𝑖𝑛 𝜃′ − 𝑅𝑦,𝐵 + (

𝑙

2)

𝐵𝑆𝑖𝑛 𝛼′ = 0

Joint-f

[𝑅𝑥,𝐵

𝑅𝑦,𝐵] + [

𝐶𝑜𝑠 𝛼′ −𝑆𝑖𝑛 𝛼′

𝑆𝑖𝑛 𝛼′ 𝐶𝑜𝑠 𝛼′ ] [(𝑙

2)

𝐵

0

] = [𝑅𝑥,𝐶

𝑅𝑦,𝐶] + [

𝐶𝑜𝑠 𝜑′ −𝑆𝑖𝑛 𝜑′

𝑆𝑖𝑛 𝜑′ 𝐶𝑜𝑠 𝜑′ ] [−(𝑙

2)𝐶

0

]

𝐂5: 𝑅𝑥,𝐵 + (𝑙

2)𝐵

𝐶𝑜𝑠 𝛼′ − 𝑅𝑥,𝐶 + (𝑙

2)𝐶𝐶𝑜𝑠 𝜑′ = 0

𝐂6: 𝑅𝑦,𝐵 + (𝑙

2)

𝐵𝑆𝑖𝑛 𝛼′ − 𝑅𝑦,𝐶 + (

𝑙

2)𝐶𝑆𝑖𝑛 𝜑′ = 0

Joint-g

[𝐫𝑥,𝐶

𝐫𝑦,𝐶] = [

𝑅𝑥,𝐶

𝑅𝑦,𝐶] + [

𝐶𝑜𝑠 𝜑′ −𝑆𝑖𝑛 𝜑′

𝑆𝑖𝑛 𝜑′ 𝐶𝑜𝑠 𝜑′ ] [(𝑙

2)𝐶

0

] = [00]

Page 92: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

𝐂7: 𝑅𝑥,𝐶 + (𝑙

2)

𝐶𝐶𝑜𝑠 𝜑′ = 0

𝐂8: 𝑅𝑦,𝐶 + (𝑙

2)

𝐶𝑆𝑖𝑛 𝜑′ = 0

As the last constraint equation, there is a torque,𝑀1 is implementing at the joint p.

𝐂9: 𝑀1 − 𝜃′

The function of this torque is a constant number.

Jacobian Matrix

𝐪 = [𝑅𝑥,𝐴 𝑅𝑦,𝐴 𝜃′ 𝑅𝑥,𝐵 𝑅𝑦,𝐵 𝛼′ 𝑅𝑥,𝐶 𝑅𝑦,𝐶 𝜑′]

𝐂𝐪 =

[ 𝜕𝐂1

𝜕𝐪1⋯

𝜕𝐂1

𝜕𝐪𝑛

⋮ ⋱ ⋮𝜕𝐂𝑛

𝜕𝐪1⋯

𝜕𝐂𝑛

𝜕𝐪𝑛]

Page 93: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

𝐂𝐪 =

[ 1 0 (

𝑙

2)𝐴𝑆𝑖𝑛𝜃′ 0 0 0 0 0 0

0 1 −(𝑙

2)𝐴

𝐶𝑜𝑠𝜃′ 0 0 0 0 0 0

1 0 − (𝑙

2)𝐴𝑆𝑖𝑛𝜃′ −1 0 −(

𝑙

2)𝐵

𝑆𝑖𝑛𝛼′ 0 0 0

0 1 (𝑙

2)𝐴𝐶𝑜𝑠𝜃′ 0 −1 (

𝑙

2)

𝐵𝐶𝑜𝑠𝛼′ 0 0 0

0 0 0 1 0 −(𝑙

2)𝐵

𝑆𝑖𝑛𝛼′ −1 0 −(𝑙

2)

𝐶𝑆𝑖𝑛𝜑′

0 0 0 0 1 (𝑙

2)

𝐵𝐶𝑜𝑠𝜃′ 0 −1 (

𝑙

2)𝐶𝐶𝑜𝑠𝜑′

0 0 0 0 0 0 1 0 −(𝑙

2)

𝐶𝑆𝑖𝑛𝜑′

0 0 0 0 0 0 0 1 (𝑙

2)𝐶𝐶𝑜𝑠𝜑′

0 0 −1 0 0 0 0 0 0 ]

Newton difference for position analysis:

Δq= −𝐂𝐪−1𝐂

Page 94: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

𝛥𝐪 = −

[ 1 0 (

𝑙

2)𝐴𝑆𝑖𝑛𝜃′ 0 0 0 0 0 0

0 1 −(𝑙

2)𝐴𝐶𝑜𝑠𝜃′ 0 0 0 0 0 0

1 0 −(𝑙

2)𝐴𝑆𝑖𝑛𝜃′ −1 0 −(

𝑙

2)𝐵

𝑆𝑖𝑛𝛼′ 0 0 0

0 1 (𝑙

2)𝐴𝐶𝑜𝑠𝜃′ 0 −1 (

𝑙

2)𝐵

𝐶𝑜𝑠𝛼′ 0 0 0

0 0 0 1 0 −(𝑙

2)𝐵

𝑆𝑖𝑛𝛼′ −1 0 − (𝑙

2)𝐶𝑆𝑖𝑛𝜑′

0 0 0 0 1 (𝑙

2)𝐵

𝐶𝑜𝑠𝜃′ 0 −1 (𝑙

2)

𝐶𝐶𝑜𝑠𝜑′

0 0 0 0 0 0 1 0 − (𝑙

2)𝐶𝑆𝑖𝑛𝜑′

0 0 0 0 0 0 0 1 (𝑙

2)

𝐶𝐶𝑜𝑠𝜑′

0 0 −1 0 0 0 0 0 0 ] −1

×

[ 𝐑𝑥,𝐴 − (

𝑙

2)𝐴𝐶𝑜𝑠 𝜃′

𝐑𝑦,𝐴 − (𝑙

2)𝐴𝑆𝑖𝑛 𝜃′

𝐑𝑥,𝐴 + (𝑙

2)𝐴𝐶𝑜𝑠 𝜃′ − 𝐑𝑥,𝐵 + (

𝑙

2)𝐵

𝐶𝑜𝑠 𝛼′

𝐑𝑦,𝐴 + (𝑙

2)𝐴𝑆𝑖𝑛 𝜃′ − 𝐑𝑦,𝐵 + (

𝑙

2)𝐵

𝑆𝑖𝑛 𝛼′

𝐑𝑥,𝐵 + (𝑙

2)𝐵

𝐶𝑜𝑠 𝛼′ − 𝐑𝑥,𝐶 + (𝑙

2)𝐶𝐶𝑜𝑠 𝜑′

𝐑𝑦,𝐵 + (𝑙

2)

𝐵𝑆𝑖𝑛 𝛼′ − 𝐑𝑦,𝐶 + (

𝑙

2)𝐶𝑆𝑖𝑛 𝜑′

𝐑𝑥,𝐶 + (𝑙

2)

𝐶𝐶𝑜𝑠 𝜑′

𝐑𝑦,𝐶 + (𝑙

2)𝐶𝑆𝑖𝑛 𝜑′

𝑀1 − 𝜃′ ]

Page 95: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

Velocity Analysis:

�̇� = 𝐂𝐪−1[−𝐂𝑡]

𝐂𝑡 =

[ 00000000�̇�1]

[ �̇�𝑥,𝐴

�̇�𝑦,𝐴

�̇�′

�̇�𝑥,𝐵

�̇�𝑦,𝐵

�̇�′

�̇�𝑥,𝐶

�̇�𝑦,𝐶

�̇�′ ]

=

[ 1 0 (

𝑙

2)𝐴𝑆𝑖𝑛𝜃′ 0 0 0 0 0 0

0 1 −(𝑙

2)𝐴𝐶𝑜𝑠𝜃′ 0 0 0 0 0 0

1 0 −(𝑙

2)𝐴

𝑆𝑖𝑛𝜃′ −1 0 −(𝑙

2)𝐵

𝑆𝑖𝑛𝛼′ 0 0 0

0 1 (𝑙

2)𝐴𝐶𝑜𝑠𝜃′ 0 −1 (

𝑙

2)𝐵

𝐶𝑜𝑠𝛼′ 0 0 0

0 0 0 1 0 −(𝑙

2)𝐵

𝑆𝑖𝑛𝛼′ −1 0 − (𝑙

2)𝐶𝑆𝑖𝑛𝜑′

0 0 0 0 1 (𝑙

2)𝐵

𝐶𝑜𝑠𝜃′ 0 −1 (𝑙

2)

𝐶𝐶𝑜𝑠 𝜑′

0 0 0 0 0 0 1 0 − (𝑙

2)𝐶𝑆𝑖𝑛𝜑′

0 0 0 0 0 0 0 1 (𝑙

2)

𝐶𝐶𝑜𝑠𝜑′

0 0 −1 0 0 0 0 0 0 ] −1

×

[ 00000000�̇�1]

Page 96: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

Appendix 6

Some detail information about three types of excavators of Volvo Company. In figures

below, the data about EW160D, EW180D, and EW210D can be found (Volvo, 2012).

Page 97: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

Appendix 7

Python code as a bridge between the excel file, user-interface, and MeVEA software.

Page 98: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …
Page 99: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

Appendix 8

Results for the Medium Bucket:

Bodies/Bucket: Global Position of LOC (y direction)

Figure A8.1. Total time and positions of the medium bucket in global y direction.

Total time: 19.35 s

Page 100: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

Dummies- DipperArmCylinder_Dummey wy

Figure A8.2. The angular velocity in global y direction for the dipper arm cylinder using the

medium bucket.

Power Transmission: Motor Power (P)

Figure A8.3. Power for the main motor of the excavator using medium bucket.

Max: 1.124 e2 kW at 1.21s

Page 101: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

Min: 2.5e-2 kW at 4.33

Output: AO_Fuel Consumption:

Figure A8.4. Fuel consumption for the excavator using the small bucket.

Max: 5.524e-2

Big Bucket

Results for the big bucket:

Page 102: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

Figure A8.5. Total time and positions of the big bucket in global y direction.

Total time: 27.24 s

Dummies- DipperArmCylinder_Dummey wy:

Figure A8.6. The angular velocity in global y direction for the dipper arm cylinder using the

big bucket

Power Transmission: Motor Power (P)

Page 103: PARAMETERIZATION AND REAL TIME SIMULATION OF AN …

Figure A8.7. Power for the main motor of the excavator using big bucket.

Max: 1.132e2 kW at 14.3s and Min: 1.55e-3 kW at 5.81s

Output: AO_Fuel Consumption:

Figure A8.8. Fuel consumption for the excavator using the big bucket.

Maximum value: 7.77e-2