14
PROJECT: NUMERICAL SOLUTIONS TO ORDINARY DIFFERENTIAL EQUATIONS IN HARDWARE Joseph Schneider EE 800 March 30, 2010

P ROJECT : N UMERICAL S OLUTIONS TO O RDINARY D IFFERENTIAL E QUATIONS IN H ARDWARE Joseph Schneider EE 800 March 30, 2010

Embed Size (px)

Citation preview

Page 1: P ROJECT : N UMERICAL S OLUTIONS TO O RDINARY D IFFERENTIAL E QUATIONS IN H ARDWARE Joseph Schneider EE 800 March 30, 2010

PROJECT: NUMERICAL SOLUTIONS TO ORDINARY DIFFERENTIAL EQUATIONS IN HARDWARE

Joseph Schneider

EE 800

March 30, 2010

Page 2: P ROJECT : N UMERICAL S OLUTIONS TO O RDINARY D IFFERENTIAL E QUATIONS IN H ARDWARE Joseph Schneider EE 800 March 30, 2010

ORDINARY DIFFERENTIAL EQUATIONS

Function with one independent variable and derivatives of the dependent variable

Eg. y’ = 1 + y/x

Requires some initial condition in order to be solved

Eg. y(1) = 2

Page 3: P ROJECT : N UMERICAL S OLUTIONS TO O RDINARY D IFFERENTIAL E QUATIONS IN H ARDWARE Joseph Schneider EE 800 March 30, 2010

ORDINARY DIFFERENTIAL EQUATIONS

Found in many areas of engineering

Radioactive decay, heat equation, motion…

In electrical engineering, charge, flux, voltage, current, all intertwined by differential equations

Page 4: P ROJECT : N UMERICAL S OLUTIONS TO O RDINARY D IFFERENTIAL E QUATIONS IN H ARDWARE Joseph Schneider EE 800 March 30, 2010

ORDINARY DIFFERENTIAL EQUATIONS

In some cases, original equation can be derived with relative ease; Exact solutions are then available

In other cases, we will only have the ODE to work with

Numerical solutions have been developed to deal with these cases

Page 5: P ROJECT : N UMERICAL S OLUTIONS TO O RDINARY D IFFERENTIAL E QUATIONS IN H ARDWARE Joseph Schneider EE 800 March 30, 2010

ORDINARY DIFFERENTIAL EQUATIONS

Most basic case: Euler’s Method

Selecting a step size h, iterate from initial value to desired value using the derivative function

Page 6: P ROJECT : N UMERICAL S OLUTIONS TO O RDINARY D IFFERENTIAL E QUATIONS IN H ARDWARE Joseph Schneider EE 800 March 30, 2010

ORDINARY DIFFERENTIAL EQUATION

Euler’s Method most basic case – Simple, but inaccurate

Variety of other methods that have been developed

Page 7: P ROJECT : N UMERICAL S OLUTIONS TO O RDINARY D IFFERENTIAL E QUATIONS IN H ARDWARE Joseph Schneider EE 800 March 30, 2010

ORDINARY DIFFERENTIAL EQUATIONS

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 210.00E+00

5.00E-04

1.00E-03

1.50E-03

2.00E-03

2.50E-03

3.00E-03

3.50E-03

4.00E-03

4.50E-03

Taylor'sMidpointMod Euler'sRunge KuttaAdam'sMilne SimpHuen's

x

Err

or

Page 8: P ROJECT : N UMERICAL S OLUTIONS TO O RDINARY D IFFERENTIAL E QUATIONS IN H ARDWARE Joseph Schneider EE 800 March 30, 2010

ORDINARY DIFFERENTIAL EQUATIONS

1 1.11.21.31.41.51.61.71.81.9 2 2.12.22.32.42.52.62.72.82.9 30.00E+00

5.00E-07

1.00E-06

1.50E-06

2.00E-06

2.50E-06

3.00E-06

3.50E-06

4.00E-06

4.50E-06

5.00E-06

Runge KuttaAdam'sMilne Simp

x

Err

or

Page 9: P ROJECT : N UMERICAL S OLUTIONS TO O RDINARY D IFFERENTIAL E QUATIONS IN H ARDWARE Joseph Schneider EE 800 March 30, 2010

ORDINARY DIFFERENTIAL EQUATIONS

Error directly linked with step size

As step size decreases, error decreases; However, takes longer for process to complete

Implemented in software (eg. Matlab), more accurate methods take several seconds to complete for smaller scale cases; Several minutes for larger cases

Page 10: P ROJECT : N UMERICAL S OLUTIONS TO O RDINARY D IFFERENTIAL E QUATIONS IN H ARDWARE Joseph Schneider EE 800 March 30, 2010

ORDINARY DIFFERENTIAL EQUATIONS

Original project goal: Implement the Runge-Kutta 4th order method in hardware for improved speed

Page 11: P ROJECT : N UMERICAL S OLUTIONS TO O RDINARY D IFFERENTIAL E QUATIONS IN H ARDWARE Joseph Schneider EE 800 March 30, 2010

PROJECT

Euler’s method also implemented for comparisons on area, timing, and accuracy.

Current implementation: Uses fixed-point number representation, state machine

Further steps on this implementation Variable-point number representation to improve

accuracy Modify for parallelism to examine impacts on

area, timing

Page 12: P ROJECT : N UMERICAL S OLUTIONS TO O RDINARY D IFFERENTIAL E QUATIONS IN H ARDWARE Joseph Schneider EE 800 March 30, 2010

PROJECT

Second implementation: Error-controlled design of Runge-Kutta method

Error is specified at beginning of process, step size is varied to ensure final result meets error specifications

Page 13: P ROJECT : N UMERICAL S OLUTIONS TO O RDINARY D IFFERENTIAL E QUATIONS IN H ARDWARE Joseph Schneider EE 800 March 30, 2010

MATLAB IMPLEMENTATIONS

10^-3 10^-4 10^-5 10^-6 10^-7 10^-8 10^-9 10^-10

10^-11

10^-12

10^-13

10^-14

10^-15

0

10

20

30

40

50

60

70

Runge KuttaAdamsExtrapolation

Error Threshold

Tim

e t

o C

om

ple

te

Page 14: P ROJECT : N UMERICAL S OLUTIONS TO O RDINARY D IFFERENTIAL E QUATIONS IN H ARDWARE Joseph Schneider EE 800 March 30, 2010

PROJECT

For second implementation, desired to use a hardware design to improve on bottleneck of software design

Comparisons to software on time vs. error threshold