Presentation on theme: "Linear Inverse Problems"— Presentation transcript:
1 Linear Inverse Problems A MATLAB TutorialPresented by Johnny Samuels
2 What do we want to do?We want to develop a method to determine the best fit to a set of data: e.g.
3 The Plan Review pertinent linear algebra topics Forward/inverse problem for linear systemsDiscuss well-posednessFormulate a least squares solution for an overdetermined system
4 Linear Algebra Review Represent m linear equations with n variables: A = m x n matrix, y = n x 1 vector, b = m x 1 vectorIf A = m x n and B = n x p then AB = m x p (number of columns of A = number of rows of B)
5 Linear Algebra Review: Example Solve system using MATLAB’s backslash operator “\”: A = [ ; ; ]; b=[2;-1;3]; y = A\b
6 Linear Algebra Review: What does it mean? Graphical Representation:
7 Linear Algebra Review: Square Matrices A = square matrix if A has n rows and n columnsThe n x n identity matrix =If there exists s.t then A is invertible
8 Linear Algebra Review Square Matrices cont. If thenCompute (by hand) and verify (with MATLAB’s “*” command) the inverse of
9 Linear Algebra Review: One last thing… The transpose of a matrix A with entries Aij is defined as Aji and is denoted as AT – that is, the columns of AT are the rows of AEx: impliesUse MATLAB’s “ ‘ “ to compute transpose
10 Forward Problem: An Introduction We will work with the linear system Ay = b where (for now) A = n x n matrix, y = n x 1 vector, b = n x 1 vectorThe forward problem consists of finding b given a particular y
11 Forward Problem: Example g = 2y : Forward problem consists of finding g for a given yIf y = 2 then g = 4What if and ?What is the forward problem for vibrating beam?
12 Inverse ProblemFor the vibrating beam, we are given data (done in lab) and we must determine m, c and k.In the case of linear system Ay=b, we are provided with A and b, but must determine y
13 Inverse Problem: Example g = 2y : Inverse problem consists of finding y for a given gIf g = 10 thenUse A\b to determine y
14 Well-posednessThe solution technique produces the correct answer when Ay=b is well-posedAy=b is well-posed whenExistence – For each b there exists an y such that Ay=bUniqueness –Stability – is continuousAy=b is ill-posed if it is not well-posed
15 Well-posedness: Example In command window type y=well_posed_ex(4,0)y is the solution toK = condition number; the closer K is to 1 the more trusted the solution is
16 Ill-posedness: Example In command window type y=ill_posed_ex(4,0)y is the solution to whereExamine error of y=ill_posed_ex(8,0)Error is present because H is ill-conditioned
17 What is an ill conditioned system? A system is ill conditioned if some small perturbation in the system causes a relatively large change in the exact solutionIll-conditioned system:
19 What is the effect of noisy data? Data from vibrating beam will be corrupted by noise (e.g. measurement error)Compare:y=well_posed_ex(4,0) and z=well_posed(4,.1)y=well_posed_ex(10,0) and z=well_posed(10,.2)y=ill_posed_ex(4,0) and z=ill_posed(4,.1)y=ill_posed_ex(10,0) and z=ill_posed(10,.2)How to deal with error? Stay tuned for next talk
20 Are we done?What if A is not a square matrix? In this case does not existFocus on an overdetermined system (i.e. A is m x n where m > n)Usually there exists no exact solution to Ay=b when A is overdeterminedIn vibrating beam example, # of data points will be much larger than # of parameters to solve (i.e. m > n)
22 Obtaining the Normal Equations We want to minimize :is minimized when y solvesprovides the least squares solution
23 Least Squares: Example Approximate the spring constant k for Hooke’s Law: l is measured lengths of spring, E is equilibrium position, and F is the resisting forceleast_squares_ex.m determines the least squares solution to the above equation for a given data set
24 What did we learn?Harmonic oscillator is a nonlinear system, so the normal equations are not directly applicableMany numerical methods approximate the nonlinear system with a linear system, and then apply the types of results we obtained here
Your consent to our cookies if you continue to use this website.