Performed by: Liran Sperling 200476216 Gal Braun301357059 Instructor: Evgeny Fiksman

36
Performed by: Liran Sperling 200476216 Gal Braun 301357059 Instructor: Evgeny Fiksman תתתתת תתתתתתת תתתתתתת תתתתתתh speed digital systems laboratory תתתת- תתתתתתת תתתתתתתת תתתתתת תתתתתתת תתתתתת תתתתechnion - Israel institute of technology epartment of Electrical Engineering GPS/INS Tracking System Using Particle Filter Model 1

description

Technion - Israel institute of technology department of Electrical Engineering. הטכניון - מכון טכנולוגי לישראל הפקולטה להנדסת חשמל. המעבדה למערכות ספרתיות מהירות. High speed digital systems laboratory. GPS/INS Tracking System Using Particle Filter Model. - PowerPoint PPT Presentation

Transcript of Performed by: Liran Sperling 200476216 Gal Braun301357059 Instructor: Evgeny Fiksman

Page 1: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

Performed by: Liran Sperling 200476216Gal Braun 301357059

Instructor: Evgeny Fiksman

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

הטכניון - מכון טכנולוגי לישראל

הפקולטה להנדסת חשמל

Technion - Israel institute of technologydepartment of Electrical Engineering

GPS/INS Tracking SystemUsing Particle Filter Model

1

Page 2: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

Project Requirements

3

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Implement the INS/GPS system using particle filter model algorithm using Nvidia GPU and OpenCL

platform

Page 3: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

GPGPU Languages

6

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

• DirectX (1995)

• Cuda (2006)

• OCL (2008)

• Open Computing Language

• Managed by Khronos group

• Use all computation resources in system

• Derived from C99

Page 4: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

Khronos Group

6

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Page 5: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Our GPU – GeForce GTX285

Price: 200$ – 250$

Page 6: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

GPU Architecture

6

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Page 7: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

OCL Memory model

6

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Page 8: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

From C to OpenCL

Page 9: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

System Description

4

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Combined GPS/INS navigation based on the particles filter model

INS – Inertial Navigation System GPS – Global Positioning System Particles Filter Model – Combining the

GPS and INS algorithms.

Page 10: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

System Description

4

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

INS

GPSWeightsrecalculation

Resampling

every 10 msec

every 1sec

every 1sec

Neff > Nth

Neff < Nth

Page 11: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

CPU

Block Diagram

5

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Initialization

Particle Propagation

Particle weight calc

State vector calculation

Covariance matrix calc

Resampling

Regularization

No GPS measure

GPS measure

Particles number < Nth

Particles number > Nth

Weight recomputation

Randomizing

Effective particles number calc

Matrix Inversion

Page 12: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

Many Particles (30000). Each particle is independent to the

others. Major parts of the algorithms can be

performed in parallel. OpenCL parallel computing will enable

to use the GPGPU computing power to optimize the algorithm performance.

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Why GPU and OCL?

Page 13: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

We would like to use our multi-core GPGPU

to optimize the calculation time.How can it be done ?

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Calculation Optimization - Example

Page 14: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Example - CPU

Calculation time = 0 time units

12 5 2 13 16 8 5 41 17 27 3 9 20 34 7 12

Sum = 012

1

17

2

19

3

32

4

219

15

231

16

Page 15: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Example – Naive GPU

12 5 2 13 16 8 5 41 17 27 3 9 20 34 7 12

Sum = 529

Calculation time = 0 time units

0 529

1

Page 16: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

Is the output correct ?

Can this level really be achieved cosidering memory access & sychronizing ?

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

But…

Page 17: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Example – Our GPU Solution

12 5 2 13 16 8 5 41 17 27 3 9 20 34 7 12

Calculation time = 0 time units 1

0 0 0 0 0 0 0 029 32 5 22 36 42 12 530 0 0 065 74 17 75

2

0 082 149

3

Sum = 0 231

4

Page 18: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

Takes approximately . Utilizes the GPUPU multi-core to the

maximum. And with large calculations (say, 30000

* 16), the calculation time is extremely reduced compared to the linear CPU solution.

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Our Solution

2log N

Page 19: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Development Methodology

Final simulatio

n

Blocks layer

Function layer

Page 20: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

Function layer: Transforming Matlab functions into OpenCL

kernels & code.– Major difficulty was tranforming the Matlab “natural”

matrix calculations into parallel C code and kernels.

Comparing the outputs of the matlab and OpenCL functions.

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Development Methodology

Page 21: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

Block layer: The algorithm was divided into two major

parts: Particles propagation block & weights recalculation. Resampling block.

– Major difficulty was synchronizing the code parts done by the CPU (the parts written in C code) and the parts done by the GPU (the parts written as OpenCL kernels).

Comparing the outputs of the matlab and OpenCL.

– Major difficulty was finding errors since it meant checking iteration by iteration of the algorithm running.

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Development Methodology

Page 22: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

Final Simulation: Running the entire algorithm over the 100

seconds long data file we received.

Comparing the results to the results provided by the C programming group.

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Development Methodology

Page 23: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Results – X coordinate

Page 24: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Results – Y coordinate

Page 25: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Results – Z coordinate

Page 26: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Results – X velocity

Page 27: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Results – Y velocity

Page 28: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Results – Z velocity

Page 29: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Results – Running Time%GPU calculating time:

Page 30: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Results – Running Time%GPU calculating time (excluding prediction):

Page 31: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Results – Running TimeNumber of calls to function:

Page 32: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Results – Running TimeNumber of calls to function (excluding Prediction & reads from memory):

Page 33: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Results – Running TimeFunction run time:

Page 34: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

Results – Running TimeCycle run time (presenting the 3 types of possible cycles):

Page 35: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

Block Diagram

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

CPU

No GPS measure

GPS measure

Particles number < Nth

Particles number > Nth

Randomizing

Matrix Inversion

5

Initialization

Particle Propagation

Particle weight calc

State vector calculation

Covariance matrix calc

Resampling

Regularization

Weight recomputation

Effective particles number calc

5

0.58[ msec]

1.80[ msec]

10.44[ msec]

12.24[ msec]

Page 36: Performed by: Liran Sperling  200476216 Gal  Braun301357059 Instructor:  Evgeny Fiksman

3

High speed digital systems laboratoryהמעבדה למערכות ספרתיות מהירות

?שאלות