Docstoc

Ing. Matteo Lancini - archimedes

Document Sample
Ing. Matteo Lancini - archimedes Powered By Docstoc
					Today




   Least    Square Method

     Linear LSM theory
Least Squares method
 Hypothesis:
  m experimental data points (couples xj-yj)
  n-th grade model given from the summation of
   n functions φ of x
            n 1
    y x     i  i x 
                                   generic function of x

            i 0

 Objective:
  Find the set of α parameters minimizing the deviation
   between the experimental values and the ones
   foreseen by the model, in order to have a model to
   estimate y, given x
Least Squares method

  Terms to minimize:
    the square of the deviation between experimental
    data and the ones foreseen by the model


   y x j   y j  
                                Deviation of the j-th couple
  2                    2
                                                               2
                                                      n 1
                                                           
                                 y j    ii x j 
  j
                                        m

       2    2 
            m                   2

                 j                j 1     i 0          
            j 1           
Least Squares method

 the term to minimize is a positive function of α,
 therefore, to find a set of α for the which this
 function has a minimum, we can look for a unique
 set of α for the which all the partial derivatives are
 null (point of minimum)
  2                                                m n 1
       0k  0, n  1    2 y j k x j   2  i  i x j   k x j 
                            m


  k                      j 1                     j 1 i  0
                         m n 1

                                      i x j   k x j     y j k x j 
                                                                   m
            1                      i
                        j 1 i  0                                 j 1
Least Squares method

                                   to simplify the
              i x1              formulation we define φi
                                   as a column vector in
      i        ...               the which each j-th
               i  xm            element is the result of
                                   the φi function applied to
                                   the experimental point xj.
      0 x1  ...  n 1  x1 
                                   grouping togheter the n
B      ...     ...        ...     φi columns we have
      0 xm  ...  n 1 xm     matrix B of m row and n
                                   columns
Least Squares method

                  y1                      0       if we define the column
    d  ...                      ...             vector d as the set of all
                  ym               n 1           the yj. experimental
                                                   points and the column
                    0 x1    ...    0  xm     vector α as the set of all
             B 
              T
                       ...     ...       ...       the parameters,
                    n 1 x1  ...  n 1 xm    equation (1) becomes:
m n 1

          i   i x j   k x j     y j k x j  k  0, n  1  B  B    B  d
                                          m
                                                             
                                                                             T              T

j 1 i  0                               j 1


   Please Note: OUR TASK IS TO FIND α GIVEN B and d
Least Squares method
  if matrix B were orthogonal the product BTB would give
  a diagonal matrix, filled up with the norms of its basis,
  therefore we could write
     0  0   0                0            0       0 d
       0       ...              0           ...         ...
       0       0        n 1   n 1       n 1    n 1  d
                                    
                     i d
           i                          i  0, n  1              but B
                      i  i                                       is not
                                                                  orthogonal

  we can however operate a basis transformation as to
  make B orthogonal, allowing us to compute α
Least Squares method
     to orthogonalize we use an iterative procedure:
     -the first new base is the same as the old
     -each further base is the same as the old, MINUS the
     dot product between the old base and the newfound
     basis (this is done to get rid of the interdependencies)

              0  x    0  x                                               n 1
                                                B  B   B  d            y    ii  x 
                                                  T              T

                                           
                        i 1    
                                             
                                                                                  i 0
                                                                                    
 i x   i x             i   p
                                           p  T
                       p 0  
                                             B  B     B  d
                                                                                 n 1
                                                                                           
                                                                             y     ii  x 
                                                                   T
                             p  p                                                          
                                                                              i 0           
 Gram-Schmidt orthogonalization
                                                                 i  d
                                                       i                   i  0, n  1
                                                                i   i
     in the new system we have
Least Squares method
  following the Gram-Schmidt orthogonalization we used
  an iterative procedure:
                0  x    0  x 
  
                                              introducing a further term
                          i 1    
                                           
  i  x   i  x                                       i   p
                                    i  p

                         p 0  
                                           p 
                               p  p               i, p 
                                            
                                                                  p   p
                                  βi,p

  we can rewrite the direct Gram-Schmidt This is not α !!
  orthogonalization as:                                       i


             
           0 x   0 x                      i  d
                                         i           i  0, n  1
                     i 1
                                                    
  i x   i x      i , p p 
                                               i  i
                      p 0             
Least Squares method

                                 This is not αi!!

                          i  d
                i                    i  0, n  1
                         i   i

  using an inverse iterative procedure we can trace back
  the original α which we sought for:

                        n 1   n 1
                 
                            n 1
                  i   i    p  p ,i 
                 
                              p i 1
Least Squares method
 First grade linear systems
                             0 x   1
  Model        y  ax  b  
                             1 x   x
                                                   0  x   1
                                                                  m
                               
    Orthogonalization         
                                             1   0           x 1
                               1 x   x                 x m
                                                                  j 1
                                                                          xx
                                              0   0         1 1
                               
                                                                  j 1


                                                                            x             
                                                m                          m

                                                1  y     j                       j    x  yj
    Orth. Model parameters             0    j 1
                                                                   1    j 1


                                                                             x                
                                                   m                          m

                                                1 1
                                                                                                2
                                                                                       j   x
                                                 j 1                       j 1

    Orthogonal model                         
                                y   0 1  1  x  x       
Least Squares method
 First grade linear systems

                                     0 x   1
    Model              y  ax  b  
                                     1 x   x

    Orthogonal model                 
                                         
                        y   0 1  1  x  x   

                         
                              1  1
    Model parameters             
                          0   0  11,0 
                         
Exercise 6: Linear LS

    A rubber to metal device has been tested
     in order to assess its longitudinal
     stiffness obtaining the following results:
      Length   Force applied
        mm           N
       50.56         0
       50.87        50
       51.06        75
       50.90        100
       51.14        150
       50.86        200
       51.37        300
       51.69        400
       52.75        500
       52.40        600
       53.52        700
       53.98        800
Exercise 7: Linear LS (2nd grade)
    A bullet is shot at a unknown angle and then its
     distance (along the firing axis) is measured using an
     high-speed camera. Its initial velocity has to be
     determined, as well as its deceleration value.
     time    position (x)                       25.000
       s          m
     0.000     1.404                            20.000
     0.001     1.100
                            Force Applied [N]




     0.002     1.985                            15.000
     0.005     2.307
     0.010     2.781                            10.000
     0.020     3.112
     0.030     4.815                             5.000
     0.040     5.670
     0.050     6.002                             0.000
                                                     0.000   0.050   0.100       0.150   0.200   0.250
     0.100     11.269                                                   Length [mm]
     0.150     16.623
     0.200     21.146

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:0
posted:5/2/2013
language:Unknown
pages:14