Analysis of Multibody Systems Based on Group Equations G. Bernab , - - PowerPoint PPT Presentation

analysis of multibody systems based on group
SMART_READER_LITE
LIVE PREVIEW

Analysis of Multibody Systems Based on Group Equations G. Bernab , - - PowerPoint PPT Presentation

International Conference on Computational Science (ICCS 2017) Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations G. Bernab , J. C. Cano , J. Cuenca , A. Flores , D. Gimnez


slide-1
SLIDE 1

Conference title 1

Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations

  • G. Bernabé†, J. C. Cano ‡, J. Cuenca†, A. Flores†, D. Giménez‡,
  • M. Saura-Sánchez Ω and P. Segado-Cabezos Ω

† Computer Engineering Department, University of Murcia

‡ Computer Science and Systems Department, University of Murcia

Ω Mechanical Engineering, Technical University of Cartagena 12-14 June, 2017

International Conference on Computational Science (ICCS 2017)

slide-2
SLIDE 2

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 2

Outline

Introduction and Motivation Parallelism in the Structural Groups method Results Conclusions and Future work

slide-3
SLIDE 3

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 3

Outline

Introduction and Motivation Parallelism in the Structural Groups method Results Conclusions and Future work

slide-4
SLIDE 4

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 4

  • Multibody systems (MBS): mechanical systems formed by

rigid and flexible bodies which are connected by means of mechanical joins in such a way that there is relative movement between their bodies

Introduction

The Stewart Platform platform handles terminal

slide-5
SLIDE 5

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 5

  • The study of the relationships between the bodies is

known as kinematic modeling

  • Selects a vector q of coordinates to define the position and
  • rientation of each body of the MBS in the space

Introduction

  • Coordinates are related by means

a nonlinear systems of constrainst equations Φ(q) = 0

slide-6
SLIDE 6

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 6

  • The study of the relationships between the bodies is

known as kinematic modeling

  • Selects a vector q of coordinates to define the position and
  • rientation of each body of the MBS in the space

Introduction

  • Coordinates are related by means

a nonlinear systems of constrainst equations Φ(q) = 0 Global Topogical formulations formulations

slide-7
SLIDE 7

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 7

  • The study of the relationships between the bodies is

known as kinematic modeling

  • Selects a vector q of coordinates to define the position and
  • rientation of each body of the MBS in the space

Introduction

  • Coordinates are related by means

a nonlinear systems of constrainst equations Φ(q) = 0 Global Topogical formulations formulations

exploits the topology of the MBS to reduce the dimension of the problem by relating the position of each body with respect to its preceding one

slide-8
SLIDE 8

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 9

  • Structural Analysis: splits the MBS into Structural Groups (SGs)
  • Kinematic Structure: How many SG, kind & order

Introduction

The Stewart Platform

terminal (SG-T0) (8) 12 dependent coordinates handle-stick (SG-H) (2-7) 15 dependent coordinates

slide-9
SLIDE 9

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 10

  • Structural Analysis: splits the MBS into Structural Groups (SGs)
  • Kinematic Structure: How many SG, kind & order

Introduction

terminal (SG-T) (8) handle-stick (SG-H) (2-7)

slide-10
SLIDE 10

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 11

  • 1. A simulator for the computational kinematic analysis of

MBS to allow us to analyze the efficiency of the group equations

  • 2. A better exploitation of the computer resources by

applying parallelism to reduce the executions in real-time applications

Motivation

terminal (SG-T) (8) handle-stick (SG-H) (2-7)

slide-11
SLIDE 11

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 12

Outline

Introduction and Motivation Parallelism in the Structural Groups method Results Conclusions and Future work

slide-12
SLIDE 12

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 13

Outline

Introduction and Motivation Parallelism in the Structural Groups method Results Conclusions and Future work

slide-13
SLIDE 13

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 14

Parallelism in the Structural Groups method

  • The Stewart Platform (MBS) is a case study to analyze the

application of parallelism for speeding up the kinematic analysis based on Group equations terminal (SG-T) (8) handle-stick (SG-H) (2-7)

slide-14
SLIDE 14

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 15

  • A scheme of the Group Equations method

1 for number of external iterations (tEnd*dt) do 2 Solve kinematic of terminal (size nSG-T) //MKL p. 3 for all structural components (nSG) do //OpenMP p. 4 for number of internal iterations (tEnd2) do 5 Solve kinematic of SC (size nSG-HS) //MKL p. 6 end for 7 end for 8 end for

Parallelism in the Structural Groups method

slide-15
SLIDE 15

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 16

  • A scheme of the Group Equations method

1 for number of external iterations (tEnd*dt) do 2 Solve kinematic of terminal (size nSG-T) //MKL p. 3 for all structural components (nSG) do //OpenMP p. 4 for number of internal iterations (tEnd2) do 5 Solve kinematic of SC (size nSG-HS) //MKL p. 6 end for 7 end for 8 end for

Parallelism in the Structural Groups method

tEnd: a maximum execution time is established dt: time step tEnd2: number of iterations for the position problem nSG: number of structural groups nSG-T: dimension of the SG-T matrix nSG-HS: dimension of the SG-HS matrix

slide-16
SLIDE 16

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 17

  • A scheme of the Group Equations method

1 for number of external iterations (tEnd*dt) do 2 Solve kinematic of terminal (size nSG-T) //MKL p. 3 for all structural components (nSG) do //OpenMP p. 4 for number of internal iterations (tEnd2) do 5 Solve kinematic of SC (size nSG-HS) //MKL p. 6 end for 7 end for 8 end for

Parallelism in the Structural Groups method

tEnd: a maximum execution time is established dt: time step tEnd2: number of iterations for the position problem nSG: number of structural groups nSG-T: dimension of the SG-T matrix nSG-HS: dimension of the SG-HS matrix

Parallelism can be exploited by simultaneously solving the problems for the SGs in the system, inside a multicore system (MKL) or with calls to GPU (MAGMA)

slide-17
SLIDE 17

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 18

  • A scheme of the Group Equations method

1 for number of external iterations (tEnd*dt) do 2 Solve kinematic of terminal (size nSG-T) //MKL p. 3 for all structural components (nSG) do //OpenMP p. 4 for number of internal iterations (tEnd2) do 5 Solve kinematic of SC (size nSG-HS) //MKL p. 6 end for 7 end for 8 end for

Parallelism in the Structural Groups method

  • We have exploited the parallelism in different ways:

1. GEMKL: The multithreading version of MKL. 2. GEOMP+MKL: OpenMP is used to start the threads which works simultaneously in the solution of different SGs. The matrix problems for each group are solved by calling MKL, which can be sequential or multithreading 3. GEOMP+MA27: OpenMP parallelism is exploited, with calls to the routine MA27 for solution of the matrix problem 4. GEMAGMA: GPU parallelism is exploited by solving the matrix problems with MAGMA.

slide-18
SLIDE 18

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 19

Outline

Introduction Parallelism in the Structural Groups method Results Conclusions and Future work

slide-19
SLIDE 19

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 20

Outline

Introduction Parallelism in the Structural Groups method Results Conclusions and Future work

slide-20
SLIDE 20

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 21

Results

  • CPU Intel Core i5-2400 3.10 GHz

– 4 cores – No Hyper-Threading – 16 GB RAM

  • MKL  GMKL and MA27  GMA27 (dense and sparse

solvers) is used for the Global formulation

  • GEOMP+MKL and GEOMP+MA27 is used for the Group

equations (Topological formulation)

slide-21
SLIDE 21

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 22

  • Experiments: number of groups of the SP (nSG=6), nSG-T=12 and nSG-HS=15 for the

smallest problem, and nSG-T is fixed to 24 and nSG-HS=30..720 for the other

  • problems. Total size represents the size of the matrices for the global formulation.
  • tEnd=200, dt=0.01, 20000 iterations, tEnd2=1 for the parallel algorithm for the G. E.

Results

Global formulations vs Group Equations Total

size nSG-HS GMKL GMA27 GEOMP+MKL GEOMP+MA27 time th. time time

  • th. x th.

time th 102 15 2.52 1 4.19 0.53 3x1 0.74 3 204 30 9.11 3 9.02 1.13 3x1 1.40 3 384 60 32.43 3 13.45 2.39 3x1 2.84 3 744 120 151.94 4 25.29 8.40 3x1 5.71 3 1464 240 1127.25 4 48.26 42.33 3x1 12.23 3 2184 360 3579.63 4 71.27 147.41 3x1 18.23 3 2904 480 7149.04 4 94.19 323.77 3x1 24.35 3 4344 720 22840.51 4 140.13 828.97 1x4 36.59 3

slide-22
SLIDE 22

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 23

  • Multithreading MKL is preferable to MA27 for small sizes  not sparsity

Results

Global formulations vs Group Equations Total

size nSG-HS GMKL GMA27 GEOMP+MKL GEOMP+MA27 time th. time time

  • th. x th.

time th 102 15 2.52 1 4.19 0.53 3x1 0.74 3 204 30 9.11 3 9.02 1.13 3x1 1.40 3 384 60 32.43 3 13.45 2.39 3x1 2.84 3 744 120 151.94 4 25.29 8.40 3x1 5.71 3 1464 240 1127.25 4 48.26 42.33 3x1 12.23 3 2184 360 3579.63 4 71.27 147.41 3x1 18.23 3 2904 480 7149.04 4 94.19 323.77 3x1 24.35 3 4344 720 22840.51 4 140.13 828.97 1x4 36.59 3

slide-23
SLIDE 23

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 24

Results

Global formulations vs Group Equations Total

size nSG-HS GMKL GMA27 GEOMP+MKL GEOMP+MA27 time th. time time

  • th. x th.

time th 102 15 2.52 1 4.19 0.53 3x1 0.74 3 204 30 9.11 3 9.02 1.13 3x1 1.40 3 384 60 32.43 3 13.45 2.39 3x1 2.84 3 744 120 151.94 4 25.29 8.40 3x1 5.71 3 1464 240 1127.25 4 48.26 42.33 3x1 12.23 3 2184 360 3579.63 4 71.27 147.41 3x1 18.23 3 2904 480 7149.04 4 94.19 323.77 3x1 24.35 3 4344 720 22840.51 4 140.13 828.97 1x4 36.59 3

  • The exploitation of sparsity through MA27 is advisable for large matrices

 low complexity cost of MA27 (O(n)) vs MKL (O(n3))

  • The best results are obtained with 3 OpenMP threads
slide-24
SLIDE 24

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 25

  • Speed-ups of parallel versions of GE in relation with the GF MA27
  • The GE method clearly outperforms the GF
  • Speed-ups up to 8 for small sizes and closed to 4 for the largest problems

Results

Global formulations vs Group Equations

1 2 3 4 5 6 7 8 9 500 1000 1500 2000 2500 3000 3500 4000 4500 5000 Spped-up total size GMA27/GMKL GMA27/GEOMP+MKL GMA27/GEOMP+MA27

slide-25
SLIDE 25

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 26

Results

Application of parallelism for MBS larger than our case study

  • CPU Intel Xeon E5-2620 2 GHz

– 2 hexa-cores = 12 cores –32 GB RAM

  • MKL and MA27 sequential (dense and sparse solvers) for the Group

equations

  • GEOMP+MKL and GEOMP+MA27 is used for the Group equations
  • nSG = 6, 16, 22
  • nSG-HS = 15, 30, 60, 120
  • nSG-T = 12 (nSG-HS=15) and 24 in other cases
slide-26
SLIDE 26

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 27

Results

Application of parallelism for MBS larger than our case study

nSG nSG-HS MKL MA27 GEOMP+MKL GEOMP+MA27 6 15 0.85 1.90 0.65 0.76 30 2.13 3.33 1.42 1.79 60 5.54 7.24 2.72 3.13 120 20.18 15.96 9.61 6.49 16 15 2.07 4.86 0.98 1.66 30 4.91 8.61 2.35 3.07 60 14.02 18.69 4.65 5.68 120 52.71 41.43 16.16 13.23 22 15 3.00 7.18 1.35 2.19 30 7.15 12.96 2.62 4.27 60 20.77 27.95 6.53 8.02 120 78.89 61.01 23.47 19.38

slide-27
SLIDE 27

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 28

nSG nSG-HS MKL MA27 GEOMP+MKL GEOMP+MA27 6 15 0.85 1.90 0.65 0.76 30 2.13 3.33 1.42 1.79 60 5.54 7.24 2.72 3.13 120 20.18 15.96 9.61 6.49 16 15 2.07 4.86 0.98 1.66 30 4.91 8.61 2.35 3.07 60 14.02 18.69 4.65 5.68 120 52.71 41.43 16.16 13.23 22 15 3.00 7.18 1.35 2.19 30 7.15 12.96 2.62 4.27 60 20.77 27.95 6.53 8.02 120 78.89 61.01 23.47 19.38

Results

Application of parallelism for MBS larger than our case study

  • The improvement increases with the number of groups and the number of
  • coordinates. The exploitation of the sparsity is advantageous from between 60

and 120 coordinates.

  • Two levels of parallelism can be used for a better exploitation of the

parallelism in larger multicore systems.

slide-28
SLIDE 28

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 29

Results

Raspberry Pi versus Multicore Systems

  • Raspberry Pi: Small and cheap systems with low energy consumption 

The Stewart Platform

  • Raspberry Pi 2 Model B (RP2)

– 4 cores – ARMv7 32 bits

  • Raspberry Pi 3 Model B (RP3)

– 4 cores – ARMv8 64 bits

  • MKL is not available
  • LAPACK without multithreading is used for LAR
  • CPU Intel Core i5-2400 3.10 GHz (MKL)

– 4 cores – No Hyper-Threading – 16 GB RAM

  • CPU Intel Xeon E5-2620 2 GHz (MKL)

– 2 hexa-cores = 12 cores – 32 GB RAM

slide-29
SLIDE 29

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 30

Results

Raspberry Pi versus Multicore Systems

Execution Time Energy consumption nSG-T nSG-HS RP2 RP3 i5 E5 RP2 RP3 i5 E5 12 18 1.15 0.68 0.40 0.11 4.6 3.4 6.0 10.5 24 36 5.90 4.08 1.46 0.26 23.6 20.4 21.9 24.7 36 54 15.67 11.67 1.94 0.48 62.7 58.4 29.1 45.6 48 72 31.11 26.72 2.95 0.69 124.4 133.6 44.3 65.6 60 90 58.84 53.36 5.14 1.09 235.4 266.8 77.1 103.4 72 108 93.38 89.17 7.17 1.48 373.5 445.9 107.6 140.6 84 126 148.42 137.69 9.64 2.10 593.7 688.5 144.6 199.5 96 144 214.06 204.77 12.85 2.67 856.2 1023.9 192.8 253.7

  • Number of groups: nSG=6
  • tEnd=300 tEnd2=200
slide-30
SLIDE 30

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 33

  • TDP RP2=RP3=4W
  • TDP i5=15W
  • TDP E5=95W

Results

Raspberry Pi versus Multicore Systems

Execution Time Energy consumption nSG-T nSG-HS RP2 RP3 i5 E5 RP2 RP3 i5 E5 12 18 1.15 0.68 0.40 0.11 4.6 3.4 6.0 10.5 24 36 5.90 4.08 1.46 0.26 23.6 20.4 21.9 24.7 36 54 15.67 11.67 1.94 0.48 62.7 58.4 29.1 45.6 48 72 31.11 26.72 2.95 0.69 124.4 133.6 44.3 65.6 60 90 58.84 53.36 5.14 1.09 235.4 266.8 77.1 103.4 72 108 93.38 89.17 7.17 1.48 373.5 445.9 107.6 140.6 84 126 148.42 137.69 9.64 2.10 593.7 688.5 144.6 199.5 96 144 214.06 204.77 12.85 2.67 856.2 1023.9 192.8 253.7

slide-31
SLIDE 31

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 34

Results

Raspberry Pi versus Multicore Systems

Execution Time Energy consumption nSG-T nSG-HS RP2 RP3 i5 E5 RP2 RP3 i5 E5 12 18 1.15 0.68 0.40 0.11 4.6 3.4 6.0 10.5 24 36 5.90 4.08 1.46 0.26 23.6 20.4 21.9 24.7 36 54 15.67 11.67 1.94 0.48 62.7 58.4 29.1 45.6 48 72 31.11 26.72 2.95 0.69 124.4 133.6 44.3 65.6 60 90 58.84 53.36 5.14 1.09 235.4 266.8 77.1 103.4 72 108 93.38 89.17 7.17 1.48 373.5 445.9 107.6 140.6 84 126 148.42 137.69 9.64 2.10 593.7 688.5 144.6 199.5 96 144 214.06 204.77 12.85 2.67 856.2 1023.9 192.8 253.7

  • Lowest TDP  i5: Much low power consumption, slower
  • RP: lowest TDP for the smallest size (SP)  Competitive GP for control

problems  Low power consumption, price and size

slide-32
SLIDE 32

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 35

Results

Experiments on GPU

  • CPU Intel Xeon E5-2620 2 GHz (MKL)

–2 hexa-cores = 12 cores –32 GB RAM

  • GPU GTX950 (MAGMA)
slide-33
SLIDE 33

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 36

Results

Experiments on GPU

  • GPU would be advantageous only for large problems  Not advisable: low

execution or power consumption.

Xeon OpenMPxMKL GPU Speed-up Speed-up nSG-T nSG-HS 6x2 2x6 MAGMA 6x2/2x6 6x2/MAGMA 12 18 0.006 0.01 0.331 0.6 0.02 24 36 0.008 0.013 0.336 0.62 0.02 36 54 0.01 0.021 0.373 0.48 0.03 48 72 0.025 0.057 0.417 0.44 0.06 60 90 0.034 0.067 0.492 0.51 0.07 72 108 0.047 0.077 0.563 0.61 0.08 400 400 0.721 0.697 3.638 1.03 0.2 600 600 1.819 2.023 5.995 0.9 0.3 800 800 3.211 4.399 8.808 0.73 0.36 1000 1000 6.928 7.376 13.47 0.94 0.51 2000 2000 43.728 40.588 53.038 1.08 0.82 3000 3000 143.072 115.185 138.463 1.24 1.03 4000 4000 328.249 253.709 293.713 1.29 1.12

slide-34
SLIDE 34

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 37

Outline

Introduction Parallelism in the Structural Groups method Results Conclusions and Future work

slide-35
SLIDE 35

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 38

Outline

Introduction Parallelism in the Structural Groups method Results Conclusions and Future work

slide-36
SLIDE 36

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 39

Conclusions

  • The computational kimematic formulation based on group equations is

a topological approach that exploits the kinematic structure of a MBS to divide it in several SGs of smaller sizes

  • Parallel programming techniques can be applied to solve the

equations independently

  • The SP has been used to analyze the Group Equations formulation
  • Lower execution times are obtained with the GE method in

comparison with the global formulation  Speed-ups achieved is between 4 and 8

  • Raspberry Pi: a good alternative to general purpose multicores for

small control problems, with similar times and lower price, power consumption and space

  • The massive parallelism of GPUs is appropriate for large problems
slide-37
SLIDE 37

ICCS’17 – Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations 40

Future work

  • The use of other computational libraries (dense and sparse)
  • Auto-tuning techniques should be included in the routines 

the best parallel strategy and library with the values of some parameters (number of threads, number of steps)

  • For large MBS  the use of message-passing parallelism

needs to be analyzed.

slide-38
SLIDE 38

Conference title 41

Exploiting Hybrid Parallelism in the Kinematic Analysis of Multibody Systems Based on Group Equations

  • G. Bernabé†, J. C. Cano ‡, J. Cuenca†, A. Flores†, D. Giménez‡,
  • M. Saura-Sánchez Ω and P. Segado-Cabezos Ω

† Computer Engineering Department, University of Murcia

‡ Computer Science and Systems Department, University of Murcia

Ω Mechanical Engineering, Technical University of Cartagena 12-14 June, 2017

International Conference on Computational Science (ICCS 2017)