Slide 1

Slide 1 text

LEARN CONTINUOUS STRUCTURE Pranay Seshadri Associate Professor in Aerospace Engineering Georgia Institute of Technology

Slide 2

Slide 2 text

LEARN CONTINUOUS STRUCTURE INTRODUCTION equadratures is an open-source python code that is purpose built for developing models using orthogonal polynomials. These models can be fit directly to real-world sensor data, simulation data, or even to other surrogate models. As you will discover, using orthogonal polynomials is very advantageous and can tell us a lot about the underlying data we are modelling. A FEW WORDS

Slide 3

Slide 3 text

LEARN CONTINUOUS STRUCTURE OVERVIEW 1. FOURIER SERIES 2. ORTHOGONAL POLYNOMIALS 3. PARAMETERS 4. PARAMETERS & ORTHOGONAL POLYNOMIALS

Slide 4

Slide 4 text

LEARN CONTINUOUS STRUCTURE Before introducing equadratures, and its building blocks, it will be worthwhile to re-visit a Fourier series JB Joseph Fourier FOURIER SERIES

Slide 5

Slide 5 text

LEARN CONTINUOUS STRUCTURE Before introducing equadratures, and its building blocks, it will be worthwhile to re-visit a Fourier series JB Joseph Fourier FOURIER SERIES where and

Slide 6

Slide 6 text

LEARN CONTINUOUS STRUCTURE Before introducing equadratures, and its building blocks, it will be worthwhile to re-visit a Fourier series JB Joseph Fourier FOURIER SERIES where and 3 very important observations!

Slide 7

Slide 7 text

LEARN CONTINUOUS STRUCTURE Before introducing equadratures, and its building blocks, it will be worthwhile to re-visit a Fourier series JB Joseph Fourier FOURIER SERIES where and The function sits inside the integral. 1

Slide 8

Slide 8 text

LEARN CONTINUOUS STRUCTURE Before introducing equadratures, and its building blocks, it will be worthwhile to re-visit a Fourier series JB Joseph Fourier FOURIER SERIES where and The basis terms are orthogonal. 2

Slide 9

Slide 9 text

LEARN CONTINUOUS STRUCTURE Before introducing equadratures, and its building blocks, it will be worthwhile to re-visit a Fourier series JB Joseph Fourier FOURIER SERIES where and Computing the basis terms requires integration. 3

Slide 10

Slide 10 text

LEARN CONTINUOUS STRUCTURE FOURIER SERIES The function sits inside the integral. 1 The basis terms are orthogonal. 2 Computing the basis terms requires integration. 3 But, what is orthogonality?

Slide 11

Slide 11 text

LEARN CONTINUOUS STRUCTURE FOURIER SERIES We define orthogonality as where

Slide 12

Slide 12 text

LEARN CONTINUOUS STRUCTURE OVERVIEW 1. FOURIER SERIES 2. ORTHOGONAL POLYNOMIALS 3. PARAMETERS 4. PARAMETERS & ORTHOGONAL POLYNOMIALS

Slide 13

Slide 13 text

LEARN CONTINUOUS STRUCTURE ORTHOGONAL POLYNOMIALS Rather than use trigonometric functions, we opt for orthogonal polynomials. where and

Slide 14

Slide 14 text

LEARN CONTINUOUS STRUCTURE ORTHOGONAL POLYNOMIALS Rather than use trigonometric functions, we opt for orthogonal polynomials. where and The function sits inside the integral. 1 The basis terms are orthogonal. 2 Computing the basis terms requires integration. 3

Slide 15

Slide 15 text

LEARN CONTINUOUS STRUCTURE ORTHOGONAL POLYNOMIALS Rather than use trigonometric functions, we opt for orthogonal polynomials. where and Now we introduce truncation! This leads to an approximation error

Slide 16

Slide 16 text

LEARN CONTINUOUS STRUCTURE To approximate a function over a basis of orthogonal polynomials, we need to integrate to estimate its coefficients. Moreover, we need to ascertain the level of truncation required. ORTHOGONAL POLYNOMIALS

Slide 17

Slide 17 text

LEARN CONTINUOUS STRUCTURE To approximate a function over a basis of orthogonal polynomials, we need to integrate to estimate its coefficients. Moreover, we need to ascertain the level of truncation required. But, before we move forward, we need to understand these polynomials more intimately. ORTHOGONAL POLYNOMIALS

Slide 18

Slide 18 text

LEARN CONTINUOUS STRUCTURE OVERVIEW 1. FOURIER SERIES 2. ORTHOGONAL POLYNOMIALS 3. PARAMETERS 4. PARAMETERS & ORTHOGONAL POLYNOMIALS

Slide 19

Slide 19 text

LEARN CONTINUOUS STRUCTURE PARAMETER A parameter is a point within a domain , i.e., .

Slide 20

Slide 20 text

LEARN CONTINUOUS STRUCTURE PARAMETER A parameter is a point within a domain , i.e., . This domain can be: closed semi-infinite infinite We will assume that this domain is a line .

Slide 21

Slide 21 text

LEARN CONTINUOUS STRUCTURE PARAMETER We will also assume that this domain is equipped with a positive weight function Also assume that it integrates to unity over the domain . .

Slide 22

Slide 22 text

LEARN CONTINUOUS STRUCTURE PARAMETER We will also assume that this domain is equipped with a positive weight function Also assume that it integrates to unity over the domain . . probability density function

Slide 23

Slide 23 text

LEARN CONTINUOUS STRUCTURE PARAMETER Putting the pieces together with code, we have a parameter which is a point from the domain and its associated interval, and equipped with a probability distribution . from equadratures import * x = Parameter(distribution=‘uniform’, lower=-1, upper=1, order=3) x = Parameter(distribution=‘gaussian’, shape_parameter_A=0, shape_parameter_B=3, \ order=3) Use parameters to define your input data points, uncertainties or design variables.

Slide 24

Slide 24 text

LEARN CONTINUOUS STRUCTURE OVERVIEW 1. FOURIER SERIES 2. ORTHOGONAL POLYNOMIALS 3. PARAMETERS 4. PARAMETERS & ORTHOGONAL POLYNOMIALS

Slide 25

Slide 25 text

LEARN CONTINUOUS STRUCTURE PARAMETERS & ORTHGONAL POLYNOMIALS There exists a set of orthogonal polynomials that are orthogonal with respect to In other words… where

Slide 26

Slide 26 text

LEARN CONTINUOUS STRUCTURE PARAMETERS & ORTHGONAL POLYNOMIALS There exists a set of orthogonal polynomials that are orthogonal with respect to In other words… where For example, if Legendre polynomials

Slide 27

Slide 27 text

LEARN CONTINUOUS STRUCTURE PARAMETERS & ORTHGONAL POLYNOMIALS There exists a set of orthogonal polynomials that are orthogonal with respect to In other words… where For example, if Jacobi polynomials

Slide 28

Slide 28 text

LEARN CONTINUOUS STRUCTURE PARAMETERS & ORTHGONAL POLYNOMIALS There exists a set of orthogonal polynomials that are orthogonal with respect to In other words… where For example, if Hermite polynomials

Slide 29

Slide 29 text

LEARN CONTINUOUS STRUCTURE PARAMETERS & ORTHGONAL POLYNOMIALS Pairing each parameter with its corresponding orthogonal polynomial is important! This guarantees that for the small truncation in you can guarantee exponential convergence. This can be easily seen when we compute Formula for the mean!

Slide 30

Slide 30 text

LEARN CONTINUOUS STRUCTURE PARAMETERS & ORTHGONAL POLYNOMIALS Pairing each parameter with its corresponding orthogonal polynomial is important! This guarantees that for the small truncation in you can guarantee exponential convergence. This can be easily seen when we compute Formula for the variance!

Slide 31

Slide 31 text

LEARN CONTINUOUS STRUCTURE PARAMETERS & ORTHGONAL POLYNOMIALS Model evaluations Error in estimating the mean 10-16 10-10 10-4 10-1 10 20 30 40 50 0 10 20 30 40 50 10-7 10-13 0 Model evaluations Monte Carlo Using orthogonal polynomials

Slide 32

Slide 32 text

LEARN CONTINUOUS STRUCTURE PARAMETERS & ORTHGONAL POLYNOMIALS So, assuming we can find the coefficients of the polynomial approximation Computing statistical moments of is very easy! But

Slide 33

Slide 33 text

LEARN CONTINUOUS STRUCTURE PARAMETERS & ORTHGONAL POLYNOMIALS So, assuming we can find the coefficients of the polynomial approximation Computing statistical moments of is very easy! But How do we determine the order of the polynomial? How do we evaluate the integrals for the coefficients?

Slide 34

Slide 34 text

LEARN CONTINUOUS STRUCTURE PARAMETERS & ORTHGONAL POLYNOMIALS Recall our command from earlier… Set by . User should know something about how non-linear the function is. from equadratures import * x = Parameter(distribution=‘uniform’, lower=-1, upper=1, order=3)

Slide 35

Slide 35 text

LEARN CONTINUOUS STRUCTURE PARAMETERS & ORTHGONAL POLYNOMIALS While it is easy to truncate over a line for approximating

Slide 36

Slide 36 text

LEARN CONTINUOUS STRUCTURE PARAMETERS & ORTHGONAL POLYNOMIALS Not so easy to truncate over a plane

Slide 37

Slide 37 text

LEARN CONTINUOUS STRUCTURE PARAMETERS & ORTHGONAL POLYNOMIALS Additionally, in the univariate case for approximating Where the coefficients were given by

Slide 38

Slide 38 text

LEARN CONTINUOUS STRUCTURE PARAMETERS & ORTHGONAL POLYNOMIALS Additionally, in the univariate case for approximating Where the coefficients were given by which we can estimate via a quadrature rule Quadrature rule points weights

Slide 39

Slide 39 text

LEARN CONTINUOUS STRUCTURE PARAMETERS & ORTHGONAL POLYNOMIALS Additionally, in the univariate case for approximating Where the coefficients were given by which we can estimate via a quadrature rule Quadrature rule points weights

Slide 40

Slide 40 text

LEARN CONTINUOUS STRUCTURE PARAMETERS & ORTHGONAL POLYNOMIALS Now for the bivariate case, we have Where the coefficients are given by

Slide 41

Slide 41 text

LEARN CONTINUOUS STRUCTURE PARAMETERS & ORTHGONAL POLYNOMIALS Now for the bivariate case, we have Where the coefficients are given by

Slide 42

Slide 42 text

LEARN CONTINUOUS STRUCTURE PARAMETERS & ORTHGONAL POLYNOMIALS Now for the bivariate case, we have Where the coefficients are given by *by construction this assumes the distributions are independent!

Slide 43

Slide 43 text

LEARN CONTINUOUS STRUCTURE PARAMETERS & ORTHGONAL POLYNOMIALS Now for the bivariate case, we have Where the coefficients are given by which we can estimate via a bivariate quadrature rule Weights

Slide 44

Slide 44 text

LEARN CONTINUOUS STRUCTURE PARAMETERS & ORTHGONAL POLYNOMIALS Now for the bivariate case, we have Where the coefficients are given by which we can estimate via a bivariate quadrature rule Weights

Slide 45

Slide 45 text

LEARN CONTINUOUS STRUCTURE OVERVIEW 1. FOURIER SERIES 2. ORTHOGONAL POLYNOMIALS 3. PARAMETERS 4. PARAMETERS & ORTHOGONAL POLYNOMIALS

Slide 46

Slide 46 text

LEARN CONTINUOUS STRUCTURE CODE

Slide 47

Slide 47 text

LEARN CONTINUOUS STRUCTURE Let’s crystallise a few of these ideas through code. CODE from equadratures import * import numpy as np x = Parameter(distribution=‘uniform’, lower=-1, upper=1, order=3) I = Basis(‘tensor-grid’) p = Poly([x,x], I, method=‘numerical-integration’) pts, wts = p.get_points_and_weights() def fun(x): return np.exp(x[0] + x[1]) p.set_model(fun)

Slide 48

Slide 48 text

LEARN CONTINUOUS STRUCTURE CODE But we aren’t restricted to tensorial quadrature rules… There are other quadrature rules — each with their degree of exactness! But to understand those, it is worthwhile to re-phrase the problem.

Slide 49

Slide 49 text

LEARN CONTINUOUS STRUCTURE CODE For notational clarity, let’s stick to the 1D case for now Equivalently written as

Slide 50

Slide 50 text

LEARN CONTINUOUS STRUCTURE CODE With a slight abuse in notation….we can write this as Which may be solved via or or some combination thereof method=‘least-squares’ method=‘compressed-sensing’ method=‘elastic-net’ method=‘relevance-vector-machine’

Slide 51

Slide 51 text

LEARN CONTINUOUS STRUCTURE CODE Classically, polynomial interpolation / regression requires at least as many model evaluations as unknown coefficients. 1D 2D For instance for a quadratic polynomial, there are three unknowns in 1D. 9 unknowns in 2D

Slide 52

Slide 52 text

LEARN CONTINUOUS STRUCTURE CODE Classically, polynomial interpolation / regression requires at least as many model evaluations as unknown coefficients. 1D 2D For instance for a quadratic polynomial, there are three unknowns in 1D. 9 unknowns in 2D 3D 27 unknowns in 3D

Slide 53

Slide 53 text

LEARN CONTINUOUS STRUCTURE CODE Classically, polynomial interpolation / regression requires at least as many model evaluations as unknown coefficients. 1D 2D For instance for a quadratic polynomial, there are three unknowns in 1D. 9 unknowns in 2D 3D 27 unknowns in 3D Rising cost!

Slide 54

Slide 54 text

LEARN CONTINUOUS STRUCTURE The goal is to essentially solve linear systems where reducing costly model evaluations. For more details, check out the next tutorial! CODE

Slide 55

Slide 55 text

LEARN CONTINUOUS STRUCTURE THANK YOU made by the equadratures team, with ❤