Adjustment Computations 1
Adjustment Computations 1 SURE 372
Popular in Course
Popular in Surveying Engineering
This 41 page Class Notes was uploaded by Mrs. April Bechtelar on Monday October 12, 2015. The Class Notes belongs to SURE 372 at Ferris State University taught by Staff in Fall. Since its upload, it has received 23 views. For similar materials see /class/221624/sure-372-ferris-state-university in Surveying Engineering at Ferris State University.
Reviews for Adjustment Computations 1
Report this Material
What is Karma?
Karma is the currency of StudySoup.
You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!
Date Created: 10/12/15
LUFACTORIZATION EXAMPLE SURVEYING ENGINEERING FERRIS STATE UNIVERSITY Given the following system of equations 3x1 4x29x3 x4 8 2x16x2 x3 7x4 7 x2 x3 x4 0 79cl x2 6x3 5x4 11 Solve the system using LU Factorization Begin by computing the upper and lower triangular forms of the design matrix R223R1 3 4 9 1 3 4 9 1 12370312 3 4 9 7 2 6 1 7 R4 3R1 0 33 76 R44512 0 33 5 0 1 1 1 0 1 1 0 0 25 7 1 6 5 0 83 15 23 0 0 275 F 0 0 01 F 0 0 08 0 0 08 1 0 1 0 0 03 1 23 1 23 25 3 4 9 1 0 33 5 76 0 0 25 13 0 0 0 22 1 0 0 0 03 1 0 0 0 03 1 0 23 25 11 1 1 78 R 13 1658 71 1R3 Ol ITERATIVE METHODS FOR SOLVING LINEAR EQUATIONS There are other methods that can be used to solve a set of linear equations that are based on iteration In these cases an initial estimate of the parameters is estimated and then the equations are solved yielding an updated version of the parameters These new values are then inserted back into the equations and the process continues until the desired solution is reached The two iterative methods discussed here are the Jacobi method and the GaussSeidel method Jacobi Iteration Method Given a set of linear equations a1X1 82X2 aan S1 bIX1 b2X2 ann s2 dlx1 d2X2 ann sn the problem is one of solving for X1 X2 9 The right hand side of these equations s represents the solution We begin by rearranging these equations in the form of solving for the unknown parameters one equation at a time Thus X1 S1a2xltzogt asxgogt anxgogt a391 a391 1 a391 b b b S21X103X30 nX 0 bll b2 b2 b2 Xquot Sndlxlltogtd2xgogt Xgojl an d dquot dquot The superscript 0 indicates the initial estimate of the parameters For the rst pass these parameters are given the value zero The equations are then solved which results in an updated value of the parameters These current estimates are then inserted back into the equations and a newer set of parameters is anived at by solving these equations The process continues until the solution converges As an example take the following linear equations 7X13X2X3 18 2X1 9X2 4X3 12 X1 4X2 123 6 Rearrange these equations 117SX2x3 3 x12571 0429x2 0143x3 X2X1X3 3 x2 13330222x10444x3 4 X3 X1 X2 3 X3 0500 0083X1 03332 12 12 12 Use as the initial estimates 2110 2120 2130 0 Insert these estimates into these equations yielding new estimates of the parameters xi 2571 0429 0 01430 2571 X 1333 0222 00444 0 1333 X 0500 0083 0 0333 0 0500 Insert these updated estimates back into original equation again yielding xf 2571 0429 1333 0143 0500 3071 Kg 1333 0222 2571 0444 0500 0540 X 0500 0083 2571 0333 1333 0159 This process is continued until the desired results are obtained The following table shows the solutions arrived at a er each iteration These results are from the attached Fortran program The output shows Xi that are the parameters Xi Also output is the change in the parameters dXi between each iteration SOLVTNG LINEAR EQUATION USING THE JACOBT TTERATTON METHOD The estimated results after each iteration are shown as Iteration x1 x2 x3 dx1 dx2 5 dx3 1 2 7143 7133333 50000 257143 7133333 50000 2 307143 753968 715873 50000 79365 765873 3 282540 772134 06415 724603 718166 22288 4 287141 767695 02410 04601 04439 704005 5 285811 768453 03506 701330 700757 01096 6 285979 768261 03365 00168 00192 700142 How good are these results Lets take our equations and put them into an augmented matrix and solve using Gauss Jordan elimination Iterative Methods for Solving Linear Equations Page 2 7 3 1 18 1 4 12 6 T 4 12 R1lt gtR3 RZ ZRI 2 9412gt2 9412gt 1 20 l1 4 12 6i l7 3 1 18JR3 7R l0 31 83 1 4 12 6 1 0 92 6 R14RZ R1792R3 0 1 20 0 7 0 1 20 0 0 0 703 24 R703 0 0 1 0034 Z mz As one can see the values using the Jacobi iterative method are very close lmamz 0 gt 24i 2 1 0 0 2859 0 1 0 0683 0 0 1 0034 Following is a Fortran program that can be used to use the Jacobi iteration to solve a set of equations The limitation now is that it is restricted to only a 3 X 3 matrix due to formatting procedures currently used in the program c Program Jacobi c Program to solve a linear equation using the Jacobi Iteration c method c IMPLICIT none REAL LS coef34 d dx3 x34 xn3 xnp3 INTEGER i iter iteratej no nv DATA iterate 0 c c The data are entered into the program using a data file called c jacobidat It has the following row values c number of equations c number of variables c xl x2 x3 solution for the first equation c xl x2 x3 solution for the second e uation c xl x2 x3 solution for the third eguation c OPEN 4 file 39jacobidat39 OPEN 6 file 39results39 c c no is the number of equations and nv is the number of variables c read4 no do 5 ilno xni 0d0 5 continue read4 nv write6901 c c The coefficients for the variables are read in the matrix x with c the solution to the equations being the last column c do 10 ilno read4 xijjlnol c c d is the coefficient for the variable that is being solved for c it forms the denominator to compute the real number for the c remaining coefficients c d xii do 7 jlnol Iterative Methods for Solving Linear Equations Page 3 000000 18 J o 0000 000000 0 900 901 coefij Xijd end do Because the Jacobi method solves for the unknown Variable with respect to the current estimates of the other variables the coefficient for the Variable is made to be zero for subsequent use in the loop to compute the adjusted estimates coefii 0d0 write6900xijj1nvh end do write6902 do 13 i1no write6900coefijjlDVU end do write6903 iter 0 iterate is just a counter to keep track of the number of iterations iterate iterate1 Solve for the estimate of the unknown parameters do 20 i1no xnpi 7 coefinv1 do 18 31nv xnpi xnpi 7 coefijxnj end d end do dx is a Vector showing the change in the estimate of the Variable with respect to the estimated Value used in the previous iteration do 50 i1no dxi xnpi 7 xnh Test to see if the change is greater than the threshold If it is then the Variable iter is made equal to 1 At the beginning of each loop this Value is made equal to 0 If iter is 1 then this means to iterate again if dabsdxigt001d0 iter 1 Update the estimated parameter Value xni xnpi continue write6904iteratexnii1nvdxii1nv if itergt0 go to 15 FORMAT5X4f1045x FORMAT15X 39SOLVING LINEAR EQUATION USING THE JACOBI lTERATlON MET 1HOD3939The coefficients to the equations with the solution at th 1e end are39 FORMAT39Rearranging the equations to solve for the unknown Vari 1ables yields395x39the following coefficients 39 FORMAT39The estimated results after each iteration are shown as 13939Iteration392x39x1399x39x2399x39x3397x39dx1397x39dx2 2397X39dx339 FORMATi34x6f1052x stop Iterative Methods for Solving Linear Equations Page 4 GaussSeidel Iterative Method The GaussSeidel iterative method of solving for a set of linear equations can be thought of as just an extension of the Jacobi method Start out using an initial value of zero for each of the parameters Then solve for x as in the Jacobi method When solving for xl insert the just computed value for x1 In other words for each calculation the most current estimate of the parameter value is used To see how the GaussSeidel method worls lets use the values in the last example The initial estimates are set to zero Then the results from the first iteration are shown as x 2571 0429 x50 0143 X 2571 0429 0 01430 2571 X 1333 0222 X 0444 x50 1333 0222 2571 0444 0 0762 x3 0500 0083 X 0333 X 0500 0083 2571 0333 0762 0033 The next iteration is performed in a similar fashion It can be shown as x 2571 0429x 1 0143x 1 2571 0429 0762 01430033 2893 x22 1333 0222 0444X1gt 1333 0222 2893 0444 0033 0676 X 0500 0083 0333 0500 00832893 0333 0676 0034 A Fortran program was written to solve this problem The results are shown in the next table SOLVING LINEAR EQUATION USING THE GAUSSSEIDEL ITERATION METHOD The estimated results after each iteration are shown as Iteration xl x2 x3 dxl dx2 dx3 257143 776190 03175 7257143 76190 703175 2 289342 767624 03347 732200 708566 700172 3 285646 768369 03406 03696 00745 700060 4 285957 768273 03412 700311 700096 700006 As with the Jacobi method the results from the GaussSeidel method are essentially correct The Fortran program used to compute the Jacobi iteration method was modi ed to solve for the Gauss Seidel iterative method The program is shown as follows Program Gausisdlfor Program to solve a linear equation using the GausseSeideI Iteration method 0000 IMPLICIT none READS coef34 d dx3 x34 xn3 xnp3 Iterative Methods for Solving Linear Equations Page 5 INTEGER i iter iteratej no nv DATA iterate 0 The data are entered into the program using a data file called gaussdat It has the following row Values number of equations Variables xl x2 x3 solution for the first equation xl x2 x3 solution for the second equation xl x2 x3 solution for the third equation 000000000 E O D H O m OPEN 4 file 39gaussdat39 OPEN 6 file 39results39 no is the number of equations and nv is the number of Variables read4 no read4 nv write6901 c c The coefficients for the Variables are read in the matrix x with c the solution to the equations being the last column c do 10 ilno read4 xijjlnol c c d is the coefficient for the Variable that is being solved for c it forms the denominator to compute the real number for the c remaining coefficients c d xii do 7 jlnol coefij xijd 7 end do c c Because the Jacobi method solves for the unknown Variable with c respect the current estimates of the other variables the c coefficient for the Variable is made to be zero for subsequent c us in the loop to compute the adjusted estimates c coefii 7 0d0 write6900 xijjlnvl 10 do write6902 do 13 il write6900 coefij jlnvl 13 do end write6903 15 iter 0 iterate is just a counter to keep track of the number of iterations iterate iteratel Solve for the estimate of the unknown parameters do 20 ilno xni coefinvl do 18 jlnv Iterative Methods for Solving Linear Equations Page 6 xni xni 7 coefijxnj 18 end do 20 end do c c dx is a vector showing the change in the estimate of the variable c with respect to the estimated value used in the previous iteration c do 50 ilno dxi xnpi Xhlt xnpi xni c c Test to see if the change is greater than the threshold c If it is then the variable iter is made equal to l c At the beginning of each loop this value is made equal to 0 c If iter is 1 then this means to iterate again c if dabsdxigt001d0 iter l c c Update the estimated parameter value c xni xnpi 50 continue write6904iteratexniilnvdxiilnv if itergt0 go to 15 900 FORMAT5x4flO45xH 90l FORMAT15x39SOLVING LINEAR EQUATION USING THE GAUssisElDEL lTERATl lON METHOD3939The coefficients to the equations with the solution 1 at the end are39 902 FORMAT39Rearranging the equations to solve for the unknown vari lables yields395x39the following coefficients 39 903 FORMAT39The estimated results after each iteration are shown as l3939Tteration392x39xl399x39x2399x39x3397x39dxl397x39dx2 2397x39dx339 904 FORMATi34x6f1052x stop end A more sophisticated subroutine for solving the GaussSeidel is shown as source unknown subroutine gsitrnabxnndimnitertolierr GaussSeidel Iterative Method ffff k k k k k k k k k k k k k k k k k k k k k k k This subroutine obtaines the solution to n linear equations by Gauss Seidel iteration An initial approximation is sent to the subroutine in the vector x The solution as approximated by the subroutine is returned in x The iterations are continued until the maximum change in any x component is less than tol If this cannot be accomplished in niter iterations a nonzero error flag is returned The matrix is to be arranged so as to have the largest values on the diagonal from quotApplied Numerical Analysisquot CF Gerald p 13 INPUTOUTPUT VARIABLES OOOOOOOOOOOOOOOOOO Iterative Methods for Solving Linear Equations Page 7 c ann coefficient matrix with largest values on diagonal c bn right hand side vector c xn solution vector initial guess c n Dimension of the system you39re solving c ndim Dimension of matrix a Note In the main program c matrix a may have been dimensioned larger than c necessary ie n the size of the system you39re c decomposing may be smaller than ndim c niter Number of iterations c tol tolerance for solution c ierr Error code ierrO no errors ierrl the c solution was not obtained in maximum iterations c c dimension andimndimbndimxndim ierr c c We can save some divisions by making all the diagonal c elements equal to unity c do 1 iln temp 10 aii bi bi temp do 2 jln aij aij temp 2 continue 1 continue c c Now we perform the iterations Store max change in x values for c testing against tol Outer loop limits iterations to niter c do 3 iterlniter xmax 0 do 4 iln temp 7 xi xi bi do 5 jln ifi nej then Mi Mi aijxj endif 5 continue ifabsxitempgtxmax xmax absxitemp 4 continue ifxmaxletol return 3 continue c c Normal exit from the loop means nonconvergent solution Flag the c error and pass control back to the calling routine c ierr 1 return end Iterative Methods for Solving Linear Equations Page 8 These rteatwe methods can also be very etrectwely progammed In a spreadsheet llke Excel For ocample the Jacobl method of solvlng for lmear equauons can be shown as The formulas for compuLlng xr and m Wthln the spreadsheet are shown as E c x1 x2 036lsA36SBumMU CQiscs zASU DQ sows sa 5 4 1 A AS4J D1 SJ39Dlu m A wb5tsaeslsAsssassrawc sassms st i 5A 03535 7 7 3m so 390 salsAsaxassyelLawssaliva D4 1 MAtz assw musHats WM 02 7 7 As l bossms SASS3mm cssmasSJma was cs sasssass Msslsassvawscswasslm 1t ls a slmple proc ss of copylng and pastlng to add more llnes to solve the equauons In a slmllar fashron the GaussSerdel method can also be progammed Wlthln Excel to amve at the same results as shown In the followlng gure Pageg Matrices Robert Burtch Order of a Matrix 0 Size Dimension or Order ofa matrix specified by number of rows m and columns H 0 Example B is a 2 by 3 matrix bll 912 913 921 922 923 623 454 mBnZBmn i 00 I 9 Vector 0 Matrix with only column or row data 0 Examples column and row 6 B 2 4 C7 4 2 8 Square Matrix 0 Number of rows eqals the number of columns 0 Example 2 4 5 D33 7 4 3 2 1 7 I O Symmetrical Matrix 0 Matrix symmetrical about the main diagonal in other words the element a aji 0 Example 6 4 2 E33 4 3 2 7 5 Diagonal Matrices o Diagonal matrix only elements on main diagonal are not zero 9 O 0 F20 2 O O O 5 0 Always a square matrix IDENTITY or UNIT MATRIX o Designated as l o Diagonal elements are ones 100 1010 001 TRIANGULAR MATRIX 0 Upper triangular matrix is an n x m matrix where aij 0 for I gt1 0 Lower triangular matrix exists if aij 0 for i ltj 3 Upper Triangular 0 0 1 Lower Triangular6 2 1 4 N EQUALITY amp SCALAR MULTIPLICATION 0 Two matrices A and B are said to be equal if a bij for each i andj o Ifris a real value reR andA is an mxn matrix scalar multiplication is rA raij Ex 2 Z 120 A Matrix Addition o If A an and B bu are both m x n matrices then the sum A B is the m x n matrix whose ijth entry is a bij for each ordered pair ij i H 321 456 222 123 543 579 i 00 I 9 Matrix Addition 0 If 0 is a m x n matrix of zeros then A 0 0 A A o Additive inverse o A1A01AA o Normally designate additive inverse as A 1A Matrix Multiplication o IfA an is an m x n matrix and B bu is an n x r matrix then the product AB C on is the m x r matrix whose entries are de ned by I1 CijZZ aikbkj k1 Matrix Multiplication 0 Row by column operation 3 2 2 4 1 3 2 1 3 1 1 4 1 6 20 22 I O Matrix Multiplication Multiplication 1 1 1 of matrices A J B is not 0 O 2 commutative 3 3 O O AB BA Algebraic Rules ABBA ABCABC ABCABC ABCABAC ABCACBC amAzawA I O Algebraic Rules aABw4BAaB a A a4 4 aA Ba4 B I O Transpose of a Matrix 0 IfA ai is an m x n matrix then the matrix AT aij J where a T aji o Transpose obtained by interchanging rows and columns Ai 123 14 AT25 456 36 Algebraic Rules for Transpose ATT A o aAT aAT o ABTATBT o ABT BTAT 0 Matrix A is symmetric if AT A A is skewsymmetric if AT A Q xxxxxx n nxxxx 5n xx xx xx xx xx H 4 mEmEmE Emw o 2m 29 528 Lo 8 5m 598 m 95 2 Emoxm xEmE 893 lt Xwltgt Dmmmomomnmnzltm Sc 36 O O O Sc 36 Sc 0 O 36 Sc 56 xEmE 9 5085 222536 952 93 Lo qu m 98 Emoxm Emcz gm mEmEmE 83 53gt xEmE x522 umucmm I O 00 008 0000 Trace of a Matrix 0 Trace of a square matrix is de ned as the sum of the principal diagonal elements of the matrix trA i Clii i1 0 Trace just a number Properties of the Trace o trA B trA trB o traA a trA o trAT trA o trAB trBA provided ABBA o trABC trBCA trCAB 000 O I 00 I 9 Inverse of a Matrix 0 If an n x n matrixA is nonsingularthen ther exists an n x n matrix B such that AB BA ln 0 B is called the inverse ofA and usually designated as A391 o If no such matrix B exists A is a singular matrix and not invertible CD Matrix Inverse o If a matrix has an inverse then the inverse is unique 0 Properties of inverse o lfA is nonsingular then A391 is nonsingular and A39 11 A o lfA and B are nonsingular then AB is nonsingular and AB391 B39lA391 o lfA nonsingular then AT391 A391T 12 00 I 9 Matrix Inverse 0 Let o 4 equations 12 71 ab A3 4 A c d a201 A1 3a4c0 b2d0 AA421 2 a b 211 0 3b4d1 3 4 c d 01 aZc b2d 1 0 quot 3a4c 3b4d 0 1 Matrix Inverse o Augmented matrix 10201 10201 30400R273R100 2 0 3 01010113301020 03041 000 21 10201 RMzgt01020 00 20 3 000 21 00 I 9 Matrix Inverse 0 Solution set a b c d 2 1 32 12 0 Since 33 JAE 1H5 3 5 Matrix Inverse o If A A2 Ar are n x n nonsingular matrices then A1A2Ar is nonsingular and A1A2quot39Ar 1 A1A11A1391 o If AB I then BA 1 assuming A and B are n x n matrices 14 PROBABILITY Robert Burtch Surveying Engineering Department Ferris State University COUNTING El Difficult to determine number of elements in finite sample space directly El THEOREM If sets A1 A2 Ak contain n1 n2 nk elements respectively then there are n1 x n2 x x nk ways of choosing the first element of A1 then element A2 finally an element of Ak PERMUTATION El When r objects are chosen from a set of n distinct objects in any particular order or arrangement El nPr nn1n2nr1 El In terms of factorials nn 1n 2n r1n rl n nPr n r n r COMBINATION El The number of ways in which r objects can be selected from a set of n objects is n nn 1n 2n r 1 r r El or in factorial notation n n l Kr rn r PROBABILITY El Classical Probability Concept I If there are n equally likely possibilities of which one must occur and S are regarded as favorable or as a success then the probability of a success is PAf g AXIOMS OF PROBABILITY El Real numbers from 0 to 1 OSPQDSI El Probability of an event from sample space occurring is 1 PS 1 El Probability functions additive PMUEHEHE GEN ERALIZATION OF THIRD AXIOM El If A1 A2 An are mutually exclusive events in a sample space S then PA1 o A2 o UAn PA1PA2 PAn RULE OF CALCULATING PROBABILITY OF EVENT IZIIf A is an event in finite sample space S then PA equals the sum of the probabilities of the individual outcomes comprising A GENERAL ADDITION RU LE I If A and B are any events in S PA U B PA PB PA m B El If A and B are mutually exclusive so that PA m B 0 The additional rule theorem reduces to 3rd axiom called special addition rule PROBABILITY OF COMPLEMENT I If A and A are complementary events Z I What is probability of at least 1 head is a coin is tossed 6 times in succession I 26 sample points since each toss has 2 outcomes Then PE 1 PE PE394 PE146364 CON DITIONAL PROBABILITY El The conditional probability of B relative to A is given as PAnB PBA PA El B is independent of A iff PBA PB GENERAL MULTIPLICATION RULE El If A and B are any events in S then PAmBPAPBA PBPAIB El Special Multiplication Rule given A and B being independent events PA m B PA PB SURE 372 Adjustment Comp 1 SET THEORY Robert Burtch Surveying Engineering Department Ferris State University SET THEORY Set unordered collection of particular objects Elements objects Example A1 2 3 4 5 9 10 A is the set Elements identified within braces Set Theory SURE 372 Adjustment Comp 1 SETTHEORY Symbol e Object is an element of a set a e S a is an element ofS a b e S 2 a and b are elements of S Symbol e Element not in a set a e S 2 a is not an element within S Subset 39 Every element If one element exists bebngstoandher H1VthaHsnotm39E set then V is not a subset Use symbols orc V T depending on syntax VcT meansVis subset of T TgtVmeansVis contained in T Set Theory SURE 372 Adjustment Comp 1 PROPER SUBSET At least one element of a set exists which is not an element of another set IfScTandS T thenSisaproper subset ofT SET THEORY SYNTAX If set S a b c then a e Sis correct form means a is an element of the set S a e S is incorrect since braces indicate a set and a is only an element a can be a subset ofS then it is properto state a c S Set Theory SURE 372 Adjustment Comp 1 Set Theory SET THEORY SYNTAX Can represent a set of elements in one set from another set S x e T x has the property p Example N is a set of natural numbers where x 2 7 SXE Nx27 SET THEORY SYNTAX Null set empty set Designated as Q Example set that contains all even Q is subset ofall sets natural numbers UHiversal Set Consists of all E T X E N I X IS even elements of interest Then Designated as U E 2 4 6 8 Also can be written as E 2n n e N SURE 372 Adjustment Comp 1 Set Theory UNION OF SETS Set consisting of Example elements from 2 or more sets A 0 2 3 5 7 9 11 Shown as and AUB B12467911 then Whose elements are C A U B XXeA0rXeB 0 1 2 3 4 5 6 7 Boolean OR 911 Conjoint If 2 sets have at least Disjoint If no common element exists in the two sets SURE 372 Adjustment Comp 1 Set Theory INTERSECTION OF SETS Denoted as C A m B Elements X X e A and X e B Boolean AND operation Example AO 2 3 5 7 8 9 11 and B 1 2 4 6 7 9 11 then CAmB2 7 9 11 COMPLEMENT OF A SET Elements from the universal set that are not a subset Designated as A0 or comp A Example if U all male and female students at FSU then the subset A all male students at FSU then comp A all female students at FSU SURE 372 Adjustment Comp 1 AB A minus B New set consists of elements in A that are not in B or XIXE Aandxe B Example from previous data c AB o 3 5 8 DISTRIBUTIVE LAW Sets follow distributive law AUBnCAUBnAUC and AnBUCAmBUAnC Set Theory WW1 Pawscr us A MillAim 7 m 5W Me P40113471 p 5 DAVE cusrwzn m Emilquot paw 71 Mm 725 2mm Weg adg W quotMquot SW Mg E pm 72 Mm 725 SEWER Solution of Linear Equation 1 2 2 1 6 A1 3 2 5 2 6 1 m21 2 m31 3 m41 2 m32 1 m34 0 m44 0556 1 2 1 4 OOOA OOOA OOOA by Gaussian Elimination Augmented Coefficient Matrix 2 10 9 2 10 9 0 1 5 0 16 2 1 9 6 9 1 5 0 16 2 35 6 9 1 5 0 16 2 35 7 11 2844444 Solution Line same as A1 Line same as A2 Line same as A2 Line same as AS Line same as AS Line same as AS
Are you sure you want to buy this material for
You're already Subscribed!
Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'